-
11.hbuilderx/launch.json
-
87src/components/order_list/retail/retail.vue
-
63src/components/order_list/ym_card/ym_card.vue
-
10src/components/site/order_modal/order_modal.vue
-
8src/js/api.js
-
2src/js/once_name.js
-
1src/js/server.js
-
36src/pages.json
-
26src/pages/order_list/order_list.vue
-
10src/pages/site/manage/manage.vue
-
6src/pages/write_off/operate/operate.vue
-
127src/pages/write_off/ym_card_gated/ym_card_gated.vue
-
193src/pages/write_off/ym_confirm/ym_confirm.vue
-
477src/subpackage/device/pages/air_conditioner/detail/detail.vue
-
200src/subpackage/device/pages/switch_manage/switch_manage.vue
-
BINsrc/subpackage/device/static/images/air_conditioner/close.png
-
BINsrc/subpackage/device/static/images/air_conditioner/heating.png
-
BINsrc/subpackage/device/static/images/air_conditioner/in_under_heating.png
-
BINsrc/subpackage/device/static/images/air_conditioner/lock.png
-
BINsrc/subpackage/device/static/images/air_conditioner/normal.png
-
BINsrc/subpackage/device/static/images/air_conditioner/open.png
-
BINsrc/subpackage/device/static/images/air_conditioner/refrigeration.png
-
BINsrc/subpackage/device/static/images/air_conditioner/switch.png
-
BINsrc/subpackage/device/static/images/air_conditioner/temp_add.png
-
BINsrc/subpackage/device/static/images/air_conditioner/temp_reduce.png
-
BINsrc/subpackage/device/static/images/air_conditioner/under_heating.png
-
BINsrc/subpackage/device/static/images/air_conditioner/ventilate.png
-
BINsrc/subpackage/device/static/images/air_conditioner/wind_0.png
-
BINsrc/subpackage/device/static/images/air_conditioner/wind_1.png
-
BINsrc/subpackage/device/static/images/air_conditioner/wind_2.png
-
BINsrc/subpackage/device/static/images/air_conditioner/wind_3.png
-
5src/subpackage/order/js/api.js
-
11src/subpackage/order/pages/mall/check_logistic/check_logistic.vue
-
11src/subpackage/order/pages/mall/refund_operate/refund_operate.vue
-
21src/subpackage/order/pages/mall/send_out/send_out.vue
-
4src/subpackage/order/pages/order_manage/order_manage.vue
-
140src/subpackage/order/pages/retail/detail/detail.vue
-
295src/subpackage/order/pages/ym_card/detail/detail.vue
-
112src/subpackage/order/pages/ym_card/use_record/use_record.vue
-
BINsrc/subpackage/order/static/images/order_manage/order_18.png
-
BINsrc/subpackage/order/static/images/order_manage/order_19.png
-
BINsrc/subpackage/order/static/images/ym_card/status_1.png
-
BINsrc/subpackage/order/static/images/ym_card/status_2.png
-
BINsrc/subpackage/order/static/images/ym_card/status_3.png
@ -1,11 +0,0 @@ |
|||
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ |
|||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 |
|||
"version": "0.0", |
|||
"configurations": [{ |
|||
"type": "uniCloud", |
|||
"default": { |
|||
"launchtype": "remote" |
|||
} |
|||
} |
|||
] |
|||
} |
@ -0,0 +1,87 @@ |
|||
<template> |
|||
<view class="retail-order" @click="toInfo"> |
|||
<a-header :source="orderInfo.source || '-'" :status="getStatus(orderInfo.pay_status)"></a-header> |
|||
<!-- 商品名称: 操作人: 购买时间: --> |
|||
<view class="ro-info"> |
|||
<a-line :value="orderInfo.order_no || '-'"> |
|||
<block slot="name">订单编号:</block> |
|||
</a-line> |
|||
<a-line :value="getGoodsName || '-'"> |
|||
<block slot="name">商品名称:</block> |
|||
</a-line> |
|||
<a-line :value="orderInfo.sys_optuname || '-'"> |
|||
<block slot="name">操作人:</block> |
|||
</a-line> |
|||
<a-line :value="orderInfo.pay_time || '-'"> |
|||
<block slot="name">购买时间:</block> |
|||
</a-line> |
|||
</view> |
|||
<view class="ro-total"><text>合计支付:</text>¥{{ orderInfo.pay_amount || 0 }}</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '../../../utils/util'; |
|||
import a_header from '../a_header/a_header.vue'; |
|||
import a_line from '../a_line/a_line.vue'; |
|||
export default { |
|||
computed: { |
|||
getGoodsName(){ |
|||
let { orderInfo } = this; |
|||
let _ls = orderInfo&&orderInfo.retail_order_goods || []; |
|||
let _str = _ls.map(e=>e.name).join(';'); |
|||
if(_ls.length)_str += ';' |
|||
return _str |
|||
} |
|||
}, |
|||
components: { |
|||
'a-header': a_header, |
|||
'a-line': a_line, |
|||
}, |
|||
props: { |
|||
orderInfo: { |
|||
default: {}, |
|||
type: Object |
|||
} |
|||
}, |
|||
methods: { |
|||
getStatus(status){ |
|||
let _obj = { |
|||
1: '交易成功' |
|||
} |
|||
return _obj[status] || '-' |
|||
}, |
|||
toInfo(){ |
|||
let { orderInfo } = this; |
|||
util.routeTo(`/subpackage/order/pages/retail/detail/detail?order_no=${orderInfo.order_no}`, 'nT'); |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
@import '~style/public.scss'; |
|||
.retail-order{ |
|||
background-color: #fff; |
|||
padding: 0 20upx 20upx; |
|||
border-radius: 10upx; |
|||
} |
|||
.ro-info{ |
|||
|
|||
} |
|||
.ro-total{ |
|||
line-height: 96upx; |
|||
font-size: 28upx; |
|||
color: #1a1a1a; |
|||
font-weight: 500; |
|||
text-align: right; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
white-space: nowrap; |
|||
>text{ |
|||
color: #9a9a9d; |
|||
font-weight: 400; |
|||
} |
|||
|
|||
} |
|||
</style> |
@ -0,0 +1,63 @@ |
|||
<template> |
|||
<view class="ym-card-container" @click="toInfo"> |
|||
<a-header :source="orderInfo.extension.name || '-'" :status="statusTxt(orderInfo.status)"></a-header> |
|||
<view class="ycc-info"> |
|||
<a-line :value="orderInfo.card_info.name || '-'"> |
|||
<block slot="name">卡名称:</block> |
|||
</a-line> |
|||
<a-line :value="orderInfo.card_no || '-'"> |
|||
<block slot="name">年月卡号:</block> |
|||
</a-line> |
|||
<a-line :value="orderInfo.mobile || '-'"> |
|||
<block slot="name">手机号码:</block> |
|||
</a-line> |
|||
<a-line :value="'至' + (orderInfo.expired_at || '-')"> |
|||
<block slot="name">有效期:</block> |
|||
</a-line> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '../../../utils/util'; |
|||
import a_header from '../a_header/a_header.vue'; |
|||
import a_line from '../a_line/a_line.vue'; |
|||
export default { |
|||
components: { |
|||
'a-header': a_header, |
|||
'a-line': a_line, |
|||
}, |
|||
props: { |
|||
orderInfo: { |
|||
default: { |
|||
card_info: {}, |
|||
extension: {} |
|||
}, |
|||
} |
|||
}, |
|||
methods: { |
|||
toInfo(){ |
|||
let { orderInfo } = this; |
|||
util.routeTo(`/subpackage/order/pages/ym_card/detail/detail?id=${orderInfo.id}&card_no=${orderInfo.card_no}`, 'nT'); |
|||
}, |
|||
statusTxt(status){ |
|||
let _obj = { |
|||
0: '待激活', |
|||
1: '使用中', |
|||
2: '已失效', |
|||
3: '已退卡', |
|||
} |
|||
return _obj[status] || '-' |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
@import '~style/public.scss'; |
|||
.ym-card-container{ |
|||
background-color: #fff; |
|||
padding: 0 20upx 20upx; |
|||
border-radius: 10upx; |
|||
} |
|||
</style> |
@ -0,0 +1,127 @@ |
|||
<template> |
|||
<view class="ym-card-gated"> |
|||
<view class="ycg-stadium">{{ pageInfo.orderInfo.extension.stadium_name || '-' }}</view> |
|||
<view class="ycg-suc-tip">核销成功</view> |
|||
<view class="ycg-back-btn" @click="backBtn">返回继续核销</view> |
|||
<view class="ycg-open-tip" v-if="pageInfo.gates&&pageInfo.gates.length">如需开门,请点击</view> |
|||
<view class="ycg-btn-ls"> |
|||
<view class="ybl-item" v-for="(e, i) in pageInfo.gates" :key="i"> |
|||
<view class="yi-name">{{ e.hardware_name || '-' }}</view> |
|||
<view class="yi-btn" @click="openBtn(e.id)">开门</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { API } from '../../../js/api'; |
|||
import { servers } from '../../../js/server'; |
|||
import { WRITE_OFF_YM_ORDER_INFO } from '../../../js/once_name'; |
|||
import util from '../../../utils/util'; |
|||
export default { |
|||
data(){ |
|||
return { |
|||
pageInfo: { |
|||
orderInfo: { extension: {} }, |
|||
gates: [], |
|||
} |
|||
} |
|||
}, |
|||
onLoad(options){ |
|||
util.$_once(WRITE_OFF_YM_ORDER_INFO, data => { |
|||
console.warn(data) |
|||
this.pageInfo = data; |
|||
}) |
|||
}, |
|||
methods: { |
|||
backBtn(){ |
|||
util.routeTo(); |
|||
}, |
|||
openBtn: util.debounce(function(id){ |
|||
let { pageInfo } = this; |
|||
util.showLoad(); |
|||
servers.get({ |
|||
url: API.writeOff.userMonthlyCardOpenGate, |
|||
data: { gate_id: id, card_no: pageInfo.orderInfo.card_no }, |
|||
isDefaultGet: false |
|||
}) |
|||
.then(res=>{ |
|||
util.hideLoad(); |
|||
if(res.data.code == 0){ |
|||
util.showNone(res.data.message || '操作成功!'); |
|||
}else{ |
|||
util.showNone(res.data.message || '操作失败!'); |
|||
} |
|||
}) |
|||
.catch(util.hideLoad) |
|||
}, 300, true) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
@import '~style/public.scss'; |
|||
page{ |
|||
background-color: #fff; |
|||
} |
|||
.ym-card-gated{ |
|||
padding: 0 30upx; |
|||
.ycg-stadium{ |
|||
padding: 30upx 0; |
|||
font-size: 32upx; |
|||
color: #1a1a1a; |
|||
border-bottom: 2upx solid #E5E5E5; |
|||
} |
|||
.ycg-suc-tip{ |
|||
padding: 100upx 0 200upx; |
|||
text-align: center; |
|||
line-height: 60upx; |
|||
font-size: 50upx; |
|||
color: #333; |
|||
} |
|||
.ycg-back-btn{ |
|||
margin: 0 auto 50upx; |
|||
width: 250upx; |
|||
height: 88upx; |
|||
line-height: 88upx; |
|||
text-align: center; |
|||
font-size: 32upx; |
|||
color: $themeColor; |
|||
border: 2upx solid $themeColor; |
|||
border-radius: 6upx; |
|||
} |
|||
.ycg-open-tip{ |
|||
margin-bottom: 50upx; |
|||
font-size: 24upx; |
|||
line-height: 32upx; |
|||
color: #9a9a9d; |
|||
} |
|||
.ycg-btn-ls{ |
|||
padding: 0 24upx; |
|||
.ybl-item{ |
|||
border-bottom: 2upx solid #f2f2f7; |
|||
padding: 30upx 0; |
|||
@include centerFlex(space-between); |
|||
.yi-name{ |
|||
flex-grow: 1; |
|||
font-size: 28upx; |
|||
line-height: 32upx; |
|||
color: #333; |
|||
@include textHide(1); |
|||
} |
|||
.yi-btn{ |
|||
flex-shrink: 0; |
|||
margin-left: 20upx; |
|||
width: 128upx; |
|||
height: 66upx; |
|||
line-height: 66upx; |
|||
font-size: 32upx; |
|||
text-align: center; |
|||
border-radius: 10upx; |
|||
background-color: $themeColor; |
|||
color: #fff; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,193 @@ |
|||
<template> |
|||
<view class="ym-confirm"> |
|||
<view class="yc-header"> |
|||
<view class="yh-stadium">{{ orderInfo.extension.stadium_name || '-' }}</view> |
|||
<view class="yh-info"> |
|||
<view>今天剩余可使用:{{ orderInfo.extension.rest_number || '0' }}次</view> |
|||
<view>进场状态:<text>{{ orderInfo.enter_status == 0?'离场':orderInfo.enter_status == 1?'进场':'' }}</text></view> |
|||
<view v-if="orderInfo.enter_status == 1">进场时间:{{ orderInfo.latest_enter_time || '-' }}</view> |
|||
</view> |
|||
</view> |
|||
<view class="yc-user-info"> |
|||
<view class="yui-tit">持卡人信息</view> |
|||
<view class="yui-line">手机号码:{{ orderInfo.mobile || '-' }}</view> |
|||
<view class="yui-line">用户昵称:{{ orderInfo.nickname || '-' }}</view> |
|||
</view> |
|||
<view class="yc-photo" v-if="!!orderInfo.user_face"> |
|||
<view>照片</view> |
|||
<image mode="aspectFit" @click="previewImg(orderInfo.user_face)" :src="orderInfo.user_face"></image> |
|||
</view> |
|||
|
|||
<view class="yc-card-mes"> |
|||
<view class="ycm-tit">年月卡信息</view> |
|||
<view class="ycm-line">年月卡名称:{{ orderInfo.card_info.name || '-' }}</view> |
|||
<view class="ycm-line">年月卡卡号:{{ orderInfo.card_no || '-' }}</view> |
|||
<view class="ycm-line">验证码:{{ orderInfo.verify_code || '-' }}</view> |
|||
<view class="ycm-line">生成时间:{{ orderInfo.created_at || '-' }}</view> |
|||
<view class="ycm-line">失效时间:{{ orderInfo.expired_at || '-' }}</view> |
|||
</view> |
|||
<view class="yc-btns"> |
|||
<view class="green" @click="confirmBtn">确认核销</view> |
|||
<!-- <view>仅核销</view> --> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '../../../utils/util'; |
|||
import { API } from '../../../js/api'; |
|||
import { servers } from '../../../js/server'; |
|||
import { WRITE_OFF_YM_ORDER_INFO, WRITE_OFF_ORDER_INFO } from '../../../js/once_name'; |
|||
export default { |
|||
data(){ |
|||
return { |
|||
type: '', // verify_code -> 5: 验证码核销(商家助手) | decrypt_text -> 6: 扫码核销(商家助手) |
|||
orderInfo: { |
|||
extension: {}, |
|||
card_info: {} |
|||
} |
|||
} |
|||
}, |
|||
onLoad(options){ |
|||
if(options.type)this.type = options.type || ''; |
|||
util.$_once(WRITE_OFF_ORDER_INFO, data => { |
|||
console.warn(data) |
|||
this.orderInfo = data; |
|||
}) |
|||
}, |
|||
methods: { |
|||
previewImg(url){ |
|||
if(!url)return |
|||
uni.previewImage({ urls: [ url ] }); |
|||
}, |
|||
confirmBtn: util.debounce(function(){ |
|||
let { orderInfo, type } = this; |
|||
servers.post({ |
|||
url: API.writeOff.userMonthlyCardVerify, |
|||
data: { |
|||
brand_id: orderInfo.brand_id, |
|||
card_no: orderInfo.card_no, |
|||
stadium_id: orderInfo.stadium_id, |
|||
type: type == 'verify_code'? 5 : 6, |
|||
}, |
|||
isDefaultGet: false, |
|||
}) |
|||
.then(res=>{ |
|||
if(res.data.code == 0){ |
|||
util.showNone(res.data.message || '操作成功!'); |
|||
let { orderInfo } = this; |
|||
let _ls = res.data.data&&res.data.data.gates || []; |
|||
setTimeout(_=>{ |
|||
util.$_emit(WRITE_OFF_YM_ORDER_INFO, { |
|||
orderInfo, |
|||
gates: _ls |
|||
}); |
|||
util.routeTo(`/pages/write_off/ym_card_gated/ym_card_gated`, 'rT'); |
|||
}, 1200); |
|||
}else{ |
|||
util.showNone(res.data.message || '操作失败!'); |
|||
} |
|||
}) |
|||
}, 300, true) |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
@import '~style/public.scss'; |
|||
page{ |
|||
background-color: #fff; |
|||
} |
|||
.ym-confirm{ |
|||
padding-bottom: 24upx; |
|||
padding-bottom: calc( 24upx + constant(safe-area-inset-bottom)); /* 兼容 iOS < 11.2 */ |
|||
padding-bottom: calc( 24upx + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */ |
|||
.yc-header{ |
|||
padding: 0 30upx; |
|||
border-bottom: 2upx solid #f2f2f7; |
|||
.yh-stadium{ |
|||
padding: 30upx 0; |
|||
font-size: 32upx; |
|||
color: #1a1a1a; |
|||
border-bottom: 2upx solid #E5E5E5; |
|||
} |
|||
.yh-info{ |
|||
padding: 20upx 0; |
|||
>view{ |
|||
margin-bottom: 10upx; |
|||
font-size: 28upx; |
|||
line-height: 52upx; |
|||
color: #333333; |
|||
@include textHide(1); |
|||
>text{ |
|||
color: $themeColor; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.yc-user-info{ |
|||
padding: 30upx; |
|||
border-bottom: 2upx solid #f2f2f7; |
|||
.yui-tit{ |
|||
margin-bottom: 20upx; |
|||
font-size: 28upx; |
|||
line-height: 52upx; |
|||
color: #9C9C9F; |
|||
} |
|||
.yui-line{ |
|||
font-size: 28upx; |
|||
line-height: 52upx; |
|||
color: #333; |
|||
@include textHide(1); |
|||
} |
|||
} |
|||
.yc-photo{ |
|||
display: flex; |
|||
padding: 30upx; |
|||
border-bottom: 2upx solid #f2f2f7; |
|||
>view{ |
|||
margin-right: 50upx; |
|||
font-size: 28upx; |
|||
line-height: 52upx; |
|||
color: #9c9c9f; |
|||
} |
|||
>image{ |
|||
flex-shrink: 0; |
|||
width: 218upx; |
|||
height: 218upx; |
|||
border-radius: 10upx; |
|||
} |
|||
} |
|||
.yc-card-mes{ |
|||
padding: 30upx 30upx 0; |
|||
.ycm-tit{ |
|||
margin-bottom: 20upx; |
|||
line-height: 52upx; |
|||
color: #9c9c9f; |
|||
} |
|||
.ycm-line{ |
|||
line-height: 52upx; |
|||
font-size: 28upx; |
|||
color: #333; |
|||
@include textHide(1); |
|||
} |
|||
} |
|||
.yc-btns{ |
|||
padding: 152upx 64upx 24upx; |
|||
>view{ |
|||
margin-bottom: 24upx; |
|||
line-height: 108upx; |
|||
text-align: center; |
|||
border-radius: 10upx; |
|||
border: 2upx solid $themeColor; |
|||
font-size: 32upx; |
|||
color: $themeColor; |
|||
&.green{ |
|||
background-color: $themeColor; |
|||
color: #fff; |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
</style> |
@ -0,0 +1,477 @@ |
|||
<template> |
|||
<view class="air-conditioner-detail"> |
|||
<view class="acd-tit">{{ airName || '-' }}</view> |
|||
<view class="acd-panel"> |
|||
<view class="ap-top-info"> |
|||
<view class="ati-box ati-temp"> |
|||
<view class="ab-tit">温度</view> |
|||
<view class="at-info"> |
|||
<view class="ai-btn"> |
|||
<image mode="aspectFit" :src="getIconPath('temp_add')" @click="tempBtn('add')"></image> |
|||
</view> |
|||
<view class="ai-temp"> |
|||
<view class="at-num">{{ pageInfo.temperature || 0 }}</view> |
|||
<view class="at-unit">℃</view> |
|||
</view> |
|||
<view class="ai-btn"> |
|||
<image mode="aspectFit" :src="getIconPath('temp_reduce')" @click="tempBtn('reduce')"></image> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="ati-box ati-wind"> |
|||
<view class="ab-tit">风速</view> |
|||
<!-- 1: 低速, 2:中,3:高,4:自动 --> |
|||
<view class="aw-txt">{{ getSpeedName(pageInfo.speed || 0) }}</view> |
|||
</view> |
|||
</view> |
|||
<view class="ap-btns"> |
|||
<view class="ab-item" @click="operateBtn({ op: 'on' })"> |
|||
<image mode="aspectFit" :src="getIconPath('open')"></image> |
|||
<view>开</view> |
|||
</view> |
|||
<view class="ab-item" @click="operateBtn({ op: 'off' })"> |
|||
<image mode="aspectFit" :src="getIconPath('close')"></image> |
|||
<view>关</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="acd-btn-ls"> |
|||
<view class="abl-tit">模式</view> |
|||
<view class="abl-ls"> |
|||
<view class="al-item" hover-class="acd-hover-active" v-for="(e, i) in modelLs" :key="i" @click="operateBtn({ op: 'mode', ext: e.mode })"> |
|||
<view class="ai-icon" :class="[e.mode == pageInfo.mode? 'active': '']"> |
|||
<image mode="aspectFit" :src="getIconPath(e.icon)"></image> |
|||
</view> |
|||
<view class="ai-txt">{{ e.name || '-' }}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="acd-btn-ls"> |
|||
<view class="abl-tit">风速</view> |
|||
<view class="abl-ls"> |
|||
<view class="al-item" hover-class="acd-hover-active" v-for="(e, i) in airSpeedLs" :key="i" @click="operateBtn({ op: 'speed', ext: e.speed })"> |
|||
<view class="ai-icon" :class="[e.speed == pageInfo.speed? 'active': '']"> |
|||
<image mode="aspectFit" :src="getIconPath(e.icon)"></image> |
|||
</view> |
|||
<view class="ai-txt">{{ e.name || '-' }}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- 后台:水阀的不管 隐藏掉 --> |
|||
<!-- <view class="acd-btn-ls"> |
|||
<view class="abl-tit">水阀</view> |
|||
<view class="abl-ls"> |
|||
<view class="al-item" v-for="(e, i) in hydrovalveLs" :key="i"> |
|||
<view class="ai-icon"> |
|||
<image mode="aspectFit" :src="getIconPath(e.icon)"></image> |
|||
</view> |
|||
<view class="ai-txt">{{ e.name || '-' }}</view> |
|||
</view> |
|||
</view> |
|||
</view> --> |
|||
<view class="acd-btn-ls"> |
|||
<view class="abl-tit">允许使用按钮</view> |
|||
<view class="abl-ls"> |
|||
<view class="al-item" hover-class="acd-hover-active" v-for="(e, i) in allowLs" :key="i" @click="operateBtn({ op: e.op })"> |
|||
<view class="ai-icon"> |
|||
<image mode="aspectFit" :src="getIconPath(e.icon)"></image> |
|||
</view> |
|||
<view class="ai-txt">{{ e.name || '-' }}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import deviceServer from '../../../js/device_server'; |
|||
import deviceApi from '../../../js/device_api'; |
|||
import util from '../../../../../utils/util'; |
|||
|
|||
/* |
|||
+ info 获取信息状态 |
|||
+ st 设置温度(value:{op:"st",ext:"24"}) 10 - 50 |
|||
+ mode 模式设置(value:{op:"mode",ext:"1"}) // 0:内机制热, 1:内机地暖同时制热(默认), 2:地暖制热,3:制冷模式,9:通风模式 |
|||
+ speed 风速设置(value:{op:"speed",ext:"1"}) // 1: 低速, 2:中,3:高,4:自动 |
|||
+ lock 锁 |
|||
+ unlock 解锁 |
|||
+ on 开 |
|||
+ off 关 |
|||
*/ |
|||
export default { |
|||
computed: { |
|||
modelLs(){ |
|||
return ([ |
|||
{ |
|||
id: 1, |
|||
name: '内机制热', |
|||
icon: 'heating', |
|||
mode: 0, |
|||
}, |
|||
{ |
|||
id: 2, |
|||
name: '内机地暖 制热', |
|||
icon: 'in_under_heating', |
|||
mode: 1, |
|||
}, |
|||
{ |
|||
id: 3, |
|||
name: '地暖制热', |
|||
icon: 'under_heating', |
|||
mode: 2, |
|||
}, |
|||
{ |
|||
id: 4, |
|||
name: '制冷', |
|||
icon: 'refrigeration', |
|||
mode: 3, |
|||
}, |
|||
{ |
|||
id: 5, |
|||
name: '通风', |
|||
icon: 'ventilate', |
|||
mode: 9, |
|||
}, |
|||
]) |
|||
}, |
|||
airSpeedLs(){ |
|||
return ([ |
|||
{ |
|||
id: 1, |
|||
name: '高', |
|||
icon: 'wind_3', |
|||
speed: 3, |
|||
}, |
|||
{ |
|||
id: 2, |
|||
name: '中', |
|||
icon: 'wind_2', |
|||
speed: 2, |
|||
}, |
|||
{ |
|||
id: 3, |
|||
name: '低', |
|||
icon: 'wind_1', |
|||
speed: 1, |
|||
}, |
|||
{ |
|||
id: 4, |
|||
name: '自动', |
|||
icon: 'wind_0', |
|||
speed: 4, |
|||
}, |
|||
]) |
|||
}, |
|||
hydrovalveLs(){ |
|||
return ([ |
|||
{ |
|||
id: 1, |
|||
name: '开', |
|||
icon: 'open' |
|||
}, |
|||
{ |
|||
id: 2, |
|||
name: '关', |
|||
icon: 'close' |
|||
}, |
|||
]) |
|||
}, |
|||
allowLs(){ |
|||
return ([ |
|||
|
|||
{ |
|||
id: 2, |
|||
name: '开机', |
|||
icon: 'switch', |
|||
op: 'on', |
|||
}, |
|||
{ |
|||
id: 3, |
|||
name: '关机', |
|||
icon: 'close', |
|||
op: 'off', |
|||
}, |
|||
{ |
|||
id: 1, |
|||
name: '解锁', |
|||
icon: 'normal', |
|||
op: 'unlock', |
|||
}, |
|||
{ |
|||
id: 4, |
|||
name: '全锁', |
|||
icon: 'lock', |
|||
op: 'lock', |
|||
}, |
|||
]) |
|||
}, |
|||
}, |
|||
data(){ |
|||
return { |
|||
subpackInfo: {}, |
|||
pageInfo: {}, |
|||
airName: '' |
|||
} |
|||
}, |
|||
onLoad(options){ |
|||
console.warn('qrstr', options.qrstr); |
|||
if(options.name)this.airName = options.name; |
|||
let _qyObj = null; |
|||
try{ |
|||
_qyObj = util.jsonPar(options.qrstr); |
|||
}catch(err){ |
|||
console.warn('json ERR', err); |
|||
} |
|||
if(!_qyObj)return; |
|||
console.warn('_qyObj', _qyObj); |
|||
_qyObj = this.setExt({ query: _qyObj, value: '', }); |
|||
this.subpackInfo = _qyObj; |
|||
this.operateReq({ data: _qyObj, isTip: false }); |
|||
}, |
|||
methods: { |
|||
tempBtn: util.debounce(function(type){ |
|||
let { pageInfo } = this; |
|||
let _num = pageInfo.temperature || 0; |
|||
_num = type == 'add' ? ++_num : type == 'reduce' ? --_num : _num; |
|||
this.operateReq({ data: this.getOperateData({ op: 'st', ext: _num }), isTip: false }); |
|||
|
|||
}, 300, true), |
|||
|
|||
operateBtn: util.debounce(function({ op='', ext='' }){ |
|||
let { subpackInfo } = this; |
|||
this.operateReq({ |
|||
data: this.getOperateData({ op, ext }) |
|||
}) |
|||
.then(res=>{ |
|||
if(res == 'success'){ |
|||
setTimeout(_=>{ |
|||
this.operateReq({ data: this.getOperateData({ op: 'st', }), isTip: false }); |
|||
}, 1200) |
|||
} |
|||
}) |
|||
}, 300, true), |
|||
getOperateData({ op='', ext='' }){ |
|||
let { subpackInfo } = this; |
|||
let _obj = null; |
|||
_obj = this.setOp({ query: subpackInfo, value: op, }); |
|||
_obj = this.setExt({ query: subpackInfo, value: ext, }); |
|||
return _obj; |
|||
}, |
|||
getSpeedName(speed){ |
|||
switch(+speed){ |
|||
case 1: |
|||
return '低速' |
|||
case 2: |
|||
return '中速' |
|||
case 3: |
|||
return '高速' |
|||
case 4: |
|||
return '自动' |
|||
default: |
|||
return '-' |
|||
} |
|||
}, |
|||
setExt({query, value}){ |
|||
if(query.data.toString() !== '[object Object]')query.data = {}; |
|||
if(query.data.value.toString() !== '[object Object]')query.data.value = {}; |
|||
query.data&&query.data.value&&(query.data.value.ext = value); |
|||
return query; |
|||
}, |
|||
setOp({query, value}){ |
|||
if(query.data.toString() !== '[object Object]')query.data = {}; |
|||
if(query.data.value.toString() !== '[object Object]')query.data.value = {}; |
|||
query.data&&query.data.value&&(query.data.value.op = value); |
|||
return query; |
|||
}, |
|||
getIconPath(iconName){ |
|||
if(!iconName)return ''; |
|||
return `/subpackage/device/static/images/air_conditioner/${iconName}.png` |
|||
}, |
|||
// 操作接口请求 |
|||
operateReq({data, isTip=true, isLoad=true}){ |
|||
if(isLoad)util.showLoad(); |
|||
return deviceServer.post({ |
|||
url: deviceApi.ouxuanac, |
|||
data: data, |
|||
isDefaultGet: false, |
|||
}) |
|||
.then(res=>{ |
|||
if(isLoad)util.hideLoad(); |
|||
if(res.data.code == 0){ |
|||
if(isTip)util.showNone(res.data.message || '操作成功!'); |
|||
if(data.data&&data.data.value&&data.data.value.op === 'info')this.pageInfo = res.data.data || {}; |
|||
return 'success' |
|||
}else{ |
|||
if(isTip)util.showNone(res.data.message || '操作失败!'); |
|||
return 'fail'; |
|||
} |
|||
}) |
|||
.catch(err=>{if(isLoad)util.hideLoad()}) |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
@import '~style/public.scss'; |
|||
.air-conditioner-detail{ |
|||
padding: 40upx; |
|||
.acd-tit{ |
|||
margin-bottom: 40upx; |
|||
font-size: 44upx; |
|||
font-weight: 500; |
|||
color: #333; |
|||
} |
|||
.acd-panel{ |
|||
margin-bottom: 60upx; |
|||
padding: 24upx 14upx 50upx; |
|||
border-radius: 10upx; |
|||
background-color: #fff; |
|||
.ap-top-info{ |
|||
margin-bottom: 64upx; |
|||
flex-wrap: nowrap; |
|||
@include centerFlex(center); |
|||
.ati-box{ |
|||
flex-shrink: 0; |
|||
max-width: 50%; |
|||
margin: 0 10upx; |
|||
padding: 12upx 20upx; |
|||
flex-grow: 1; |
|||
height: 178upx; |
|||
border-radius: 4upx; |
|||
background-color: #f2f2f7; |
|||
.ab-tit{ |
|||
font-size: 28upx; |
|||
line-height: 40upx; |
|||
color: #9c9c9f; |
|||
} |
|||
} |
|||
.ati-temp{ |
|||
.at-info{ |
|||
@include centerFlex(space-between); |
|||
.ai-btn{ |
|||
flex-shrink: 0; |
|||
width: 24upx; |
|||
height: 24upx; |
|||
>image{ |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
} |
|||
.ai-temp{ |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
.at-num{ |
|||
line-height: 112upx; |
|||
font-weight: 500; |
|||
font-size: 80upx; |
|||
color: $themeColor; |
|||
@include textHide(1); |
|||
} |
|||
.at-unit{ |
|||
flex-shrink: 0; |
|||
padding-top: 10upx; |
|||
align-self: flex-start; |
|||
font-size: 28upx; |
|||
line-height: 40upx; |
|||
color: $themeColor; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.ati-wind{ |
|||
.aw-txt{ |
|||
line-height: 90upx; |
|||
text-align: center; |
|||
font-weight: 500; |
|||
font-size: 64upx; |
|||
color: $themeColor; |
|||
|
|||
} |
|||
} |
|||
} |
|||
|
|||
.ap-btns{ |
|||
@include centerFlex(center); |
|||
.ab-item{ |
|||
margin: 0 60upx; |
|||
>image{ |
|||
margin: 0 auto 20upx; |
|||
display: block; |
|||
width: 100upx; |
|||
height: 100upx; |
|||
} |
|||
>view{ |
|||
margin: 0 auto; |
|||
text-align: center; |
|||
font-size: 24upx; |
|||
line-height: 34upx; |
|||
color: #9a9a9d; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.acd-btn-ls{ |
|||
width: 100%; |
|||
margin-bottom: 50upx; |
|||
.abl-tit{ |
|||
margin-bottom: 28upx; |
|||
line-height: 40upx; |
|||
font-size: 28upx; |
|||
color: #9c9c9f; |
|||
} |
|||
.abl-ls{ |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
.al-item{ |
|||
margin-bottom: 24upx; |
|||
width: 116upx; |
|||
flex-shrink: 0; |
|||
flex-grow: 0; |
|||
&:not(:nth-child(5n)){ |
|||
margin-right: 20upx; |
|||
} |
|||
&.acd-hover-active{ |
|||
.ai-icon{ |
|||
&::after{ |
|||
position: absolute; |
|||
content: ''; |
|||
left: 0; |
|||
top: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
background-color: rgba($color: #000000, $alpha: .3); |
|||
} |
|||
} |
|||
} |
|||
.ai-icon{ |
|||
position: relative; |
|||
margin: 0 auto 14upx; |
|||
width: 116upx; |
|||
height: 116upx; |
|||
border-radius: 10upx; |
|||
background-color: #fff; |
|||
overflow: hidden; |
|||
@include centerFlex(center); |
|||
>image{ |
|||
width: 60upx; |
|||
height: 60upx; |
|||
} |
|||
&.active{ |
|||
border: 2upx solid $themeColor; |
|||
} |
|||
} |
|||
.ai-txt{ |
|||
text-align: center; |
|||
text-align: center; |
|||
line-height: 40upx; |
|||
font-size: 28upx; |
|||
color: #1a1a1a; |
|||
@include textHide(2); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
After Width: 200 | Height: 200 | Size: 4.2 KiB |
After Width: 120 | Height: 120 | Size: 1.8 KiB |
After Width: 120 | Height: 120 | Size: 2.1 KiB |
After Width: 120 | Height: 120 | Size: 1.1 KiB |
After Width: 120 | Height: 120 | Size: 2.4 KiB |
After Width: 200 | Height: 200 | Size: 3.1 KiB |
After Width: 120 | Height: 120 | Size: 1.4 KiB |
After Width: 120 | Height: 120 | Size: 1.1 KiB |
After Width: 56 | Height: 56 | Size: 291 B |
After Width: 48 | Height: 48 | Size: 193 B |
After Width: 120 | Height: 120 | Size: 920 B |
After Width: 120 | Height: 120 | Size: 940 B |
After Width: 120 | Height: 120 | Size: 719 B |
After Width: 120 | Height: 120 | Size: 656 B |
After Width: 120 | Height: 120 | Size: 795 B |
After Width: 120 | Height: 120 | Size: 691 B |
@ -0,0 +1,140 @@ |
|||
<template> |
|||
<view class="retail-container"> |
|||
<view class="rc-header"> |
|||
<a-header :source="orderInfo.source || '-'" :status="getStatus(orderInfo.pay_status)"></a-header> |
|||
<view class="rh-name"> |
|||
<a-line :value="orderInfo.sys_optuname || '-'"> |
|||
<block slot="name">操作人:</block> |
|||
</a-line> |
|||
</view> |
|||
</view> |
|||
<view class="rc-goods-info" v-if="orderInfo.retail_order_goods&&orderInfo.retail_order_goods.length"> |
|||
<view class="rgi-tit">商品详情</view> |
|||
<view class="rgi-goods-ls"> |
|||
<view class="rgl-item" v-for="(e, i) in orderInfo.retail_order_goods" :key="i"> |
|||
<!-- 商品名称 :咖啡(小) 数量:1 价格:¥3 --> |
|||
<a-line :value="e.name || '-'"> |
|||
<block slot="name">商品名称:</block> |
|||
</a-line> |
|||
<a-line :value="e.nums || '0'"> |
|||
<block slot="name">数量:</block> |
|||
</a-line> |
|||
<a-line :value="'¥' + (e.price || '0')"> |
|||
<block slot="name">价格:</block> |
|||
</a-line> |
|||
</view> |
|||
</view> |
|||
<view class="rgi-total"><text>合计支付:</text>¥{{ orderInfo.pay_amount || 0 }}</view> |
|||
</view> |
|||
<view class="rc-pay-info"> |
|||
<!-- 订单编号 --> |
|||
<view class="rpi-tit">支付详情</view> |
|||
<p-line :keyname="'订单编号'" :value="orderInfo.order_no || '-'" isbtn></p-line> |
|||
<p-line :keyname="'支付方式'" :value="payTypeTxt(orderInfo.pay_type)"></p-line> |
|||
<p-line :keyname="'支付时间'" :value="orderInfo.pay_time || '-'"></p-line> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { ORDER_API } from '../../../js/api'; |
|||
import server from '../../../js/server'; |
|||
import util from '../../../../../utils/util'; |
|||
import a_header from '../../../../../components/order_list/a_header/a_header.vue'; |
|||
import a_line from '../../../../../components/order_list/a_line/a_line.vue'; |
|||
import s_line from '../../../components/s_line/s_line.vue'; |
|||
import p_line from '../../../components/p_line/p_line.vue'; |
|||
export default { |
|||
components: { |
|||
'a-line': a_line, |
|||
'a-header': a_header, |
|||
's-line': s_line, |
|||
'p-line': p_line, |
|||
}, |
|||
data(){ |
|||
return { |
|||
orderInfo: {} |
|||
} |
|||
}, |
|||
onLoad(options){ |
|||
this.getOrderInfo(options.order_no); |
|||
}, |
|||
methods: { |
|||
payTypeTxt: util.order_pay_type_txt, |
|||
getStatus(status){ |
|||
let _obj = { |
|||
1: '交易成功' |
|||
} |
|||
return _obj[status] || '-' |
|||
}, |
|||
getOrderInfo(order_no){ |
|||
util.showLoad(); |
|||
server.get({ |
|||
url: ORDER_API.retailOrderInfo, |
|||
data: { order_no }, |
|||
failMsg: '加载失败!' |
|||
}) |
|||
.then(res=>{ |
|||
util.hideLoad(); |
|||
this.orderInfo = res || {}; |
|||
}) |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
@import '~style/public.scss'; |
|||
.retail-container{ |
|||
|
|||
} |
|||
.rc-header{ |
|||
margin-bottom: 26upx; |
|||
padding: 0 24upx; |
|||
background-color: #fff; |
|||
.rh-name{ |
|||
padding: 30upx 0; |
|||
} |
|||
} |
|||
.rc-goods-info{ |
|||
margin-bottom: 24upx; |
|||
padding: 0 24upx; |
|||
background-color: #fff; |
|||
.rgi-tit{ |
|||
padding-top: 20upx; |
|||
font-size: 32upx; |
|||
color: #1a1a1a; |
|||
} |
|||
.rgi-goods-ls{ |
|||
.rgl-item{ |
|||
padding: 30upx 0; |
|||
border-bottom: 2upx solid #D8D8D8; |
|||
} |
|||
} |
|||
.rgi-total{ |
|||
text-align: right; |
|||
line-height: 106upx; |
|||
font-weight: 500; |
|||
font-size: 28upx; |
|||
color: #1a1a1a; |
|||
white-space: nowrap; |
|||
text-overflow: ellipsis; |
|||
overflow: hidden; |
|||
>text{ |
|||
color: #9a9a9d; |
|||
font-weight: 400; |
|||
} |
|||
} |
|||
} |
|||
.rc-pay-info{ |
|||
padding: 30upx; |
|||
background-color: #fff; |
|||
.rpi-tit{ |
|||
margin-bottom: 16upx; |
|||
line-height: 44upx; |
|||
font-size: 32upx; |
|||
color: #333; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,295 @@ |
|||
<template> |
|||
<view class="ym-card-info"> |
|||
<view class="yci-main"> |
|||
<view class="yci-box ym-card-info"> |
|||
<view class="yci-stadium-name">{{ orderInfo.extension.name || '-' }}</view> |
|||
<view class="yci-line"> |
|||
<view>年月卡名称:{{ orderInfo.card_info.name || '-' }}</view> |
|||
<view>年月卡卡号:{{ orderInfo.card_no || '-' }}</view> |
|||
<view>有效期:至{{ orderInfo.expired_at || '-' }}</view> |
|||
</view> |
|||
<view class="yci-btn"> |
|||
<view @click="toRecord">使用记录</view> |
|||
</view> |
|||
<view class="yci-status-tag"> |
|||
<image mode="aspectFit" :src="getTagImgPath(orderInfo.status)"></image> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="yci-box ym-user"> |
|||
<view class="yci-tit">持卡人信息</view> |
|||
<a-line :value="orderInfo.mobile || '-'"> |
|||
<block slot="name">手机号码:</block> |
|||
</a-line> |
|||
<a-line :value="orderInfo.nickname || '-'"> |
|||
<block slot="name">用户昵称:</block> |
|||
</a-line> |
|||
<view class="yu-line">照片:<text @click="changeFaceImgBtn" v-if="orderInfo.status ==1">更改照片</text></view> |
|||
<image |
|||
class="yu-img" |
|||
mode="aspectFit" |
|||
v-if="orderInfo.user_face" |
|||
:src="orderInfo.user_face" |
|||
@click="previewImg(orderInfo.user_face)" |
|||
></image> |
|||
</view> |
|||
|
|||
<view class="yci-box yci-buy-info" v-if="orderInfo.status == 1 || orderInfo.status == 2 || orderInfo.status == 3"> |
|||
<view class="yci-tit">购卡信息</view> |
|||
<view class="ybi-name">年月卡名称:{{ orderInfo.card_info.name || '-' }}</view> |
|||
<s-line :keyname="'金额小计'" :value="'¥' + (orderInfo.extension.amount || '0')"></s-line> |
|||
<s-line :keyname="'积分抵扣'" :value="'¥' + (orderInfo.extension.deduction_amount|| '0')"></s-line> |
|||
<s-line :keyname="'折扣金额'" :value="'¥' + (orderInfo.extension.discount_amount || '0')"></s-line> |
|||
<s-line :keyname="'优惠券优惠'" :value="'¥' + (orderInfo.extension.coupons_amount || '0')"></s-line> |
|||
<view class="ybi-total"><text>合计支付:</text>¥ {{ orderInfo.extension.pay_amount || '0' }}</view> |
|||
</view> |
|||
|
|||
<view class="yci-box yci-pay-info" v-if="orderInfo.status == 1 || orderInfo.status == 2 || orderInfo.status == 3"> |
|||
<view class="yci-tit">支付信息</view> |
|||
<p-line :keyname="'订单编号'" :value="orderInfo.order_no || '-'" ></p-line> |
|||
<p-line :keyname="'支付方式'" :value="orderInfo.extension.pay_type_text || '-'" ></p-line> |
|||
<p-line :keyname="'支付时间'" :value="orderInfo.extension.pay_time || '-'" ></p-line> |
|||
<p-line :keyname="'微信交易号'" :value="orderInfo.extension.trade_no || '-'" ></p-line> |
|||
<p-line :keyname="'创建途径'" :value="orderInfo.source || '-'" ></p-line> |
|||
</view> |
|||
|
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
/* |
|||
InactiveCardStatus CardStatusType = iota // 待激活 0 |
|||
ActiveCardStatus // 使用中 1 |
|||
InvalidCardStatus // 已失效 2 |
|||
ReturnCardStatus // 已退卡 3 |
|||
*/ |
|||
import a_line from '../../../../../components/order_list/a_line/a_line.vue'; |
|||
import s_line from '../../../components/s_line/s_line.vue'; |
|||
import p_line from '../../../components/p_line/p_line.vue'; |
|||
import util from '../../../../../utils/util'; |
|||
import { ORDER_API } from '../../../js/api'; |
|||
import server from '../../../js/server'; |
|||
export default { |
|||
components: { |
|||
'a-line': a_line, |
|||
's-line': s_line, |
|||
'p-line': p_line, |
|||
|
|||
}, |
|||
data(){ |
|||
return { |
|||
orderInfo: { |
|||
card_info: {}, |
|||
extension: {} |
|||
}, |
|||
optionsQuery: {}, |
|||
} |
|||
}, |
|||
onLoad(options){ |
|||
this.getCardInfo({ |
|||
id: options.id, |
|||
card_no: options.card_no |
|||
}); |
|||
this.optionsQuery = options || {}; |
|||
}, |
|||
methods: { |
|||
previewImg(url){ |
|||
if(!url)return |
|||
uni.previewImage({ urls: [ url ] }); |
|||
}, |
|||
changeFaceImgBtn(){ |
|||
uni.chooseImage({ |
|||
count: 1, |
|||
success: imgRes =>{ |
|||
this.upLoadImg(imgRes || {}); |
|||
}, |
|||
failMsg: imgErr => { |
|||
console.warn('chooseImage err --->' , imgErr); |
|||
util.showNone('选择图片失败!'); |
|||
} |
|||
}) |
|||
}, |
|||
upLoadImg(imgRes){ |
|||
util.showLoad(); |
|||
server.uploadFile({ |
|||
url: ORDER_API.ymCardInfoFace, |
|||
filePath: imgRes.tempFilePaths[0] || '', |
|||
}) |
|||
.then(e=>{ |
|||
util.hideLoad(); |
|||
let _res = util.jsonPar(e.data); |
|||
if(_res.code == 0){ |
|||
let _url = _res.data.url || ''; |
|||
this.saveFaceImg(_url); |
|||
}else{ |
|||
console.error('上传图片失败--->',_res); |
|||
util.showNone(_res.message || '上传图片失败,请重试!') |
|||
} |
|||
}) |
|||
.catch(err=>{ |
|||
util.hideLoad(); |
|||
console.error('上传图片失败--->',err); |
|||
util.showNone('上传图片失败,稍后重试!') |
|||
}) |
|||
}, |
|||
saveFaceImg(faceUrl){ |
|||
let { optionsQuery } = this; |
|||
util.showLoad(); |
|||
server.post({ |
|||
url: ORDER_API.ymCardInfoFaceSave, |
|||
data: { |
|||
card_no: optionsQuery.card_no, |
|||
face: faceUrl, |
|||
}, |
|||
isDefaultGet: false, |
|||
}) |
|||
.then(res=>{ |
|||
util.hideLoad(); |
|||
if(res.data.code == 0){ |
|||
util.showNone(res.data.message || '操作成功!'); |
|||
let { optionsQuery } = this; |
|||
setTimeout(_=>{ |
|||
this.getCardInfo({ |
|||
id: optionsQuery.id, |
|||
card_no: optionsQuery.card_no |
|||
}); |
|||
}, 1200); |
|||
}else{ |
|||
util.showNone(res.data.message || '操作失败!'); |
|||
} |
|||
}) |
|||
}, |
|||
getTagImgPath(status){ |
|||
if(!status)return '' |
|||
return `/subpackage/order/static/images/ym_card/status_${status}.png` |
|||
}, |
|||
getCardInfo({id, card_no}){ |
|||
util.showLoad(); |
|||
server.get({ |
|||
url: ORDER_API.userMonthlyCardInfo, |
|||
data: { id, card_no }, |
|||
failMsg: '加载失败!' |
|||
}) |
|||
.then(res=>{ |
|||
util.hideLoad(); |
|||
this.orderInfo = res || {}; |
|||
}) |
|||
}, |
|||
toRecord(){ |
|||
let { optionsQuery } = this; |
|||
util.routeTo(`/subpackage/order/pages/ym_card/use_record/use_record?card_no=${optionsQuery.card_no}`, 'nT'); |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
@import '~style/public.scss'; |
|||
.ym-card-info{ |
|||
|
|||
} |
|||
.yci-box{ |
|||
padding: 30upx; |
|||
margin-bottom: 24upx; |
|||
border-radius: 10upx; |
|||
background-color: #fff; |
|||
} |
|||
.yci-tit{ |
|||
margin-bottom: 20upx; |
|||
line-height: 40upx; |
|||
font-size: 28upx; |
|||
color: #9C9C9F; |
|||
} |
|||
.yci-main{ |
|||
padding: 24upx; |
|||
.ym-card-info{ |
|||
position: relative; |
|||
.yci-stadium-name{ |
|||
margin-bottom: 22upx; |
|||
padding-bottom: 26upx; |
|||
line-height: 40upx; |
|||
font-size: 28upx; |
|||
font-weight: 500; |
|||
border-bottom: 2upx solid #D8D8D8; |
|||
@include textHide(1); |
|||
} |
|||
.yci-line{ |
|||
margin-bottom: 32upx; |
|||
>view{ |
|||
line-height: 48upx; |
|||
font-size: 28upx; |
|||
color: #333; |
|||
@include textHide(1); |
|||
} |
|||
} |
|||
.yci-btn{ |
|||
@include centerFlex(flex-end); |
|||
>view{ |
|||
width: 176upx; |
|||
line-height: 80upx; |
|||
text-align: center; |
|||
border-radius: 10upx; |
|||
border: 2upx solid #9A9A9D; |
|||
font-size: 32upx; |
|||
color: #9A9A9D; |
|||
} |
|||
} |
|||
.yci-status-tag{ |
|||
position: absolute; |
|||
right: 0; |
|||
top: 0; |
|||
width: 132upx; |
|||
height: 132upx; |
|||
overflow: hidden; |
|||
border-top-right-radius: 10upx; |
|||
>image{ |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
} |
|||
} |
|||
.ym-user{ |
|||
.yu-line{ |
|||
margin-bottom: 16upx; |
|||
font-size: 28upx; |
|||
line-height: 52upx; |
|||
color: #9a9a9d; |
|||
>text{ |
|||
color: $themeColor; |
|||
text-decoration: underline; |
|||
} |
|||
} |
|||
.yu-img{ |
|||
display: block; |
|||
width: 218upx; |
|||
height: 218upx; |
|||
border-radius: 10upx; |
|||
|
|||
} |
|||
} |
|||
.yci-buy-info{ |
|||
.ybi-name{ |
|||
margin-bottom: 22upx; |
|||
padding-bottom: 30upx; |
|||
font-size: 28upx; |
|||
line-height: 40upx; |
|||
color: #1a1a1a; |
|||
border-bottom: 2upx solid #D8D8D8; |
|||
|
|||
} |
|||
.ybi-total{ |
|||
text-align: right; |
|||
font-size: 28upx; |
|||
font-weight: 500; |
|||
line-height: 40upx; |
|||
color: #333; |
|||
@include textHide(1); |
|||
>text{ |
|||
color: #9A9A9D; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
</style> |
@ -0,0 +1,112 @@ |
|||
<template> |
|||
<view class="use-record"> |
|||
<view class="ur-list"> |
|||
<view class="ul-item" v-for="(e, i) in recordLs" :key="i"> |
|||
<view class="ui-header"> |
|||
<image class="uh-img" mode="aspectFit" :src="e.stadium_logo"></image> |
|||
<view>{{ e.stadium_name || '-' }}</view> |
|||
</view> |
|||
<view class="uh-lines"> |
|||
<view><text>验证方式:</text>{{ e.enter_desc || '-' }}</view> |
|||
<view><text>核销时间:</text>{{ e.enter_time || '-' }}</view> |
|||
<view><text>离场时间:</text>{{ e.leave_time || '-' }}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import util from '../../../../../utils/util'; |
|||
import { ORDER_API } from '../../../js/api'; |
|||
import server from '../../../js/server'; |
|||
export default { |
|||
data(){ |
|||
return { |
|||
recordLs: [], |
|||
page: 1, |
|||
card_no: '', |
|||
} |
|||
}, |
|||
onLoad(options){ |
|||
this.card_no = options.card_no || ''; |
|||
this.getRecordLs({ |
|||
card_no: options.card_no, |
|||
}); |
|||
}, |
|||
onReachBottom(){ |
|||
let { card_no, page } = this; |
|||
this.getRecordLs({ |
|||
card_no: card_no, |
|||
page: ++page, |
|||
}) |
|||
}, |
|||
methods: { |
|||
getRecordLs({ |
|||
card_no, |
|||
page = 1, |
|||
page_size = 15 |
|||
}){ |
|||
util.showLoad(); |
|||
server.get({ |
|||
url: ORDER_API.ymCardUsage, |
|||
data: { card_no, page_size, page }, |
|||
failMsg: '加载失败!' |
|||
}) |
|||
.then(res=>{ |
|||
util.hideLoad(); |
|||
let _ls = res.list || []; |
|||
if(page == 1)return this.recordLs = _ls; |
|||
if(!_ls.length)return util.showNone('没有更多!'); |
|||
this.page = page; |
|||
this.recordLs = [...this.recordLs, ..._ls]; |
|||
}) |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
@import '~style/public.scss'; |
|||
.use-record{ |
|||
.ur-list{ |
|||
.ul-item{ |
|||
margin-bottom: 24upx; |
|||
padding: 30upx; |
|||
background-color: #fff; |
|||
.ui-header{ |
|||
height: 100upx; |
|||
border-bottom: 2upx solid #f2f2f7; |
|||
@include centerFlex(space-between); |
|||
.uh-img{ |
|||
flex-shrink: 0; |
|||
flex-grow: 0; |
|||
margin-right: 10upx; |
|||
width: 30upx; |
|||
height: 30upx; |
|||
} |
|||
>view{ |
|||
flex-grow: 1; |
|||
line-height: 44upx; |
|||
font-size: 32upx; |
|||
color: #333; |
|||
@include textHide(1); |
|||
} |
|||
} |
|||
.uh-lines{ |
|||
padding: 14upx 16upx 10upx; |
|||
>view{ |
|||
font-size: 28upx; |
|||
line-height: 50upx; |
|||
color: #333; |
|||
@include textHide(1); |
|||
>text{ |
|||
color: #9A9A9D; |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
|||
} |
|||
</style> |
After Width: 60 | Height: 60 | Size: 537 B |
After Width: 120 | Height: 120 | Size: 811 B |
After Width: 132 | Height: 132 | Size: 13 KiB |
After Width: 132 | Height: 132 | Size: 2.0 KiB |
After Width: 132 | Height: 132 | Size: 2.1 KiB |