This commit is contained in:
曹辉 2023-03-17 17:17:34 +08:00
parent 30cf997c1e
commit 73639d511e
5 changed files with 28 additions and 22 deletions

View File

@ -21,10 +21,12 @@ var request = function(config) {
uni.removeStorageSync('phone');
let pages = getCurrentPages();
let path = pages[pages.length - 1].$page.fullPath
if (path == '/pages/integral/integral') {} else if (path ==
'/pages/CommodityOrder/CommodityOrder') {} else if (path ==
'/pages/coupon/coupon') {} else if (path ==
'/pages/Nursingstationserviceorder/Nursingstationserviceorder') {} else {
let paths = path.split('?')
console.log(paths)
if (paths == '/pages/integral/integral' || paths ==
'/pages/shopping/shopping' || paths ==
'/pages/coupon/coupon' || paths ==
'/pages/materialbenefits/materialbenefits') {} else {
uni.navigateTo({
url: '/pages/login/login'
})

View File

@ -274,12 +274,6 @@
this.pageNum = 1;
this.baseurl = baseurl;
let that = this
const value = uni.getStorageSync('openid');
if (value) {} else {
uni.navigateTo({
url: '/pages/login/login'
})
}
const value3 = uni.getStorageSync('Refresh');
if (value3) {
that.goodsOrderinfo();
@ -310,6 +304,11 @@
} else {
that.goodsOrderinfo();
}
}else{
that.$refs.uToast.show({
title: '未登录,请先登录',
type: 'error',
})
}
},
onReachBottom() { //

View File

@ -116,12 +116,6 @@
if (value3) {
that.getinfo();
}
const value = uni.getStorageSync('openid');
if (value) {} else {
uni.navigateTo({
url: '/pages/login/login'
})
}
},
onLoad() {
let that = this
@ -132,6 +126,11 @@
that.patientId = value
that.openid = value2
that.getinfo()
} else {
this.$refs.uToast.show({
title: '未登录,请先登录',
type: 'error',
})
}
},
methods: {

View File

@ -24,7 +24,7 @@
<view class="titles">
积分兑换
</view>
<view class="items" v-if="goodslist.length>0">
<view class="items" v-show="goodslist.length>0">
<view class="item" v-for="(item,index) in goodslist" :key="index">
<image :src="item.attributePitureUrl" mode=""></image>
<view class="title">
@ -43,7 +43,7 @@
</view>
</view>
</view>
<view class="noorder" v-else>
<view class="noorder" v-if="goodslist.length==0">
<u-empty mode="list" icon-size='220' text='暂无可兑换商品'></u-empty>
</view>
<u-mask :show="gainshow" @click="gainshow = false">
@ -296,7 +296,13 @@
}
}
})
} else {}
} else {
that.$refs.uToast.show({
title: '未登录,请先登录',
type: 'error',
duration: '2000',
})
}
let useritem = null
uni.$on('updata', function(data) {
if (data.useritem) {

View File

@ -42,9 +42,9 @@
},
onShow() {
var that = this
createMobileToken().then(res => {
uni.setStorageSync("token", res.data.token)
})
// createMobileToken().then(res => {
// uni.setStorageSync("token", res.data.token)
// })
setTimeout(() => {
uni.reLaunch({
url: '/pages/homepage/homepage'