apply.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <view class="apply-page">
  3. <view class="common-card flex-a flex-j-b mb-20" @click="handleAddress" v-if="defaultAddr.id">
  4. <image src="../../pages-mine/static/adderss.png" style="width:40rpx;height: 40rpx;"></image>
  5. <view class="flex-d flex-1 ml-24" style="margin-right: 90rpx;">
  6. <view class="flex-a flex-j-b mb-10">
  7. <view :style="titleStyle">{{ defaultAddr.name }}</view>
  8. <view :style="titleStyle">{{ defaultAddr.mobile }}</view>
  9. </view>
  10. <view :style="titleStyle">地址:{{ defaultAddr.fullAddress }}</view>
  11. </view>
  12. <u-icon name="arrow-right" :size="28" color="#666" top="4"></u-icon>
  13. </view>
  14. <!-- 退回地址 -->
  15. <view v-else class="common-card flex-a flex-j-b mb-20" @click="handleAddress">
  16. <view class="flex-a">
  17. <u-icon name="plus-circle-fill" size="50" color="#38C148"></u-icon>
  18. <text class="required">退回地址</text>
  19. </view>
  20. <view class="flex-a">
  21. <view class="flex-d mr-10 flex-a-e">
  22. <text class="common-text-2 font-28">请添加</text>
  23. <text class="common-text font-24">提交后无法修改</text>
  24. </view>
  25. <u-icon name="arrow-right" size="32" color="#666666"></u-icon>
  26. </view>
  27. </view>
  28. <view class="common-card flex-a flex-j-b mb-20" style="padding: 30rpx;" @click="selectBooks">
  29. <text class="required">选择退回书籍</text>
  30. <view class="flex-a">
  31. <text class="common-text-2 font-26">请选择</text>
  32. <u-icon name="arrow-right" size="32" color="#666666"></u-icon>
  33. </view>
  34. </view>
  35. <!-- 退回书籍 -->
  36. <view class="common-card mb-20">
  37. <view class="common-title mb-20"> <text>订单编号: {{ orderId }}</text></view>
  38. <!-- 书籍列表 -->
  39. <detail-book-item :book="item" v-for="(item, index) in bookItems" isReturn :key="index" />
  40. </view>
  41. <view class="common-card" style="padding: 30rpx;" @click="selectBooks">
  42. <view class="flex-a flex-j-b mb-20">
  43. <text class="common-text-2 font-30">退回邮费:</text>
  44. <text class="common-title" style="color: #FF0000;">首次免费退回/¥33.00</text>
  45. </view>
  46. <view class="common-card flex-a flex-j-b" style="background: #fafafa;">
  47. <text class="common-text-2">书籍数量</text>
  48. <text class="common-text-2">3</text>
  49. </view>
  50. </view>
  51. <view class="bottom-fixed-con">
  52. <u-button type="primary">确认退回</u-button>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. import OrderItem from '../components/order-item.vue'
  58. import detailBookItem from '../components/detail-book-item.vue';
  59. export default {
  60. components: {
  61. OrderItem,
  62. detailBookItem
  63. },
  64. data() {
  65. return {
  66. defaultAddr: {},
  67. orderId: '54631435441',
  68. bookItems: [
  69. {
  70. cover: 'https://img3.doubanio.com/lpic/s1076932.jpg',
  71. bookName: '这里是书本名称bu换行',
  72. recycleMoney: '32.20',
  73. num: 2,
  74. suit: 1,
  75. auditList: [
  76. { status: '良好', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
  77. { status: '不通过', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
  78. { status: '良好', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
  79. ]
  80. },
  81. {
  82. cover: 'https://img3.doubanio.com/lpic/s1076932.jpg',
  83. bookName: '这里是书本名称bu换行',
  84. recycleMoney: '32.20',
  85. num: 2,
  86. suit: 1,
  87. auditList: [
  88. { status: '良好', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
  89. { status: '不通过', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
  90. { status: '良好', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
  91. ]
  92. },
  93. {
  94. cover: 'https://img3.doubanio.com/lpic/s1076932.jpg',
  95. bookName: '这里是书本名称bu换行',
  96. recycleMoney: '32.20',
  97. num: 2,
  98. suit: 1,
  99. auditList: [
  100. { status: '良好', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
  101. { status: '不通过', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
  102. { status: '良好', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
  103. ]
  104. },
  105. ]
  106. }
  107. },
  108. methods: {
  109. addAddress() {
  110. // 添加地址逻辑
  111. },
  112. selectBooks() {
  113. // 选择书籍逻辑
  114. },
  115. //添加或者选择地址
  116. handleAddress() {
  117. uni.navigateTo({
  118. url: `/pages-mine/pages/address/list?id=${this.defaultAddr.id}&isSelect=1`
  119. })
  120. },
  121. },
  122. mounted() {
  123. uni.$on('selectAddr', (item) => {
  124. if (item.id) {
  125. this.defaultAddr = item
  126. }
  127. })
  128. }
  129. }
  130. </script>
  131. <style lang="scss" scoped>
  132. .apply-page {
  133. min-height: 100vh;
  134. background: #f5f7fa;
  135. padding: 20rpx;
  136. padding-bottom: calc(env(safe-area-inset-bottom) + 130rpx);
  137. .required {
  138. font-size: 32rpx;
  139. color: #333;
  140. font-weight: 400;
  141. position: relative;
  142. margin-left: 10rpx;
  143. &::after {
  144. content: '*';
  145. color: #fa3534;
  146. margin-left: 4rpx;
  147. }
  148. }
  149. }
  150. </style>