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'); uni.removeStorageSync('phone');
let pages = getCurrentPages(); let pages = getCurrentPages();
let path = pages[pages.length - 1].$page.fullPath let path = pages[pages.length - 1].$page.fullPath
if (path == '/pages/integral/integral') {} else if (path == let paths = path.split('?')
'/pages/CommodityOrder/CommodityOrder') {} else if (path == console.log(paths)
'/pages/coupon/coupon') {} else if (path == if (paths == '/pages/integral/integral' || paths ==
'/pages/Nursingstationserviceorder/Nursingstationserviceorder') {} else { '/pages/shopping/shopping' || paths ==
'/pages/coupon/coupon' || paths ==
'/pages/materialbenefits/materialbenefits') {} else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/login/login' url: '/pages/login/login'
}) })

View File

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

View File

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

View File

@ -24,7 +24,7 @@
<view class="titles"> <view class="titles">
积分兑换 积分兑换
</view> </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"> <view class="item" v-for="(item,index) in goodslist" :key="index">
<image :src="item.attributePitureUrl" mode=""></image> <image :src="item.attributePitureUrl" mode=""></image>
<view class="title"> <view class="title">
@ -43,7 +43,7 @@
</view> </view>
</view> </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> <u-empty mode="list" icon-size='220' text='暂无可兑换商品'></u-empty>
</view> </view>
<u-mask :show="gainshow" @click="gainshow = false"> <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 let useritem = null
uni.$on('updata', function(data) { uni.$on('updata', function(data) {
if (data.useritem) { if (data.useritem) {

View File

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