complaint.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
  1. <template>
  2. <view class="container">
  3. <view class="form-item top_item" @click="navTo">
  4. <text>我的咨询投诉</text>
  5. <u-icon name="arrow-right" color="#333" size="20"></u-icon>
  6. </view>
  7. <u-form labelPosition="top" labelWidth='0' :model="formdata" :rules="rules" ref="uForm" errorType="toast">
  8. <u-form-item label=" " prop="complaintType">
  9. <view class="form-item">
  10. <view class="form-item-title">投诉方式</view>
  11. <view class="tagbox">
  12. <view :class="formdata.complaintType == 1?'tagitem active':'tagitem'"
  13. @click="formdata.complaintType = 1">咨询</view>
  14. <view :class="formdata.complaintType == 2?'tagitem active':'tagitem'"
  15. @click="formdata.complaintType = 2">投诉/举报</view>
  16. </view>
  17. </view>
  18. </u-form-item>
  19. <u-form-item label=" " prop="type">
  20. <view class="form-item">
  21. <view class="form-item-title">投诉类型</view>
  22. <view class="tagbox">
  23. <view :class="formdata.type == 1?'tagitem active':'tagitem'" @click="formdata.type = 1">店铺
  24. </view>
  25. <view :class="formdata.type == 2?'tagitem active':'tagitem'" @click="formdata.type = 2">商品
  26. </view>
  27. <view :class="formdata.type == 0?'tagitem active':'tagitem'" @click="formdata.type = 0">其他
  28. </view>
  29. </view>
  30. </view>
  31. </u-form-item>
  32. <u-form-item label=" " v-if="formdata.type == 1">
  33. <view class="form-item" @click="openStore">
  34. <view class="form-item-title x-bc">
  35. <text>选择店铺</text>
  36. <u-icon name="arrow-right" color="#333" size="18"></u-icon>
  37. </view>
  38. <view class="storename x-bc">
  39. <text>{{storeId? storeName : "选择店铺"}}</text>
  40. </view>
  41. </view>
  42. </u-form-item>
  43. <u-form-item label=" " v-if="formdata.complaintType == 2&&formdata.type == 2">
  44. <view class="form-item">
  45. <view class="form-item-title x-bc" @click="openOrder">
  46. <text> 选择订单商品</text>
  47. <u-icon name="arrow-right" color="#333" size="18"></u-icon>
  48. </view>
  49. <view class="orderbox chooseorder" v-show="item&&JSON.stringify(item)!='{}'">
  50. <view class="item" >
  51. <!-- 订单号,状态 -->
  52. <view class="ordersn-box">
  53. <view class="num">订单号:{{item.orderCode}}</view>
  54. <!-- <view class="status-box">
  55. <text class="text success">
  56. {{$getDictLabelName("storeOrderStatus",item.status)}}
  57. </text>
  58. </view> -->
  59. </view>
  60. <!-- 药品列表 -->
  61. <view class="drug-list" >
  62. <view v-if="item.isPackage!=1" v-for="(subItem,subIndex) in item.items" :key="subIndex" class="drug-item" >
  63. <view class="x-f">
  64. <checkbox :value="subItem.checked" :checked="subItem.checked" @click="checkShopChange(subItem)" />
  65. <view class="img-box">
  66. <image :src="JSON.parse(subItem.jsonInfo).image" mode="aspectFill"></image>
  67. </view>
  68. </view>
  69. <view class="drug-info" >
  70. <view>
  71. <view class="name-box ellipsis2">
  72. <view v-if="subItem.isPrescribe==1" class="tag">处方药</view>{{JSON.parse(subItem.jsonInfo).productName}}
  73. </view>
  74. <view class="spec ellipsis2">{{JSON.parse(subItem.jsonInfo).sku}}</view>
  75. </view>
  76. <view class="num-box">
  77. <view class="price">
  78. <text class="unit">¥</text>
  79. <text class="num">{{JSON.parse(subItem.jsonInfo).price.toFixed(2)}}</text>
  80. </view>
  81. <view class="amount">x{{JSON.parse(subItem.jsonInfo).num}}</view>
  82. </view>
  83. </view>
  84. </view>
  85. <view v-if="item.isPackage==1&&item.packageJson!=null" class="drug-item" >
  86. <view class="img-box">
  87. <image :src="JSON.parse(item.packageJson).imgUrl" mode="aspectFill"></image>
  88. </view>
  89. <view class="drug-info" >
  90. <view>
  91. <view class="name-box ellipsis2">
  92. <view class="tag">套餐</view>{{JSON.parse(item.packageJson).title}}
  93. </view>
  94. <view class="spec ellipsis2">{{JSON.parse(item.packageJson).descs}}</view>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. </u-form-item>
  103. <u-form-item label=" " prop="title">
  104. <view class="form-item">
  105. <view class="form-item-title">标题</view>
  106. <u--input v-model="formdata.title" placeholder="请输入标题" maxlength='100'></u--input>
  107. </view>
  108. </u-form-item>
  109. <u-form-item label=" " prop="content">
  110. <view class="form-item">
  111. <view class="form-item-title">内容</view>
  112. <u--textarea v-model="formdata.content" placeholder="请详细描述您遇到的问题,我们会认真处理您的问题" count
  113. maxlength='200'></u--textarea>
  114. </view>
  115. </u-form-item>
  116. <u-form-item label=" " prop="images">
  117. <view class="form-item">
  118. <view class="form-item-title">上传凭证</view>
  119. <u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1"
  120. :maxCount="4"></u-upload>
  121. </view>
  122. </u-form-item>
  123. </u-form>
  124. <view class="btn-box">
  125. <view class="sub-btn" @click="submit()">提交</view>
  126. </view>
  127. <u-popup :show="show" :closeable="true" @close="close">
  128. <view class="storePop">
  129. <view class="storePop-title">选择店铺</view>
  130. <scroll-view class="scroll-list" scroll-y="true" @scrolltolower="lower" >
  131. <view v-if="storeList.length == 0" class="no-data-box" >
  132. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/empty_icon.png" mode="aspectFit"></image>
  133. <view class="empty-title">暂无店铺</view>
  134. </view>
  135. <view class="storebox" v-for="(item,index) in storeList" :key="index">
  136. <image class="logo" :src="item.store.logoUrl" mode="aspectFill"></image>
  137. <view class="storebox-r">
  138. <view class="x-bc" style="flex: 1;min-height: 104rpx;">
  139. <view class="storename ellipsis">{{item.store.storeName || ''}}</view>
  140. <view class="storebox-btn" @click="handleClick(item,'store')">选择</u-icon></view>
  141. </view>
  142. </view>
  143. </view>
  144. </scroll-view>
  145. </view>
  146. </u-popup>
  147. <u-popup :show="showOrder" :closeable="true" @close="closeOrder">
  148. <view class="storePop">
  149. <view class="storePop-title">选择订单</view>
  150. <scroll-view class="scroll-list" style="height: 80vh" scroll-y="true" @scrolltolower="lowerOrder" >
  151. <view v-if="orderList.length == 0" class="no-data-box" >
  152. <image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/empty_icon.png" mode="aspectFit"></image>
  153. <view class="empty-title">暂无订单</view>
  154. </view>
  155. <view class="item" v-for="(item,index) in orderList" :key="index">
  156. <!-- 订单号,状态 -->
  157. <view class="ordersn-box">
  158. <view class="num">订单号:{{item.orderCode}}</view>
  159. <view class="storebox-btn" @click="handleClick(item,'order')">选择</u-icon></view>
  160. <!-- <view class="status-box">
  161. <text class="text success">
  162. {{$getDictLabelName("storeOrderStatus",item.status)}}
  163. </text>
  164. </view> -->
  165. </view>
  166. <!-- 药品列表 -->
  167. <view class="drug-list" >
  168. <view v-if="item.isPackage!=1" v-for="(subItem,subIndex) in item.items" :key="subIndex" class="drug-item" >
  169. <view class="img-box">
  170. <image :src="JSON.parse(subItem.jsonInfo).image" mode="aspectFill"></image>
  171. </view>
  172. <view class="drug-info" >
  173. <view>
  174. <view class="name-box ellipsis2">
  175. <view v-if="subItem.isPrescribe==1" class="tag">处方药</view>{{JSON.parse(subItem.jsonInfo).productName}}
  176. </view>
  177. <view class="spec ellipsis2">{{JSON.parse(subItem.jsonInfo).sku}}</view>
  178. </view>
  179. <view class="num-box">
  180. <view class="price">
  181. <text class="unit">¥</text>
  182. <text class="num">{{JSON.parse(subItem.jsonInfo).price.toFixed(2)}}</text>
  183. </view>
  184. <view class="amount">x{{JSON.parse(subItem.jsonInfo).num}}</view>
  185. </view>
  186. </view>
  187. </view>
  188. <view v-if="item.isPackage==1&&item.packageJson!=null" class="drug-item" >
  189. <view class="img-box">
  190. <image :src="JSON.parse(item.packageJson).imgUrl" mode="aspectFill"></image>
  191. </view>
  192. <view class="drug-info" >
  193. <view>
  194. <view class="name-box ellipsis2">
  195. <view class="tag">套餐</view>{{JSON.parse(item.packageJson).title}}
  196. </view>
  197. <view class="spec ellipsis2">{{JSON.parse(item.packageJson).descs}}</view>
  198. </view>
  199. </view>
  200. </view>
  201. </view>
  202. </view>
  203. </scroll-view>
  204. </view>
  205. </u-popup>
  206. </view>
  207. </template>
  208. <script>
  209. import {getMyStoreOrderList} from '@/api/myStoreOrder.js'
  210. import {recommendList} from "@/api/index.js"
  211. import {storeComplaint} from "@/api/user.js"
  212. export default {
  213. data() {
  214. return {
  215. show: false,
  216. total: 0,
  217. pageNum: 1,
  218. storeId: '',
  219. storeName: "",
  220. isLastPage: false,
  221. storeList: [],
  222. fileList1: [],
  223. formdata: {
  224. title: '',
  225. type: 0, //0默认1店铺2商品
  226. content: '',
  227. images: '',
  228. complaintType: '',
  229. },
  230. rules: {
  231. complaintType: [{
  232. required: true,
  233. message: '请选择投诉方式'
  234. }],
  235. title: [{
  236. required: true,
  237. message: '请输入标题'
  238. }],
  239. content: [{
  240. required: true,
  241. message: '请输入内容'
  242. }],
  243. // images: [{
  244. // required: true,
  245. // message: '请上传凭证'
  246. // }]
  247. },
  248. item: {},
  249. showOrder: false,
  250. orderList: [],
  251. orderParamQuery: {
  252. total: 0,
  253. pageNum: 1,
  254. isLastPage: false
  255. },
  256. orderInfo: {}
  257. }
  258. },
  259. methods: {
  260. openStore() {
  261. this.storeId = ''
  262. this.storeName = ''
  263. this.show = true
  264. this.pageNum = 1
  265. this.getList()
  266. },
  267. close() {
  268. this.show = false
  269. },
  270. lower(event) {
  271. if(this.total>this.storeList.length){
  272. this.pageNum++;
  273. this.getList();
  274. }
  275. },
  276. handleClick(item,type) {
  277. if(type=='order') {
  278. this.showOrder = false
  279. item.items = item.items.map(it=>({
  280. ...it,
  281. checked: true
  282. }))
  283. this.item = item
  284. this.orderId = item.id
  285. console.log("this.item==",this.item)
  286. } else if(type=='store') {
  287. this.storeId = item.store.storeId
  288. this.storeName = item.store.storeName
  289. this.show = false
  290. }
  291. },
  292. checkShopChange(item) {
  293. item.checked = !item.checked;
  294. },
  295. getList(){
  296. if(this.isLastPage){
  297. return;
  298. }
  299. const param = {
  300. pageNum: this.pageNum,
  301. pageSize: 10
  302. };
  303. recommendList(param).then(res => {
  304. if(res.code==200){
  305. //设置列表数据
  306. if (this.pageNum == 1) {
  307. this.storeList = res.rows;
  308. } else {
  309. this.storeList = this.storeList.concat(res.rows);
  310. }
  311. this.total=res.total
  312. this.isLastPage=this.storeList.length>=res.total
  313. }else{
  314. uni.showToast({
  315. icon:'none',
  316. title: "请求失败",
  317. });
  318. }
  319. });
  320. },
  321. navTo() {
  322. this.$isLogin().then(
  323. res => {
  324. if (res) {
  325. uni.navigateTo({
  326. url: '/pages_user/complaintList'
  327. })
  328. } else {
  329. uni.navigateTo({
  330. url: '/pages/auth/login'
  331. })
  332. }
  333. }
  334. );
  335. },
  336. submit() {
  337. if (this.fileList1.length > 0) {
  338. this.formdata.images = this.fileList1.map(item=>item.url).join(',')
  339. }
  340. if(this.formdata.type == 1&&!this.storeId) {
  341. uni.showToast({
  342. title: '请选择店铺',
  343. icon: 'none'
  344. })
  345. return
  346. }
  347. let productIds = ''
  348. if(this.formdata.complaintType == 2&&this.formdata.type == 2) {
  349. if(this.item==null || JSON.stringify(this.item)=='{}') {
  350. uni.showToast({
  351. title: '请选择订单',
  352. icon: 'none'
  353. })
  354. return
  355. }
  356. productIds = this.item.items.filter(it => it.checked == true).map(ele=>ele.productId).join(',')
  357. if(!productIds) {
  358. uni.showToast({
  359. title: '请选择商品',
  360. icon: 'none'
  361. })
  362. return
  363. }
  364. }
  365. this.$refs.uForm.validate().then(res => {
  366. if (res) {
  367. this.$isLogin().then(res => {
  368. if (res) {
  369. if(this.formdata.type == 1) {
  370. this.formdata = {
  371. ...this.formdata,
  372. storeId: this.storeId,
  373. orderId: this.orderId,
  374. productIds: productIds
  375. }
  376. }
  377. storeComplaint(this.formdata).then(res => {
  378. if (res.code == 200) {
  379. uni.showModal({
  380. title: '',
  381. content: '我们已收到您的反馈,谢谢',
  382. showCancel: false,
  383. success: function(res) {
  384. if (res.confirm) {
  385. uni.navigateBack()
  386. } else if (res.cancel) {
  387. uni.navigateBack()
  388. }
  389. }
  390. });
  391. } else {
  392. uni.showToast({
  393. title: res.msg,
  394. icon: 'none'
  395. })
  396. }
  397. })
  398. } else {
  399. uni.navigateTo({
  400. url: '/pages/auth/login'
  401. })
  402. }
  403. });
  404. }
  405. })
  406. },
  407. deletePic(event) {
  408. this[`fileList${event.name}`].splice(event.index, 1)
  409. },
  410. async afterRead(event) {
  411. // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
  412. let lists = [].concat(event.file)
  413. let fileListLen = this[`fileList${event.name}`].length
  414. lists.map((item) => {
  415. this[`fileList${event.name}`].push({
  416. ...item,
  417. status: 'uploading',
  418. message: '上传中'
  419. })
  420. })
  421. for (let i = 0; i < lists.length; i++) {
  422. const result = await this.uploadFilePromise(lists[i].url)
  423. let item = this[`fileList${event.name}`][fileListLen]
  424. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  425. status: 'success',
  426. message: '',
  427. url: result
  428. }))
  429. fileListLen++
  430. }
  431. },
  432. uploadFilePromise(url) {
  433. return new Promise((resolve, reject) => {
  434. let a = uni.uploadFile({
  435. url: uni.getStorageSync('requestPath') + '/app/common/uploadOSS',
  436. filePath: url,
  437. name: 'file',
  438. formData: {
  439. user: 'test'
  440. },
  441. success: (res) => {
  442. setTimeout(() => {
  443. console.log(JSON.parse(res.data).url)
  444. resolve(JSON.parse(res.data).url)
  445. }, 1000)
  446. }
  447. });
  448. })
  449. },
  450. openOrder() {
  451. this.showOrder = true
  452. this.orderParamQuery.pageNum = 1
  453. this.getOrderList()
  454. },
  455. closeOrder() {
  456. this.showOrder = false
  457. },
  458. lowerOrder(event) {
  459. if(this.orderParamQuery.total>this.orderList.length){
  460. this.orderParamQuery.pageNum++;
  461. this.getOrderList();
  462. }
  463. },
  464. getOrderList(){
  465. if(this.orderParamQuery.isLastPage){
  466. return;
  467. }
  468. const param = {
  469. pageSize: 10,
  470. statusList:'3,4',
  471. page: this.orderParamQuery.pageNum,
  472. };
  473. getMyStoreOrderList(param).then(res => {
  474. if(res.code==200){
  475. //设置列表数据
  476. if (this.orderParamQuery.pageNum == 1) {
  477. this.orderList = res.data.list;
  478. } else {
  479. this.orderList = this.orderList.concat(res.data.list);
  480. }
  481. this.orderParamQuery.total=res.data.total
  482. this.orderParamQuery.isLastPage=res.data.isLastPage
  483. }else{
  484. uni.showToast({
  485. icon:'none',
  486. title: "请求失败",
  487. });
  488. }
  489. });
  490. },
  491. }
  492. }
  493. </script>
  494. <style scoped lang="scss">
  495. .container {
  496. padding: 24rpx;
  497. }
  498. .scroll-list {
  499. height: 60vh;
  500. padding: 24rpx;
  501. box-sizing: border-box;
  502. }
  503. ::v-deep .u-form-item__body {
  504. padding: 0 !important;
  505. }
  506. .chooseorder {
  507. padding: 0 !important;
  508. .item {
  509. padding: 0 !important;
  510. margin-bottom: 0 !important;
  511. }
  512. .ordersn-box {
  513. padding: 20rpx 0 !important;
  514. }
  515. }
  516. .storePop{
  517. background-color: #f5f5f5;
  518. &-title {
  519. padding: 24rpx;
  520. text-align: center;
  521. border-bottom: 1rpx solid #eee;
  522. background-color: #fff;
  523. }
  524. .storebox {
  525. background-color: #fff;
  526. padding: 20rpx;
  527. font-family: PingFang SC;
  528. color: #333333;
  529. border-radius: 16rpx 16rpx 16rpx 16rpx;
  530. overflow: hidden;
  531. display: flex;
  532. align-items: flex-start;
  533. margin-bottom: 24rpx;
  534. .logo {
  535. flex-shrink: 0;
  536. width: 104rpx;
  537. height: 104rpx;
  538. background: #fff;
  539. border-radius: 16rpx 16rpx 16rpx 16rpx;
  540. border: 1rpx solid #eee;
  541. margin-right: 16rpx;
  542. box-sizing: border-box;
  543. }
  544. .storename {
  545. font-weight: 500;
  546. font-size: 32rpx;
  547. }
  548. .storedesc {
  549. margin-top: 12rpx;
  550. font-weight: 400;
  551. font-size: 22rpx;
  552. }
  553. .storebox-r {
  554. flex: 1;
  555. overflow: hidden;
  556. }
  557. }
  558. }
  559. .storebox-btn {
  560. flex-shrink: 0;
  561. padding: 10rpx 24rpx;
  562. font-size: 28rpx;
  563. border-radius: 28rpx 28rpx 28rpx 28rpx;
  564. border: 2rpx solid #FF5C03;
  565. font-weight: 500;
  566. font-size: 24rpx;
  567. color: #FF5C03;
  568. }
  569. .btn-box {
  570. width: 100%;
  571. height: 120upx;
  572. padding: 0 30upx;
  573. display: flex;
  574. align-items: center;
  575. justify-content: center;
  576. .sub-btn {
  577. width: 100%;
  578. height: 88upx;
  579. line-height: 88upx;
  580. text-align: center;
  581. font-size: 30upx;
  582. font-family: PingFang SC;
  583. font-weight: bold;
  584. color: #FFFFFF;
  585. background: #2583EB;
  586. border-radius: 44upx;
  587. }
  588. }
  589. .tagbox {
  590. display: flex;
  591. align-items: center;
  592. flex-wrap: wrap;
  593. .tagitem {
  594. min-width: 100rpx;
  595. box-sizing: border-box;
  596. font-family: PingFang SC, PingFang SC;
  597. font-weight: 400;
  598. font-size: 30rpx;
  599. padding: 8rpx 12rpx;
  600. background: #FFF;
  601. border: 1rpx solid #2583EB;
  602. color: #2583EB;
  603. border-radius: 4rpx 4rpx 4rpx 4rpx;
  604. margin-right: 24rpx;
  605. text-align: center;
  606. }
  607. .active {
  608. color: #FFFFFF;
  609. border: 1rpx solid #2583EB;
  610. background: #2583EB;
  611. }
  612. }
  613. .form-item {
  614. background-color: #fff;
  615. border-radius: 16rpx;
  616. padding: 0 24rpx 24rpx 24rpx;
  617. margin-bottom: 16rpx;
  618. &-title {
  619. font-family: PingFang SC, PingFang SC;
  620. font-weight: 600;
  621. font-size: 32rpx;
  622. color: #222222;
  623. padding: 24rpx 0;
  624. }
  625. }
  626. .top_item {
  627. font-family: PingFang SC, PingFang SC;
  628. font-weight: 400;
  629. font-size: 30rpx;
  630. color: #222222;
  631. display: flex;
  632. align-items: center;
  633. justify-content: space-between;
  634. padding: 24rpx !important;
  635. }
  636. .orderbox{
  637. padding: 20upx;
  638. }
  639. .item{
  640. background: #FFFFFF;
  641. border-radius: 16upx;
  642. padding: 0 30upx;
  643. margin-bottom: 20upx;
  644. .ordersn-box{
  645. display: flex;
  646. align-items: center;
  647. justify-content: space-between;
  648. padding: 34upx 0 20upx;
  649. .num{
  650. font-size: 26upx;
  651. font-family: PingFang SC;
  652. font-weight: 500;
  653. color: #999999;
  654. line-height: 1;
  655. }
  656. .status-box{
  657. display: flex;
  658. align-items: center;
  659. .recom-box{
  660. width: 108upx;
  661. height: 30upx;
  662. line-height: 30upx;
  663. text-align: left;
  664. padding-left: 8upx;
  665. font-size: 22upx;
  666. font-family: PingFang SC;
  667. font-weight: 500;
  668. color: #FFFFFF;
  669. background-image: url('https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/recom.png');
  670. background-repeat: no-repeat;
  671. background-size: 100% 100%;
  672. margin-right: 8upx;
  673. }
  674. .text{
  675. font-size: 28upx;
  676. font-family: PingFang SC;
  677. font-weight: 500;
  678. line-height: 1;
  679. &.success{
  680. color: #2BC7B9;
  681. }
  682. &.black{
  683. color: #111111;
  684. }
  685. &.info{
  686. color: #999999;
  687. }
  688. }
  689. }
  690. }
  691. .drug-list{
  692. .drug-item{
  693. padding: 30upx 0;
  694. border-bottom: 1px soli #F0F0F0;
  695. display: flex;
  696. align-items: center;
  697. .img-box{
  698. width: 160upx;
  699. height: 160upx;
  700. margin-right: 30upx;
  701. flex-shrink: 0;
  702. image{
  703. width: 100%;
  704. height: 100%;
  705. }
  706. }
  707. .drug-info{
  708. width: calc(100% - 190upx);
  709. height: 160upx;
  710. display: flex;
  711. flex-direction: column;
  712. justify-content: space-between;
  713. .name-box{
  714. font-size: 28upx;
  715. font-family: PingFang SC;
  716. font-weight: 500;
  717. color: #111111;
  718. line-height: 40upx;
  719. .tag{
  720. display: inline-block;
  721. padding: 0 6upx;
  722. height: 30upx;
  723. background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
  724. border-radius: 4upx;
  725. margin-right: 10upx;
  726. font-size: 22upx;
  727. font-family: PingFang SC;
  728. font-weight: bold;
  729. color: #FFFFFF;
  730. line-height: 30upx;
  731. float: left;
  732. margin-top: 7upx;
  733. }
  734. }
  735. .spec{
  736. font-size: 24upx;
  737. font-family: PingFang SC;
  738. font-weight: 500;
  739. color: #999999;
  740. line-height: 1;
  741. margin-top: 10upx;
  742. }
  743. .num-box{
  744. display: flex;
  745. align-items: center;
  746. justify-content: space-between;
  747. .price{
  748. display: flex;
  749. align-items: flex-end;
  750. .unit{
  751. font-size: 24upx;
  752. font-family: PingFang SC;
  753. font-weight: 500;
  754. color: #111111;
  755. line-height: 1.2;
  756. margin-right: 4upx;
  757. }
  758. .num{
  759. font-size: 32upx;
  760. font-family: PingFang SC;
  761. font-weight: 500;
  762. color: #111111;
  763. line-height: 1;
  764. }
  765. }
  766. .amount{
  767. font-size: 24upx;
  768. font-family: PingFang SC;
  769. font-weight: 500;
  770. color: #999999;
  771. line-height: 1;
  772. }
  773. }
  774. }
  775. }
  776. }
  777. }
  778. </style>