shopList.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <template>
  2. <view class="shop-list">
  3. <view class="shop-item" v-for="(item,index) in 1" :key="index" @click="handleShop(item)">
  4. <view class="shop-head">
  5. <view class="shop-title">
  6. <text>从化荔博园店铺</text>
  7. <up-icon class="icon" name="arrow-right" size="12" color="rgba(137, 137, 137, 0.69)"></up-icon>
  8. </view>
  9. <text class="status">{{statusStr[active]}}</text>
  10. </view>
  11. <view class="shop-cont">
  12. <image class="shop-img" src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png">
  13. </image>
  14. <view class="shop-info">
  15. <view class="shop-name flex">
  16. <text>海南妃子笑荔枝新鲜采摘</text>
  17. <text class="shop-price">¥25</text>
  18. </view>
  19. <view class="shop-text flex">
  20. <text>3斤装规格</text>
  21. <text>x1</text>
  22. </view>
  23. <up-text size="12" color="#AFAFAF" text="坏单包退 包邮"></up-text>
  24. <view class="total">
  25. <view v-if="active==3 || active==4">共优惠 <text class="num">¥10</text></view>
  26. <view v-if="active!=0 || active!=1">实付款 <text class="num">¥25</text></view>
  27. </view>
  28. </view>
  29. </view>
  30. <view :class="['shop-foot','flex',{end:type === 'detail'}]">
  31. <view class="more" v-show="type !== 'detail'">更多</view>
  32. <view class="shop-button" v-if="active==0 || active==1">
  33. <view>取消订单</view>
  34. <view>付款</view>
  35. </view>
  36. <view class="shop-button" v-else-if="active==2">
  37. <view>删除订单</view>
  38. <view>提醒发货</view>
  39. </view>
  40. <view class="shop-button" v-else-if="active==3">
  41. <view>删除订单</view>
  42. <view>查看物流</view>
  43. <view class="confirm">确认收货</view>
  44. </view>
  45. <view class="shop-button" v-else="active==4">
  46. <view>申请售后</view>
  47. <view>去评价</view>
  48. <view class="confirm">再买一单</view>
  49. </view>
  50. </view>
  51. <view class="shop-detail-info" v-show="type === 'detail'">
  52. <view class="info-row">
  53. <view class="label">订单编号</view>
  54. <view class="value">69854885962524256653</view>
  55. </view>
  56. <!-- <view class="info-row">
  57. <view class="label">更多信息</view>
  58. </view> -->
  59. <up-collapse :border="false">
  60. <up-collapse-item title="更多信息" cellCustomClass="collapse-item" value="展开" :rightIconStyle="{color:'rgba(137, 137, 137, 0.69)',size:'10px'}">
  61. 123145646
  62. </up-collapse-item>
  63. </up-collapse>
  64. <!-- <view class="btn-text">
  65. <up-icon name="chat-fill"></up-icon>
  66. <text>联系商家</text>
  67. </view> -->
  68. </view>
  69. </view>
  70. </view>
  71. </template>
  72. <script setup>
  73. import {
  74. ref
  75. } from "vue"
  76. const props = defineProps({
  77. active: {
  78. type: [Number, String],
  79. default: 0
  80. },
  81. type: {
  82. type: String,
  83. default: ''
  84. }
  85. })
  86. const statusStr = {
  87. 0: "待付款",
  88. 1: "待付款",
  89. 2: "待发货",
  90. 3: "待收货",
  91. 4: "交易成功",
  92. 5: "退款/售后",
  93. }
  94. const handleShop = () => {
  95. if (props.active == 3 || props.active == 4) {
  96. uni.navigateTo({
  97. url: `/pages/tabBar/mine/subPages/orderDetail?status=${props.active}`
  98. });
  99. }
  100. }
  101. </script>
  102. <style lang="scss" scoped>
  103. .shop-list {
  104. font-size: 28rpx;
  105. .flex {
  106. display: flex;
  107. align-items: center;
  108. justify-content: space-between;
  109. }
  110. .shop-item {
  111. background: #fff;
  112. padding: 20rpx 24rpx;
  113. .shop-head {
  114. display: flex;
  115. align-items: center;
  116. justify-content: space-between;
  117. .shop-title {
  118. font-weight: 500;
  119. display: flex;
  120. .icon {
  121. margin-left: 2rpx;
  122. }
  123. }
  124. .status {
  125. color: #F3C11D;
  126. }
  127. }
  128. .shop-cont {
  129. width: 100%;
  130. display: flex;
  131. margin: 20rpx 0;
  132. .shop-img {
  133. width: 182rpx;
  134. height: 182rpx;
  135. margin-right: 10rpx;
  136. border-radius: 10rpx;
  137. }
  138. .shop-info {
  139. width: calc(100% - 182rpx - 10rpx);
  140. .shop-name {
  141. font-size: 28rpx;
  142. font-weight: 500;
  143. .shop-price {
  144. font-weight: 400;
  145. }
  146. }
  147. .shop-text {
  148. color: #717070;
  149. }
  150. .total {
  151. margin-top: 20rpx;
  152. display: flex;
  153. justify-content: flex-end;
  154. .num {
  155. font-weight: 500;
  156. font-size: 34rpx;
  157. }
  158. view+view {
  159. margin-left: 20rpx;
  160. }
  161. }
  162. }
  163. }
  164. .shop-foot {
  165. &.end {
  166. justify-content: flex-end;
  167. }
  168. .more {
  169. color: rgba(0, 0, 0, 0.5);
  170. }
  171. .shop-button {
  172. display: flex;
  173. align-items: center;
  174. view {
  175. width: 164rpx;
  176. padding: 10rpx 0;
  177. text-align: center;
  178. border-radius: 50rpx;
  179. border: 2rpx solid rgba(0, 0, 0, 0.3);
  180. }
  181. .confirm {
  182. background: #FFD95E;
  183. border: 2rpx solid transparent;
  184. }
  185. view+view {
  186. margin-left: 20rpx;
  187. }
  188. }
  189. }
  190. .shop-detail-info {
  191. .info-row {
  192. margin-top: 20rpx;
  193. display: flex;
  194. align-items: center;
  195. justify-content: space-between;
  196. .label {
  197. font-size: 26rpx;
  198. }
  199. .value{
  200. color: rgba(0, 0, 0, 0.5);
  201. }
  202. }
  203. .collapse-item{
  204. border: none;
  205. }
  206. .btn-text{
  207. display: flex;
  208. align-items: center;
  209. }
  210. ::v-deep .u-cell > .u-cell__body {
  211. padding: 0 !important;
  212. font-size: 26rpx;
  213. margin-top: 20rpx;
  214. // color: rgba(0, 0, 0, 0.5);
  215. .u-cell__left-icon-wrap{
  216. margin-right: 0;
  217. }
  218. }
  219. }
  220. }
  221. .shop-item+.shop-item {
  222. margin-top: 10rpx;
  223. }
  224. }
  225. </style>