no message
This commit is contained in:
@@ -52,7 +52,8 @@
|
|||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-6 button-primary" @tap="toEmpty">清空</button>
|
<button class="zd-col-6 button-primary" @tap="toEmpty">清空</button>
|
||||||
<button v-if="dataList.length > 0 && dataList[0].lock_type === '00'" class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toSure('1')">绑定</button>
|
<button v-if="dataList.length > 0 && dataList[0].lock_type === '00'" class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toSure('1')">绑定</button>
|
||||||
<button v-else class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toSure('0')">解绑</button>
|
<button v-if="dataList.length > 0 && dataList[0].lock_type !== '00'" class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toSure('0')">解绑</button>
|
||||||
|
<button v-if="!dataList.length" class="zd-col-16 button-primary button-info">绑定/解绑</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -88,6 +89,7 @@
|
|||||||
let res = await getPointStatus(e)
|
let res = await getPointStatus(e)
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.dataList.push(res)
|
this.dataList.push(res)
|
||||||
|
this.val2 = res.vehicle_code
|
||||||
},
|
},
|
||||||
toEmpty () {
|
toEmpty () {
|
||||||
this.val1 = ''
|
this.val1 = ''
|
||||||
@@ -106,6 +108,9 @@
|
|||||||
async _bindOrUnbind (type) {
|
async _bindOrUnbind (type) {
|
||||||
try {
|
try {
|
||||||
let res = await bindOrUnbind(this.val1, this.val2, type)
|
let res = await bindOrUnbind(this.val1, this.val2, type)
|
||||||
|
if (res.code === '200') {
|
||||||
|
this._getPointStatus(this.val1)
|
||||||
|
}
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
|
|||||||
Reference in New Issue
Block a user