Commit 3c801558 by zhangzhen

细节优化,加订阅消息提示

parent eebca2b1
......@@ -5,13 +5,14 @@
<text class="tips"><text class="text-bold">预定须知:</text> 预定成功后,请按预约时间及时到店消费,若无法及时到店消费,可提前取消订单</text>
</view>
<view class="part-right">
<text class="text-title text-xl text-bold">{{roomInfo.name||'一帆风顺'}}{{roomInfo.roomType?'【'+roomTypeEnum[roomInfo.roomType]+'】':''}}</text>
<view class="status-icon-box">
<view class="status-box" :class="'status-box-'+roomInfo.status">
<text>{{roomStatusEnum[roomInfo.status]}}</text>
</view>
<image class="img" :src="assetsPath+'/fa_icon_'+roomInfo.status+'.png'" mode="widthFix"></image>
<text
class="text-title text-xl text-bold">{{roomInfo.name||'一帆风顺'}}{{roomInfo.roomType?'【'+roomTypeEnum[roomInfo.roomType]+'】':''}}</text>
<view class="status-icon-box">
<view class="status-box" :class="'status-box-'+roomInfo.status">
<text>{{roomStatusEnum[roomInfo.status]}}</text>
</view>
<image class="img" :src="assetsPath+'/fa_icon_'+roomInfo.status+'.png'" mode="widthFix"></image>
</view>
</view>
<view class="part-left">
<image :src="roomInfo.images.length?roomInfo.images[0]:'../../static/blank2.jpg'" mode="widthFix">
......@@ -25,7 +26,7 @@
@tap="onTypeChange(i)">
<text class="text-gray text-xl text-bold">{{item.label}}</text>
<view class="line">
</view>
</view>
</view>
......@@ -45,115 +46,118 @@
</view>
</view>
</view>
<view class="flex-col data-content-box">
<view v-show="index==1" class="flex-col package-mode">
<view class="part-1">
<text class="text-title text-lg text-bold">套餐选择:</text>
</view>
<view class="flex-1 package-box">
<view v-for="(item,index) in packageMode" :key="index" class="flex-col item"
:class="{active: modeIndex===index,'item-3':packageMode.length<3,'item-n':packageMode.length>=3}" @tap="onChangeMode(index)">
<text class="text-title">{{item.name}}</text>
<view class="flex-row" style="margin-top: 12upx;">
<text style="margin-bottom: 4upx;"></text>
<text class="text-title text-bold text-xl">{{item.price}}</text>
<view v-show="index==1" class="flex-col package-mode">
<view class="part-1">
<text class="text-title text-lg text-bold">套餐选择:</text>
</view>
<view class="flex-1 package-box">
<view v-for="(item,index) in packageMode" :key="index" class="flex-col item"
:class="{active: modeIndex===index,'item-3':packageMode.length<3,'item-n':packageMode.length>=3}"
@tap="onChangeMode(index)">
<text class="text-title">{{item.name}}</text>
<view class="flex-row" style="margin-top: 12upx;">
<text style="margin-bottom: 4upx;"></text>
<text class="text-title text-bold text-xl">{{item.price}}</text>
</view>
</view>
</view>
</view>
</view>
<view v-show="orderType ===1 && index == 0" class="flex-col distance-mode">
<view class="distance-title">
<text class="text-title text-lg text-bold">时长选择:</text>
</view>
<view class="flex-1 distance-box">
<view v-for="(item,index) in distanceMode" :key="index" class="flex-col" style="margin: 0 12upx;"
@tap="onDurationChange(index)">
<view class="cu-tag radius" :class="index===distanceIndex? 'line-black':'line-gray'">
<text>{{ index >= distanceMode.length-1 && !editDuration.length ? item.duration: item.duration+'小时'}}</text>
<text v-if="index >= distanceMode.length-1" class="cuIcon-edit text-lg"></text>
</view>
<view v-show="orderType ===1 && index == 0" class="flex-col distance-mode">
<view class="distance-title">
<text class="text-title text-lg text-bold">时长选择:</text>
</view>
</view>
</view>
<view v-if="orderType ===2" class="flex-col distance-mode" style="margin: 40upx 20upx 40upx;">
<view class="distance-title">
<text class="text-title text-lg text-bold">时长选择:</text>
</view>
<view class="flex-1 distance-box">
<view v-for="(item,index) in distanceMode2" :key="index" class="flex-col" style="margin: 0 6upx;"
@tap="onDurationChange2(index)">
<view class="cu-tag radius" :class="index===distanceIndex? 'line-black':'line-gray'">
<text>{{item.duration<1?'半小时': item.duration+'小时'}}</text>
<view class="flex-1 distance-box">
<view v-for="(item,index) in distanceMode" :key="index" class="flex-col"
style="margin: 0 12upx;" @tap="onDurationChange(index)">
<view class="cu-tag radius" :class="index===distanceIndex? 'line-black':'line-gray'">
<text>{{ index >= distanceMode.length-1 && !editDuration.length ? item.duration: item.duration+'小时'}}</text>
<text v-if="index >= distanceMode.length-1" class="cuIcon-edit text-lg"></text>
</view>
</view>
</view>
</view>
</view>
<view class="flex-col date-mode">
<view class="flex-row date-box">
<view class="part-1">
<text class="text-title">开始时间</text>
</view>
<view class="part-2">
<view v-if="orderType ===2" class="flex-col distance-mode" style="margin: 40upx 20upx 40upx;">
<view class="distance-title">
<text class="text-title text-lg text-bold">时长选择:</text>
</view>
<view class="part-1 part-3">
<text class="text-title">结束时间</text>
<view class="flex-1 distance-box">
<view v-for="(item,index) in distanceMode2" :key="index" class="flex-col"
style="margin: 0 6upx;" @tap="onDurationChange2(index)">
<view class="cu-tag radius" :class="index===distanceIndex? 'line-black':'line-gray'">
<text>{{item.duration<1?'半小时': item.duration+'小时'}}</text>
</view>
</view>
</view>
</view>
<view class="flex-row date-box">
<view class="part-1">
<button class="cu-btn round" :class="orderType===1?'line-black':'line-gray'" @tap="onSelectDate">
<text>{{startTime}}</text>
<text class="cuIcon-edit"></text>
</button>
</view>
<view class="part-2">
<text class=" text-black text-lg"></text>
<view class="flex-col date-mode">
<view class="flex-row date-box">
<view class="part-1">
<text class="text-title">开始时间</text>
</view>
<view class="part-2">
</view>
<view class="part-1 part-3">
<text class="text-title">结束时间</text>
</view>
</view>
<view class="part-1 part-3">
<button class="cu-btn round line-gray">
<text>{{endTime}}</text>
</button>
<view class="flex-row date-box">
<view class="part-1">
<button class="cu-btn round" :class="orderType===1?'line-black':'line-gray'"
@tap="onSelectDate">
<text>{{startTime}}</text>
<text class="cuIcon-edit"></text>
</button>
</view>
<view class="part-2">
<text class=" text-black text-lg"></text>
</view>
<view class="part-1 part-3">
<button class="cu-btn round line-gray">
<text>{{endTime}}</text>
</button>
</view>
</view>
</view>
</view>
<view class="date-interval">
<view class="flex-1 flex-row">
<view class="round-box pink">
<view class="date-interval">
<view class="flex-1 flex-row">
<view class="round-box pink">
</view>
<text>已选时段</text>
</view>
<text>已选时段</text>
</view>
<view class="flex-1 flex-row">
<view class="round-box blank">
<view class="flex-1 flex-row">
<view class="round-box blank">
</view>
<text>可选时段</text>
</view>
<text>可选时段</text>
</view>
<view class="flex-1 flex-row">
<view class="round-box gray">
<view class="flex-1 flex-row">
<view class="round-box gray">
</view>
<text>不可选时段</text>
</view>
<text>不可选时段</text>
</view>
</view>
<view class="date-point-box">
<view v-for="(item,k) in intervalList" :key="k" class="date-point-item" @tap="onSelectDatePoint(item,k)">
<view class="date-point"
:class="item.status === 0?'free':item.status==1?'used': item.status==2?'checked':'error'">
<view class="date-point-box">
<view v-for="(item,k) in intervalList" :key="k" class="date-point-item"
@tap="onSelectDatePoint(item,k)">
<view class="date-point"
:class="item.status === 0?'free':item.status==1?'used': item.status==2?'checked':'error'">
</view>
<text class="text-gray">{{item.hour}}</text>
</view>
<text class="text-gray">{{item.hour}}</text>
</view>
</view>
</view>
</view>
<view class="flex-col count-price">
<view class="flex-between original-price">
......@@ -186,11 +190,12 @@
<view class="flex-between price">
<text class="text-black text-left">预约优惠</text>
<view class="flex-row">
<text class="text-pink text-sm text-bold" style="margin-bottom: 3upx;">{{computePriceInfo.couponFee>0?'-':''}}</text>
<text class="text-pink text-sm text-bold"
style="margin-bottom: 3upx;">{{computePriceInfo.couponFee>0?'-':''}}</text>
<text class="text-pink text-lg text-bold">{{computePriceInfo.couponFee}}</text>
</view>
</view>
<!-- <view class="flex-between price">
<!-- <view class="flex-between price">
<text class="text-title text-lg">账户余额</text>
<view class="flex-row text-pink">
<text class="text-title text-lg">¥0.00</text>
......@@ -207,7 +212,8 @@
</view>
</view>
<view class="btn-box">
<button v-if="orderType===1" class="cu-btn cu-btn-1 margin-right" @tap="onNavToCheckedCoupon">团购验券</button>
<button v-if="orderType===1" class="cu-btn cu-btn-1 margin-right"
@tap="onNavToCheckedCoupon">团购验券</button>
<button class="cu-btn cu-btn-2 " @tap="onOrderConfirm">{{orderType===1?'预约':'续单'}} </button>
</view>
</view>
......@@ -263,7 +269,8 @@
</view>
<view class="info-box">
<view class="info">
<text class="text-black text-lg">{{orderType==1? '预约':'续单'}}门店:{{roomInfo.storeName|| ''}}</text>
<text
class="text-black text-lg">{{orderType==1? '预约':'续单'}}门店:{{roomInfo.storeName|| ''}}</text>
</view>
<view class="info">
<text class="text-black text-lg">{{orderType==1? '预约':'续单'}}包间:{{roomInfo.name}}</text>
......@@ -281,7 +288,7 @@
<text class="text-red text-bold text-xl">客户须知</text>
</view>
<view class="flex-col text-red">
<text >1.预定的订单将全时段保留,迟到不可顺延和退款。</text>
<text>1.预定的订单将全时段保留,迟到不可顺延和退款。</text>
<text>2.若订单时段前包厢无使用.可提前开始订单.但订单总时长不变。</text>
<text>3.订单开始前0小时内取消订单需核收xx%退单费请合理规划您的时间。</text>
</view>
......@@ -292,13 +299,14 @@
<button class="cu-btn round block line-pink lg" @tap="onCancle">返回修改</button>
</view>
<view class="btn-box">
<button class="cu-btn round block bg-pink lg" @tap="onOrderCreate">立即{{orderType==1? '预约':'续单'}}</button>
<button class="cu-btn round block bg-pink lg"
@tap="onOrderCreate">立即{{orderType==1? '预约':'续单'}}</button>
</view>
</view>
</view>
</view>
</uni-popup>
<LoginPop ref="loginPop" @success='onLoading' />
<LoginPop ref="loginPop" @success='onLoading' />
</view>
</template>
......@@ -306,8 +314,12 @@
import LoginPop from "@/components/login/login"
import config from "@/config/index.config"
import moment from "@/common/moment_zh_cn.js";
import {dictList} from "@/api/index.js";
import {getDictItem} from "@/utils/tools.js"
import {
dictList
} from "@/api/index.js";
import {
getDictItem
} from "@/utils/tools.js"
import {
listSortDistance,
roomInfo
......@@ -360,8 +372,7 @@
],
// 时长选择
distanceIndex: 0,
distanceMode: [
{
distanceMode: [{
duration: 4
},
{
......@@ -374,8 +385,7 @@
duration: '其他',
}
],
distanceMode2:[
{
distanceMode2: [{
duration: 0.5
},
{
......@@ -437,9 +447,9 @@
totalFee: '',
},
dateObj: {},
preOrderNo:'',
roomStatusEnum:{},
roomTypeEnum:{}
preOrderNo: '',
roomStatusEnum: {},
roomTypeEnum: {}
};
},
onLoad(option) {
......@@ -448,17 +458,17 @@
})
this.onGetDicts();
this.id = option.roomId || 106;
if(option.orderNo){
if (option.orderNo) {
this.orderType = 2;
this.preOrderNo = option.orderNo;
uni.setNavigationBarTitle({
title:'房间续单'
title: '房间续单'
})
this.onGetOrderInfo()
}else{
} else {
this.onLoading()
}
},
methods: {
onGetDicts() {
......@@ -489,25 +499,25 @@
.split(",").map(val => this.hostUrl + val) : []
}
// 判断房间有没有绑定套餐
if (this.orderType ===1 && this.roomInfo.packList && this.roomInfo.packList.length) {
if (this.orderType === 1 && this.roomInfo.packList && this.roomInfo.packList.length) {
this.packageMode = this.roomInfo.packList
this.index = 1;
this.modeIndex = 0;
}else{
} else {
this.index = 0;
this.orderTypeList = this.orderTypeList.filter(item=>item.type==1)
this.orderTypeList = this.orderTypeList.filter(item => item.type == 1)
}
this.onGetSortDistance()
}
})
},
onGetOrderInfo(){
getOrderInfoByNo(this.preOrderNo).then(res=>{
if(res.data.code == 200){
onGetOrderInfo() {
getOrderInfoByNo(this.preOrderNo).then(res => {
if (res.data.code == 200) {
let endDate = res.data.data.endDate || res.data.data.preEndDate;
this.startTime = moment(endDate).format("HH:mm");
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)
this.onLoading()
}
})
......@@ -550,29 +560,29 @@
}).join(":")
} else {
// 小时模式
if(this.orderType ===1){
if (this.orderType === 1) {
this.duration = Number(this.distanceMode[this.distanceIndex].duration);
}else if(this.orderType ===2){
} else if (this.orderType === 2) {
this.duration = Number(this.distanceMode2[this.distanceIndex].duration);
}
if(this.orderType === 2 && this.duration<1){
let startDateArr = this.startTime.split(":").map(item=>Number(item))
if (this.orderType === 2 && this.duration < 1) {
let startDateArr = this.startTime.split(":").map(item => Number(item))
// 分钟
let m = startDateArr[1]+60*this.duration
if(m>=60){
startDateArr[0]+=1
if(startDateArr[0]>23){
startDateArr[0] = startDateArr[0]-23
let m = startDateArr[1] + 60 * this.duration
if (m >= 60) {
startDateArr[0] += 1
if (startDateArr[0] > 23) {
startDateArr[0] = startDateArr[0] - 23
}
startDateArr[1] = m-60
}else{
startDateArr[1] = m - 60
} else {
startDateArr[1] = m
}
this.endTime = startDateArr.map(num => num >= 10 ? num : `0${num}` ).join(':');
}else{
this.endTime = startDateArr.map(num => num >= 10 ? num : `0${num}`).join(':');
} else {
this.endTime = this.startTime.split(":").map((item, k) => {
let num = ''
if (k == 0) {
......@@ -582,7 +592,7 @@
num = Number(item) + this.duration
}
} else {
num = Number(item)
}
return num >= 10 ? num : `0${num}`
......@@ -596,14 +606,14 @@
// 更新时间的选取状态
onUpdateIntervalList() {
this.useDateStatus = true
let start = Number(this.startTime.split(":")[0])
let startM = Number(this.startTime.split(":")[1])
let end = Number(this.endTime.split(":")[0])
let endM = Number(this.endTime.split(":")[1])
if (end < start) {
end += 24
}
......@@ -613,10 +623,10 @@
]
for (start; start <= end; start++) {
// 在时间小时段内,在被占用的情况下,新增订单的开始分钟时间需要占用结束时间后,结束分钟时间需在时间占用开始前
if (this.dateIntervalList[start].status === 1
&& startM < moment(this.dateIntervalList[start].endHoldTime).format("mm")
&& endM >= moment(this.dateIntervalList[start].startHoldTime).format("mm")
) {
if (this.dateIntervalList[start].status === 1 &&
startM < moment(this.dateIntervalList[start].endHoldTime).format("mm") &&
endM >= moment(this.dateIntervalList[start].startHoldTime).format("mm")
) {
// 表示时间点被占用,无法选择
this.useDateStatus = false
this.intervalList[start] = {
......@@ -651,13 +661,13 @@
preStartDate: dateObj.startDate,
preEndDate: dateObj.endDate
}).then(res => {
if (res.data.code == 200) {
if (res.data && res.data.data.length) {
this.useCouponList = res.data.data.filter(item => item.isAvailable === 0).sort((a,
b) => b.subPrice - a.subPrice);
}
}else if(res.data.code == 200){
} else if (res.data.code == 200) {
this.$refs.loginPop.open();
}
this.onComputePrice();
......@@ -717,10 +727,10 @@
},
// 下单模式切换
onTypeChange(i) {
if(this.orderType ==2){
if (this.orderType == 2) {
uni.showToast({
icon:'none',
title:'房间续单无法选择套餐模式'
icon: 'none',
title: '房间续单无法选择套餐模式'
})
return
}
......@@ -750,14 +760,14 @@
this.onSetEndTime()
},
onDateChange(k) {
if(this.orderType ==2) return;
if (this.orderType == 2) return;
if (this.dateIndex === k) return;
this.dateIndex = k
this.onGetSortDistance()
},
// 开始选择时间
onSelectDate() {
if(this.orderType === 2) return;
if (this.orderType === 2) return;
if (!this.checkedIndex.length) {
let arr = this.startTime.split(":")
if (arr.length) {
......@@ -772,7 +782,7 @@
} else {
this.checkedDateList = [Number(arr[0]) + 1, 0]
}
}
}
}
......@@ -780,7 +790,7 @@
this.$refs.popup.open()
},
// 切换时间
// 切换时间
onBindChange(e) {
this.checkedIndex = e.target.value
},
......@@ -810,7 +820,7 @@
this.distanceMode[this.distanceIndex] = {
duration: this.editDuration[0] + 1,
}
this.onHideModal()
this.$forceUpdate();
this.onSetEndTime()
......@@ -822,7 +832,7 @@
onCancle() {
this.$refs.confirmPop.close();
},
onOrderConfirm(){
onOrderConfirm() {
if (!this.useDateStatus) {
uni.showToast({
icon: "none",
......@@ -830,9 +840,24 @@
})
return
}
this.$refs.confirmPop.open();
if (uni.getStorageSync("orderUseMessage")) {
this.$refs.confirmPop.open();
}else{
wx.requestSubscribeMessage({
tmplIds: ['K8fbcKVq46w9o7Ekpesn74WPjwxnbso947YZiYBQw9c',
'HB2_moQRQrXC2cKw6zE08NU3AQO9Ggj3aAOg0lIgecg',
'oTc000e4NHkoc7v9OLBZiwM6Q6SFzguemrx6d0iuVS8'
],
success: (res) => {
uni.setStorageSync("orderUseMessage", true);
this.$refs.confirmPop.open();
},
complete: (res) => {
console.log(res, 909090)
}
})
}
},
onOrderCreate() {
this.onCancle();
uni.showLoading({
......@@ -850,22 +875,22 @@
preEndDate: dateObj.endDate,
totalFee: Number(this.roomInfo.price) * this.duration,
payFee: this.computePriceInfo.payFee || 0,
packId:this.index>0? this.packageMode[this.modeIndex].id : ''
packId: this.index > 0 ? this.packageMode[this.modeIndex].id : ''
}
if(this.orderType === 2 && this.preOrderNo){
if (this.orderType === 2 && this.preOrderNo) {
params.preOrderNo = this.preOrderNo
}
orderCreate(params).then(res => {
uni.hideLoading()
if (res.data.code == 200) {
if(res.data.data.jsConfig){
if (res.data.data.jsConfig) {
wx.requestPayment({
"timeStamp": res.data.data.jsConfig.timeStamp,
"nonceStr": res.data.data.jsConfig.nonceStr,
"package": res.data.data.jsConfig.packages,
"signType": res.data.data.jsConfig.signType,
"paySign": res.data.data.jsConfig.paySign,
"success":(resp)=>{
"success": (resp) => {
// 支付成功
uni.showToast({
icon: "success",
......@@ -873,33 +898,31 @@
success: () => {
setTimeout(() => {
uni.navigateTo({
url: "/pages/orderResult/orderResult?orderNo=" +
res.data.data.orderNo
url: `/pages/orderResult/orderResult?orderNo=${res.data.data.orderNo}&success=true`
})
}, 1500)
}
})
},
"fail":(resp)=>{
"fail": (resp) => {
// 取消支付或支付失败
uni.showToast({
title: "取消支付或支付失败"
})
// 调用取消订单接口
},
"complete":(resp)=>{
"complete": (resp) => {
// 接口调用结束的回调函数(调用成功、失败都会执行)
}
});
}else{
} else {
uni.showToast({
icon: "success",
title: "下单成功",
success: () => {
setTimeout(() => {
uni.navigateTo({
url: "/pages/orderResult/orderResult?orderNo=" +
res.data.data.orderNo
url: `/pages/orderResult/orderResult?orderNo=${res.data.data.orderNo}&success=true`
})
}, 1000)
}
......@@ -907,8 +930,8 @@
}
} else {
uni.showToast({
icon:"none",
title:res.data.msg || "下单失败"
icon: "none",
title: res.data.msg || "下单失败"
})
}
})
......@@ -935,35 +958,35 @@
title: "功能暂未开发"
})
},
onNavToCheckedCoupon(){
onNavToCheckedCoupon() {
uni.navigateTo({
url:"/pages/couponCheck/couponCheck?openShopUuid="+this.roomInfo.openShopUuid,
events: {
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
acceptData(data){
if(data.data){
this.onGetUseCoupon()
}
}
}
url: "/pages/couponCheck/couponCheck?openShopUuid=" + this.roomInfo.openShopUuid,
events: {
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
acceptData(data) {
if (data.data) {
this.onGetUseCoupon()
}
}
}
})
},
onSelectDatePoint(val,i){
console.log(val,i)
if(i<24){
if(val.status ==1){
let mTime=moment(val.endHoldTime).format("mm")
console.log(mTime,"分钟数据")
if( mTime>= '59' ){
onSelectDatePoint(val, i) {
console.log(val, i)
if (i < 24) {
if (val.status == 1) {
let mTime = moment(val.endHoldTime).format("mm")
console.log(mTime, "分钟数据")
if (mTime >= '59') {
uni.showToast({
icon:'none',
title:'当前时段不可选'
icon: 'none',
title: '当前时段不可选'
})
}else{
} else {
this.startTime = `${i}:${mTime}`;
this.onSetEndTime()
}
}else{
} else {
this.startTime = `${i}:00`;
this.onSetEndTime()
}
......@@ -1010,24 +1033,29 @@
padding: 30upx;
background-color: #ffffff;
align-items: center;
.part-2 {
display: flex;
align-items: center;
width: 100%;
height: 100upx;
background: #F8EDDD;
border-radius: 50rpx;
padding: 0 30upx;
.tips{
line-height: 36upx;
}
text{
color: #C98D35;
}
.part-2 {
display: flex;
align-items: center;
width: 100%;
height: 100upx;
background: #F8EDDD;
border-radius: 50rpx;
padding: 0 30upx;
.tips {
line-height: 36upx;
}
text {
color: #C98D35;
}
}
.part-left {
display: block;
width: 100%;
image {
display: block;
width: 100%;
......@@ -1041,38 +1069,44 @@
align-items: center;
width: 100%;
padding: 20upx 6upx;
.status-icon-box{
.status-icon-box {
display: flex;
flex-direction: row;
align-items: center;
.status-box{
.status-box {
background: #F0F9EB;
border: 2upx solid #67C23A;
box-shadow: 0rpx 5rpx 13rpx 0rpx rgba(0,0,0,0.1);
box-shadow: 0rpx 5rpx 13rpx 0rpx rgba(0, 0, 0, 0.1);
border-radius: 6px;
font-size: 28upx;
padding: 8upx 30upx 8upx 16upx;
color: #67C23A;
}
.status-box-0{
.status-box-0 {
background: #F0F9EB;
border: 2upx solid #67C23A;
color: #67C23A;
}
.status-box-1{
.status-box-1 {
background: #FDF6EC;
border: 2upx solid #F5DAB1;
color: #F5DAB1;
}
.status-box-3{
.status-box-3 {
background: #ECF5FF;
border: 2upx solid #B3D8FF;
color: #B3D8FF;
}
.img{
.img {
width: 68upx;
margin-left: -30upx;
max-height: 180upx ;
max-height: 180upx;
}
}
......@@ -1093,6 +1127,7 @@
justify-content: center;
width: 100%;
background: #ffffff;
.tab-item {
position: relative;
display: flex;
......@@ -1100,12 +1135,14 @@
align-items: center;
height: 80upx;
width: 36%;
text {
color: #000000;
font-size: 34upx;
font-weight: 600;
}
.line{
.line {
position: absolute;
width: 30%;
height: 2px;
......@@ -1119,40 +1156,46 @@
text {
color: #DBA556;
}
.line{
.line {
background: #DBA556;
}
}
}
.date-content-box{
.date-content-box {
width: 100%;
background-color: #FFF7F5;
}
.date-tips{
.date-tips {
display: flex;
flex-direction: row;
align-items: center;
width: 92%;
margin: 30upx auto 12upx;
.text-2{
.text-2 {
color: #8C8C8C;
}
}
.date-box {
position: relative;
margin: 10upx 30upx;
.date-item {
position: relative;
justify-content: center;
align-items: center;
padding: 40upx 0 12upx 0;
z-index: 10;
text {
color: #6B0000;
}
.text-first{
.text-first {
letter-spacing: 4upx;
}
}
......@@ -1170,7 +1213,8 @@
width: 20%;
height: 100%;
transition: left 0.3s ease-in-out;
.img{
.img {
width: 100%;
height: 100%;
border-radius: 12upx;
......@@ -1178,16 +1222,19 @@
}
}
.data-content-box{
.data-content-box {
width: 100%;
background-color: #ffffff;
}
.package-mode {
padding: 0 30upx 30upx;
border-bottom: 2upx solid #F1F1F1;
.part-1{
border-bottom: 2upx solid #F1F1F1;
.part-1 {
margin: 30upx 0;
}
.package-box {
.item {
margin: 0 1.5%;
......@@ -1196,22 +1243,27 @@
border: 1px solid transparent;
border-radius: 12upx;
padding: 12upx 0;
color: #333333;
color: #333333;
background-color: #F7F8FA;
.flex-row {
align-items: flex-end;
}
}
.item-3{
.item-3 {
width: 30%;
}
.item-n{
.item-n {
flex: 1;
}
.active {
background: #FBF6EE;
background: #FBF6EE;
border: 1px solid #DBA556;
text{
text {
color: #B67D32;
}
}
......@@ -1221,9 +1273,10 @@
.distance-mode {
margin: 10upx 30upx;
.distance-title{
.distance-title {
margin: 20upx 0;
}
.distance-box {
display: flex;
flex-direction: row;
......@@ -1239,24 +1292,28 @@
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
.part-1{
width: 100%;
.part-1 {
display: flex;
flex: 1;
justify-content: center;
align-items: center;
}
.part-2{
.part-2 {
display: flex;
justify-content: center;
align-items: center;
width: 60upx;
}
.part-3{
text{
.part-3 {
text {
color: #8C8C8C;
}
}
.cu-btn {
width: 80%;
font-size: 32upx;
......@@ -1358,18 +1415,20 @@
background-color: #ffffff;
margin-top: 30upx;
min-height: 300upx;
padding:0 0 15upx;
padding: 0 0 15upx;
overflow: hidden;
align-items: center;
.text-left{
.text-left {
width: 120upx;
text-align-last: justify;
}
.original-price {
width: 100%;
padding: 30upx 30upx 15upx;
.flex-row{
.flex-row {
align-items: flex-end;
}
......@@ -1385,11 +1444,12 @@
}
}
.use-coupon-box{
.flex-row{
.use-coupon-box {
.flex-row {
max-width: 70%;
}
}
.line {
width: 94%;
border-top: 2upx solid rgba(255, 170, 255, 0.8);
......@@ -1407,9 +1467,10 @@
width: 100%;
height: 120rpx;
background: #FFFFFF;
box-shadow: 0rpx 5rpx 25rpx 0rpx rgba(0,0,0,0.1);
box-shadow: 0rpx 5rpx 25rpx 0rpx rgba(0, 0, 0, 0.1);
padding: 0 30upx;
z-index: 111;
>.flex-row {
display: flex;
flex-direction: row;
......@@ -1422,12 +1483,13 @@
color: #e03997;
}
}
.btn-box{
.cu-btn-1{
.btn-box {
.cu-btn-1 {
width: 159rpx;
line-height: 58rpx;
background: linear-gradient(97deg, #FADB4A, #FFA751);
box-shadow: 0rpx 5rpx 9rpx 0rpx rgba(54,4,9,0.42);
box-shadow: 0rpx 5rpx 9rpx 0rpx rgba(54, 4, 9, 0.42);
opacity: 0.95;
border-radius: 29rpx;
font-size: 30upx;
......@@ -1435,11 +1497,12 @@
color: #ffffff;
padding: 0;
}
.cu-btn-2{
.cu-btn-2 {
width: 159rpx;
line-height: 58rpx;
background: linear-gradient(97deg, #E5268B, #FD5661);
box-shadow: 0rpx 5rpx 9rpx 0rpx rgba(54,4,9,0.42);
box-shadow: 0rpx 5rpx 9rpx 0rpx rgba(54, 4, 9, 0.42);
opacity: 0.95;
border-radius: 29rpx;
text-align: center;
......@@ -1480,17 +1543,20 @@
min-height: 50vh;
background-color: #ffffff;
border-radius: 20upx;
.info-box {
display: flex;
flex-direction: column;
width: 92%;
margin: 0 auto;
margin: 0 auto;
padding-top: 12upx 0;
.info {
padding: 12upx 0;
font-size: 20upx;
}
}
.title {
display: flex;
justify-content: center;
......@@ -1499,18 +1565,21 @@
padding: 20upx;
border-bottom: 1px solid #ffaaff;
}
.flex-1{
.flex-1 {
display: flex;
flex: 1;
width: 100%;
justify-content: center;
padding-top: 40upx;
.tip-box{
.tip-box {
padding-top: 40upx;
width: 92%;
border-top: 1px dashed #ffaaff;
.flex-col{
text{
.flex-col {
text {
line-height: 52upx;
}
}
......@@ -1529,5 +1598,4 @@
}
}
}
</style>
\ No newline at end of file
......@@ -16,7 +16,7 @@
<text class="cuIcon cuIcon-title text-pink"></text>
<text class="text-title text-bold text-xl">{{item.storeName||'门店名称'}}</text>
</view>
<text :class="item.status==1?'text-pink':item.status==0?'text-cyan':item.status==2?'text-gray':'text-red'">{{orderStatusEnum[item.status]}}</text>
<text :class="item.status==1?'text-pink':item.status==0?'text-cyan':item.status==2?'text-gray':'text-red'">{{item.status>=3? refundStatusEnum[item.refundStatus]: orderStatusEnum[item.status]}}</text>
</view>
<view class="flex-row room-image-box">
......@@ -162,7 +162,12 @@ import NoLogin from "@/components/noLogin/noLogin"
},
loginStatus:true,
orderStatusEnum:{},
roomTypeEnum:{}
roomTypeEnum:{},
refundStatusEnum:{
1:'退款中',
2:'退款中',
3:'已退款'
}
};
},
onLoad() {
......
......@@ -80,7 +80,7 @@
<view class="part">
<button class="cu-btn block round line-pink lg" @tap="onNavToShare">分享好友</button>
</view>
<view class="part">
<view v-is="orderInfo.status == 1" class="part">
<button class="cu-btn block round bg-mauve lg" @tap="onNavToOrder">房间续单</button>
</view>
</view>
......@@ -140,7 +140,10 @@
this.orderNo = option.orderNo;
this.onGetDicts()
this.onLoading();
this.onMessagePush()
if(option.success){
this.onMessagePush()
}
},
methods:{
onGetDicts() {
......@@ -237,15 +240,7 @@
})
},
onMessagePush(){
if( !uni.getStorageSync("orderUseMessage")){
uni.requestSubscribeMessage({
tmplIds:['oTc000e4NHkoc7v9OLBZiwM6Q6SFzguemrx6d0iuVS8'],
complete: (res) => {
console.log(res,909090)
uni.setStorageSync("orderUseMessage",true);
}
})
}
}
}
}
......
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