fix: 修复bug
parent
02ff453ff1
commit
2925d35df8
|
@ -5,8 +5,8 @@ ENV = 'development'
|
|||
VUE_APP_TITLE = 创盈商户管理系统
|
||||
|
||||
# 芋道管理系统/开发环境
|
||||
VUE_APP_BASE_API = 'https://cmx.bskies.cc:8000/cyywl-api'
|
||||
#VUE_APP_BASE_API = 'http://192.168.1.147:48080'
|
||||
#VUE_APP_BASE_API = 'https://cmx.bskies.cc:8000/cyywl-api'
|
||||
VUE_APP_BASE_API = 'http://192.168.1.147:48080'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
trigger="click"
|
||||
popper-class="qrcode-wrap"
|
||||
>
|
||||
<canvas :id="`id-${scope.row.id}`"></canvas>
|
||||
<canvas :id="`id-${scope.row.id}`" width="120" height="120"></canvas>
|
||||
<el-button slot="reference" size="mini" type="text" @click="handleQRCode(scope.row)"
|
||||
v-hasPermi="['system:tenant:delete']">推广码
|
||||
</el-button>
|
||||
|
@ -345,9 +345,11 @@ export default {
|
|||
this.resetForm('form');
|
||||
},
|
||||
handleQRCode(row) {
|
||||
const url =`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7e503d9cded34c07&redirect_uri=
|
||||
http://192.168.1.149:8080?tenantId=${row.id}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`
|
||||
QRCode.toCanvas(document.getElementById(`id-${row.id}`), url, function (error) {
|
||||
const baseUrl = 'http://yuxy.perrymake.com'
|
||||
const url =`${baseUrl}/pages/index/index?redirectUrl=${baseUrl}&tenantId=${row.id}`
|
||||
QRCode.toCanvas(document.getElementById(`id-${row.id}`), url, {
|
||||
scale: 2
|
||||
}, function (error) {
|
||||
if (error) console.error(error)
|
||||
console.log('success!');
|
||||
})
|
||||
|
|
|
@ -31,11 +31,11 @@
|
|||
id: 0
|
||||
},
|
||||
onLaunch: function(option) {
|
||||
const res = memberGradeInfo().then((res) =>{
|
||||
if(res.data.some((item) => !!!parseInt(item.isExist))){
|
||||
const res = memberGradeInfo().then((res) => {
|
||||
if (res.data.some((item) => !!!parseInt(item.isExist))) {
|
||||
uni.setTabBarItem({
|
||||
index: 2,
|
||||
text: 'text',
|
||||
text: 'text',
|
||||
pagePath: '/pages/member_equity/index'
|
||||
})
|
||||
}
|
||||
|
@ -175,6 +175,7 @@
|
|||
},
|
||||
computed: mapGetters(['tenantId']),
|
||||
async mounted() {
|
||||
this.isQRCode()
|
||||
if (this.$store.getters.isLogin && !this.$Cache.get('USER_INFO')) {
|
||||
await this.$store.dispatch('USERINFO');
|
||||
}
|
||||
|
@ -186,6 +187,7 @@
|
|||
if (!this.$Cache.get('OPEN_ID') && this.$route.query.code) {
|
||||
this.getWxChatCode()
|
||||
}
|
||||
this.setSpreadId()
|
||||
setInterval(() => {
|
||||
if (this.$store.getters.isLogin) {
|
||||
this.setRefreshToken()
|
||||
|
@ -193,6 +195,16 @@
|
|||
}, 60000)
|
||||
},
|
||||
methods: {
|
||||
// 是否扫码跳转
|
||||
isQRCode() {
|
||||
const redirectUrl = this.$route.query.redirectUrl || ''
|
||||
if (redirectUrl) {
|
||||
const tenantId = this.$route.query.tenantId || ''
|
||||
const spreadId = this.$route.query.spreadId || ''
|
||||
const wechatUrl = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7e503d9cded34c07'
|
||||
location.href =`${wechatUrl}&redirect_uri=${redirectUrl}/pages/member_application/index?tenantId=${tenantId}&spreadId=${spreadId}&response_type=code&scope=snsapi_base#wechat_redirect`
|
||||
}
|
||||
},
|
||||
// 获取租户信息
|
||||
getTenantInfo() {
|
||||
fetchTenantInfo(this.tenantId).then(res => {
|
||||
|
@ -201,7 +213,7 @@
|
|||
},
|
||||
// 获取租户ID
|
||||
getTenantId() {
|
||||
const tenantId = this.$route.query.tenantId
|
||||
const tenantId = this.$route.query.tenantId || ''
|
||||
if (tenantId) {
|
||||
this.$store.commit("SET_TENANTID", tenantId);
|
||||
this.getTenantInfo()
|
||||
|
@ -213,8 +225,8 @@
|
|||
},
|
||||
// 获取推广员ID
|
||||
setSpreadId() {
|
||||
const spreadId = this.$route.query.spreadId
|
||||
if (tenantId) {
|
||||
const spreadId = this.$route.query.spreadId || ''
|
||||
if (spreadId) {
|
||||
this.$store.commit("SET_SPREADID", spreadId);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<image class="avatar" :src='userInfo.avatar' v-if="userInfo.avatar && uid" @click="goEdit()"></image>
|
||||
<image v-else class="avatar" src="/static/images/f.png" mode="" @click="goEdit()"></image>
|
||||
<view class="info">
|
||||
<view class="name" v-if="!uid" @tap="openAuto">
|
||||
<view class="name" v-if="!uid" @click="openAuto">
|
||||
请点击登录
|
||||
</view>
|
||||
<view class="name" v-if="uid">
|
||||
|
@ -286,8 +286,10 @@
|
|||
},
|
||||
// 打开授权
|
||||
openAuto() {
|
||||
Cache.set(BACK_URL, '')
|
||||
toLogin();
|
||||
// Cache.set(BACK_URL, '')
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/login/index'
|
||||
})
|
||||
},
|
||||
// 授权回调
|
||||
onLoadFun() {
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.registerForm.mobile)) return this.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
if(that.checked.length === 0) return that.$util.Tips({
|
||||
if(this.checked.length === 0) return this.$util.Tips({
|
||||
title: '请勾选同意用户协议'
|
||||
});
|
||||
await registerVerify(this.registerForm.mobile, 4)
|
||||
|
|
|
@ -78,13 +78,13 @@
|
|||
poster: '',
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
qrcodeSize: 1000,
|
||||
qrcodeSize: 3000,
|
||||
PromotionCode: '',
|
||||
base64List: [],
|
||||
canvasStatus: true //海报绘图标签
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['isLogin', 'uid', 'userInfo']),
|
||||
computed: mapGetters(['isLogin', 'uid', 'userInfo','tenantId']),
|
||||
watch: {
|
||||
isLogin: {
|
||||
handler: function(newV, oldV) {
|
||||
|
@ -202,15 +202,17 @@
|
|||
make() {
|
||||
let that = this;
|
||||
let href = '';
|
||||
// #ifdef H5
|
||||
href = window.location.href.split('/pages')[0];
|
||||
// #endif
|
||||
// href = window.location.href.split('/pages')[0];
|
||||
const baseUrl = 'http://yuxy.perrymake.com';
|
||||
const url =`${baseUrl}/pages/index/index?redirectUrl=${baseUrl}&tenantId=${that.tenantId}&spreadId=${that.uid}`
|
||||
uQRCode.make({
|
||||
canvasId: 'qrcode',
|
||||
text: href + '/pages/index/index?spreadId=' + that.uid,
|
||||
// text: href + '/pages/index/index?spreadId=' + that.uid,
|
||||
text: url,
|
||||
size: this.qrcodeSize,
|
||||
margin: 10,
|
||||
success: res => {
|
||||
console.log('res', res)
|
||||
that.PromotionCode = res;
|
||||
setTimeout(() => {
|
||||
that.PosterCanvas(this.base64List[0], that.PromotionCode, that.userInfo
|
||||
|
|
Loading…
Reference in New Issue