2023-12-8

This commit is contained in:
2023-12-08 18:33:48 +08:00
parent 615911b6ee
commit b84753c252
6 changed files with 46 additions and 21 deletions

View File

@@ -165,7 +165,21 @@
") 0.75%,rgba(255,177,118," + x + ") 99.78%)"
},
clickIcon() {
uni.navigateBack()
// uni.navigateBack()
const pages = getCurrentPages()
// 有可返回的页面则直接返回uni.navigateBack 默认返回失败之后会自动刷新页面 ,无法继续返回
if (pages.length > 1) {
uni.navigateBack(1)
return;
}else{
uni.switchTab({
url: '/pages/card/card'
})
}
return;
}
}
}

View File

@@ -101,7 +101,7 @@
],
"globalStyle": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "uni-app",
"navigationBarTitleText": "云菜窖",
"navigationBarBackgroundColor": "#FE9039",
"backgroundColor": "#FE9039"
},

View File

@@ -138,16 +138,16 @@
},
detail(item) {
if (item.state == '失效') {
// 记录
uni.navigateTo({
url: '/pages/card/card_record?sid=' + item.sid
})
} else {
// 详情
if (item.showBtn) {
// 正常
uni.navigateTo({
url: '/pages/card/card_detail?sid=' + item.sid
})
} else {
// 过期 已完成
uni.navigateTo({
url: '/pages/card/card_detail2?sid=' + item.sid
})
}
},

View File

@@ -9,7 +9,8 @@
:end-change-height="page.endHeight">
</NavBar>
<view>
<image src="https://supervise.yxtsoft.com/lpk/image/card_example.png" mode="scaleToFill" style="width: 100%;height: 70vw"></image>
<image src="https://supervise.yxtsoft.com/lpk/image/card_example.png" mode="scaleToFill"
style="width: 100%;height: 70vw"></image>
</view>
</view>
@@ -85,6 +86,12 @@
}
}
},
onUnload() {
let pages = getCurrentPages().length - 1;
wx.navigateBack({
delta: pages
})
},
onLoad(options) {
let _this = this;
wx.login({

View File

@@ -27,6 +27,8 @@
<image src="https://supervise.yxtsoft.com/lpk/image/giftpack.png" mode="aspectFit"
style="margin-left: 20px;margin-right: 20px; width: 80vw;height: 25vw;"></image>
<text style="color: #fff;font-size: 18px;z-index: 10;position: absolute;margin-top: 11vw;">{{data.pname}}</text>
</view>
<loading-state ref="pageView" @request="request">
@@ -112,7 +114,7 @@
<view style="height: 50px;"></view>
<view v-if="data.showBtn" style="width: 100%; background-color: #fff;height: 15vw;position: fixed;bottom: 0;overflow:hidden;
<view v-if="data.notRese" style="width: 100%; background-color: #fff;height: 15vw;position: fixed;bottom: 0;overflow:hidden;
display: flex;flex-direction: row;" >
<view style="flex: 1;"></view>
<text style=" width: 20vw;font-size: 16px;color: #fff; background-color: #FF9D33;

View File

@@ -27,6 +27,8 @@
<image src="https://supervise.yxtsoft.com/lpk/image/giftpack.png" mode="aspectFit"
style="margin-left: 20px;margin-right: 20px; width: 80vw;height: 25vw;"></image>
<text style="color: #fff;font-size: 18px;z-index: 10;position: absolute;margin-top: 11vw;">{{data.pname}}</text>
</view>
<loading-state ref="pageView" @request="request">