Commit 2f549705ed7509ef0572b6f6668b5e725fc0ac1d

Authored by zhiyangdu
1 parent 40cb53c3

订单支付和取消调试

src/pages/myGiftBox/myGiftBox.vue
... ... @@ -50,7 +50,13 @@
50 50 position="bottom"
51 51 v-model="actionSheetShow"
52 52 >
53   - <van-picker show-toolbar :columns="orderOperation.causes" :default-index="2" @cancel="onCancel" @confirm="confirm"/>
  53 + <van-picker
  54 + show-toolbar
  55 + :columns="orderOperation.causes"
  56 + :default-index="2"
  57 + @cancel="onCancel"
  58 + @confirm="confirm"
  59 + />
54 60 </van-popup>
55 61 </div>
56 62 </template>
... ... @@ -439,8 +445,8 @@ export default {
439 445 this.cancelorder(this.orderOperation.item, value);
440 446 },
441 447 // 取消,取消订单
442   - onCancel(){
443   - this.actionSheetShow = false;
  448 + onCancel() {
  449 + this.actionSheetShow = false;
444 450 },
445 451 // 取消支付填写原因
446 452 cancelorder(item, content) {
... ... @@ -469,14 +475,13 @@ export default {
469 475 cancelorderCallback(res, ext) {
470 476 // 加载完成
471 477 Indicator.close();
472   - // 设置已关注
473   - if (ext.item.status == "0") {
474   - // 关注达人
475   - this.$set(ext.item, "status", "3");
476   - }
477 478 // 返回处理
478 479 if (res.code == 200) {
479   - this.actionSheetShow = true;
  480 + // 取消订单
  481 + if (ext.item.status == "0") {
  482 + // status=3(订单已经关闭)
  483 + this.$set(ext.item, "status", "3");
  484 + }
480 485 // 解构数据
481 486 let { data: datas } = res;
482 487 // 获取到的数组存到this.causes中去
... ... @@ -504,6 +509,24 @@ export default {
504 509 window.obj.jumpToPay(item.orderid);
505 510 }
506 511 }
  512 + },
  513 + // ios支付成功回调
  514 + appPaymentCallback(item) {
  515 + alert("支付完成回调")
  516 + // 取消订单
  517 + if (item.status == "0") {
  518 + // status=1(已支付可分享状态)
  519 + this.$set(item, "status", "1");
  520 + }
  521 + },
  522 + // 安卓支付成功回调
  523 + payFinish(item) {
  524 + alert("支付完成回调")
  525 + // 取消订单
  526 + if (item.status == "0") {
  527 + // status=1(已支付可分享状态)
  528 + this.$set(ext.item, "status", "1");
  529 + }
507 530 }
508 531 }
509 532 };
... ...