finsh.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. }
  41. },
  42. // cha kan ding dan xiang qing
  43. lookfor() {
  44. let order_id = this.order_id ;
  45. uni.$emit('finshlist');
  46. uni.redirectTo({
  47. url: `/pages/myOrder/order?id=${order_id}`
  48. });
  49. }
  50. }
  51. }
  52. </script>
  53. <style>
  54. </style>