anchorSelection.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <template>
  2. <view class="content">
  3. <!-- 主播头部 -->
  4. <view class="goback-box" @click="goback"><image class="goback" src="https://37shop.liuniu946.com/front/img/fanhui.png" mode=""></image></view>
  5. <view class="header">申请主播选品</view>
  6. <view class="anchor-top"><image src="https://zhibo.liuniu946.com/img/anchor3.png" mode=""></image></view>
  7. <!-- 立刻申请 -->
  8. <view class="anchor-box">
  9. <view class="anchor-buttom">
  10. <view class="dredge-box">
  11. <view class="dredge">
  12. <view class="icon"><image src="https://zhibo.liuniu946.com/img/anchor1.png" mode=""></image></view>
  13. <view class="text"><input v-model="liveData.account" type="text" placeholder="请填写直播账号" /></view>
  14. </view>
  15. <view class="dredge">
  16. <view class="icon"><image src="https://zhibo.liuniu946.com/img/anchor1.png" mode=""></image></view>
  17. <view class="text"><input v-model="liveData.amountOfFans" type="number" placeholder="请填写账号粉丝量" /></view>
  18. </view>
  19. <view class="dredge">
  20. <view class="icon"><image src="https://zhibo.liuniu946.com/img/anchor2.png" mode=""></image></view>
  21. <view class="text"><input v-model="liveData.platform" type="text" placeholder="请填写直播平台" /></view>
  22. </view>
  23. </view>
  24. <view class="judge">
  25. <view class="left">
  26. <view class="icon"><image src="https://zhibo.liuniu946.com/img/anchor2.png" mode=""></image></view>
  27. <view class="text">是否开通直播带货</view>
  28. <!-- <label class="checkbox">
  29. <text>是</text>
  30. <checkbox value="true" checked="checked" />
  31. <text>否</text>
  32. <checkbox value="false" />
  33. </label> -->
  34. <!-- <label class="radio" style="transform:scale(0.7);" >
  35. <text>是</text>
  36. <radio value="1" :checked='sex == 1' color="#fd4646" style="margin: 0 20rpx;" />
  37. <text>否</text>
  38. <radio value="2" :checked='sex == 2' color="#fd4646" style="margin: 0 20rpx;" />
  39. </label> -->
  40. <label class="radio" @click="changePayType(true)" style="transform:scale(0.7);margin: 0 30rpx;">
  41. <text style="font-size: 44rpx;">是</text>
  42. <radio value="1" :checked="liveData.payType == true" color="#fd4646" style="margin: 0 10rpx;"></radio>
  43. </label>
  44. <label class="radio" @click="changePayType(false)" style="transform:scale(0.7);margin: 0 30rpx;">
  45. <text style="font-size: 44rpx;">否</text>
  46. <radio class="rad" value="2" :checked="liveData.payType == false" color="#fd4646" style="margin: 0 10rpx;"></radio>
  47. </label>
  48. </view>
  49. </view>
  50. <view class="buttom">
  51. <!-- <view class="apply" @click="confirm">立刻申请</view> -->
  52. <view class="apply" v-if="userInfo.level != 3" @click="confirm">立刻申请</view>
  53. <view class="apply1" v-else>已开通</view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. <script>
  60. import { mapState, mapMutations } from 'vuex';
  61. import { openTheHost } from '@/api/anchor.js';
  62. export default {
  63. computed: {
  64. ...mapState(['userInfo']),
  65. },
  66. data() {
  67. return {
  68. liveData: {
  69. account: '', //直播账号
  70. amountOfFans: '', //粉丝量
  71. platform: '', //直播平台
  72. payType: true //判断是否openTheHost
  73. }
  74. };
  75. },
  76. methods: {
  77. goback() {
  78. uni.switchTab({
  79. url: '../user/user'
  80. });
  81. },
  82. onLoad(option) {},
  83. //数据校验
  84. confirm() {
  85. let data = this.liveData;
  86. if (data.account == '') {
  87. uni.showToast({
  88. icon:'none',
  89. title: '请输入直播账号'})
  90. return;
  91. }
  92. if (data.amountOfFans == '') {
  93. uni.showToast({
  94. icon:'none',
  95. title: '请填写账号粉丝量'})
  96. return;
  97. }
  98. if (data.platform == '') {
  99. uni.showToast({
  100. icon:'none',
  101. title: '请填写直播平台'})
  102. return;
  103. }
  104. console.log(123);
  105. openTheHost({
  106. payType: 'offline',
  107. // make: JSON.stringify(data),
  108. make: data,
  109. apply_level: 3
  110. }).then(({ data }) => {
  111. console.log('------', data);
  112. uni.navigateTo({
  113. url:'../wallet/tjSuccess'
  114. })
  115. });
  116. },
  117. changePayType(type) {
  118. this.liveData.payType = type;
  119. },
  120. radioChange(e) {
  121. console.log('type:' + e.detail.value);
  122. this.sex = e.detail.value;
  123. }
  124. }
  125. };
  126. </script>
  127. <style lang="scss">
  128. .content {
  129. width: 750rpx;
  130. height: 100%;
  131. position: relative;
  132. .header {
  133. margin-top: var(--status-bar-height);
  134. position: absolute;
  135. left: 0;
  136. top: 0;
  137. width: 100%;
  138. height: 80rpx;
  139. font-size: 32rpx;
  140. font-weight: 700;
  141. z-index: 99;
  142. display: flex;
  143. justify-content: center;
  144. align-items: center;
  145. color: #fff;
  146. }
  147. .goback-box {
  148. margin-top: var(--status-bar-height);
  149. position: absolute;
  150. left: 18rpx;
  151. top: 0;
  152. height: 80rpx;
  153. display: flex;
  154. align-items: center;
  155. }
  156. .goback {
  157. z-index: 100;
  158. width: 34rpx;
  159. height: 34rpx;
  160. }
  161. .anchor-top {
  162. width: 750rpx;
  163. height: 400rpx;
  164. background-color: pink;
  165. image {
  166. width: 750rpx;
  167. height: 400rpx;
  168. }
  169. }
  170. .anchor-box {
  171. width: 100%;
  172. position: absolute;
  173. left: 0;
  174. top: 340rpx;
  175. display: flex;
  176. justify-content: center;
  177. }
  178. .anchor-buttom {
  179. // margin: 0 auto;
  180. width: 702rpx;
  181. height: 695rpx;
  182. background: #ffffff;
  183. border-radius: 20px;
  184. z-index: 9;
  185. .dredge-box {
  186. padding: 99rpx 0 0 89rpx;
  187. .dredge {
  188. padding-bottom: 55rpx;
  189. display: flex;
  190. // flex-direction: row;
  191. align-items: center;
  192. .icon {
  193. width: 29rpx;
  194. height: 35rpx;
  195. image {
  196. width: 29rpx;
  197. height: 35rpx;
  198. }
  199. }
  200. .text {
  201. font-size: 28rpx;
  202. font-family: PingFang SC;
  203. font-weight: 500;
  204. color: #999999;
  205. margin-bottom: 2rpx;
  206. padding-left: 20rpx;
  207. }
  208. }
  209. }
  210. .judge {
  211. .left {
  212. display: flex;
  213. align-items: center;
  214. padding: 100rpx 0 0 89rpx;
  215. margin-top: -130rpx;
  216. .icon {
  217. width: 29rpx;
  218. height: 35rpx;
  219. image {
  220. width: 29rpx;
  221. height: 35rpx;
  222. }
  223. }
  224. .text {
  225. font-size: 28rpx;
  226. font-weight: 500;
  227. color: #333333;
  228. line-height: 114rpx;
  229. margin-bottom: 2rpx;
  230. padding-left: 20rpx;
  231. }
  232. }
  233. .radio {
  234. display: flex;
  235. align-items: center;
  236. margin-left: 32rpx;
  237. width: 26rpx;
  238. height: 25rpx;
  239. font-size: 28rpx;
  240. font-family: PingFang SC;
  241. font-weight: 500;
  242. color: #999999;
  243. }
  244. }
  245. .buttom {
  246. display: flex;
  247. justify-content: center;
  248. align-items: center;
  249. margin-top: 60rpx;
  250. .apply {
  251. display: flex;
  252. justify-content: center;
  253. align-items: center;
  254. font-size: 30rpx;
  255. font-weight: 500;
  256. color: #ffffff;
  257. width: 560rpx;
  258. height: 80rpx;
  259. background: linear-gradient(180deg, #fd4646, #ff3535);
  260. border-radius: 40rpx;
  261. }
  262. .apply1 {
  263. display: flex;
  264. justify-content: center;
  265. align-items: center;
  266. font-size: 30rpx;
  267. font-weight: 500;
  268. color: #ffffff;
  269. width: 560rpx;
  270. height: 80rpx;
  271. background: #b5b5b5;
  272. border-radius: 40rpx;
  273. }
  274. }
  275. }
  276. }
  277. </style>