[开通节点模块样式调整及底部按钮状态处理及申请状态处理及支未完付]
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<view class="examine-name">
|
||||
提交成功,请耐心等待~
|
||||
</view>
|
||||
<view class="examine-cont" @click="$Router.push({name: 'User'})">
|
||||
<view class="examine-cont" @click="toUser">
|
||||
我知道了
|
||||
</view>
|
||||
</view>
|
||||
@@ -13,6 +13,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods:{
|
||||
toUser(){
|
||||
console.log('trule')
|
||||
uni.switchTab({
|
||||
url:'/pages/user/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -3,11 +3,23 @@
|
||||
<!-- 上传凭证弹出 -->
|
||||
<view class="canBack" v-if="canForm"></view>
|
||||
<view class="canPop" v-if="canForm">
|
||||
<image class="canPop-tips" @click="canClick" src="/static/user/order-cancelPay.png" mode="widthFix"></image>
|
||||
<view class="canPop-cont">上传打款凭证</view>
|
||||
<image class="canPop-cover" :src="canFromImg.showpath || require('@/static/icons/add-icon.png')"
|
||||
@click="updImg()" mode="aspectFill"></image>
|
||||
<view class="canPop-btn" @click="canSubmit">提交</view>
|
||||
<block v-if="voucher">
|
||||
<image class="canPop-tips" @click="canClick" src="/static/user/order-cancelPay.png" mode="widthFix"></image>
|
||||
<view class="canPop-cont">打款凭证</view>
|
||||
<image class="canPop-cover" v-if="voucher.status.value === 3" :src="canFromImg.showpath || require('@/static/icons/add-icon.png')" @click="updImg()" mode="aspectFill" />
|
||||
<image class="canPop-cover" v-else :src="canFromImg.showpath || require('@/static/icons/add-icon.png')" @click="preImg()" mode="aspectFill" />
|
||||
<view class="canPop-status">状态:{{voucher.status.text}}</view>
|
||||
<view class="canPop-remark" v-if="voucher.remark && voucher.status.value === 3">驳回原因:{{voucher.remark}}</view>
|
||||
<view class="canPop-btn" v-if="voucher.status.value === 3" @click="canSubmitEdit(voucher.voucher_id)">重新提交</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<image class="canPop-tips" @click="canClick" src="/static/user/order-cancelPay.png" mode="widthFix"></image>
|
||||
<view class="canPop-cont">上传打款凭证</view>
|
||||
<image class="canPop-cover" :src="canFromImg.showpath || require('@/static/icons/add-icon.png')"
|
||||
@click="updImg()" mode="aspectFill"></image>
|
||||
<view class="canPop-btn" @click="canSubmit">提交</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
|
||||
<swiper class="vip-container" previous-margin="55rpx" next-margin="55rpx" :current="tabsIndex" circular
|
||||
@@ -86,18 +98,22 @@
|
||||
</view>
|
||||
|
||||
<!-- 用户协议 -->
|
||||
<view class="agree">
|
||||
<view class="agree" v-if="identitie[tabsIndex].can.show_button">
|
||||
<view class="agree-tips" @click="$Router.push({ name: 'vipAgree', params: { type: 'vipAgree' } })">
|
||||
请仔细阅读并确认服务协议</view>
|
||||
</view>
|
||||
<view class="agree-btn" @click="agreeChange">
|
||||
<view class="agree-btn" @click="agreeChange" v-if="identitie[tabsIndex].can.show_button">
|
||||
<radio :checked="selected" style="transform: scale(.7);" color="#7c52fc"></radio>
|
||||
会员服务协议
|
||||
</view>
|
||||
|
||||
<!-- 开通按钮 -->
|
||||
<view class="footer">
|
||||
<image class="footer-btn" :src="identitie[tabsIndex].button_cover" mode="widthFix" @click="openOrder" />
|
||||
<view class="footer" >
|
||||
<image class="footer-btn" v-if="identitie[tabsIndex].can.show_button && voucher === ''"
|
||||
:src="identitie[tabsIndex].button_cover" mode="widthFix" @click="openOrder" />
|
||||
<view class="current-btn-sh" v-if="identitie[tabsIndex].can.show_button && voucher !== ''" @click="openOrder" >{{voucher.status.value === 1?'申请审核中':''}}{{voucher.status.value === 3?'申请被驳回查看原因':''}}</view>
|
||||
<view class="current-btn-sh" v-if="!identitie[tabsIndex].can.show_button && voucher === ''"> 当前不可开通</view>
|
||||
<view class="current-btn" v-if="currentInfo.identity.identity_id === identitie[tabsIndex].identity_id">当前身份</view>
|
||||
<!-- <button class="footer-btn" type="default" >
|
||||
<view class="footer-btn-num">
|
||||
合计:{{total}}
|
||||
@@ -116,6 +132,7 @@
|
||||
vipOrder,
|
||||
vipWechatPay,
|
||||
vipCont,
|
||||
vipVoucherUpdate,
|
||||
vipVoucher
|
||||
} from '@/apis/interfaces/vip';
|
||||
import {
|
||||
@@ -143,12 +160,13 @@
|
||||
showpath: '',
|
||||
path: ''
|
||||
},
|
||||
openCondition: {}
|
||||
};
|
||||
openCondition: {},
|
||||
voucher:'', //弹窗展示得内容
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 获取当前用户信息
|
||||
this.idenInfo('cre');
|
||||
this.idenInfo('cre')
|
||||
|
||||
},
|
||||
methods: {
|
||||
@@ -157,9 +175,7 @@
|
||||
identities().then(res => {
|
||||
console.log(res, 'res。。。获取身份详情')
|
||||
res.identities.map(item => {
|
||||
item.obj_condition = new Object();
|
||||
console.log(item.get_condition.length > 0)
|
||||
|
||||
item.obj_condition = new Object()
|
||||
for (let val of item.get_condition) {
|
||||
item.obj_condition[val.name] = {
|
||||
message: val.message,
|
||||
@@ -167,33 +183,42 @@
|
||||
};
|
||||
}
|
||||
return item;
|
||||
|
||||
|
||||
|
||||
});
|
||||
this.identitie = res.identities;
|
||||
this.identitie = res.identities
|
||||
if (type === 'cre') {
|
||||
this.tabsIndex = res.identities.findIndex(val => val.identity_id == this.$Route.query
|
||||
.identity_id)
|
||||
this.tabsIndex = res.identities.findIndex(val => val.identity_id == this.$Route.query.identity_id)
|
||||
}
|
||||
this.openCondition = res.identities[this.tabsIndex].obj_condition;
|
||||
this.rights = res.identities[this.tabsIndex].rights;
|
||||
this.total = res.identities[this.tabsIndex].price;
|
||||
this.canBtn = res.identities[this.tabsIndex].can;
|
||||
this.openCondition = res.identities[this.tabsIndex].obj_condition
|
||||
this.rights = res.identities[this.tabsIndex].rights
|
||||
this.total = res.identities[this.tabsIndex].price
|
||||
this.canBtn = res.identities[this.tabsIndex].can
|
||||
this.currentInfo = res.user
|
||||
this.loding = false;
|
||||
this.loding = false
|
||||
this.voucher = this.identitie[this.tabsIndex].voucher || ''
|
||||
if(this.voucher){
|
||||
this.canFromImg = this.identitie[this.tabsIndex].voucher.cover
|
||||
}else{
|
||||
this.canFromImg = {
|
||||
path:'',
|
||||
showpath:''
|
||||
}
|
||||
}
|
||||
console.log(this.voucher,'voucher...')
|
||||
console.log(this.canFromImg,'canFromImg...')
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 切换开通身份
|
||||
swiperChange(e) {
|
||||
this.tabsIndex = e.detail.current;
|
||||
this.tabsIndex = e.detail.current
|
||||
// 获取当前用户信息
|
||||
this.idenInfo();
|
||||
this.idenInfo()
|
||||
},
|
||||
|
||||
// 开通会员
|
||||
@@ -208,68 +233,59 @@
|
||||
return;
|
||||
}
|
||||
if (can.on_line) {
|
||||
if (can.buy) {
|
||||
this.wxPayConfig();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: can.message,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
// #ifdef H5
|
||||
this.wxPayH5Config()
|
||||
// #endif
|
||||
//#ifdef APP-PLUS
|
||||
this.wxPayAppConfig()
|
||||
//#endif
|
||||
} else {
|
||||
if (can.buy) {
|
||||
// 上传凭证
|
||||
this.canClick();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: can.message,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
this.canClick()
|
||||
}
|
||||
return;
|
||||
},
|
||||
// 微信支付鉴权
|
||||
wxPayConfig() {
|
||||
wxConfig({
|
||||
url: window.location.href,
|
||||
jsApiList: ['chooseWXPay']
|
||||
}).then(res => {
|
||||
let payConfig = JSON.parse(res);
|
||||
let jweixin = require('jweixin-module');
|
||||
jweixin.ready(() => {
|
||||
// res
|
||||
});
|
||||
jweixin.error(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
jweixin.config({
|
||||
...payConfig
|
||||
});
|
||||
vipOrder(this.identitie[this.tabsIndex].identity_id, {
|
||||
year: this.sumNumber
|
||||
}).then(payId => {
|
||||
this.wechatPay(payId.id, jweixin);
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
// 微信支付鉴权H5
|
||||
wxPayH5Config() {
|
||||
wxConfig({
|
||||
url: window.location.href,
|
||||
jsApiList: ['chooseWXPay']
|
||||
}).then(res => {
|
||||
let payConfig = JSON.parse(res)
|
||||
let jweixin = require('jweixin-module')
|
||||
jweixin.ready(() => {
|
||||
// res
|
||||
})
|
||||
jweixin.error(err => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
jweixin.config({
|
||||
...payConfig
|
||||
})
|
||||
vipOrder(this.identitie[this.tabsIndex].identity_id, {
|
||||
year: this.sumNumber
|
||||
}).then(payId => {
|
||||
this.wechatH5Pay(payId.id, jweixin);
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 微信支付
|
||||
wechatPay(id, wx) {
|
||||
// 微信支付 H5
|
||||
wechatH5Pay(id, wx) {
|
||||
vipWechatPay(id, {
|
||||
type:'mp',
|
||||
openid: this.$store.getters.getCode
|
||||
}).then(payConfig => {
|
||||
wx.chooseWXPay({
|
||||
@@ -299,7 +315,39 @@
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 支付创建订单APP
|
||||
wxPayAppConfig(){
|
||||
let data = {year:1}
|
||||
let identity = this.identitie[this.tabsIndex].identity_id
|
||||
vipOrder(identity,data).then(res=>{
|
||||
console.log(res)
|
||||
this.wechatAppPay(res.id)
|
||||
}).catch(err=>{
|
||||
uni.showToast({
|
||||
title:err.message,
|
||||
icon:"none"
|
||||
})
|
||||
})
|
||||
},
|
||||
// 微信支付 APP
|
||||
wechatAppPay(orderid){
|
||||
let data = {
|
||||
type:'app'
|
||||
}
|
||||
let orderId = orderid
|
||||
console.log(orderId,data)
|
||||
vipWechatPay(orderId,data).then(res=>{
|
||||
console.log('-----------------')
|
||||
console.log(res)
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
uni.showToast({
|
||||
title:err.message,
|
||||
icon:"none"
|
||||
})
|
||||
})
|
||||
},
|
||||
// 勾选协议
|
||||
agreeChange() {
|
||||
this.selected = !this.selected;
|
||||
@@ -311,7 +359,7 @@
|
||||
title: title,
|
||||
content: val,
|
||||
showCancel: false
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
// 上传打款凭证图片
|
||||
@@ -330,10 +378,18 @@
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 预览图片
|
||||
preImg(){
|
||||
console.log('袁兰图片')
|
||||
uni.previewImage({
|
||||
current:this.voucher.cover.showpath,
|
||||
urls:[this.voucher.cover.showpath]
|
||||
})
|
||||
},
|
||||
|
||||
// 打款凭证弹出状态
|
||||
@@ -351,16 +407,34 @@
|
||||
}).then(res => {
|
||||
this.$Router.push({
|
||||
name: 'Examine'
|
||||
});
|
||||
})
|
||||
this.canForm = !this.canForm
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
})
|
||||
})
|
||||
},
|
||||
// 编辑凭证
|
||||
canSubmitEdit(id){
|
||||
let newCover = this.canFromImg.path
|
||||
vipVoucherUpdate(id,{
|
||||
cover: newCover
|
||||
}).then(res => {
|
||||
this.$Router.push({
|
||||
name: 'Examine'
|
||||
})
|
||||
this.canForm = !this.canForm
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@@ -406,11 +480,18 @@
|
||||
}
|
||||
|
||||
.canPop-cover {
|
||||
margin: 60rpx auto 40rpx;
|
||||
margin: 40rpx auto 20rpx auto;
|
||||
width: 240rpx;
|
||||
height: 240rpx;
|
||||
border: 2rpx solid #f3f3f3;
|
||||
}
|
||||
.canPop-remark{
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.canPop-status{
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.canPop-btn {
|
||||
text-align: center;
|
||||
@@ -621,6 +702,26 @@
|
||||
.footer-btn {
|
||||
width: 74%;
|
||||
}
|
||||
.current-btn{
|
||||
width: 74%;
|
||||
height: 80rpx;
|
||||
background-image: linear-gradient(to right, #7c52fc, #976dff);
|
||||
color: #fff;
|
||||
margin-left: 13%;
|
||||
border-radius: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
.current-btn-sh{
|
||||
background-color: #cacaca;
|
||||
width: 74%;
|
||||
height: 80rpx;
|
||||
color: #fff;
|
||||
margin-left: 13%;
|
||||
border-radius: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
// 会员权限
|
||||
|
||||
Reference in New Issue
Block a user