orderConfirm.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view>
  3. <view class="container flex align-center justify-between" @click="navTap">
  4. <view class="flex padding align-center">
  5. <image src="/static/address.png" style="width: 65upx;height: 65upx;"></image>
  6. <view class="padding-left text-sm" v-if="!$u.test.isEmpty(address)">
  7. <view style="font-size: 28upx;font-family: PingFang SC;font-weight: 800;color: #000000;">赖德福 19849015150</view>
  8. <view class="text-gray">广东省 广州市 荔湾区 新路街</view>
  9. </view>
  10. <view class="padding-left" style="font-size: 28upx;font-family: PingFang SC;font-weight: 800;color: #000000;" v-else>请选择收货地址</view>
  11. </view>
  12. <view class="padding">
  13. <u-icon name="arrow-right" color="#d4d4d4"></u-icon>
  14. </view>
  15. </view>
  16. <block v-for="(item, index) in giftList" :key="index">
  17. <view class="card">
  18. <view class="padding">
  19. <view class="flex margin-top-xs">
  20. <image :src="item.goodsPic" style="width: 220upx;height: 220upx;"></image>
  21. <view class="padding-left-sm">
  22. <view class="name text-cut" style="width: 350upx;">{{item.goodsName}}</view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="flex justify-end padding" style="margin-top: -120upx;">
  27. <view class="count">x{{item.count}}</view>
  28. </view>
  29. </view>
  30. </block>
  31. <view style="height: 120upx;"></view>
  32. <view class="notice text-sm">
  33. 提示:该礼包运费需要用户自行承担
  34. </view>
  35. <view class="footer-fixed flex justify-between align-center padding-sm bg-white">
  36. <view></view>
  37. <button class="cu-btn round text-white theme-bg-color" style="width: 180upx;height: 80upx;" @click="dialog">领取</button>
  38. </view>
  39. <u-popup v-model="dialogShow" mode="center" width="500" height="480" border-radius="30">
  40. <view class="bg-img text-center" style="background-image: url('/static/dialogBgImg.png');height: 600rpx;">
  41. <view style="height: 80upx;"></view>
  42. <view style="font-size: 50upx;font-family: PingFang SC;font-weight: 600;color: #ffffff;">恭喜你</view>
  43. <view class="text-bold text-black" style="padding: 80upx 0;">领取成功!请等待卖家发货</view>
  44. <view class="padding">
  45. <u-button class="custom-style" shape="circle" @click="onConfirm">确定</u-button>
  46. </view>
  47. </view>
  48. </u-popup>
  49. </view>
  50. </template>
  51. <script>
  52. export default {
  53. data() {
  54. return {
  55. userId:'',
  56. dialogShow: false,
  57. writeAddress: false,
  58. //我的地址
  59. address:{},
  60. count: 0,
  61. giftList: [],
  62. }
  63. },
  64. onLoad(options) {
  65. this.giftList=JSON.parse(options.goods)
  66. this.userId=this.giftList[0].userId
  67. this.getAddress()
  68. },
  69. methods: {
  70. getAddress(){
  71. this.$u.api.user.userAddress({userId:this.userId}).then(res=>{
  72. this.address=res.records[0]
  73. })
  74. },
  75. dialog() {
  76. this.dialogShow = true;
  77. },
  78. onConfirm() {
  79. this.dialogShow = false;
  80. uni.navigateBack({
  81. delta: 1
  82. })
  83. },
  84. navTap() {
  85. let params=JSON.stringify(this.address)
  86. uni.navigateTo({
  87. url: "/pages/activityList/mine/order/address?address="+params
  88. })
  89. }
  90. }
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. .card {
  95. margin: 20upx;
  96. border-radius: 16upx;
  97. background-color: #FFFFFF;
  98. .title {
  99. font-size: 28upx;
  100. font-family: PingFang SC;
  101. font-weight: 800;
  102. color: #222222;
  103. }
  104. .name {
  105. font-size: 26upx;
  106. font-family: PingFang SC;
  107. font-weight: 800;
  108. color: #222222;
  109. }
  110. .specification {
  111. padding-top: 30upx;
  112. font-size: 24upx;
  113. font-family: PingFang SC;
  114. font-weight: bold;
  115. color: #959595;
  116. }
  117. .count {
  118. width: 60upx;
  119. height: 60upx;
  120. border: #d9d9d9 1upx solid;
  121. border-radius: 16upx;
  122. display: flex;
  123. align-items: center;
  124. justify-content: center;
  125. }
  126. }
  127. .container {
  128. background-color: #ffffff;
  129. border-radius: 16upx;
  130. margin: 20upx;
  131. }
  132. .notice {
  133. position: fixed;
  134. width: 100%;
  135. z-index: 10000;
  136. bottom: 120upx;
  137. left: 0;
  138. line-height: 80upx;
  139. text-align: center;
  140. background-color: #fdedee;
  141. color: #ff0000;
  142. }
  143. .custom-style {
  144. background-color: #5b3ee7;
  145. width: 250upx;
  146. color: #ffffff;
  147. }
  148. </style>