finsh.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. }
  18. },
  19. onLoad(e) {
  20. console.log(e);
  21. this.order_id = e.order_id;
  22. this.isform = e.isform; // 1 从订单过来 2 从购物车过来
  23. },
  24. methods:{
  25. // ji xu gou wu
  26. submitRemin() {
  27. console.log(this.isform);
  28. if(this.isform == 1) {
  29. uni.switchTab({
  30. url: '/pages/myOrder/index'
  31. })
  32. uni.$emit('finshlist');
  33. }else {
  34. uni.navigateTo({
  35. url: '/pages/index/cart'
  36. })
  37. }
  38. },
  39. // cha kan ding dan xiang qing
  40. lookfor() {
  41. let order_id = this.order_id ;
  42. uni.navigateTo({
  43. url: `/pages/myOrder/order?id=${order_id}`
  44. });
  45. }
  46. }
  47. }
  48. </script>
  49. <style>
  50. </style>