bug修改
This commit is contained in:
parent
65e5c884fa
commit
17c53afdb4
@ -55,7 +55,10 @@
|
||||
"urlCheck" : false,
|
||||
"es6" : true
|
||||
},
|
||||
"usingComponents" : true
|
||||
"usingComponents" : true,
|
||||
"optimization" : {
|
||||
"subpackages" : true
|
||||
}
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
|
@ -35,7 +35,7 @@
|
||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||
import request from "@/utils/request";
|
||||
import {getUserInfoRequest} from "@/utils/common.js";
|
||||
import {getToken,setUserInfo} from '@/utils/auth.js'
|
||||
import {getToken,setUserInfo,getUserInfo} from '@/utils/auth.js'
|
||||
export default {
|
||||
components: {
|
||||
VNavigationBar,
|
||||
@ -76,13 +76,25 @@ export default {
|
||||
})
|
||||
}else{
|
||||
console.log("已登录")
|
||||
if(!getUserInfo()){
|
||||
console.log("没有用户信息")
|
||||
this.getUserInfos()
|
||||
}else{
|
||||
this.customInfo = JSON.parse(getUserInfo())
|
||||
this.getActive()
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(data) {
|
||||
this.getActive()
|
||||
|
||||
},
|
||||
methods: {
|
||||
preventKeyboard(e) {
|
||||
// 阻止键盘弹出
|
||||
e.preventDefault();
|
||||
// 将焦点移除,这样就不会有键盘弹出
|
||||
e.target.blur();
|
||||
},
|
||||
isNumber(value) {
|
||||
return /^\d+(\.\d+)?$/.test(value);
|
||||
},
|
||||
@ -108,12 +120,27 @@ export default {
|
||||
},
|
||||
//获取当前登录用户信息
|
||||
async getUserInfos() {
|
||||
await getUserInfoRequest()
|
||||
await this.getActive()
|
||||
request({
|
||||
url: "/userClient/customer/getUserCustomer",
|
||||
method: 'get',
|
||||
params:{}
|
||||
}).then(res=>{
|
||||
if(!res.data){
|
||||
uni.reLaunch({
|
||||
url: '/pages/my/register'
|
||||
})
|
||||
}else{
|
||||
setUserInfo(JSON.stringify(res.data))
|
||||
this.customInfo = res.data
|
||||
this.getActive()
|
||||
}
|
||||
})
|
||||
},
|
||||
//查询营销活动列表
|
||||
async getActive() {
|
||||
this.customInfo = JSON.parse(uni.getStorageSync('customerInfo'))
|
||||
this.activeList=[]
|
||||
this.couponList=[]
|
||||
this.array=[]
|
||||
const data = {
|
||||
cusId: this.customInfo.id
|
||||
}
|
||||
@ -265,9 +292,7 @@ export default {
|
||||
flex: 1;
|
||||
height: 0;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
margin: 0 32rpx;
|
||||
|
||||
padding: 30rpx 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 20rpx;
|
||||
|
@ -93,7 +93,7 @@
|
||||
<script>
|
||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||
import reservationOrder from '@/components/reservationOrder/reservationOrder.vue'
|
||||
import TicketsItem from "@/components/ticketsItem/ticketsItem.vue";
|
||||
import TicketsItem from "@/pages-order/ticketsItem/ticketsItem.vue";
|
||||
import request from "../../utils/request";
|
||||
export default {
|
||||
components: {
|
||||
|
@ -66,8 +66,7 @@
|
||||
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
||||
import request from "@/utils/request";
|
||||
import {getUserInfoRequest} from "@/utils/common.js";
|
||||
import {getToken,setUserInfo} from '@/utils/auth.js'
|
||||
import {getUserInfo} from "../../utils/auth";
|
||||
import {getToken,setUserInfo,getUserInfo} from '@/utils/auth.js'
|
||||
export default {
|
||||
components: {
|
||||
tabBarVue,
|
||||
@ -80,7 +79,11 @@
|
||||
})
|
||||
}else{
|
||||
console.log("已登录")
|
||||
if(!getUserInfo()){
|
||||
this.getServer()
|
||||
}else{
|
||||
this.customInfo = JSON.parse(getUserInfo())
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -103,7 +103,7 @@
|
||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||
import config from "@/config";
|
||||
import {getUserInfoRequest} from "@/utils/common.js";
|
||||
import {getToken,setUserInfo} from '@/utils/auth.js'
|
||||
import {getToken,getUserInfo} from '@/utils/auth.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -123,7 +123,7 @@
|
||||
},
|
||||
focus: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
Loading…
Reference in New Issue
Block a user