business.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  1. <template>
  2. <view class="content">
  3. <view class="main">
  4. <!-- <view class="tilte">
  5. 开通智播会员网店
  6. </view> -->
  7. <scroll-view scroll-y="true" class="img-box">
  8. <image class="img" v-for="item in imgList" :src="item" mode="widthFix"></image>
  9. <image class="qm" :src="name" mode="aspectFit"></image>
  10. </scroll-view>
  11. <!-- @click="navTo('/pages/freeShop/success')" -->
  12. <!-- <view class="btn1" v-if="shop_lv >= 2">
  13. 已有创业网店
  14. </view> -->
  15. <view class="btn-box">
  16. <view class="btn1" v-if="istrue" >
  17. 已签约
  18. </view>
  19. <view class="btn" v-else @click="submit" >
  20. 确认申请
  21. </view>
  22. </view>
  23. </view>
  24. <uni-popup ref="tiaozhuan" type="center" @click="close">
  25. <view class="ts">
  26. <image src="../../static/img/shopBg.png" ></image>
  27. <view class="title">选择开通</view>
  28. <view class="con">请选择开通身份</view>
  29. <view class="vipBox flex" >
  30. <!-- <view class="left"> -->
  31. <view class="zftype flex">
  32. <view class="left">
  33. <image class="image1" src="../../static/img/ffVip.png" mode="aspectFill"></image>
  34. <view class="zf">个人开通</view>
  35. </view>
  36. <switch :checked="check == 1" @change="changePayType('/pages/freeShop/enterprise',1)" color="#FE4141" style="transform:scale(0.7)" />
  37. </view>
  38. <view class="zftype flex">
  39. <view class="left">
  40. <image class="image2" src="../../static/img/cyzb.png" mode="aspectFill"></image>
  41. <view class="zf">企业开通</view>
  42. </view>
  43. <switch :checked="check == 2" @change="changePayType('/pages/anchor/dredge',2)" color="#FE4141" style="transform:scale(0.7)" />
  44. </view>
  45. <!-- </view> -->
  46. <view class="right">
  47. <!-- <label class="radio" @click="changePayType('/pages/anchor/commonVip',1)"> -->
  48. <!-- <switch :checked="check == 1" @change="changePayType('/pages/anchor/commonVip',1)" color="#FE4141" style="transform:scale(0.7)" /> -->
  49. <!-- <radio style="transform:scale(0.7)" value="" :checked="check == 1" color="#FE4141"></radio> -->
  50. <!-- </label> -->
  51. <!-- <label class="radio" @click="changePayType('/pages/anchor/dredge',2)"> -->
  52. <!-- <switch :checked="check == 2" @change="changePayType('/pages/anchor/dredge',2)" color="#FE4141" style="transform:scale(0.7)" /> -->
  53. <!-- <radio style="transform:scale(0.7)" class="rad" value="" :checked="check == 2" color="#FE4141"></radio> -->
  54. <!-- </label> -->
  55. </view>
  56. </view>
  57. <view class="btn" @click="nav()">
  58. 立即开通
  59. </view>
  60. </view>
  61. </uni-popup>
  62. </view>
  63. </template>
  64. <script>
  65. import { getSign, setSign, uploadSign } from '@/api/contract.js';
  66. import { mapState, mapMutations } from 'vuex';
  67. import uniPopup from '@/components/uni-popup/uni-popup.vue';
  68. import { apply } from '@/api/apply.js';
  69. export default{
  70. compontents: {
  71. uniPopup
  72. },
  73. computed: {
  74. ...mapState(['userInfo']),
  75. shop_lv(){
  76. if(this.userInfo.store_info){
  77. return this.userInfo.store_info.type;
  78. }
  79. else{
  80. return 0;
  81. }
  82. }
  83. },
  84. data(){
  85. return{
  86. istrue: false,
  87. name: '',
  88. allChecked: false, //全选状态 true|false
  89. imgList: [],
  90. payName: 'weixin',
  91. to_phone: '',
  92. check: 1,
  93. url:'/pages/anchor/commonVip'
  94. }
  95. },
  96. onLoad() {
  97. this.loadData()
  98. },
  99. methods:{
  100. async loadData(){
  101. const obj = this;
  102. getSign({},1).then(({data})=>{
  103. console.log('获取合同内容',data)
  104. this.imgList = data.pictures
  105. this.id = data.id
  106. });
  107. getSign({},1,this.userInfo.uid)
  108. .then(src => {
  109. console.log("1111111",src);
  110. if(src.data.user_info){
  111. if(src.data.user_info.sign){
  112. obj.istrue = true;
  113. obj.name = src.data.user_info.sign;
  114. }
  115. }
  116. })
  117. .catch(err => {
  118. console.log(err);
  119. })
  120. },
  121. submit(){
  122. let obj = this
  123. if(obj.userInfo.level < 1){
  124. console.log(obj.userInfo.level);
  125. uni.showModal({
  126. title: '友情提示',
  127. // content: '您当前不是付费会员或创业主播是否前往申请',
  128. content: '您当前不是付费会员是否前往申请',
  129. success: res => {
  130. if (res.confirm) {
  131. uni.navigateTo({
  132. url: '/pages/anchor/commonVip'
  133. })
  134. // this.$refs.tiaozhuan.open();
  135. console.log('用户点击确定');
  136. } else if (res.cancel) {
  137. console.log('用户点击取消');
  138. }
  139. }
  140. });
  141. // uni.navigateTo({
  142. // url: "/pages/anchor/dredge"
  143. // })
  144. }
  145. else{
  146. uni.navigateTo({
  147. url: "/pages/contract/contract?type=1"
  148. })
  149. }
  150. // this.$refs.popup.open();
  151. },
  152. changePayType(url,type){
  153. console.log(url)
  154. this.url = url;
  155. this.check = type;
  156. },
  157. nav(){
  158. uni.navigateTo({
  159. url: this.url
  160. })
  161. },
  162. // qx(){
  163. // this.$refs.tiaozhuan.close();
  164. // },
  165. // nav(){
  166. // uni.navigateTo({
  167. // url: "/pages/anchor/dredge"
  168. // })
  169. // },
  170. // comfirm1:function () {
  171. // let obj = this
  172. // if(obj.userInfo.level < 2){
  173. // console.log(obj.userInfo.level);
  174. // uni.navigateTo({
  175. // url: "/pages/anchor/dredge"
  176. // })
  177. // }
  178. // if ( obj.to_phone.toString().trim() == '' ){
  179. // obj.$api.msg('请填写正确的手机号码');
  180. // } else {
  181. // console.log('obj.to_phone1111',obj.to_phone)
  182. // const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
  183. // if (!reg.test(obj.to_phone)) {
  184. // obj.$api.msg('请填写正确的手机号码');
  185. // return;
  186. // }
  187. // if(this.shop_lv >= 2){
  188. // getSign({},1,this.userInfo.uid)
  189. // .then(src => {
  190. // console.log("1111111",src);
  191. // })
  192. // .catch(err => {
  193. // console.log("222222",err);
  194. // })
  195. // }else {
  196. // apply({
  197. // name: obj.userInfo.nickname + "的网店",
  198. // introduction: obj.userInfo.nickname + "的网店",
  199. // image: obj.userInfo.avatar,
  200. // phone: obj.to_phone || '',
  201. // type: 2})
  202. // .then(({ data }) =>{
  203. // this.$refs.popup.close();
  204. // console.log(data)
  205. // uni.navigateTo({
  206. // url:'/pages/contract/contract?type=2'
  207. // });
  208. // })
  209. // .catch((err) => {
  210. // this.$refs.popup.close();
  211. // if(this.userInfo.level < 2){
  212. // this.$refs.tiaozhuan.open();
  213. // }
  214. // })
  215. // }
  216. // }
  217. // },
  218. // submit(url){
  219. // apply({name: this.userInfo.nickname + "的网店",
  220. // introduction: this.userInfo.nickname + "的网店",
  221. // image: this.userInfo.avatar,
  222. // phone: this.userInfo.phone,
  223. // type: 2})
  224. // .then(({ data }) =>{
  225. // console.log(data)
  226. // uni.navigateTo({
  227. // url
  228. // });
  229. // })
  230. // .catch((err) => {
  231. // console.log(err);
  232. // })
  233. // },
  234. }
  235. }
  236. </script>
  237. <style lang="scss">
  238. .content{
  239. width: 100%;
  240. height: 100%;
  241. background-color: #FFFFFF;
  242. }
  243. .img-box{
  244. // padding: 0 24rpx;
  245. // margin-top: 30rpx;
  246. width: 100%;
  247. display: flex;
  248. flex-direction: column;
  249. position: relative;
  250. .img{
  251. width: 100%;
  252. height: 1035rpx;
  253. }
  254. }
  255. .tilte{
  256. font-size: 34rpx;
  257. font-weight: 400;
  258. color: #333333;
  259. line-height: 40rpx;
  260. text-align: center;
  261. padding: 16rpx 0 0;
  262. }
  263. .qm {
  264. width: 310rpx;
  265. height: 128rpx;
  266. position: absolute;
  267. bottom: 200rpx;
  268. left: 239rpx;
  269. // z-index: 999;
  270. }
  271. // .details{
  272. // padding: 12rpx 24rpx 24rpx;
  273. // text-indent: 44rpx;
  274. // font-size: 26rpx;
  275. // line-height: 40rpx;
  276. // }
  277. .btn-box{
  278. padding-bottom: 30rpx;
  279. .btn{
  280. width: 674rpx;
  281. height: 88rpx;
  282. background: linear-gradient(180deg, #FD4646, #FF3535);
  283. border-radius: 44rpx;
  284. display: flex;
  285. justify-content: center;
  286. align-items: center;
  287. color: #FFFFFF;
  288. margin: 0rpx auto;
  289. margin-top: 180rpx;
  290. font-size: 36rpx;
  291. }
  292. .btn1{
  293. width: 674rpx;
  294. height: 88rpx;
  295. background: #b1b1b1;
  296. border-radius: 44rpx;
  297. display: flex;
  298. justify-content: center;
  299. align-items: center;
  300. color: #FFFFFF;
  301. margin: 0rpx auto;
  302. margin-top: 180rpx;
  303. font-size: 36rpx;
  304. }
  305. }
  306. .buttom {
  307. width: 100%;
  308. height: 113rpx;
  309. padding-top: 20rpx;
  310. align-items: center;
  311. .heji {
  312. height: 100%;
  313. width: 50%;
  314. padding-left: 23rpx;
  315. padding-top: 20rpx;
  316. font-size: 28rpx;
  317. font-family: PingFang SC;
  318. font-weight: 400;
  319. color: #3F454B;
  320. text {
  321. font-size: 24rpx;
  322. font-family: PingFang SC;
  323. font-weight: bold;
  324. color: #FF0000;
  325. .money {
  326. font-size: 36rpx;
  327. }
  328. }
  329. }
  330. .zhifu {
  331. width: 50%;
  332. height: 92rpx;
  333. background: linear-gradient(180deg, #FD4646, #FF3535);
  334. text-align: center;
  335. line-height: 92rpx;
  336. font-size: 32rpx;
  337. font-family: PingFang SC;
  338. font-weight: bold;
  339. color: #FFFFFF;
  340. }
  341. }
  342. .right .checkalls.checked {
  343. color: #FD4343;
  344. background:#FFFFFF;
  345. }
  346. .ts{
  347. // margin-top: 108rpx;
  348. height: 575rpx;
  349. width: 542rpx;
  350. border-radius: 25rpx;
  351. background-color: #FFFFFF;
  352. z-index: 999;
  353. image{
  354. position: relative;
  355. width: 100%;
  356. height: 144rpx;
  357. }
  358. .title {
  359. margin-top: -100rpx;
  360. text-align: center;
  361. font-size: 36rpx;
  362. font-family: PingFang SC;
  363. font-weight: bold;
  364. color: #000000;
  365. position: relative;
  366. z-index: 10;
  367. }
  368. .con {
  369. position: relative;
  370. text-align: center;
  371. z-index: 10;
  372. font-size: 24rpx;
  373. font-family: PingFang SC;
  374. font-weight: 500;
  375. color: #808080;
  376. }
  377. .vipBox {
  378. display: flex;
  379. flex-direction: column;
  380. justify-content: space-between;
  381. padding: 0rpx 42rpx 32rpx 51rpx;
  382. .left{
  383. width: 100%;
  384. }
  385. .type {
  386. font-size: 28rpx;
  387. font-family: PingFang SC;
  388. font-weight: bold;
  389. color: #333333;
  390. }
  391. .zftype {
  392. width: 100%;
  393. display: flex;
  394. justify-content: space-between;
  395. .left{
  396. display: flex;
  397. align-items: center;
  398. }
  399. margin-top: 54rpx;
  400. .image1 {
  401. width: 44rpx;
  402. height: 38rpx;
  403. }
  404. .image2 {
  405. width: 46rpx;
  406. height: 44rpx;
  407. }
  408. .zf {
  409. padding-left: 18rpx;
  410. font-size: 30rpx;
  411. font-family: PingFang SC;
  412. font-weight: 500;
  413. color: #000000;
  414. }
  415. }
  416. .right {
  417. display: flex;
  418. flex-direction: column;
  419. justify-content: space-between;
  420. align-items: center;
  421. .radio {
  422. margin-top: 61rpx;
  423. }
  424. }
  425. }
  426. .btn {
  427. width: 80%;
  428. text-align: center;
  429. margin: 0 auto;
  430. margin-top: 60rpx;
  431. height: 66rpx;
  432. line-height: 66rpx;
  433. background: #FF3737;
  434. box-shadow: 0rpx 16rpx 16rpx 0rpx rgba(249, 98, 105, 0.5);
  435. border-radius: 5rpx;
  436. font-size: 28rpx;
  437. font-family: PingFang SC;
  438. font-weight: 500;
  439. color: #FFFFFF;
  440. }
  441. }
  442. .icon-checked-box {
  443. border-radius: 50rpx;
  444. background-color: #ffffff;
  445. width: 52rpx;
  446. height: 100%;
  447. position: relative;
  448. z-index: 5;
  449. font-size: 53rpx;
  450. line-height: 1;
  451. color: $font-color-light;
  452. }
  453. .icon-checked {
  454. color: $base-color;
  455. }
  456. </style>