修复:酒道馆登录token过期后未正常处理,导致移动端依然可以登录但是不能正常使用

修复:由于编码问题,在真机上面不能正常进行扫码核销提货券
文字修改:部分优惠券修改为提货券
This commit is contained in:
wuhui_zzw 2024-03-13 12:04:14 +08:00
parent 87a4f5aefb
commit f9f1467368
6 changed files with 42 additions and 19 deletions

View File

@ -6,13 +6,13 @@ let VUE_APP_WS_URL = `ws://${location.hostname}?type=user`
let openPlantGrass = '-openPlantGrass-' let openPlantGrass = '-openPlantGrass-'
// 网络接口修改此字符 小程序域名要求https // 网络接口修改此字符 小程序域名要求https
let httpApi = 'https://bt.test.cdlfjy.com/' // 开发 // let httpApi = 'https://bt.test.cdlfjy.com/' // 开发
// let httpApi = 'https://mp.scwmbh.cn/' // 生产 let httpApi = 'https://mp.scwmbh.cn/' // 生产
// 聊天接口修改此字符 小程序聊天要求wss 例如: // 聊天接口修改此字符 小程序聊天要求wss 例如:
let wsApi = 'wss://bt.test.cdlfjy.com' // let wsApi = 'wss://bt.test.cdlfjy.com'
// let wsApi = 'wss://mp.scwmbh.cn' let wsApi = 'wss://mp.scwmbh.cn'
module.exports = { module.exports = {

View File

@ -239,7 +239,7 @@
{ {
"path": "user_coupon/index", "path": "user_coupon/index",
"style": { "style": {
"navigationBarTitleText": "我的优惠券" "navigationBarTitleText": "我的提货券"
} }
}, },
{ {
@ -584,7 +584,7 @@
{ {
"path": "write_off/index", "path": "write_off/index",
"style": { "style": {
"navigationBarTitleText": "优惠券核销" "navigationBarTitleText": "提货券核销"
} }
} }
] ]

View File

@ -75,7 +75,7 @@ export default {
if(merchantInfo.merchant_type == 1){ if(merchantInfo.merchant_type == 1){
// //
list.push({ list.push({
title: '优惠券核销', title: '提货券核销',
url: '/pages/users/write_off/index', url: '/pages/users/write_off/index',
icon: 'iconfont icon-dingdanhexiao' icon: 'iconfont icon-dingdanhexiao'
}); });

View File

@ -16,9 +16,10 @@
</view> </view>
<view class="name">{{ item.mer_name || '' }}</view> <view class="name">{{ item.mer_name || '' }}</view>
</view> </view>
<view class="right" @click="autoLogin(item)"> <view v-if="item.exp > current_timestamp" class="right" @click="autoLogin(item)">
登录 <text class="iconfont icon-xiangyou"></text> 登录 <text class="iconfont icon-xiangyou"></text>
</view> </view>
<view v-else class="right not-btn">已过期</view>
</view> </view>
</view> </view>
<!--新账号登录--> <!--新账号登录-->
@ -73,6 +74,9 @@ export default {
account: '', account: '',
password: '' password: ''
}, },
//
intervalId: '',
current_timestamp: 0,
} }
}, },
computed: { computed: {
@ -94,6 +98,17 @@ export default {
// //
this.init(); this.init();
}, },
onShow() {
let _this = this;
_this.intervalId = setInterval(function () {
const now = new Date();
_this.current_timestamp = Math.ceil(now.getTime() / 1000)
}, 1000); //
},
onUnload() {
//
if (this.intervalId) clearInterval(this.intervalId);
},
onReady() { onReady() {
this.login_bg = `${HTTP_REQUEST_URL}/static/images/mer/mer_login_bg.png`; this.login_bg = `${HTTP_REQUEST_URL}/static/images/mer/mer_login_bg.png`;
this.list_bg = `${HTTP_REQUEST_URL}/static/images/mer/mer_login_list.png`; this.list_bg = `${HTTP_REQUEST_URL}/static/images/mer/mer_login_list.png`;
@ -169,6 +184,10 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.not-btn{
background-color: #909399!important;
color: #fff!important;
}
.existed-content{ .existed-content{
width: 100vw !important; width: 100vw !important;
min-height: 100vh !important; min-height: 100vh !important;
@ -230,7 +249,7 @@ export default {
} }
} }
.right{ .right{
width: 110rpx; width: 120rpx;
background: #b51613; background: #b51613;
color: #e6babe; color: #e6babe;
border-radius: 150rpx; border-radius: 150rpx;
@ -349,10 +368,6 @@ export default {
text-align: center; text-align: center;
border-radius: 100rpx; border-radius: 100rpx;
} }
.not-btn{
background-color: #909399!important;
color: #fff!important;
}
} }
} }
} }

View File

@ -44,7 +44,7 @@
<view class="line-title" :class="item._type === 0 ? 'bg-color-huic' : 'bg-color-check'" v-else-if="item.coupon && item.coupon.type === 11">品类券</view> <view class="line-title" :class="item._type === 0 ? 'bg-color-huic' : 'bg-color-check'" v-else-if="item.coupon && item.coupon.type === 11">品类券</view>
<view class="line-title" :class="item._type === 0 ? 'bg-color-huic' : 'bg-color-check'" v-else-if="item.coupon && item.coupon.type === 10">通用券</view> <view class="line-title" :class="item._type === 0 ? 'bg-color-huic' : 'bg-color-check'" v-else-if="item.coupon && item.coupon.type === 10">通用券</view>
<view class="line-title" :class="item._type === 0 ? 'bg-color-huic' : 'bg-color-check'" v-else-if="item.coupon && item.coupon.type === 12">跨店券</view> <view class="line-title" :class="item._type === 0 ? 'bg-color-huic' : 'bg-color-check'" v-else-if="item.coupon && item.coupon.type === 12">跨店券</view>
<view class="line-title" :class="item._type === 0 ? 'bg-color-huic' : 'bg-color-check'" v-else-if="item.coupon && item.coupon.type === 13">核销券</view> <view class="line-title" :class="item._type === 0 ? 'bg-color-huic' : 'bg-color-check'" v-else-if="item.coupon && item.coupon.type === 13">提货券<!--核销券--></view>
<view class="line-title" :class="item._type === 0 ? 'bg-color-huic' : 'bg-color-check'" v-else>商品券</view> <view class="line-title" :class="item._type === 0 ? 'bg-color-huic' : 'bg-color-check'" v-else>商品券</view>
<view class="line1 coupon-title">{{item.coupon_title}}</view> <view class="line1 coupon-title">{{item.coupon_title}}</view>
</view> </view>
@ -220,7 +220,7 @@
let pages = getCurrentPages(); let pages = getCurrentPages();
let page = pages[pages.length - 1] let page = pages[pages.length - 1]
let shareData = { let shareData = {
title: '我的优惠券', title: '我的提货券',
path: page.$page.fullPath || '/' + page.route, path: page.$page.fullPath || '/' + page.route,
}; };
// //
@ -231,7 +231,7 @@
// //
onShareTimeline() { onShareTimeline() {
let shareData = { let shareData = {
title: '我的优惠券', title: '我的提货券',
query: {}, query: {},
}; };
// //

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="page"> <view class="page">
<view class="OrderCancellation"> <view class="OrderCancellation">
<view class="header" :style="{ 'background-image': `url(${domain}/static/images/cancellation-header.png)`}"> <view class="header" :style="{ 'background-image': `url(${domain}/static/images/coupon_wiff_header.jpg)`}">
</view> </view>
<view class="scan_count"> <view class="scan_count">
<view class="scan_bg"></view> <view class="scan_bg"></view>
@ -139,10 +139,18 @@
// scanType: ["qrCode", "barCode"], // scanType: ["qrCode", "barCode"],
success(res) { success(res) {
console.log(res); console.log(res);
// self.write_code = res.result
// self.goCallate()
let page = res.path || ''; let page = res.path || '';
let pathArr = page.split('?');
let path = pathArr[1];
let reg = new RegExp("scene=","g");
let paramsStr = path.replace(reg,"");
if(page){ if(page){
if(res.charSet != 'ISO8859-1'){
page = pathArr[0] + '?scene=' + encodeURIComponent(paramsStr)
console.log('真机处理',page)
}
//
uni.redirectTo({ uni.redirectTo({
url: '/' + page url: '/' + page
}) })