payCourseSuccess.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <template>
  2. <view class="common-page">
  3. <view class="header-box" :style="{
  4. paddingBottom: '30rpx',
  5. }" id="headerBox" ref="headerBox">
  6. <view class="navbar-box display-flex-content-center" :style="{
  7. height: `${topData.height}px`,
  8. paddingTop: `${topData.top}px`,
  9. paddingBottom: '40rpx',
  10. color: '#666666',
  11. fontSize: '34rpx',
  12. fontWeight: 'bold'
  13. }">
  14. <view @click="toHome" style="position: absolute;left:30rpx">
  15. <u-icon size="20" name="arrow-left" color="#666666"></u-icon>
  16. </view>
  17. <text></text>
  18. </view>
  19. <view class="success-con fs16">
  20. <view class="display-flex-content-center">
  21. <u-icon size="50rpx" name="checkmark-circle-fill" color="#E2B98E" ></u-icon>
  22. <text class="fw700 ml5 success-title-text">支付成功</text>
  23. </view>
  24. <view class="text-center fs14 mtr20 mb20">我们会在24小时内与您联系,您也可以加客服微信~</view>
  25. <view style="display: flex; align-items: center; justify-content: center;">
  26. <van-image
  27. id="qrCodeImage"
  28. height="240rpx"
  29. :src="cs_wechat_img"
  30. width="240rpx"
  31. @click="recognizeQRCode"
  32. />
  33. </view>
  34. <view class="text-center fs14 mtr20">长按图片添加客服</view>
  35. </view>
  36. </view>
  37. <view class="content-box">
  38. <!-- 订单编号 -->
  39. <view class="common-card">
  40. <text style="color: #888888">订单编号: </text>
  41. <text style="color: #333333;margin-left: 12rpx"> {{ detailData.order_no}}</text>
  42. <u-divider :dashed="true"></u-divider>
  43. <!-- 已选商品 -->
  44. <view class="display-flex-center" v-for="(item, index) in goodsList" :key="index">
  45. <image style="width: 155rpx; height: 155rpx; border-radius: 10rpx;margin-right: 30rpx;flex-shrink: 0;"
  46. :src="item.goods_cover" mode="aspectFill">
  47. </image>
  48. <view style="width: 100%;">
  49. <view class="display-flex-between ">
  50. <text class="goods-name">{{item.goods_name}}</text>
  51. </view>
  52. <view class="display-flex-between " style="margin-top: 30rpx">
  53. <text class="goods-price">¥<text style="font-family: D-DIN-Bold;font-weight: 700; font-size: 36rpx;">{{item.price_selling}}</text></text>
  54. </view>
  55. </view>
  56. </view>
  57. <u-divider :dashed="true"></u-divider>
  58. <!-- 运费信息 -->
  59. <view class="display-flex-center mb15" style="justify-content: space-between;">
  60. <text class="color-71 flex-shrink" style="color: #888888">用户信息:</text>
  61. <text class=" text-overflow-single" style="color: #333333;">
  62. {{truckData.address_name}}&nbsp;&nbsp;{{truckData.address_phone}}
  63. </text>
  64. </view>
  65. <view class="display-flex-center mb15" style="justify-content: space-between;">
  66. <text class="color-71 flex-shrink" style="color: #888888">支付金额:</text>
  67. <text class=" text-overflow-single" style="color: #333333;">¥{{detailData.payment_amount}}</text>
  68. </view>
  69. <view class="display-flex-center" style="justify-content: space-between;">
  70. <text class="color-71 flex-shrink" style="color: #888888">支付时间:</text>
  71. <text class="text-overflow-single" style="color: #333333;">{{detailData.payment_datetime}}</text>
  72. </view>
  73. </view>
  74. </view>
  75. <view style="margin-top: 40rpx;width: 100%;">
  76. <view class="btn-gray-border" @click="toHome"><span>返回首页</span></view>
  77. </view>
  78. </view>
  79. </template>
  80. <script>
  81. export default {
  82. data() {
  83. return {
  84. orderNo: '',
  85. goodsList: [
  86. {}, {}
  87. ],
  88. cs_wechat_img:"",
  89. detailData: {},
  90. truckData: {},
  91. topData: {
  92. top: 0,
  93. height: 0
  94. },
  95. }
  96. },
  97. onLoad(options) {
  98. this.orderNo = options.orderNo
  99. const configs = uni.getStorageSync("configs");
  100. this.cs_wechat_img =configs.cs_wechat_img;
  101. // const mData = uni.getStorageSync('selectTaskData') || undefined
  102. },
  103. onShow() {
  104. const topData = uni.getMenuButtonBoundingClientRect()
  105. this.topData.top = topData.top
  106. this.topData.height = topData.height
  107. this.getOrderDetail()
  108. },
  109. methods: {
  110. getOrderDetail() {
  111. this.$api.orderDetail({ order_no: this.orderNo }).then(res => {
  112. this.detailData = res.data
  113. this.goodsList = res.data.items || []
  114. this.truckData = res.data.truck
  115. })
  116. },
  117. recognizeQRCode() {
  118. if (!this.cs_wechat_img) {
  119. uni.showToast({
  120. title: '二维码图片地址为空',
  121. icon: 'none',
  122. duration: 3000
  123. });
  124. return;
  125. }
  126. // 预览图片
  127. uni.previewImage({
  128. urls: [this.cs_wechat_img],
  129. success: () => {
  130. },
  131. fail: (err) => {
  132. console.error('预览图片失败:', err);
  133. uni.showToast({
  134. title: '预览图片失败',
  135. icon: 'none',
  136. duration: 3000
  137. });
  138. }
  139. });
  140. },
  141. toHome() {
  142. uni.switchTab({
  143. url: '/pages/home/index'
  144. })
  145. },
  146. toOrder() {
  147. uni.navigateTo({
  148. url: `/subPages/orderDetail/orderDetail?orderNo=${this.detailData.order_no}`
  149. })
  150. }
  151. }
  152. }
  153. </script>
  154. <style lang="scss" scoped>
  155. .common-page {
  156. height: 100vh;
  157. overflow-y: auto;
  158. // padding: 20rpx;
  159. color: #2C2C2C;
  160. padding-bottom: 188rpx;
  161. box-sizing: border-box;
  162. background-color: #F8F9FA;
  163. }
  164. .coupon-list {
  165. padding: 30rpx 20rpx;
  166. background-color: #fff;
  167. border-radius: 20rpx 20rpx 0 0;
  168. }
  169. .btn-gray-border{
  170. width: 560rpx;
  171. height: 88rpx;
  172. margin: 0 auto;
  173. background: linear-gradient( 315deg, #CA9359 0%, #E2B98E 100%);
  174. border-radius: 292rpx 292rpx 292rpx 292rpx;
  175. font-family: PingFang SC, PingFang SC-Medium;
  176. font-weight: 400;
  177. font-size: 32rpx;
  178. color: #FFFFFF;
  179. line-height: 36rpx;
  180. text-align: center;
  181. font-style: normal;
  182. text-transform: none;
  183. display: flex;
  184. justify-content: center;
  185. align-items: center;
  186. }
  187. .goods-name{
  188. font-family: PingFang SC-Bold;
  189. font-weight: 400;
  190. font-size: 28rpx;
  191. color: #333333;
  192. line-height: 40rpx;
  193. text-align: left;
  194. font-style: normal;
  195. text-transform: none;
  196. // 加粗
  197. font-weight: bold;
  198. }
  199. .goods-price{
  200. font-family: D-DIN-Regular;
  201. font-weight: 400;
  202. font-size: 24rpx;
  203. color: #333333;
  204. line-height: 30rpx;
  205. text-align: left;
  206. font-style: normal;
  207. text-transform: none;
  208. }
  209. .content-box {
  210. padding: 20rpx;
  211. }
  212. .navbar-box {
  213. position: relative;
  214. }
  215. .success-title-text{
  216. font-family: PingFang SC, PingFang SC;
  217. font-weight: 400;
  218. font-size: 40rpx;
  219. color: #333333;
  220. line-height: 50rpx;
  221. text-align: center;
  222. font-style: normal;
  223. text-transform: none;
  224. // 加粗
  225. font-weight: bold;
  226. }
  227. .text-center{
  228. font-family: PingFang SC, PingFang SC;
  229. font-weight: 400;
  230. font-size: 24rpx;
  231. color: #666666;
  232. line-height: 40rpx;
  233. text-align: center;
  234. font-style: normal;
  235. text-transform: none;
  236. }
  237. .good-card {
  238. padding: 38rpx 22rpx;
  239. color: #7A7A7A;
  240. ::v-deep {
  241. .u-textarea {
  242. background: #F6F6F6;
  243. border-radius: 12rpx 12rpx 12rpx 12rpx;
  244. border: none;
  245. padding: 18rpx;
  246. .u-textarea__count {
  247. background-color: transparent !important;
  248. }
  249. }
  250. }
  251. }
  252. .goods-list {
  253. margin: 0 30rpx;
  254. padding: 30rpx 0;
  255. border-bottom: 1rpx solid #F5F5F5;
  256. }
  257. .goods-total {
  258. justify-content: flex-end;
  259. margin: 27rpx 20rpx;
  260. }
  261. </style>