storeOrder.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939
  1. <template>
  2. <view>
  3. <view class="top-fixed">
  4. <!-- tab切换 -->
  5. <view class="pub-tab-box">
  6. <view class="tab-inner">
  7. <view v-for="(item,index) in orderStatus" :key="index"
  8. :class="status ==item.value?'item active':'item'" @click="orderStatusChange(item)">
  9. <view class="text">
  10. {{ item.name }}
  11. <image v-show="status ==item.value" class="tab-bg"
  12. src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/tab_bg.png"
  13. mode=""></image>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="search-cont">
  19. <view class="inner">
  20. <image class="icon-search"
  21. src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/search.png" mode="">
  22. </image>
  23. <input type="text" value="" placeholder="输入订单号" confirm-type="搜索" @confirm="goSearch"
  24. placeholder-style="font-size:28rpx;color:#BBBBBB;font-family: PingFang SC;" />
  25. </view>
  26. </view>
  27. </view>
  28. <view class="top-seat"></view>
  29. <!-- 订单列表 -->
  30. <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
  31. :up="upOption">
  32. <view class="order-list">
  33. <view v-for="(item,index) in dataList" :key="index" class="item">
  34. <!-- 订单号,状态 -->
  35. <view class="ordersn-box" @click="showDetail(item)">
  36. <view class="num">订单号:{{item.orderCode}}</view>
  37. <view class="status-box">
  38. <!-- <view class="recom-box">推荐订单</view> -->
  39. <text class="text success">
  40. {{utils.getDictLabelName("storeOrderStatus",item.status)||''}}
  41. </text>
  42. </view>
  43. </view>
  44. <!-- 产品列表 -->
  45. <!-- 商城 -->
  46. <view class="drug-list" v-if="item.orderType!==2">
  47. <view @click="showDetail(item)" v-if="item.isPackage!=1"
  48. v-for="(subItem,subIndex) in item.items" :key="subIndex" class="drug-item">
  49. <view class="img-box">
  50. <image :src="JSON.parse(subItem.jsonInfo).image" mode="aspectFill"></image>
  51. </view>
  52. <view class="drug-info">
  53. <view>
  54. <view class="name-box ellipsis2">
  55. <view v-if="subItem.isPrescribe==1" class="tag">处方药</view>
  56. {{JSON.parse(subItem.jsonInfo).productName}}
  57. </view>
  58. <view class="spec ellipsis2">{{JSON.parse(subItem.jsonInfo).sku}}</view>
  59. </view>
  60. <view class="num-box">
  61. <view class="price">
  62. <text class="unit">¥</text>
  63. <text class="num">{{JSON.parse(subItem.jsonInfo).price.toFixed(2)}}</text>
  64. </view>
  65. <view class="amount">x{{JSON.parse(subItem.jsonInfo).num}}</view>
  66. </view>
  67. </view>
  68. </view>
  69. <view v-if="item.isPackage==1&&item.packageJson!=null" class="drug-item"
  70. @click="showDetail(item)">
  71. <view class="img-box">
  72. <image :src="JSON.parse(item.packageJson).imgUrl" mode="aspectFill"></image>
  73. </view>
  74. <view class="drug-info">
  75. <view>
  76. <view class="name-box ellipsis2">
  77. <view class="tag">套餐</view>{{JSON.parse(item.packageJson).title}}
  78. </view>
  79. <view class="spec ellipsis2">{{JSON.parse(item.packageJson).descs}}</view>
  80. </view>
  81. <!-- <view class="num-box">
  82. <view class="price">
  83. <text class="unit">¥</text>
  84. <text class="num">{{JSON.parse(item.packageJson).payMoney.toFixed(2)}}</text>
  85. </view>
  86. <view class="amount"></view>
  87. </view> -->
  88. </view>
  89. </view>
  90. <!-- 实付金额、按钮 -->
  91. <view class="bottom-box">
  92. <view class="amount-paid">
  93. <text class="label">订单金额:</text>
  94. <view class="price-box">
  95. <view class="unit">¥</view>
  96. <view class="num">{{item.payPrice.toFixed(2)}}</view>
  97. </view>
  98. </view>
  99. <view class="btn-box">
  100. <view v-if="item.status == 0" class="btn cancel" @click="cancel(item)">取消订单</view>
  101. <view v-if="item.status == 0" class="btn pay" @click="pay(item)">支付</view>
  102. <view v-if="item.isAfterSales==1" class="btn cancel" @click="refund(item)">申请售后</view>
  103. <view v-if="item.status >=2 &&item.deliveryId!=null" class="btn pay"
  104. @click.stop="showDelivery(item)">查看物流</view>
  105. <view v-if="item.status == -3" class="btn cancel" @click="deleteOrder(item)">删除订单</view>
  106. <!-- <view v-if="item.status==4" class="btn pay">再次购买</view> -->
  107. </view>
  108. </view>
  109. </view>
  110. <!-- 直播 -->
  111. <view class="drug-list" v-if="item.orderType==2">
  112. <view @click="showDetail(item)" v-if="item.isPackage!=1" class="drug-item">
  113. <view class="img-box">
  114. <image :src="JSON.parse(item.itemJson).image" mode="aspectFill"></image>
  115. </view>
  116. <view class="drug-info">
  117. <view>
  118. <view class="name-box ellipsis2">
  119. <view v-if="item.isPrescribe==1" class="tag">处方药</view>
  120. {{JSON.parse(item.itemJson).productName}}
  121. </view>
  122. <view class="spec ellipsis2">{{JSON.parse(item.itemJson).sku}}</view>
  123. </view>
  124. <view class="num-box">
  125. <view class="price">
  126. <text class="unit">¥</text>
  127. <text class="num">{{JSON.parse(item.itemJson).price.toFixed(2)}}</text>
  128. </view>
  129. <view class="amount">x{{item.totalNum}}</view>
  130. </view>
  131. </view>
  132. </view>
  133. <view v-if="item.isPackage==1&&item.packageJson!=null" class="drug-item"
  134. @click="showDetail(item)">
  135. <view class="img-box">
  136. <image :src="JSON.parse(item.packageJson).imgUrl" mode="aspectFill"></image>
  137. </view>
  138. <view class="drug-info">
  139. <view>
  140. <view class="name-box ellipsis2">
  141. <view class="tag">套餐</view>{{JSON.parse(item.packageJson).title}}
  142. </view>
  143. <view class="spec ellipsis2">{{JSON.parse(item.packageJson).descs}}</view>
  144. </view>
  145. <!-- <view class="num-box">
  146. <view class="price">
  147. <text class="unit">¥</text>
  148. <text class="num">{{JSON.parse(item.packageJson).payMoney.toFixed(2)}}</text>
  149. </view>
  150. <view class="amount"></view>
  151. </view> -->
  152. </view>
  153. </view>
  154. <!-- 实付金额、按钮 -->
  155. <view class="bottom-box">
  156. <view class="amount-paid">
  157. <text class="label">订单金额:</text>
  158. <view class="price-box">
  159. <view class="unit">¥</view>
  160. <view class="num">{{item.payPrice.toFixed(2)}}</view>
  161. </view>
  162. </view>
  163. <view class="btn-box">
  164. <view v-if="item.status == 0" class="btn cancel" @click="cancel(item)">取消订单</view>
  165. <view v-if="item.status == 0" class="btn pay" @click="pay(item)">支付</view>
  166. <view v-if="item.isAfterSales==1" class="btn cancel" @click="refund(item)">申请售后</view>
  167. <view v-if="item.status >=2 &&item.deliveryId!=null" class="btn pay"
  168. @click.stop="showDelivery(item)">查看物流</view>
  169. <view v-if="item.status == -3" class="btn cancel" @click="deleteOrder(item)">删除订单</view>
  170. <!-- <view v-if="item.status==4" class="btn pay">再次购买</view> -->
  171. </view>
  172. </view>
  173. </view>
  174. </view>
  175. </view>
  176. </mescroll-body>
  177. <CustomToast ref="customToast">
  178. </CustomToast>
  179. </view>
  180. </template>
  181. <script>
  182. import {
  183. getMyStoreOrderList,
  184. cancelOrder,
  185. canceliveOrder,
  186. deleteOrder as deleteOrderApi,
  187. cancelLiveOrder
  188. } from '@/api/storeOrder'
  189. import {
  190. getDicts
  191. } from '@/api/index'
  192. import {
  193. checkPurchaseLimit,
  194. checkOrderPurchaseLimit
  195. } from '@/api/product';
  196. import {
  197. CustomToast
  198. } from '@/components/custom-toast.vue';
  199. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  200. export default {
  201. mixins: [MescrollMixin],
  202. components: {
  203. CustomToast
  204. },
  205. data() {
  206. return {
  207. searchKey: "",
  208. status: 0,
  209. orderStatus: [{
  210. name: "全部",
  211. value: ""
  212. },
  213. {
  214. name: "待付款",
  215. value: "0"
  216. },
  217. {
  218. name: "待发货",
  219. value: "1"
  220. },
  221. {
  222. name: "待收货",
  223. value: "2"
  224. },
  225. {
  226. name: "已完成",
  227. value: "3"
  228. }
  229. ],
  230. mescroll: null,
  231. // 上拉加载的配置
  232. upOption: {
  233. onScroll: true,
  234. use: true, // 是否启用上拉加载; 默认true
  235. page: {
  236. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  237. size: 10 // 每页数据的数量,默认10
  238. },
  239. noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  240. empty: {
  241. icon: 'https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/no_data.png',
  242. tip: '暂无数据'
  243. }
  244. },
  245. // 列表数据
  246. dataList: [],
  247. // 用于存储正在支付的订单ID,防止重复点击
  248. payingMap: {},
  249. };
  250. },
  251. onShow() {
  252. // 页面显示时清除所有支付标志位,确保从支付页返回后可以再次支付
  253. this.payingMap = {};
  254. },
  255. onLoad(option) {
  256. this.status = option.status
  257. this.getDicts();
  258. var that = this;
  259. uni.$on('refreshOrder', () => {
  260. that.mescroll.resetUpScroll()
  261. });
  262. },
  263. methods: {
  264. goSearch(e) {
  265. this.searchKey = e.detail.value;
  266. this.mescroll.resetUpScroll()
  267. },
  268. getDicts: function() {
  269. getDicts().then(
  270. res => {
  271. if (res.code == 200) {
  272. uni.setStorageSync('dicts', JSON.stringify(res));
  273. } else {
  274. }
  275. // this.loadding=false;
  276. // this.navigatHandler();
  277. },
  278. rej => {}
  279. );
  280. },
  281. refund(item) {
  282. if (item.orderType == 2) {
  283. uni.navigateTo({
  284. url: '/pages_shopping/live/refundOrderProduct?orderId=' + item.orderId
  285. })
  286. } else {
  287. uni.navigateTo({
  288. url: './refundOrderProduct?orderId=' + item.id
  289. })
  290. }
  291. },
  292. // tab切换
  293. orderStatusChange(item) {
  294. this.status = item.value
  295. this.mescroll.resetUpScroll()
  296. },
  297. mescrollInit(mescroll) {
  298. this.mescroll = mescroll;
  299. },
  300. /*下拉刷新的回调 */
  301. downCallback(mescroll) {
  302. mescroll.resetUpScroll()
  303. },
  304. upCallback(page) {
  305. //联网加载数据
  306. var that = this;
  307. var data = {
  308. keyword: this.searchKey,
  309. status: this.status,
  310. page: page.num,
  311. pageSize: page.size
  312. };
  313. getMyStoreOrderList(data).then(res => {
  314. if (res.code == 200) {
  315. //设置列表数据
  316. if (page.num == 1) {
  317. that.dataList = res.data.list;
  318. } else {
  319. that.dataList = that.dataList.concat(res.data.list);
  320. }
  321. that.mescroll.endBySize(res.data.list.length, res.data.total);
  322. } else {
  323. uni.showToast({
  324. icon: 'none',
  325. title: "请求失败",
  326. });
  327. that.dataList = null;
  328. that.mescroll.endErr();
  329. }
  330. });
  331. },
  332. // 查看订单详情
  333. showDetail(item) {
  334. console.log(item)
  335. if (item.orderType == 2) {
  336. uni.navigateTo({
  337. url: '/pages_shopping/live/storeOrderDetail?orderId=' + item.orderId
  338. })
  339. } else {
  340. uni.navigateTo({
  341. url: './storeOrderDetail?id=' + item.id
  342. })
  343. }
  344. },
  345. cancel(item) {
  346. var that = this;
  347. uni.showModal({
  348. title: '提示',
  349. content: '确定取消订单吗',
  350. success: function(res) {
  351. if (res.confirm) {
  352. var data = {
  353. orderId: item.orderType == 2 ? item.orderId : item.id
  354. };
  355. if (item.orderType == 2) {
  356. cancelLiveOrder(data).then(res => {
  357. if (res.code == 200) {
  358. uni.showToast({
  359. icon: 'success',
  360. title: "操作成功",
  361. });
  362. that.mescroll.resetUpScroll()
  363. } else {
  364. uni.showToast({
  365. icon: 'none',
  366. title: res.msg,
  367. });
  368. }
  369. });
  370. } else {
  371. cancelOrder(data).then(res => {
  372. if (res.code == 200) {
  373. uni.showToast({
  374. icon: 'success',
  375. title: "操作成功",
  376. });
  377. that.mescroll.resetUpScroll()
  378. } else {
  379. uni.showToast({
  380. icon: 'none',
  381. title: res.msg,
  382. });
  383. }
  384. });
  385. }
  386. } else if (res.cancel) {
  387. }
  388. }
  389. });
  390. },
  391. async pay(item) {
  392. // 获取订单唯一标识
  393. const orderKey = item.id || item.orderId || item.orderCode;
  394. if (!orderKey) {
  395. console.error('订单ID不存在,无法支付');
  396. return;
  397. }
  398. // 防止重复点击
  399. if (this.payingMap[orderKey]) {
  400. console.log(`订单 ${orderKey} 正在支付中,请勿重复点击`);
  401. uni.showToast({
  402. icon: 'none',
  403. title: '支付处理中,请勿重复点击',
  404. duration: 1500
  405. });
  406. return;
  407. }
  408. // 立即设置标志,防止重复点击
  409. this.$set(this.payingMap, orderKey, true);
  410. try {
  411. if (item.isPrescribe == 1 && item.prescribeId == null) {
  412. uni.navigateTo({
  413. url: "/pages/shopping/prescribe?orderId=" + item.id,
  414. success: () => {
  415. // 跳转成功,延迟清除标志位
  416. setTimeout(() => {
  417. this.$set(this.payingMap, orderKey, false);
  418. }, 500);
  419. },
  420. fail: () => {
  421. // 跳转失败,清除标志位
  422. this.$set(this.payingMap, orderKey, false);
  423. }
  424. });
  425. return;
  426. }
  427. if (item.orderType == 2) {
  428. // 直播订单,限购逻辑不变,使用原有逻辑
  429. let productId = null;
  430. let num = item.totalNum || 1; // 获取订单数量
  431. if (item.productId) {
  432. productId = item.productId;
  433. } else if (item.itemJson) {
  434. try {
  435. const itemJson = JSON.parse(item.itemJson);
  436. productId = itemJson.productId;
  437. } catch (e) {
  438. console.error('解析 itemJson 失败:', e);
  439. }
  440. }
  441. // 如果获取到 productId,检查限购
  442. if (productId) {
  443. try {
  444. const res = await checkPurchaseLimit({
  445. productId: productId,
  446. num: num
  447. });
  448. if (res.code !== 200) {
  449. this.$set(this.payingMap, orderKey, false); // 限购检查失败,清除标志
  450. this.$refs.customToast.show({
  451. title: res.msg || '该商品限购,目前剩余可购买数量不足',
  452. duration: 2000
  453. });
  454. return;
  455. }
  456. } catch (error) {
  457. this.$set(this.payingMap, orderKey, false); // 检查失败,清除标志
  458. console.error('检查限购失败:', error);
  459. uni.showToast({
  460. icon: 'none',
  461. title: '检查限购失败,请稍后重试'
  462. });
  463. return;
  464. }
  465. }
  466. // 支付
  467. console.log("去支付", item)
  468. uni.navigateTo({
  469. url: `/pages_shopping/live/paymentOrder?orderList=${encodeURIComponent(JSON.stringify(item))}`,
  470. success: () => {
  471. // 跳转成功,延迟清除标志位(页面会跳转走)
  472. setTimeout(() => {
  473. this.$set(this.payingMap, orderKey, false);
  474. }, 500);
  475. },
  476. fail: () => {
  477. // 跳转失败,清除标志位
  478. this.$set(this.payingMap, orderKey, false);
  479. uni.showToast({
  480. icon: 'none',
  481. title: '跳转失败,请重试'
  482. });
  483. }
  484. })
  485. } else {
  486. // 商城订单,使用新接口根据orderCode校验
  487. if (item.orderCode) {
  488. try {
  489. const res = await checkOrderPurchaseLimit({
  490. orderCode: item.orderCode
  491. });
  492. if (res.code !== 200) {
  493. this.$set(this.payingMap, orderKey, false); // 限购检查失败,清除标志
  494. this.$refs.customToast.show({
  495. title: res.msg || '订单商品限购校验失败',
  496. duration: 2000
  497. });
  498. return;
  499. }
  500. } catch (error) {
  501. this.$set(this.payingMap, orderKey, false); // 检查失败,清除标志
  502. console.error('检查限购失败:', error);
  503. uni.showToast({
  504. icon: 'none',
  505. title: '检查限购失败,请稍后重试'
  506. });
  507. return;
  508. }
  509. }
  510. // 限购检查通过,进行支付跳转
  511. uni.navigateTo({
  512. url: '/pages/shopping/paymentOrder?orderId=' + item.id,
  513. success: () => {
  514. // 跳转成功,延迟清除标志位(页面会跳转走)
  515. setTimeout(() => {
  516. this.$set(this.payingMap, orderKey, false);
  517. }, 500);
  518. },
  519. fail: () => {
  520. // 跳转失败,清除标志位
  521. this.$set(this.payingMap, orderKey, false);
  522. uni.showToast({
  523. icon: 'none',
  524. title: '跳转失败,请重试'
  525. });
  526. }
  527. })
  528. }
  529. } catch (error) {
  530. // 异常情况,清除标志位
  531. this.$set(this.payingMap, orderKey, false);
  532. console.error('支付处理异常:', error);
  533. uni.showToast({
  534. icon: 'none',
  535. title: '支付处理异常,请重试'
  536. });
  537. }
  538. },
  539. // 查看物流
  540. showDelivery(item) {
  541. if (item.orderType == 2) {
  542. uni.navigateTo({
  543. url: `/pages_shopping/live/storeOrderDelivery?orderId=${item.orderId}`
  544. })
  545. } else {
  546. uni.navigateTo({
  547. url: './storeOrderDelivery?orderId=' + item.id
  548. })
  549. }
  550. },
  551. // 删除订单
  552. deleteOrder(item) {
  553. var that = this;
  554. uni.showModal({
  555. title: '提示',
  556. content: '确定删除订单吗?删除后无法恢复',
  557. success: function(res) {
  558. if (res.confirm) {
  559. var data = {
  560. orderId: item.orderType == 2 ? item.orderId : item.id,
  561. orderType: item.orderType
  562. };
  563. deleteOrderApi(data).then(res => {
  564. if (res.code == 200) {
  565. uni.showToast({
  566. icon: 'success',
  567. title: "删除成功",
  568. });
  569. that.mescroll.resetUpScroll()
  570. } else {
  571. uni.showToast({
  572. icon: 'none',
  573. title: res.msg,
  574. });
  575. }
  576. });
  577. }
  578. }
  579. });
  580. }
  581. }
  582. }
  583. </script>
  584. <style lang="scss">
  585. .top-fixed {
  586. width: 100%;
  587. position: fixed;
  588. top: 0;
  589. left: 0;
  590. z-index: 10;
  591. }
  592. .pub-tab-box {
  593. box-sizing: border-box;
  594. width: 100%;
  595. padding: 0 40upx;
  596. background-color: #FFFFFF;
  597. .tab-inner {
  598. height: 88upx;
  599. line-height: 88upx;
  600. display: flex;
  601. align-items: center;
  602. justify-content: space-between;
  603. overflow-x: auto;
  604. }
  605. .item {
  606. font-size: 28upx;
  607. white-space: nowrap;
  608. line-height: 1;
  609. font-family: PingFang SC;
  610. font-weight: 500;
  611. color: #666666;
  612. margin-right: 60upx;
  613. display: flex;
  614. align-items: center;
  615. justify-content: center;
  616. &:last-child {
  617. margin-right: 0;
  618. }
  619. &.active {
  620. font-weight: bold;
  621. color: #333333;
  622. }
  623. .text {
  624. position: relative;
  625. z-index: 1;
  626. }
  627. .tab-bg {
  628. width: 72upx;
  629. height: 28upx;
  630. position: absolute;
  631. top: 17upx;
  632. left: 50%;
  633. transform: translateX(-36upx);
  634. z-index: -1;
  635. }
  636. }
  637. }
  638. .top-seat {
  639. width: 100%;
  640. height: 192upx;
  641. }
  642. .search-cont {
  643. padding: 16upx 30upx;
  644. background-color: #FFFFFF;
  645. .inner {
  646. box-sizing: border-box;
  647. width: 100%;
  648. height: 72upx;
  649. background: #F7F7F7;
  650. border-radius: 36upx;
  651. display: flex;
  652. align-items: center;
  653. padding: 0 30upx;
  654. .icon-search {
  655. width: 28upx;
  656. height: 28upx;
  657. margin-right: 20upx;
  658. }
  659. input {
  660. height: 60upx;
  661. line-height: 60upx;
  662. flex: 1;
  663. }
  664. }
  665. }
  666. .order-list {
  667. padding: 20upx;
  668. .item {
  669. background: #FFFFFF;
  670. border-radius: 16upx;
  671. padding: 0 30upx;
  672. margin-bottom: 20upx;
  673. .ordersn-box {
  674. display: flex;
  675. align-items: center;
  676. justify-content: space-between;
  677. padding: 34upx 0 20upx;
  678. .num {
  679. font-size: 26upx;
  680. font-family: PingFang SC;
  681. font-weight: 500;
  682. color: #999999;
  683. line-height: 1;
  684. }
  685. .status-box {
  686. display: flex;
  687. align-items: center;
  688. .recom-box {
  689. width: 108upx;
  690. height: 30upx;
  691. line-height: 30upx;
  692. text-align: left;
  693. padding-left: 8upx;
  694. font-size: 22upx;
  695. font-family: PingFang SC;
  696. font-weight: 500;
  697. color: #FFFFFF;
  698. background-image: url(https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/recom.png);
  699. background-repeat: no-repeat;
  700. background-size: 100% 100%;
  701. margin-right: 8upx;
  702. }
  703. .text {
  704. font-size: 28upx;
  705. font-family: PingFang SC;
  706. font-weight: 500;
  707. line-height: 1;
  708. &.success {
  709. color: #2BC7B9;
  710. }
  711. &.black {
  712. color: #111111;
  713. }
  714. &.info {
  715. color: #999999;
  716. }
  717. }
  718. }
  719. }
  720. .drug-list {
  721. .drug-item {
  722. padding: 30upx 0;
  723. border-bottom: 1px soli #F0F0F0;
  724. display: flex;
  725. align-items: center;
  726. .img-box {
  727. width: 160upx;
  728. height: 160upx;
  729. margin-right: 30upx;
  730. flex-shrink: 0;
  731. image {
  732. width: 100%;
  733. height: 100%;
  734. }
  735. }
  736. .drug-info {
  737. width: calc(100% - 190upx);
  738. height: 160upx;
  739. display: flex;
  740. flex-direction: column;
  741. justify-content: space-between;
  742. .name-box {
  743. font-size: 28upx;
  744. font-family: PingFang SC;
  745. font-weight: 500;
  746. color: #111111;
  747. line-height: 40upx;
  748. .tag {
  749. display: inline-block;
  750. padding: 0 6upx;
  751. height: 30upx;
  752. background: linear-gradient(90deg, #66b2ef 0%, #2BC7B9 100%);
  753. border-radius: 4upx;
  754. margin-right: 10upx;
  755. font-size: 22upx;
  756. font-family: PingFang SC;
  757. font-weight: bold;
  758. color: #FFFFFF;
  759. line-height: 30upx;
  760. float: left;
  761. margin-top: 7upx;
  762. }
  763. }
  764. .spec {
  765. font-size: 24upx;
  766. font-family: PingFang SC;
  767. font-weight: 500;
  768. color: #999999;
  769. line-height: 1;
  770. margin-top: 10upx;
  771. }
  772. .num-box {
  773. display: flex;
  774. align-items: center;
  775. justify-content: space-between;
  776. .price {
  777. display: flex;
  778. align-items: flex-end;
  779. .unit {
  780. font-size: 24upx;
  781. font-family: PingFang SC;
  782. font-weight: 500;
  783. color: #111111;
  784. line-height: 1.2;
  785. margin-right: 4upx;
  786. }
  787. .num {
  788. font-size: 32upx;
  789. font-family: PingFang SC;
  790. font-weight: 500;
  791. color: #111111;
  792. line-height: 1;
  793. }
  794. }
  795. .amount {
  796. font-size: 24upx;
  797. font-family: PingFang SC;
  798. font-weight: 500;
  799. color: #999999;
  800. line-height: 1;
  801. }
  802. }
  803. }
  804. }
  805. .bottom-box {
  806. height: 110upx;
  807. display: flex;
  808. align-items: center;
  809. justify-content: space-between;
  810. .amount-paid {
  811. display: flex;
  812. align-items: center;
  813. .label {
  814. font-size: 24upx;
  815. font-family: PingFang SC;
  816. font-weight: 500;
  817. color: #999999;
  818. line-height: 1;
  819. }
  820. .price-box {
  821. display: flex;
  822. align-items: flex-end;
  823. .unit {
  824. font-size: 24upx;
  825. font-family: PingFang SC;
  826. font-weight: 500;
  827. color: #FF6633;
  828. line-height: 1.2;
  829. margin-right: 4upx;
  830. }
  831. .num {
  832. font-size: 32upx;
  833. font-family: PingFang SC;
  834. font-weight: bold;
  835. color: #FF6633;
  836. line-height: 1;
  837. }
  838. }
  839. }
  840. .btn-box {
  841. box-sizing: border-box;
  842. display: flex;
  843. align-items: center;
  844. .btn {
  845. width: 155upx;
  846. height: 64upx;
  847. line-height: 64upx;
  848. font-size: 26upx;
  849. font-family: PingFang SC;
  850. font-weight: 500;
  851. text-align: center;
  852. border-radius: 32upx;
  853. margin-left: 15upx;
  854. &:first-child {
  855. margin-left: 0;
  856. }
  857. &.cancel {
  858. border: 1px solid #DDDDDD;
  859. color: #666666;
  860. }
  861. &.pay {
  862. background: #2BC7B9;
  863. color: #FFFFFF;
  864. }
  865. }
  866. }
  867. }
  868. }
  869. }
  870. }
  871. </style>