Commit 292a4643 by zhangzhen

优化

parent 5c27c749
......@@ -14,7 +14,7 @@
</view>
<view class="input-box">
<view class="cu-form-group">
<input class="input" placeholder="点击输入卡券兑换码" name="input" v-mode="code"></input>
<input type="number" class="input" placeholder="点击输入卡券兑换码" v-model="code"></input>
<text class="cuIcon-qr_code text-gray text-xxl" @tap="onScanCode"></text>
</view>
</view>
......
......@@ -12,8 +12,8 @@
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item" @tap="onNavToOrderInfo(item)">
<view class="flex-between part-1">
<text class="text-title text-bold text-xl">一帆风顺(111)</text>
<text class="text-pink">待使用</text>
<text class="text-title text-bold text-xl">{{item.roomName||'房间名称'}}</text>
<text class="text-pink">{{orderStatusEnum[item.status]}}</text>
</view>
<view class="flex-between part-1">
<view class="">
......@@ -24,9 +24,9 @@
<text>{{item.orderType==1?'房间预定':'房间续订'}}</text>
</view>
</view>
<view class="flex-between part-1">
<view v-if="item.couponId" class="flex-between part-1">
<text>优惠券抵扣</text>
<text>四小时75元优惠券</text>
<text>{{item.couponName}}</text>
</view>
<view class="flex-row part-1">
<text>订单编号:</text>
......@@ -58,6 +58,9 @@
} from "@/api/order.js"
import list from "../../uni_modules/uview-ui/libs/config/props/list";
import NoLogin from "@/components/noLogin/noLogin"
import {
getDictItem
} from "@/utils/tools.js"
export default {
components:{
......@@ -97,7 +100,8 @@ import NoLogin from "@/components/noLogin/noLogin"
pageNum: 1,
pageSize: 10
},
loginStatus:true
loginStatus:true,
orderStatusEnum:{}
};
},
onLoad() {
......@@ -110,9 +114,24 @@ import NoLogin from "@/components/noLogin/noLogin"
}
},
onShow() {
this.onLoading()
this.onGetDicts()
},
methods: {
onGetDicts() {
let dicts = []
if (uni.getStorageSync('dicts')) {
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
})
}
},
onLoading() {
uni.showLoading({
title: '加载中'
......
......@@ -26,12 +26,12 @@
</view>
<button class="cu-btn line-pink">
<text>导航</text>
<image src="../../static/map_icon.png" mode="heightFix"></image>
<image :src="assetsPath+'/map_icon.png'" mode="heightFix"></image>
</button>
</view>
<view class="flex-row">
<view class="part-img">
<image src="../../static/blank2.jpg" mode="scaleToFill"></image>
<image :src="assetsPath+'/blank2.jpg'" mode="scaleToFill"></image>
</view>
<view class="flex-1 flex-col">
<view class="info">
......@@ -104,6 +104,7 @@
import {getOrderInfoByNo} from "@/api/order.js"
import moment from "@/common/moment_zh_cn.js";
import {openDoor} from "@/api/order.js"
import config from "@/config/index.config"
export default {
components:{
......@@ -113,6 +114,7 @@
return {
orderNo:'',
orderInfo:{},
assetsPath: config.assetsPath,
};
},
onLoad(option) {
......
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