Commit b6035a44 by zhangzhen

细节优化

parent 292a4643
...@@ -11,9 +11,9 @@ export const getUseCoupon=(data)=>{ ...@@ -11,9 +11,9 @@ export const getUseCoupon=(data)=>{
return http.post(url,data) return http.post(url,data)
} }
export const couponChecked=(code)=>{ export const couponChecked=(data)=>{
let url=`/chessCards/consumeByUser?code=`+code let url=`/chessCards/consumeByUser`
return http.get(url) return http.get(url,data)
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</view> </view>
<view class="input-box"> <view class="input-box">
<view class="cu-form-group"> <view class="cu-form-group">
<input type="number" class="input" placeholder="点击输入卡券兑换码" v-model="code"></input> <input placeholder="点击输入卡券兑换码" name="input" v-model="code"></input>
<text class="cuIcon-qr_code text-gray text-xxl" @tap="onScanCode"></text> <text class="cuIcon-qr_code text-gray text-xxl" @tap="onScanCode"></text>
</view> </view>
</view> </view>
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
return { return {
assetsPath:config.assetsPath, assetsPath:config.assetsPath,
code:"", code:"",
openShopUuid:'',
list:[ list:[
{ {
iconUrl:config.assetsPath+'/mt_icon.png', iconUrl:config.assetsPath+'/mt_icon.png',
...@@ -85,7 +86,10 @@ ...@@ -85,7 +86,10 @@
return moment(val).format("YYYY-MM-DD HH:mm:ss") return moment(val).format("YYYY-MM-DD HH:mm:ss")
} }
}, },
onLoad() { onLoad(option) {
if(option.openShopUuid){
this.openShopUuid = option.openShopUuid
}
this.eventChannel = this.getOpenerEventChannel(); this.eventChannel = this.getOpenerEventChannel();
}, },
...@@ -101,7 +105,10 @@ ...@@ -101,7 +105,10 @@
uni.showLoading({ uni.showLoading({
title:"券码核验中" title:"券码核验中"
}) })
couponChecked(this.code).then(res=>{ couponChecked({
code:this.code,
openShopUuid:this.openShopUuid
}).then(res=>{
console.log(res,909090) console.log(res,909090)
if(res.data.code === 200){ if(res.data.code === 200){
this.couponInfo = res.data.data this.couponInfo = res.data.data
......
...@@ -750,7 +750,7 @@ ...@@ -750,7 +750,7 @@
}, },
onNavToCheckedCoupon(){ onNavToCheckedCoupon(){
uni.navigateTo({ uni.navigateTo({
url:"/pages/couponCheck/couponCheck", url:"/pages/couponCheck/couponCheck?openShopUuid="+this.roomInfo.openShopUuid,
events: { events: {
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
acceptData(data){ acceptData(data){
......
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