Browse Source

核销订单接口支付接口(待测试联调)

test
Enzo 5 years ago
parent
commit
4fe41eec79
  1. 7
      common/api.js
  2. 43
      pages/user/user.vue

7
common/api.js

@ -33,8 +33,13 @@ export const API_BUYAGREE = '/api/agent_info/buy_protocol'; //购买协议
export const API_CONFIRMDETAILS = '/api/order/price'; //确认购买商品详情
export const API_CREATEORDER = '/api/order/create'; //创建订单
export const API_CREATEORDER = '/api/order/create'; //创建订单并支付
export const API_ORDERPAY = '/api/order/pay'; //订单页面支付
export const API_CONFIRM_CODE = '/api/verification/verify'; //核销订单
export const API_MESSAGELIST = '/api/message/list'; //消息列表
export const API_MESSAGEDETAILS = '/api/message/show'; //消息详情

43
pages/user/user.vue

@ -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>
Loading…
Cancel
Save