finsh.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <view style="padding: 0 36upx;">
  3. <view style="text-align: center;margin: 0 auto;padding: 10upx 0;">
  4. <van-icon color="#eee;" size="88px" name="passed" />
  5. </view>
  6. <view style="text-align: center;padding: 10upx 0;">订单支付成功</view>
  7. <view class="submitRemin" @click="lookfor" style="background-color: #fff;color:#303133;border: 1px solid #D9332E;">查看订单详情</view>
  8. <view class="submitRemin" @click="submitRemin">继续购物</view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return{
  15. order_id:'',
  16. isform: 0,
  17. store_id:''
  18. }
  19. },
  20. onLoad(e) {
  21. console.log(e);
  22. this.order_id = e.order_id;
  23. this.store_id = e.store_id;
  24. this.isform = e.isform; // 1 从订单过来 2 从购物车过来
  25. },
  26. methods:{
  27. // ji xu gou wu
  28. submitRemin() {
  29. console.log(this.isform);
  30. let store_id = this.store_id;
  31. if(this.isform == 1) {
  32. uni.switchTab({
  33. url: '/pages/myOrder/index'
  34. })
  35. uni.$emit('finshlist');
  36. }else {
  37. // uni.redirectTo({
  38. // url: `/pages/index/cart?store_id=${store_id}`
  39. // })
  40. uni.redirectTo({
  41. url: `/pages/index/hotel?id=${store_id}`
  42. })
  43. }
  44. },
  45. // cha kan ding dan xiang qing
  46. lookfor() {
  47. let order_id = this.order_id ;
  48. uni.$emit('finshlist');
  49. uni.redirectTo({
  50. url: `/pages/myOrder/order?id=${order_id}`
  51. });
  52. }
  53. }
  54. }
  55. </script>
  56. <style>
  57. </style>