邀请码页面绘制
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,8 +332,12 @@
|
||||
},
|
||||
"name": "withdrawList",
|
||||
"aliasPath": "/wallet/withdraw/list"
|
||||
}
|
||||
],
|
||||
}, {
|
||||
"path" : "pages/wxAuth/wxAuth",
|
||||
"name" : "wxAuth",
|
||||
"aliasPath": "/wechat-auth"
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationStyle": "custom",
|
||||
"backgroundColor": "#F5F5F5"
|
||||
|
||||
@@ -57,9 +57,6 @@
|
||||
}
|
||||
},
|
||||
onShow(){
|
||||
|
||||
console.log(this.$Route)
|
||||
|
||||
this.parentId = this.$Route.query.invite || ''
|
||||
},
|
||||
methods: {
|
||||
|
||||
1269
pages/vip/vip.vue
@@ -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 |