receiving-status.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <view class="safe-area-inset-bottom u-bottom-fixed">
  3. <view class="page-width receiving-status dir-left-nowrap cross-center main-right">
  4. <view class="item" @click="route_go(`/plugins/gift/receive/receive?gift_id=${gift_id}&status=${status}`)">
  5. 查看领取详情
  6. </view>
  7. <view class="item" v-if="status != 0 && status_num == 1 && !notPayOrder && getConvert(detail)" @click="setShare">
  8. 转赠礼物
  9. </view>
  10. <view class="item" v-if="status != 0 && status_num == 1 && !notPayOrder && getConvert(detail)" @click="route_go(`/plugins/gift/address/address?id=${user_id}&status=${status}`)">
  11. 填写地址
  12. </view>
  13. <view class="item" v-if="status != 0 && status_num == 2 && getConvert(detail)" @click="receipt">
  14. 确认收货
  15. </view>
  16. <view class="item" v-if="notPayOrder && getConvert(detail)" @click="route_go(`/pages/order/index/index?status=1`)">
  17. 去支付
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. name: "receiving-status",
  25. props: [`theme`, `type`, `gift_id`, `status`, `status_num`, `user_id`, `order_id`, `notPayOrder`, `detail`],
  26. methods: {
  27. route_go(data) {
  28. uni.navigateTo({
  29. url: data,
  30. })
  31. },
  32. // 转赠礼物
  33. setShare() {
  34. this.$emit('setShare');
  35. },
  36. receipt() {
  37. this.$emit('receipt', this.order_id);
  38. },
  39. getConvert(order_list){
  40. let is_convert = true;
  41. for (let i = 0; i < order_list.length;i++) {
  42. if (order_list[i].is_convert == -1) {
  43. is_convert = false;
  44. }
  45. }
  46. return is_convert;
  47. }
  48. }
  49. }
  50. </script>
  51. <style scoped lang="scss">
  52. .receiving-status {
  53. height: #{110upx};
  54. padding: #{0 8upx};
  55. .item {
  56. padding: #{0 28upx};
  57. margin-right: #{16upx};
  58. height: #{62upx};
  59. line-height: #{62upx};
  60. font-size: #{24upx};
  61. color: #353535;
  62. border-radius: #{38upx};
  63. border: #{1upx} solid #bbbbbb;
  64. }
  65. }
  66. .u-bottom-fixed {
  67. position: fixed;
  68. bottom: 0;
  69. left: 0;
  70. width: 100%;
  71. z-index: 1500;
  72. background-color: #ffffff;
  73. }
  74. </style>