businessAnchor.vue 9.0 KB

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