更改登录流程
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
let tableCode = this.getQueryString(decodeURIComponent(res.result), 'code')
|
||||
uni.cache.set('tableCode', this.tableCode)
|
||||
if (tableCode) {
|
||||
uni.pro.navigateTo('order_food/order_food', {
|
||||
tableCode: tableCode,
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<view class="container">
|
||||
<view class="box flex-center">
|
||||
<!-- <text>欢迎登录零点八零</text> -->
|
||||
|
||||
|
||||
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/Logo" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="top_box">
|
||||
<view class="top_box_one" v-if="showbox">
|
||||
<text class="top_box_one_text">手机号码</text>
|
||||
@@ -50,14 +50,14 @@
|
||||
<view class="toLogin" v-if="showbox" @click="toLoginconfirm">登录</view>
|
||||
<view class="toLogins" @click="showbox = !showbox">其他手机号登录/注册</view>
|
||||
<!-- #endif -->
|
||||
<view class="agreement flex-start">
|
||||
<!-- <view class="agreement flex-start">
|
||||
<u-checkbox-group><u-checkbox shape="circle" @change="radioChange"
|
||||
size="24"></u-checkbox></u-checkbox-group>
|
||||
<text>阅读并同意零点八零</text>
|
||||
<view class="agreement-Item" @click="Privacy(1)">《用户协议》</view>
|
||||
及
|
||||
<view class="agreement-Item" @click="Privacy(2)">《隐私政策》</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- #ifdef APP-PLUS || H5 -->
|
||||
<view class="box_conf" v-if="debug" @click="showpicker = true">{{ baseUrl || '切换' }}</view>
|
||||
@@ -118,6 +118,7 @@
|
||||
second: 60,
|
||||
showText: true,
|
||||
Recapture: '发送验证码',
|
||||
types: '', //判断是否是微信扫码点餐进来
|
||||
form: {
|
||||
//密码
|
||||
loginName: '',
|
||||
@@ -131,7 +132,13 @@
|
||||
this.computed_h();
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
onLoad(e) {
|
||||
console.log(e)
|
||||
try {
|
||||
this.types = e.type
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
// #ifdef APP-PLUS || H5
|
||||
this.showbox = true
|
||||
// #endif
|
||||
@@ -280,8 +287,13 @@
|
||||
uni.cache.set('miniAppOpenId', res.data.userInfo
|
||||
.miniAppOpenId)
|
||||
uni.cache.set('userInfo', res.data.userInfo);
|
||||
// uni.cache.set('shopUser', res.data.shopUser);
|
||||
uni.pro.switchTab('index/index')
|
||||
if (this.types == 0) {
|
||||
uni.pro.navigateTo('order_food/order_food')
|
||||
} else {
|
||||
// uni.cache.set('shopUser', res.data.shopUser);
|
||||
uni.pro.switchTab('index/index')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
@@ -330,8 +342,13 @@
|
||||
uni.cache.set('miniAppOpenId', res.data.userInfo
|
||||
.miniAppOpenId)
|
||||
uni.cache.set('userInfo', res.data.userInfo);
|
||||
uni.cache.set('shopUser', res.data.shopUser);
|
||||
uni.pro.switchTab('index/index')
|
||||
// uni.cache.set('shopUser', res.data.shopUser);
|
||||
if (this.types == 0) {
|
||||
uni.pro.navigateTo('order_food/order_food')
|
||||
} else {
|
||||
// uni.cache.set('shopUser', res.data.shopUser);
|
||||
uni.pro.switchTab('index/index')
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
|
||||
@@ -276,11 +276,13 @@
|
||||
if (e.q) {
|
||||
this.tableCode = this.getQueryString(decodeURIComponent(e.q), 'code')
|
||||
uni.cache.set('tableCode', this.tableCode)
|
||||
this.scanCodehandle()
|
||||
// this.scanCodehandle()
|
||||
uni.pro.navigateTo('login/login', {
|
||||
type: 0
|
||||
})
|
||||
} else {
|
||||
this.tableCode = e.tableCode
|
||||
uni.cache.set('tableCode', this.tableCode)
|
||||
this.productqueryShopIdByTableCode()//获取shop User id
|
||||
this.tableCode = uni.cache.get('tableCode')
|
||||
this.productqueryShopIdByTableCode() //获取shop User id
|
||||
}
|
||||
|
||||
uni.$on('message', this.getMessage)
|
||||
@@ -293,6 +295,11 @@
|
||||
this.socketTicket.Close()
|
||||
uni.$off('message')
|
||||
},
|
||||
onShow() {
|
||||
if (uni.cache.get('token')) {
|
||||
this.productqueryShopIdByTableCode() //获取shop User id
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 单独获取他的shopUserid
|
||||
async productqueryShopIdByTableCode() {
|
||||
@@ -399,7 +406,6 @@
|
||||
}
|
||||
},
|
||||
scanCodehandle(e) {
|
||||
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY
|
||||
uni.login({ //alipay weixin
|
||||
provider: 'weixin',
|
||||
|
||||
Reference in New Issue
Block a user