|
|
|
@ -67,6 +67,22 @@ |
|
|
|
<button class="feedback-btn" open-type="contact"></button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 商家工具 --> |
|
|
|
<view class="shop-list" v-if="userInfo.verifier == 1"> |
|
|
|
<view class="lf-row-between"> |
|
|
|
<view class="lf-font-36 lf-font-bold">商家工具</view> |
|
|
|
</view> |
|
|
|
<view class="lf-row-between list-item" hover-class="lf-opacity" @click="chargeOff"> |
|
|
|
<view class="lf-row-center"> |
|
|
|
<image class="icon-img" src="../../static/center/order.png"></image> |
|
|
|
<text class="lf-text-vertical lf-m-l-20 lf-font-28 lf-color-black">卡券核销</text> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<text class="lf-iconfont lf-icon-xiangyou lf-text-vertical"></text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="lf-p-t-35" style="background-color: #F6F6F6;"> |
|
|
|
<!-- <view class="lf-p-t-40 lf-p-b-20 text-center details-title"> |
|
|
|
|
|
|
|
@ -129,6 +145,24 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 卡券核销 |
|
|
|
chargeOff(){ |
|
|
|
uni.scanCode({ |
|
|
|
complete: result => { |
|
|
|
console.log("resuly", result) |
|
|
|
if(result.errMsg == 'scanCode:ok'){ |
|
|
|
let content = result.result; // 核销码 |
|
|
|
this.$http(this.API.API_CONFIRM_CODE, {id: content}).then(res => { |
|
|
|
this.$msg('核销成功!'); |
|
|
|
let order_id = res.data.id; |
|
|
|
time = setTimeout(() => { |
|
|
|
this.$url('/pages/shopOrder/order-details?order_id='+ order_id); |
|
|
|
}, 1000); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 检查当前用户登录状态 |
|
|
|
verifyUserInfo(){ |
|
|
|
let userInfo = uni.getStorageSync('userinfo') || {}; |
|
|
|
@ -247,4 +281,13 @@ |
|
|
|
left: 0; |
|
|
|
z-index: -1; |
|
|
|
} |
|
|
|
.shop-list{ |
|
|
|
margin-top: 20rpx; |
|
|
|
width: 750rpx; |
|
|
|
height: auto; |
|
|
|
background-color: #FFFFFF; |
|
|
|
padding: 0 32rpx; |
|
|
|
padding-bottom: 0; |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
</style> |