邀请码页面绘制
15
App.vue
@@ -1,7 +1,19 @@
|
||||
<script>
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
console.log('App Launch')
|
||||
if (typeof WeixinJSBridge == 'object' && typeof WeixinJSBridge.invoke == 'function') {
|
||||
handleFontSize();
|
||||
} else {
|
||||
document.addEventListener('WeixinJSBridgeReady', handleFontSize, false);
|
||||
}
|
||||
function handleFontSize() {
|
||||
// 设置网页字体为默认大小
|
||||
WeixinJSBridge.invoke('setFontSizeCallback', { fontSize: 0 });
|
||||
// 重写设置网页字体大小的事件
|
||||
WeixinJSBridge.on('menu:setfont', function() {
|
||||
WeixinJSBridge.invoke('setFontSizeCallback', { fontSize: 0 });
|
||||
});
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
@@ -15,6 +27,7 @@
|
||||
<style>
|
||||
page{
|
||||
background: #F5F5F5;
|
||||
-webkit-text-size-adjust: 100% !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -34,9 +34,6 @@ const request = (parameter) => {
|
||||
'Accept': 'application/json',
|
||||
'Authorization': store.getters.getToken || ''
|
||||
}
|
||||
|
||||
// console.log('parameterDbug', parameter)
|
||||
|
||||
// 加载提示
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
|
||||
@@ -25,9 +25,10 @@ const vipOrder = (id, data) =>{
|
||||
}
|
||||
|
||||
// 开通会员微信支付
|
||||
const vipWechatPay = id => {
|
||||
const vipWechatPay = (id, data) => {
|
||||
return request({
|
||||
url : 'user/identities/pay/' + id + '/wechat'
|
||||
url: 'user/identities/pay/' + id + '/wechat',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -9,13 +9,32 @@
|
||||
|
||||
import { request } from '../index'
|
||||
|
||||
// 微信配置信息
|
||||
const wxConfig = data => {
|
||||
return request({
|
||||
url : 'user/auth/get_jssdk',
|
||||
data : data
|
||||
url: 'user/auth/get_jssdk',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 鉴权转跳地址
|
||||
const wxCode = data => {
|
||||
return request({
|
||||
url: 'user/auth/get_auth_url',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取openid
|
||||
const wxOpenid = data => {
|
||||
return request({
|
||||
url: 'user/auth/get_openid',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
wxConfig
|
||||
wxConfig,
|
||||
wxCode,
|
||||
wxOpenid
|
||||
}
|
||||
|
||||
@@ -332,6 +332,10 @@
|
||||
},
|
||||
"name": "withdrawList",
|
||||
"aliasPath": "/wallet/withdraw/list"
|
||||
}, {
|
||||
"path" : "pages/wxAuth/wxAuth",
|
||||
"name" : "wxAuth",
|
||||
"aliasPath": "/wechat-auth"
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
||||
@@ -57,9 +57,6 @@
|
||||
}
|
||||
},
|
||||
onShow(){
|
||||
|
||||
console.log(this.$Route)
|
||||
|
||||
this.parentId = this.$Route.query.invite || ''
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -15,31 +15,22 @@
|
||||
<image class="vip-back" :src="item.card_cover" mode="scaleToFill"></image>
|
||||
<view class="vip-cont">
|
||||
<view class="vip-name">
|
||||
{{item.name}}<image class="vip-name-img" @click="showRemark(item.name, item.node_definition)" src="../../static/user/vip_privilege_03.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="vip-number" v-if="item.count">
|
||||
{{item.count.stock > 0 ? '剩余名额:' + item.count.residue : '不限名数'}}
|
||||
{{ item.name }}
|
||||
<image class="vip-name-img" @click="showRemark(item.name, item.node_definition)" src="../../static/user/vip_privilege_03.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="vip-number" v-if="item.count">{{ item.count.stock > 0 ? '剩余名额:' + item.count.residue : '不限名数' }}</view>
|
||||
<view class="vip-tips">
|
||||
<!-- 会员 -->
|
||||
<view v-if="item.identity_id == 2" class="vip-tips-text vip-tips-color-01">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view v-if="item.identity_id == 2" class="vip-tips-text vip-tips-color-01">{{ item.title }}</view>
|
||||
|
||||
<!-- VIP节点 -->
|
||||
<view v-else-if="item.identity_id == 3" class="vip-tips-text vip-tips-color-02">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view v-else-if="item.identity_id == 3" class="vip-tips-text vip-tips-color-02">{{ item.title }}</view>
|
||||
|
||||
<!-- 主节点 -->
|
||||
<view v-else-if="item.identity_id == 4" class="vip-tips-text vip-tips-color-03">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view v-else-if="item.identity_id == 4" class="vip-tips-text vip-tips-color-03">{{ item.title }}</view>
|
||||
|
||||
<!-- 超级节点 -->
|
||||
<view v-else-if="item.identity_id == 5" class="vip-tips-text vip-tips-color-04">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view v-else-if="item.identity_id == 5" class="vip-tips-text vip-tips-color-04">{{ item.title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -51,51 +42,45 @@
|
||||
<view class="privilege-list">
|
||||
<image class="privilege-img" src="/static/user/vip_privilege_00.png" mode=""></image>
|
||||
<view class="privilege-text">
|
||||
<view class="privilege-name">
|
||||
节点定义
|
||||
</view>
|
||||
{{identitie[tabsIndex].node_definition}}
|
||||
<view class="privilege-name">节点定义</view>
|
||||
{{ identitie[tabsIndex].node_definition }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="privilege-list">
|
||||
<image class="privilege-img" src="/static/user/vip_privilege_01.png" mode=""></image>
|
||||
<view class="privilege-text">
|
||||
<view class="privilege-name">
|
||||
升级条件
|
||||
</view>
|
||||
<view class="privilege-name">升级条件</view>
|
||||
<block v-if="openCondition.energy_shard">
|
||||
<view class="privilege-label" :class="{'active' : openCondition.energy_shard.finish}">{{openCondition.energy_shard.message}}<uni-icons v-if="openCondition.energy_shard.finish" type="checkmarkempty" size="17" color="#f6b338"></uni-icons></view>
|
||||
<view class="privilege-label" :class="{'active' : openCondition.price.finish}" v-if="!openCondition.energy_shard.finish">{{openCondition.price.message}}</view>
|
||||
<view class="privilege-label" v-else>{{openCondition.service_charge.message}}</view>
|
||||
<view class="privilege-label" :class="{ active: openCondition.energy_shard.finish }">
|
||||
{{ openCondition.energy_shard.message }}
|
||||
<uni-icons v-if="openCondition.energy_shard.finish" type="checkmarkempty" size="17" color="#f6b338"></uni-icons>
|
||||
</view>
|
||||
<view class="privilege-label" :class="{ active: openCondition.price.finish }" v-if="!openCondition.energy_shard.finish">
|
||||
{{ openCondition.price.message }}
|
||||
</view>
|
||||
<view class="privilege-label" v-else>{{ openCondition.service_charge.message }}</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="privilege-label" :class="{'active' : openCondition.price.finish}">{{openCondition.price.message}}</view>
|
||||
<view class="privilege-label" :class="{ active: openCondition.price.finish }">{{ openCondition.price.message }}</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="privilege-list">
|
||||
<image class="privilege-img" src="/static/user/vip_privilege_02.png" mode=""></image>
|
||||
<view class="privilege-text">
|
||||
<view class="privilege-name">
|
||||
节点权益
|
||||
</view>
|
||||
<view class="privilege-label privilege-right" v-for="(item, index) in identitie[tabsIndex].rights" :key="index">
|
||||
&{{item.remark}}
|
||||
<view class="privilege-name">节点权益</view>
|
||||
<view class="privilege-label privilege-right" v-for="(item, index) in identitie[tabsIndex].rights" :key="index">&{{ item.remark }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 用户协议 -->
|
||||
<!-- 用户协议 -->
|
||||
<view class="agree">
|
||||
<view class="agree-tips" @click="$Router.push({name: 'vipAgree', params: {type : 'vipAgree'}})">
|
||||
请仔细阅读并确认服务协议
|
||||
</view>
|
||||
<view class="agree"><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">
|
||||
<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"></image>
|
||||
@@ -112,265 +97,239 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
import { identities, vipOrder, vipWechatPay, vipCont, vipVoucher } from '@/apis/interfaces/vip'
|
||||
import { wxConfig } from '@/apis/interfaces/wx'
|
||||
import { uploads } from '@/apis/interfaces/uploading'
|
||||
import { identities, vipOrder, vipWechatPay, vipCont, vipVoucher } from '@/apis/interfaces/vip';
|
||||
import { wxConfig } from '@/apis/interfaces/wx';
|
||||
import { uploads } from '@/apis/interfaces/uploading';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
return {
|
||||
loding : true,
|
||||
tabsIndex : 0,
|
||||
user : {},
|
||||
identitie : [],
|
||||
rights : [],
|
||||
loding: true,
|
||||
tabsIndex: 0,
|
||||
user: {},
|
||||
identitie: [],
|
||||
rights: [],
|
||||
description: '',
|
||||
identityTime: '', // 到期时间
|
||||
identityTime: '', // 到期时间
|
||||
sumNumber : 1, // 开通年限
|
||||
total : '', // 开通年限总资金额
|
||||
selected : false, // 用户协议
|
||||
canBtn : '', // 按钮操作
|
||||
canForm : false, // 凭证弹出
|
||||
sumNumber: 1, // 开通年限
|
||||
total: '', // 开通年限总资金额
|
||||
selected: false, // 用户协议
|
||||
canBtn: '', // 按钮操作
|
||||
canForm: false, // 凭证弹出
|
||||
canFromImg: {
|
||||
showpath: '',
|
||||
showpath: '',
|
||||
path: ''
|
||||
},
|
||||
openCondition: {}
|
||||
openCondition: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// 获取当前用户信息
|
||||
this.idenInfo();
|
||||
this.idenInfo();
|
||||
// 微信鉴权
|
||||
wxConfig({
|
||||
url : window.location.href,
|
||||
jsApiList : ['chooseWXPay']
|
||||
}).then(res => {
|
||||
let payConfig = JSON.parse(res)
|
||||
let jweixin = require('jweixin-module')
|
||||
|
||||
jweixin.ready(res=>{
|
||||
// res
|
||||
})
|
||||
jweixin.error(err => {
|
||||
console.log(err)
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
jweixin.config({...payConfig})
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
},
|
||||
methods: {
|
||||
// 当前用户信息
|
||||
// 当前用户信息
|
||||
idenInfo() {
|
||||
identities().then(res => {
|
||||
res.identities.map(item => {
|
||||
res.identities.map(item => {
|
||||
item.obj_condition = new Object
|
||||
item.obj_condition = new Object();
|
||||
for (let val of item.get_condition) {
|
||||
item.obj_condition[val.name] = {
|
||||
message: val.message,
|
||||
finish: val.finish
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
return item
|
||||
})
|
||||
|
||||
this.identitie = res.identities
|
||||
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.loding = false
|
||||
return item;
|
||||
});
|
||||
this.identitie = res.identities;
|
||||
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.loding = false;
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
// 切换开通身份
|
||||
swiperChange(e) {
|
||||
swiperChange(e) {
|
||||
this.tabsIndex = e.detail.current;
|
||||
// 获取当前用户信息
|
||||
this.idenInfo();
|
||||
},
|
||||
|
||||
// 开通会员
|
||||
// 开通会员
|
||||
openOrder() {
|
||||
let can = this.canBtn,
|
||||
let can = this.canBtn,
|
||||
identitiesId = this.identitie[this.tabsIndex].identity_id
|
||||
identitiesId = this.identitie[this.tabsIndex].identity_id;
|
||||
if (this.selected == false) {
|
||||
uni.showToast({
|
||||
title: '请勾选用户协议',
|
||||
title: '请勾选用户协议',
|
||||
icon : 'none'
|
||||
})
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(can.on_line) {
|
||||
if(can.buy) {
|
||||
// 开通vip提交
|
||||
console.log('开通vip提交')
|
||||
if (can.on_line) {
|
||||
if (can.buy) {
|
||||
this.wxPayConfig();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: can.message,
|
||||
title: can.message,
|
||||
icon : 'none'
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
if (can.buy) {
|
||||
// 上传凭证
|
||||
this.canClick();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: can.message,
|
||||
title: can.message,
|
||||
icon : 'none'
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
},
|
||||
},
|
||||
// 开通vip提交
|
||||
vipSubmitr(id) {
|
||||
// vipOrder(id,{
|
||||
// year: 1
|
||||
// }).then(res => {
|
||||
// if(!res.test){
|
||||
// let verifyForm = res
|
||||
// this.wechatPay(res.id)
|
||||
// }else{
|
||||
// // 测试环境
|
||||
// uni.showModal({
|
||||
// title : '开通提示',
|
||||
// content : '会员开通成功,是否继续完成企业认证',
|
||||
// showCancel : true,
|
||||
// cancelText : '稍后认证',
|
||||
// confirmText : '立即认证',
|
||||
// success : modalRes => {
|
||||
// if(modalRes.confirm){
|
||||
// this.$Router.replace({name: 'Approve'})
|
||||
// return
|
||||
// }
|
||||
// this.$Router.back()
|
||||
// },
|
||||
// fail(err) {
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }).catch(err =>{
|
||||
// uni.showToast({
|
||||
// title: err.message,
|
||||
// icon : 'none'
|
||||
// })
|
||||
// 微信支付鉴权
|
||||
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'
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
// 微信支付
|
||||
// 微信支付
|
||||
wechatPay(id){
|
||||
vipWechatPay(id).then(res => {
|
||||
let payConfig = JSON.parse(res.wechat),
|
||||
payIdentity = res.identity
|
||||
uni.requestPayment({
|
||||
provider : "wxpay",
|
||||
orderInfo : payConfig,
|
||||
success : payRes => {
|
||||
console.log(payRes)
|
||||
},
|
||||
fail : payErr => {
|
||||
console.log(payErr)
|
||||
}
|
||||
})
|
||||
wechatPay(id, wx) {
|
||||
vipWechatPay(id, {
|
||||
openid: this.$store.getters.getCode
|
||||
}).then(payConfig => {
|
||||
wx.chooseWXPay({...payConfig,
|
||||
success: ()=> {
|
||||
uni.showToast({
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: "success"
|
||||
})
|
||||
this.idenInfo();
|
||||
},
|
||||
fail(err) {
|
||||
uni.showToast({
|
||||
title: '支付被取消',
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
// 勾选协议
|
||||
agreeChange() {
|
||||
agreeChange() {
|
||||
this.selected = !this.selected;
|
||||
},
|
||||
|
||||
// 会员权益介绍
|
||||
// 会员权益介绍
|
||||
showRemark(title, val) {
|
||||
uni.showModal({
|
||||
uni.showModal({
|
||||
title : title,
|
||||
content : val,
|
||||
showCancel : false
|
||||
title: title,
|
||||
content: val,
|
||||
showCancel: false
|
||||
});
|
||||
},
|
||||
|
||||
// 上传打款凭证图片
|
||||
// 上传打款凭证图片
|
||||
updImg() {
|
||||
uni.chooseImage({
|
||||
uni.chooseImage({
|
||||
count : 1,
|
||||
success : path => {
|
||||
uploads([{
|
||||
uri : path.tempFilePaths[0]
|
||||
count: 1,
|
||||
success: path => {
|
||||
uploads([{uri: path.tempFilePaths[0]}]).then(res => {
|
||||
this.canFromImg = {
|
||||
showpath: res.url[0],
|
||||
path: res.path[0]
|
||||
path: res.path[0]
|
||||
};
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 打款凭证弹出状态
|
||||
canClick() {
|
||||
canClick() {
|
||||
this.canForm = !this.canForm;
|
||||
},
|
||||
|
||||
// 打款凭证提交
|
||||
canSubmit() {
|
||||
let newCover = this.canFromImg.path,
|
||||
let newCover = this.canFromImg.path,
|
||||
newId = this.identitie[this.tabsIndex].identity_id;
|
||||
vipVoucher({
|
||||
cover: newCover,
|
||||
identity_id: newId
|
||||
}).then(res => {
|
||||
}).then(res => {
|
||||
this.$Router.push({name: "Examine"})
|
||||
this.$Router.push({ name: 'Examine' });
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
icon: 'none'
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style>
|
||||
page {
|
||||
background-color: #FFFFFF;
|
||||
page {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
<style lang="scss" scoped>
|
||||
.canBack {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
height: 100vh;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
z-index: 99;
|
||||
}
|
||||
}
|
||||
.canPop {
|
||||
position: absolute;
|
||||
position: absolute;
|
||||
background-color: #ffffff;
|
||||
left: 100rpx;
|
||||
right: 100rpx;
|
||||
top: 30%;
|
||||
@@ -405,25 +364,25 @@
|
||||
line-height: 90rpx;
|
||||
font-size: $title-size;
|
||||
color: white;
|
||||
color: white;
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.vip-container {
|
||||
width: 750rpx;
|
||||
height: 340rpx;
|
||||
margin-top: $margin;
|
||||
margin-top: $margin;
|
||||
}
|
||||
|
||||
|
||||
.swiper-item {
|
||||
width: 640rpx;
|
||||
height: 340rpx;
|
||||
display: flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
|
||||
.vip-item {
|
||||
width: 640rpx;
|
||||
height: 340rpx;
|
||||
border-radius: 20rpx;
|
||||
@@ -457,9 +416,9 @@
|
||||
}
|
||||
.vip-number {
|
||||
margin: 10rpx 0 40rpx;
|
||||
margin: 10rpx 0 40rpx;
|
||||
color: #ffffff;
|
||||
font-size: 32rpx;
|
||||
font-size: 32rpx;
|
||||
opacity: 0.8;
|
||||
}
|
||||
.vip-tips {
|
||||
font-size: 30rpx;
|
||||
@@ -475,25 +434,25 @@
|
||||
color: transparent;
|
||||
}
|
||||
.vip-tips-color-00 {
|
||||
.vip-tips-color-00 {
|
||||
background-image: linear-gradient(to bottom, #6189f0, #b6b9c1);
|
||||
}
|
||||
.vip-tips-color-01 {
|
||||
.vip-tips-color-01 {
|
||||
background-image: linear-gradient(to top, #ffd459, #ff6c52);
|
||||
}
|
||||
.vip-tips-color-02 {
|
||||
.vip-tips-color-02 {
|
||||
background-image: linear-gradient(to top, #e0c9fe, #892edb);
|
||||
}
|
||||
.vip-tips-color-03 {
|
||||
.vip-tips-color-03 {
|
||||
background-image: linear-gradient(to top, #f6b237, #f035e3);
|
||||
}
|
||||
.vip-tips-color-04 {
|
||||
.vip-tips-color-04 {
|
||||
background-image: linear-gradient(to top, #c455ec, #5f76e9);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 会员特权
|
||||
}
|
||||
// 会员特权
|
||||
.privilege {
|
||||
padding: 20rpx 30rpx 80rpx;
|
||||
box-sizing: border-box;
|
||||
.privilege-list {
|
||||
@@ -522,108 +481,108 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 用户协议
|
||||
// 用户协议
|
||||
.agree {
|
||||
margin: $margin 0;
|
||||
text-align: center;
|
||||
.agree-tips {
|
||||
background-color: #999999;
|
||||
display: inline-block;
|
||||
padding: 14rpx $padding;
|
||||
padding: 14rpx $padding;
|
||||
color: #ffffff;
|
||||
border-radius: 60rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.agree-btn {
|
||||
display: flex;
|
||||
font-size: $title-size-lg;
|
||||
text-align: left;
|
||||
color: #999999;
|
||||
padding: $padding;
|
||||
padding: $padding;
|
||||
}
|
||||
|
||||
|
||||
// .content{
|
||||
// min-height: 100vh;
|
||||
// background: #fefaef;
|
||||
// }
|
||||
// 开通须知
|
||||
// .content{
|
||||
// min-height: 100vh;
|
||||
// background: #fefaef;
|
||||
// }
|
||||
// 开通须知
|
||||
.notice {
|
||||
font-size: $title-size-m;
|
||||
color: $text-gray;
|
||||
color: $text-gray;
|
||||
padding: $padding $padding*2 $padding*2;
|
||||
padding: $padding $padding * 2 $padding * 2;
|
||||
.title {
|
||||
padding-bottom: $padding/2;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.item {
|
||||
padding-bottom: $padding/2;
|
||||
line-height: 40rpx;
|
||||
text-align: justify;
|
||||
}
|
||||
}
|
||||
}
|
||||
// footer
|
||||
}
|
||||
// footer
|
||||
.footer {
|
||||
padding: 0 $padding;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
text-align: center;
|
||||
.footer-btn {
|
||||
width: 74%;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 会员权限
|
||||
}
|
||||
// 会员权限
|
||||
.privilege {
|
||||
padding: $padding;
|
||||
padding: $padding;
|
||||
.title {
|
||||
font-weight: bold;
|
||||
color: #322711;
|
||||
font-size: $title-size;
|
||||
text-align: center;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
}
|
||||
.privilege-box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: $padding 0;
|
||||
padding: $padding 0;
|
||||
.item {
|
||||
width: 25%;
|
||||
padding: $padding/2;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
text-align: center;
|
||||
.icon {
|
||||
width: 78rpx;
|
||||
height: 78rpx;
|
||||
background: #bd995d;
|
||||
border-radius: 50%;
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
font-size: $title-size-sm;
|
||||
color: #201212;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 会员卡
|
||||
}
|
||||
// 会员卡
|
||||
.cards {
|
||||
position: relative;
|
||||
background: #1f1b1c;
|
||||
background: #1f1b1c;
|
||||
.card {
|
||||
position: relative;
|
||||
margin: 0 $margin;
|
||||
background: linear-gradient(to right, #3b3d4a, #231d1f);
|
||||
padding: 15rpx;
|
||||
border-radius: $radius/2;
|
||||
z-index: 2;
|
||||
z-index: 2;
|
||||
.card-content {
|
||||
position: relative;
|
||||
position: relative;
|
||||
border: solid 1rpx rgba($color: white, $alpha: 0.4);
|
||||
border-radius: $radius/2;
|
||||
padding: 30rpx 180rpx 60rpx 148rpx;
|
||||
min-height: 98rpx;
|
||||
min-height: 98rpx;
|
||||
.cover {
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
top: 30rpx;
|
||||
@@ -631,17 +590,17 @@
|
||||
height: 98rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.user{
|
||||
.user {
|
||||
color: rgba($color: white, $alpha: 0.7);
|
||||
line-height: 58rpx;
|
||||
font-size: $title-size-lg;
|
||||
}
|
||||
}
|
||||
.sub-time {
|
||||
line-height: 40rpx;
|
||||
color: #e6ce9e;
|
||||
font-size: $title-size-sm;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
position: absolute;
|
||||
color: #261f0f;
|
||||
background: #e6ce9e;
|
||||
@@ -655,15 +614,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.cards-angle {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index: 3;
|
||||
}
|
||||
}
|
||||
&::after{
|
||||
&::after {
|
||||
content: ' ';
|
||||
height: 70rpx;
|
||||
background: #b29671;
|
||||
position: absolute;
|
||||
@@ -672,36 +631,36 @@
|
||||
border-radius: $radius/2;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
// tabs
|
||||
}
|
||||
// tabs
|
||||
.tabs {
|
||||
background: #1f1b1c;
|
||||
color: white;
|
||||
padding: 0 0 $padding 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: $title-size-lg;
|
||||
font-size: $title-size-lg;
|
||||
.item {
|
||||
margin: 0 $margin;
|
||||
line-height: 70rpx;
|
||||
height: 70rpx;
|
||||
height: 70rpx;
|
||||
color: rgba($color: white, $alpha: .6);
|
||||
color: rgba($color: white, $alpha: 0.6);
|
||||
&.show {
|
||||
position: relative;
|
||||
font-weight: bold;
|
||||
font-size: $title-size;
|
||||
color: white;
|
||||
color: white;
|
||||
&::after {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 20%;
|
||||
width: 60%;
|
||||
height: 6rpx;
|
||||
border-radius: 3rpx;
|
||||
border-radius: 3rpx;
|
||||
content: ' ';
|
||||
background: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
<u-icon name="edit-pen-fill" @click='editBank(item.bank_account_id)' color="rgba(255,255,255,0.6)"
|
||||
size='50' />
|
||||
</view>
|
||||
<!-- 底部新增按钮 -->
|
||||
<view class="addBtn" @click="$Router.push({ name: 'addBank'})">
|
||||
<u-icon name="plus" label-pos='bottom' color='#fff' label-color='#fff' label='新增' />
|
||||
</view>
|
||||
<!-- 无列表 -->
|
||||
<no-list v-if="lists.length === 0" name='no-shop' txt="没有任何提现银行 ~ " />
|
||||
<!-- <u-toast ref="uToast" /> -->
|
||||
@@ -81,8 +85,8 @@
|
||||
editBank(id) {
|
||||
this.$Router.push({
|
||||
name: 'addBank',
|
||||
params:{
|
||||
id:id
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -101,9 +105,9 @@
|
||||
withdrawsAccountsDelete(id).then(res => {
|
||||
console.log(res)
|
||||
that.lists.splice(index, 1)
|
||||
if(that.lists.length === 0){
|
||||
if (that.lists.length === 0) {
|
||||
uni.navigateBack({})
|
||||
uni.setStorageSync('refresh',true)
|
||||
uni.setStorageSync('refresh', true)
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$refs.uToast.show({
|
||||
@@ -133,6 +137,24 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.addBtn{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
margin: 40rpx;
|
||||
text-align: center;
|
||||
width: 130rpx;
|
||||
height: 130rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50%;
|
||||
z-index: 100;
|
||||
right: 0;
|
||||
box-shadow: 0 0 20rpx 20rpx rgba($color: #fff, $alpha: .5);
|
||||
background-image: linear-gradient(to right, #7c52fc, #976dff);
|
||||
}
|
||||
.selectCard {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
|
||||
@@ -330,7 +330,6 @@
|
||||
color: #3a3a3a;
|
||||
font-weight: bolder;
|
||||
flex: 1;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
46
pages/wxAuth/wxAuth.vue
Normal file
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<view class="content vertical">
|
||||
<u-loading mode="flower"></u-loading>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { wxCode, wxOpenid } from '@/apis/interfaces/wx'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// 微信鉴权
|
||||
if(!this.$Route.query.code){
|
||||
wxCode({
|
||||
pages: 'wechat-auth'
|
||||
}).then(res => {
|
||||
window.location.href = res
|
||||
})
|
||||
}else{
|
||||
wxOpenid({
|
||||
code: this.$Route.query.code
|
||||
}).then(res => {
|
||||
this.$store.commit('setCode', res.openid)
|
||||
this.$Router.replaceAll({name: 'Index'})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content{
|
||||
background: white;
|
||||
height: 100vh;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -28,6 +28,12 @@ const router = createRouter({
|
||||
// 全局路由前置守卫
|
||||
router.beforeEach((to, from, next) => {
|
||||
const token = store.getters.getToken || uni.getStorageSync('token')
|
||||
// 检查是否需要微信授权
|
||||
if(store.getters.getCode === '' && to.name != 'wxAuth'){
|
||||
next({
|
||||
name: 'wxAuth'
|
||||
})
|
||||
}
|
||||
// 检查是否需要登录
|
||||
if(to.auth && token === ''){
|
||||
next({
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 202 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 465 KiB After Width: | Height: | Size: 274 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 784 KiB After Width: | Height: | Size: 212 KiB |
|
Before Width: | Height: | Size: 542 KiB After Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 433 B |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 639 B |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 216 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 285 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 411 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 552 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 472 B |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 227 B |
|
Before Width: | Height: | Size: 686 B After Width: | Height: | Size: 240 B |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 937 B |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 1015 B |
|
Before Width: | Height: | Size: 585 B After Width: | Height: | Size: 303 B |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 599 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 491 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 376 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 509 B |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 944 B After Width: | Height: | Size: 401 B |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 880 B |
|
Before Width: | Height: | Size: 491 B After Width: | Height: | Size: 306 B |
|
Before Width: | Height: | Size: 956 B After Width: | Height: | Size: 682 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 730 B |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 590 B |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 904 B |
|
Before Width: | Height: | Size: 866 B After Width: | Height: | Size: 614 B |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 619 B |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 930 B After Width: | Height: | Size: 643 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 386 B |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 929 B |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 857 B |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 771 B |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 940 B |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 319 B |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 162 B |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 563 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 418 B |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 613 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 673 B |
|
Before Width: | Height: | Size: 626 B After Width: | Height: | Size: 270 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 451 B |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 579 B |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 710 B |