Commit 4886270f by zhangzhen

细节优化

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