storeOrder.vue 23 KB

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