paySucess.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view class="o-w o-h">
  3. <view class="o-w o-ptb-100 o-plr-50">
  4. <view class="c-text-c c-text-20 c-text-b c-color-1 o-mb-40" v-if="mealCode">取餐码:{{mealCode}}</view>
  5. <view class="c-text-c"><image src="/static/images/mine/payOrder.png" mode="" style="width: 80px;height: 80px;"></image></view>
  6. <view class="c-text-c o-ptb-12"><text class="c-text-18 c-text-b c-color-1">支付成功</text></view>
  7. <view class="c-text-c"><text class="c-text-b c-color-8">您已经完成支付</text></view>
  8. <view class="o-mt-30 l-flex-between">
  9. <u-button @click="toIndex" :customStyle="{ marginRight: '50px' }" plain shape="circle" type="primary" text="继续逛逛"></u-button>
  10. <u-button @click="toIndex" shape="circle" type="primary" text="返回首页"></u-button>
  11. </view>
  12. </view>
  13. <!-- <view class="o-plr-50 o-mt-50">
  14. <view class="l-boxShadow o-mb-20 c-bg-f o-plr-10 o-ptb-20 c-radius-10">
  15. <text class="c-color-8">扫码关注公众号,领取棉花糖优惠码</text>
  16. <view class="l-flex-center">
  17. <u--image src="/static/images/home/goods/A01.png" width="180px" height="180px"></u--image>
  18. </view>
  19. <view class="c-color-8 c-text-c"><text>长按图片,扫码关注</text></view>
  20. </view>
  21. </view> -->
  22. </view>
  23. </template>
  24. <script>
  25. // 导入接口
  26. import { API_postMealCode } from '@/common/api.js';
  27. export default {
  28. data() {
  29. return {
  30. mealCode:'',
  31. };
  32. },
  33. onLoad(options) {
  34. console.log(options);
  35. if (options.sn) {
  36. this.getList(options.sn);
  37. }
  38. },
  39. methods: {
  40. getList(sn) {
  41. API_postMealCode( sn ).then(res => {
  42. console.log('res', res);
  43. this.mealCode = res;
  44. });
  45. },
  46. // 回到首页
  47. toIndex() {
  48. // 改变vuex的数据
  49. this.$M_Dp('ACTI_TABIDX', 0);
  50. this.$M_Rl('/pages/index');
  51. }
  52. }
  53. };
  54. </script>
  55. <style lang="scss"></style>