Commit 2f549705ed7509ef0572b6f6668b5e725fc0ac1d
1 parent
40cb53c3
订单支付和取消调试
Showing
1 changed file
with
32 additions
and
9 deletions
src/pages/myGiftBox/myGiftBox.vue
| @@ -50,7 +50,13 @@ | @@ -50,7 +50,13 @@ | ||
| 50 | position="bottom" | 50 | position="bottom" |
| 51 | v-model="actionSheetShow" | 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 | </van-popup> | 60 | </van-popup> |
| 55 | </div> | 61 | </div> |
| 56 | </template> | 62 | </template> |
| @@ -439,8 +445,8 @@ export default { | @@ -439,8 +445,8 @@ export default { | ||
| 439 | this.cancelorder(this.orderOperation.item, value); | 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 | cancelorder(item, content) { | 452 | cancelorder(item, content) { |
| @@ -469,14 +475,13 @@ export default { | @@ -469,14 +475,13 @@ export default { | ||
| 469 | cancelorderCallback(res, ext) { | 475 | cancelorderCallback(res, ext) { |
| 470 | // 加载完成 | 476 | // 加载完成 |
| 471 | Indicator.close(); | 477 | Indicator.close(); |
| 472 | - // 设置已关注 | ||
| 473 | - if (ext.item.status == "0") { | ||
| 474 | - // 关注达人 | ||
| 475 | - this.$set(ext.item, "status", "3"); | ||
| 476 | - } | ||
| 477 | // 返回处理 | 478 | // 返回处理 |
| 478 | if (res.code == 200) { | 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 | let { data: datas } = res; | 486 | let { data: datas } = res; |
| 482 | // 获取到的数组存到this.causes中去 | 487 | // 获取到的数组存到this.causes中去 |
| @@ -504,6 +509,24 @@ export default { | @@ -504,6 +509,24 @@ export default { | ||
| 504 | window.obj.jumpToPay(item.orderid); | 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 | }; |