|
|
@ -1,21 +1,61 @@ |
|
|
|
<template> |
|
|
|
<view class="ym-card-gated"> |
|
|
|
<view class="ycg-stadium">场馆</view> |
|
|
|
<view class="ycg-stadium">{{ pageInfo.extension.stadium_name || '-' }}</view> |
|
|
|
<view class="ycg-suc-tip">核销成功</view> |
|
|
|
<view class="ycg-back-btn">返回继续核销</view> |
|
|
|
<view class="ycg-open-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"> |
|
|
|
<view class="yi-name">name</view> |
|
|
|
<view class="yi-btn">开门</view> |
|
|
|
<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> |
|
|
|
|
|
|
|