Commit 4886270f by zhangzhen

细节优化

parent 9d82608f
......@@ -26,8 +26,6 @@
// })
// }
uni.removeStorageSync('storeId')
uni.getSystemInfo({
success: (e) => {
Vue.prototype.screenHeight = e.screenHeight;
......
const CONFIG = {
// 开发环境配置
development: {
assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
// assetsPath: 'http://127.0.0.1:8211/static', // 静态资源路径
baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
hostUrl: 'https://www.coujio.com/prod-api', // H5地址(前端运行地址)
// baseUrl: 'http://192.168.1.189:8883/front', // 后台接口请求地址
// hostUrl: 'http://192.168.1.189:8882', // H5地址(前端运行地址)
// assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
assetsPath: 'https://coujiao.pseer.com/wechat_static', // 静态资源路径
// assetsPath: 'http://localhost:8211/static', // 静态资源路径
// baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
baseUrl: 'https://coujiao.pseer.com/front-api', // 后台接口请求地址
// baseUrl: 'http://10.24.3.185:8883/front-api',
// hostUrl: 'https://www.coujio.com/prod-api', // H5地址(前端运行地址)
hostUrl: 'https://coujiao.pseer.com/prod-api', // H5地址(前端运行地址)
websocketUrl: '', // websocket服务端地址
weixinAppId: '' ,// 微信公众号appid
codeHeadUrl:"",
......@@ -14,9 +16,12 @@ const CONFIG = {
},
// 生产环境配置
production: {
assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
hostUrl: 'https://www.coujio.com/prod-api', // H5地址(前端运行地址)
assetsPath: 'https://coujiao.pseer.com/wechat_static', // 静态资源路径
// assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
baseUrl: 'https://coujiao.pseer.com/front-api', // 后台接口请求地址
// baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
hostUrl: 'https://coujiao.pseer.com/prod-api', // H5地址(前端运行地址)
// hostUrl: 'https://www.coujio.com/prod-api', // H5地址(前端运行地址)
websocketUrl: '', // websocket服务端地址
weixinAppId: '', // 微信公众号appid
codeHeadUrl:"",
......
......@@ -267,6 +267,9 @@
}
},
onShow() {
if(uni.getStorageSync("storeId")){
uni.removeStorageSync('storeId')
}
this.onGetSysConfig();
this.list = [];
this.onSetShowPoint()
......
......@@ -637,8 +637,12 @@
},
onGetOrderInfo() {
getOrderInfoByNo(this.preOrderNo).then(res => {
console.log(res,"订单信息")
if (res.data.code == 200) {
let endDate = res.data.data.endDate || res.data.data.preEndDate;
if(res.data.data.status ==2){
endDate = moment().format('YYYY-MM-DD HH:mm')
}
this.startTime = moment(endDate).format("HH:mm");
let date = moment(endDate).format("YYYY-MM-DD")
this.dateIndex = this.dateList.findIndex(item => item.readDate === date)
......
......@@ -87,7 +87,7 @@
</view>
</view>
<view v-if="orderInfo.status <= 1 && !orderInfo.refundStatus" class="part-2">
<view v-if="(orderInfo.status <= 1 && !orderInfo.refundStatus) || continStatus" class="part-2">
<view class="flex-between title">
<view class="flex-row">
<text class="cuIcon-titles text-pink text-xl"></text>
......@@ -95,13 +95,13 @@
</view>
</view>
<view class="flex-between btn-box">
<view class="part">
<view v-if="orderInfo.status <= 1" class="part">
<button class="cu-btn block round bg-pink lg" :class="openDoorStatus?'bg-gray':'bg-pink'" @tap="onOpenDoor">进店开门</button>
</view>
<view class="part">
<button class="cu-btn block round line-pink lg" open-type="share">分享好友</button>
</view>
<view v-if="orderInfo.status === 1 && userInfo.id == orderInfo.consumerId" class="part">
<view v-if="(continStatus || orderInfo.status ==1) && userInfo.id == orderInfo.consumerId" class="part">
<button class="cu-btn block round bg-mauve lg" @tap="onNavToOrder">房间续单</button>
</view>
</view>
......@@ -148,6 +148,7 @@
},
data() {
return {
continStatus: false,
orderNo:'',
orderInfo:{},
assetsPath: config.assetsPath,
......@@ -207,6 +208,13 @@
},
onLoading(){
getOrderInfoByNo(this.orderNo).then(res=>{
if(res.data.data.status ===2){
let nowTime = moment().valueOf();
let endTime = moment(res.data.data.endDate).valueOf();
if(nowTime-endTime< 15*60*1000){
this.continStatus = true;
}
}
this.close()
if(res.data.code == 200){
this.orderInfo = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment