| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462 |
- <template>
- <view class="content">
- <view class="main">
- <!-- <view class="tilte">
- 开通智播会员网店
- </view> -->
- <scroll-view scroll-y="true" class="img-box">
- <image class="img" v-for="item in imgList" :src="item" mode="widthFix"></image>
- <image class="qm" :src="name" mode="aspectFit"></image>
- </scroll-view>
- <!-- @click="navTo('/pages/freeShop/success')" -->
- <!-- <view class="btn1" v-if="shop_lv >= 2">
- 已有创业网店
- </view> -->
- <view class="btn-box">
- <view class="btn1" v-if="istrue" >
- 已签约
- </view>
- <view class="btn" v-else @click="submit" >
- 确认申请
- </view>
- </view>
- </view>
- <uni-popup ref="tiaozhuan" type="center" @click="close">
- <view class="ts">
- <image src="../../static/img/shopBg.png" ></image>
- <view class="title">选择开通</view>
- <view class="con">请选择开通身份</view>
- <view class="vipBox flex" >
- <!-- <view class="left"> -->
- <view class="zftype flex">
- <view class="left">
- <image class="image1" src="../../static/img/ffVip.png" mode="aspectFill"></image>
- <view class="zf">个人开通</view>
- </view>
-
- <switch :checked="check == 1" @change="changePayType('/pages/freeShop/enterprise',1)" color="#FE4141" style="transform:scale(0.7)" />
- </view>
- <view class="zftype flex">
- <view class="left">
- <image class="image2" src="../../static/img/cyzb.png" mode="aspectFill"></image>
- <view class="zf">企业开通</view>
- </view>
- <switch :checked="check == 2" @change="changePayType('/pages/anchor/dredge',2)" color="#FE4141" style="transform:scale(0.7)" />
- </view>
- <!-- </view> -->
- <view class="right">
- <!-- <label class="radio" @click="changePayType('/pages/anchor/commonVip',1)"> -->
- <!-- <switch :checked="check == 1" @change="changePayType('/pages/anchor/commonVip',1)" color="#FE4141" style="transform:scale(0.7)" /> -->
- <!-- <radio style="transform:scale(0.7)" value="" :checked="check == 1" color="#FE4141"></radio> -->
- <!-- </label> -->
- <!-- <label class="radio" @click="changePayType('/pages/anchor/dredge',2)"> -->
- <!-- <switch :checked="check == 2" @change="changePayType('/pages/anchor/dredge',2)" color="#FE4141" style="transform:scale(0.7)" /> -->
- <!-- <radio style="transform:scale(0.7)" class="rad" value="" :checked="check == 2" color="#FE4141"></radio> -->
- <!-- </label> -->
- </view>
- </view>
- <view class="btn" @click="nav()">
- 立即开通
- </view>
-
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import { getSign, setSign, uploadSign } from '@/api/contract.js';
- import { mapState, mapMutations } from 'vuex';
- import uniPopup from '@/components/uni-popup/uni-popup.vue';
- import { apply } from '@/api/apply.js';
- export default{
- compontents: {
- uniPopup
- },
- computed: {
- ...mapState(['userInfo']),
- shop_lv(){
- if(this.userInfo.store_info){
- return this.userInfo.store_info.type;
- }
- else{
- return 0;
- }
- }
- },
- data(){
- return{
- istrue: false,
- name: '',
- allChecked: false, //全选状态 true|false
- imgList: [],
- payName: 'weixin',
- to_phone: '',
- check: 1,
- url:'/pages/anchor/commonVip'
- }
- },
- onLoad() {
- this.loadData()
- },
- methods:{
- async loadData(){
- const obj = this;
- getSign({},1).then(({data})=>{
- console.log('获取合同内容',data)
- this.imgList = data.pictures
- this.id = data.id
- });
- getSign({},1,this.userInfo.uid)
- .then(src => {
- console.log("1111111",src);
- if(src.data.user_info){
- if(src.data.user_info.sign){
- obj.istrue = true;
- obj.name = src.data.user_info.sign;
- }
- }
- })
- .catch(err => {
- console.log(err);
- })
- },
- submit(){
- let obj = this
- if(obj.userInfo.level < 1){
- console.log(obj.userInfo.level);
- uni.showModal({
- title: '友情提示',
- // content: '您当前不是付费会员或创业主播是否前往申请',
- content: '您当前不是付费会员是否前往申请',
- success: res => {
- if (res.confirm) {
- uni.navigateTo({
- url: '/pages/anchor/commonVip'
- })
- // this.$refs.tiaozhuan.open();
- console.log('用户点击确定');
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- // uni.navigateTo({
- // url: "/pages/anchor/dredge"
- // })
- }
- else{
- uni.navigateTo({
- url: "/pages/contract/contract?type=1"
- })
- }
- // this.$refs.popup.open();
- },
- changePayType(url,type){
- console.log(url)
- this.url = url;
- this.check = type;
- },
- nav(){
- uni.navigateTo({
- url: this.url
- })
- },
- // qx(){
- // this.$refs.tiaozhuan.close();
- // },
- // nav(){
- // uni.navigateTo({
- // url: "/pages/anchor/dredge"
- // })
- // },
- // comfirm1:function () {
- // let obj = this
- // if(obj.userInfo.level < 2){
- // console.log(obj.userInfo.level);
- // uni.navigateTo({
- // url: "/pages/anchor/dredge"
- // })
- // }
- // if ( obj.to_phone.toString().trim() == '' ){
- // obj.$api.msg('请填写正确的手机号码');
-
- // } else {
- // console.log('obj.to_phone1111',obj.to_phone)
- // const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
- // if (!reg.test(obj.to_phone)) {
- // obj.$api.msg('请填写正确的手机号码');
- // return;
- // }
- // if(this.shop_lv >= 2){
- // getSign({},1,this.userInfo.uid)
- // .then(src => {
- // console.log("1111111",src);
- // })
- // .catch(err => {
- // console.log("222222",err);
- // })
- // }else {
- // apply({
- // name: obj.userInfo.nickname + "的网店",
- // introduction: obj.userInfo.nickname + "的网店",
- // image: obj.userInfo.avatar,
- // phone: obj.to_phone || '',
- // type: 2})
- // .then(({ data }) =>{
- // this.$refs.popup.close();
- // console.log(data)
- // uni.navigateTo({
- // url:'/pages/contract/contract?type=2'
- // });
- // })
- // .catch((err) => {
- // this.$refs.popup.close();
- // if(this.userInfo.level < 2){
- // this.$refs.tiaozhuan.open();
- // }
- // })
- // }
- // }
- // },
- // submit(url){
- // apply({name: this.userInfo.nickname + "的网店",
- // introduction: this.userInfo.nickname + "的网店",
- // image: this.userInfo.avatar,
- // phone: this.userInfo.phone,
- // type: 2})
- // .then(({ data }) =>{
- // console.log(data)
- // uni.navigateTo({
- // url
- // });
- // })
- // .catch((err) => {
- // console.log(err);
- // })
- // },
- }
- }
- </script>
- <style lang="scss">
- .content{
- width: 100%;
- height: 100%;
- background-color: #FFFFFF;
- }
- .img-box{
- // padding: 0 24rpx;
- // margin-top: 30rpx;
- width: 100%;
- display: flex;
- flex-direction: column;
- position: relative;
- .img{
- width: 100%;
- height: 1035rpx;
- }
- }
- .tilte{
- font-size: 34rpx;
- font-weight: 400;
- color: #333333;
- line-height: 40rpx;
- text-align: center;
- padding: 16rpx 0 0;
- }
- .qm {
- width: 310rpx;
- height: 128rpx;
- position: absolute;
- bottom: 200rpx;
- left: 239rpx;
- // z-index: 999;
- }
- // .details{
- // padding: 12rpx 24rpx 24rpx;
- // text-indent: 44rpx;
- // font-size: 26rpx;
- // line-height: 40rpx;
- // }
- .btn-box{
- padding-bottom: 30rpx;
- .btn{
- width: 674rpx;
- height: 88rpx;
- background: linear-gradient(180deg, #FD4646, #FF3535);
- border-radius: 44rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #FFFFFF;
- margin: 0rpx auto;
- margin-top: 180rpx;
- font-size: 36rpx;
- }
- .btn1{
- width: 674rpx;
- height: 88rpx;
- background: #b1b1b1;
- border-radius: 44rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #FFFFFF;
- margin: 0rpx auto;
- margin-top: 180rpx;
- font-size: 36rpx;
- }
- }
- .buttom {
- width: 100%;
- height: 113rpx;
- padding-top: 20rpx;
- align-items: center;
- .heji {
- height: 100%;
- width: 50%;
- padding-left: 23rpx;
- padding-top: 20rpx;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #3F454B;
- text {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FF0000;
- .money {
- font-size: 36rpx;
- }
- }
- }
- .zhifu {
- width: 50%;
- height: 92rpx;
- background: linear-gradient(180deg, #FD4646, #FF3535);
- text-align: center;
- line-height: 92rpx;
- font-size: 32rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FFFFFF;
- }
- }
- .right .checkalls.checked {
- color: #FD4343;
- background:#FFFFFF;
- }
-
- .ts{
- // margin-top: 108rpx;
- height: 575rpx;
- width: 542rpx;
- border-radius: 25rpx;
- background-color: #FFFFFF;
- z-index: 999;
- image{
- position: relative;
- width: 100%;
- height: 144rpx;
- }
- .title {
- margin-top: -100rpx;
- text-align: center;
- font-size: 36rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #000000;
- position: relative;
- z-index: 10;
- }
- .con {
- position: relative;
- text-align: center;
- z-index: 10;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #808080;
- }
- .vipBox {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- padding: 0rpx 42rpx 32rpx 51rpx;
- .left{
- width: 100%;
- }
- .type {
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- }
- .zftype {
- width: 100%;
- display: flex;
- justify-content: space-between;
- .left{
- display: flex;
- align-items: center;
- }
- margin-top: 54rpx;
- .image1 {
- width: 44rpx;
- height: 38rpx;
- }
- .image2 {
- width: 46rpx;
- height: 44rpx;
- }
- .zf {
- padding-left: 18rpx;
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #000000;
- }
- }
- .right {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: center;
- .radio {
- margin-top: 61rpx;
- }
- }
- }
- .btn {
- width: 80%;
- text-align: center;
- margin: 0 auto;
- margin-top: 60rpx;
- height: 66rpx;
- line-height: 66rpx;
- background: #FF3737;
- box-shadow: 0rpx 16rpx 16rpx 0rpx rgba(249, 98, 105, 0.5);
- border-radius: 5rpx;
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- }
- }
- .icon-checked-box {
- border-radius: 50rpx;
- background-color: #ffffff;
- width: 52rpx;
- height: 100%;
- position: relative;
- z-index: 5;
- font-size: 53rpx;
- line-height: 1;
- color: $font-color-light;
- }
- .icon-checked {
- color: $base-color;
- }
- </style>
|