detail.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <template>
  2. <view style="background-color: #fff;height: 100vh;">
  3. <view style="border-bottom: 2rpx solid #EEEEEE;" class="address flexB" @click="goorderPlacer">
  4. <view class="flexV">
  5. <view class="address_tip green">
  6. 下单人
  7. </view>
  8. <view style="line-height: 50rpx;">
  9. <text>{{ form.buy_name }}</text>
  10. <text style="margin-left: 24rpx;">{{ form.buy_phone }}</text>
  11. </view>
  12. </view>
  13. </view>
  14. <view class="address flexB " @click="goaddress">
  15. <view class="flexV">
  16. <view class="address_tip red">
  17. 收货人
  18. </view>
  19. <view>
  20. <view>
  21. <text>{{ form.user_name }}</text>
  22. <text style="margin-left: 24rpx;">{{ form.mobile }}</text>
  23. </view>
  24. <view class="gray">
  25. {{ form.province + form.city + form.area + form.address }}
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="soapBox">
  31. <view class="soapBox_middle">
  32. <view class="flexB">
  33. <image :src="type ? image[0] : image[1]" mode="widthFix" style="width: 200rpx;margin-right: 20rpx;"></image>
  34. <view class="middleFlex">
  35. <view class="middleFlex_title">
  36. {{ type ? '【大卫博士健康内裤】专用洗涤皂' : '【大卫博士健康内裤】专用打包胶带' }}
  37. </view>
  38. <view class="middleFlex_dan">
  39. <view style="font-weight: bold;">
  40. ¥{{ form.price }}
  41. </view>
  42. <view class="num">
  43. x{{ form.num }}
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="soapBox_bottom">
  50. <text class="text1">共{{ `${form.num + (type ? '块' : '卷')}` }},</text>
  51. <text>合计;</text>
  52. <text class="text2">¥</text>
  53. <text class="text3">{{ form.cost }}</text>
  54. </view>
  55. </view>
  56. <view class="botFlex">
  57. <view class="flexB botFlex_flex">
  58. <view class="title">
  59. 订单编号:
  60. <text style="font-weight: 400;">{{ form.order_no }}</text>
  61. </view>
  62. <view class="anniu" @click="copy(form.order_no)">
  63. 复制
  64. </view>
  65. </view>
  66. <view class="flexB botFlex_flex">
  67. <view class="title">
  68. 下单时间:
  69. <text style="font-weight: 400;">{{ form.created_at }}</text>
  70. </view>
  71. </view>
  72. <view class="flexB botFlex_flex">
  73. <view class="title">
  74. 商品总额:
  75. </view>
  76. <view class="right">
  77. ¥{{ form.cost }}
  78. </view>
  79. </view>
  80. <view class="flexB botFlex_flex">
  81. <view class="title">
  82. 商品数量:
  83. </view>
  84. <view class="right">
  85. {{ `${form.num + (type ? '块' : '卷')}` }}
  86. </view>
  87. </view>
  88. <view v-if="form.remark" class="flexT botFlex_flex">
  89. <view class="title">
  90. 订单备注:
  91. </view>
  92. <view class="remark">
  93. {{ form.remark }}
  94. </view>
  95. </view>
  96. </view>
  97. <view class="submitPay">
  98. <view class="anniu red" @click="again">
  99. 继续下单
  100. </view>
  101. </view>
  102. </view>
  103. </template>
  104. <script>
  105. import {
  106. handleClipboard
  107. } from '../../common/util/utils.js'
  108. // import { _API_get_express } from '@/apis/good.js'
  109. export default {
  110. data() {
  111. return {
  112. type: '',
  113. image: [
  114. require('../../static/img/soap-s.png'),
  115. require('../../static/img/tape-s.png')
  116. ],
  117. form: {},
  118. }
  119. },
  120. onLoad(opt){
  121. this.form = JSON.parse(decodeURIComponent(opt.data))
  122. this.type = this.form.goods_type == 1 ? 1 : 0
  123. },
  124. methods: {
  125. // 再次下单
  126. again() {
  127. const type = this.type == 1 ? 'soap' : 'tape'
  128. uni.reLaunch({
  129. url: '../index/index?type=' + type
  130. })
  131. },
  132. /*复制单号*/
  133. copy(order_num) {
  134. try {
  135. uni.setClipboardData({
  136. data: order_num,
  137. success: () => {
  138. uni.toast('订单号已复制');
  139. }
  140. })
  141. } catch (e) {
  142. uni.showModal({
  143. content: '您的手机暂不支持复制',
  144. showCancel: false
  145. })
  146. }
  147. },
  148. }
  149. }
  150. </script>
  151. <style lang="scss" scoped>
  152. .address {
  153. padding: 40rpx 0;
  154. margin: 0 24rpx;
  155. background-color: #fff;
  156. &_tip {
  157. width: 92rpx;
  158. color: #fff;
  159. font-size: 24rpx;
  160. font-weight: bold;
  161. line-height: 50rpx;
  162. text-align: center;
  163. border-radius: 8rpx 8rpx 8rpx 8rpx;
  164. margin-right: 20rpx;
  165. }
  166. .green {
  167. background: linear-gradient(180deg, #46DBA1 0%, #19D16E 100%);
  168. }
  169. .red {
  170. background: linear-gradient(180deg, #FF232C 0%, #FF571B 100%);
  171. }
  172. &_title {
  173. font-size: 28rpx;
  174. font-weight: 400;
  175. color: $uni-text-color;
  176. }
  177. text {
  178. font-size: 34rpx;
  179. font-weight: bold;
  180. }
  181. .gray {
  182. width: 570rpx;
  183. font-size: 28rpx;
  184. color: #999999;
  185. margin-top: 8rpx;
  186. text-overflow: -o-ellipsis-lastline;
  187. overflow: hidden; //溢出内容隐藏
  188. text-overflow: ellipsis; //文本溢出部分用省略号表示
  189. display: -webkit-box; //特别显示模式
  190. line-clamp: 2;
  191. -webkit-line-clamp: 2; //行数
  192. -webkit-box-orient: vertical;
  193. }
  194. }
  195. .soapBox {
  196. border-top: 24rpx solid #F5F5F5;
  197. border-bottom: 24rpx solid #F5F5F5;
  198. padding: 24rpx 24rpx 48rpx 24rpx;
  199. background: #FFFFFF;
  200. position: relative;
  201. &_statusImg {
  202. width: 148rpx;
  203. position: absolute;
  204. right: 0;
  205. top: 0;
  206. }
  207. &_middle {
  208. display: flex;
  209. justify-content: space-between;
  210. align-items: flex-end;
  211. margin-top: 24rpx;
  212. .num {
  213. font-size: 28rpx;
  214. color: #999999;
  215. }
  216. .middleFlex {
  217. height: 130rpx;
  218. display: flex;
  219. justify-content: flex-start;
  220. flex-direction: column;
  221. &_title {
  222. font-size: 30rpx;
  223. font-weight: bold;
  224. }
  225. &_dan {
  226. margin-top: 24rpx;
  227. font-size: 28rpx;
  228. width: 472rpx;
  229. display: flex;
  230. align-items: center;
  231. justify-content: space-between;
  232. }
  233. }
  234. }
  235. &_bottom {
  236. text-align: right;
  237. // margin-top: 34rpx;
  238. font-weight: bold;
  239. font-size: 28rpx;
  240. .text1 {
  241. color: #999;
  242. }
  243. .text2 {
  244. color: #FB231F;
  245. }
  246. .text3 {
  247. font-size: 44rpx;
  248. color: #FB231F;
  249. }
  250. }
  251. }
  252. .botFlex {
  253. background-color: #fff;
  254. margin-top: 30rpx;
  255. padding: 20rpx 30rpx;
  256. .botzuofei {
  257. align-items: flex-start;
  258. .red {
  259. padding-top: 10rpx;
  260. width: 500rpx;
  261. font-size: 28rpx;
  262. line-height: 35rpx;
  263. color: #FB231F;
  264. // text-align: ri;
  265. display: flex;
  266. justify-content: flex-end;
  267. }
  268. }
  269. &_flex {
  270. .title {
  271. line-height: 56rpx;
  272. font-size: 28rpx;
  273. font-weight: bold;
  274. }
  275. .anniu {
  276. width: 72rpx;
  277. height: 42rpx;
  278. background: #FFF4F3;
  279. border-radius: 8rpx;
  280. text-align: center;
  281. line-height: 42rpx;
  282. font-size: 24rpx;
  283. color: #FB231F;
  284. }
  285. .right {
  286. font-size: 28rpx;
  287. font-weight: bold;
  288. color: #FB231F;
  289. }
  290. .remark {
  291. text-align: right;
  292. width: 60%;
  293. font-size: 28rpx;
  294. }
  295. }
  296. }
  297. .submitPay {
  298. position: fixed;
  299. left: 0;
  300. bottom: 0;
  301. width: 100%;
  302. height: 102rpx;
  303. background-color: #fff;
  304. box-shadow: 0px -4px 24px 2px rgba(0, 0, 0, 0.1);
  305. display: flex;
  306. justify-content: flex-end;
  307. align-items: center;
  308. border-top: 2rpx solid #EEEEEE;
  309. .anniu {
  310. width: 160rpx;
  311. height: 64rpx;
  312. text-align: center;
  313. line-height: 64rpx;
  314. border-radius: 34rpx;
  315. margin-left: 20rpx;
  316. font-size: 28rpx;
  317. margin-right: 30rpx;
  318. }
  319. .grays {
  320. border: 2rpx solid #CCCCCC;
  321. color: 333;
  322. }
  323. .red {
  324. background: linear-gradient(84deg, #F30000 0%, #FE4815 100%);
  325. color: #fff;
  326. }
  327. }
  328. </style>