1.修复登录状态过期时的提示和跳转逻辑 - 在接口请求中增加401 错误的处理,显示登录过期提示并跳转到登录页面
2. 添加游客访问功能 - 在登录页面添加游客访问按钮,点击后跳转到首页 3.优化支付成功页面的数据加载 - 增加多个数据加载方法以适应不同的支付场景 4. 修复委托绘画页面的加载逻辑 - 修复了委托绘画页面的加载问题,增加了错误提示
This commit is contained in:
parent
5411bd7850
commit
5df9de86b2
@ -4,7 +4,7 @@
|
||||
*/
|
||||
export default {
|
||||
config: {
|
||||
baseUrl: "https://warehouse.szjixun.cn", //"http://172.16.100.93:8017", //"http://192.168.88.175:9021",//测试 'https://warehouse.szjixun.cn' 正式 https://stock.szjixun.cn
|
||||
baseUrl: "https://stock.szjixun.cn", //"http://172.16.100.93:8017", //"http://192.168.88.175:9021",//测试 'https://warehouse.szjixun.cn' 正式 https://stock.szjixun.cn
|
||||
header: {
|
||||
"Content-Type": "application/json;charset=UTF-8",
|
||||
// 'Content-Type':'application/x-www-form-urlencoded'
|
||||
@ -61,13 +61,22 @@ export default {
|
||||
}
|
||||
}
|
||||
if (response.data?.status === 401) {
|
||||
let curPage = getCurrentPages();
|
||||
let route = curPage[curPage.length - 1].route; //获取当前页面的路由
|
||||
if (route !== "pages/login/login") {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login",
|
||||
});
|
||||
}
|
||||
uni.showModal({
|
||||
title:'登录后使用完整功能',
|
||||
success:(res)=>{
|
||||
if (res.confirm){
|
||||
let curPage = getCurrentPages();
|
||||
let route = curPage[curPage.length - 1].route; //获取当前页面的路由
|
||||
if (route !== "pages/login/login") {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
// 统一的响应日志记录
|
||||
_reslog(response);
|
||||
|
@ -552,8 +552,15 @@ export default {
|
||||
uni.navigateTo({
|
||||
url: `/pages/signwebview/index`,
|
||||
});
|
||||
this.loading=false
|
||||
|
||||
}else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
this.loading=false
|
||||
},
|
||||
async obtainAmount(index,list=false){
|
||||
let data={
|
||||
|
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="main">
|
||||
<view class="ykfw" @click="goRouter">游客访问</view>
|
||||
<image src="@/static/image/logo.png" mode="scaleToFill" class="logo" />
|
||||
<view class="btn">
|
||||
<u-button v-if="isShow" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" color="transparent"
|
||||
@ -22,6 +23,11 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
goRouter(){
|
||||
uni.switchTab({
|
||||
url: '/pages/home/index'
|
||||
});
|
||||
},
|
||||
async getPhoneNumber(e) {
|
||||
if (e.detail.errMsg == "getPhoneNumber:ok") {
|
||||
// 用户允许或去手机号
|
||||
@ -111,7 +117,14 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
|
||||
position: relative;
|
||||
.ykfw{
|
||||
height: 50rpx;
|
||||
position:absolute;
|
||||
top: 20rpx;
|
||||
right: 40rpx;
|
||||
color: #fff;
|
||||
}
|
||||
.logo {
|
||||
margin-top: 250rpx;
|
||||
width: 398rpx;
|
||||
|
@ -85,6 +85,24 @@ export default {
|
||||
if (res1.code === 200) {
|
||||
this.info = res1.data
|
||||
}
|
||||
},
|
||||
async getData1() {
|
||||
const data1 = {
|
||||
ID: Number(this.$mp.query.ID)
|
||||
}
|
||||
const res1 = await postDataByParams('/api/v2/warehouse/detail', data1)
|
||||
if (res1.code === 200) {
|
||||
this.info = res1.data
|
||||
}
|
||||
},
|
||||
async getData2() {
|
||||
const data1 = {
|
||||
ID: Number(this.$mp.query.ID)
|
||||
}
|
||||
const res1 = await postDataByParams('/api/v2/warehouse/detail', data1)
|
||||
if (res1.code === 200) {
|
||||
this.info = res1.data
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user