complaint.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  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 v-if="formdata.complaintType == 1" :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: undefined, //0默认1店铺2商品
  226. content: '',
  227. images: '',
  228. complaintType: '',
  229. },
  230. rules: {
  231. complaintType: [{
  232. required: true,
  233. message: '请选择投诉方式'
  234. }],
  235. type: [{
  236. required: true,
  237. message: '请选择投诉类型'
  238. }],
  239. title: [{
  240. required: true,
  241. message: '请输入标题'
  242. }],
  243. content: [{
  244. required: true,
  245. message: '请输入内容'
  246. }],
  247. // images: [{
  248. // required: true,
  249. // message: '请上传凭证'
  250. // }]
  251. },
  252. item: {},
  253. showOrder: false,
  254. orderList: [],
  255. orderParamQuery: {
  256. total: 0,
  257. pageNum: 1,
  258. isLastPage: false
  259. },
  260. orderInfo: {}
  261. }
  262. },
  263. methods: {
  264. openStore() {
  265. this.storeId = ''
  266. this.storeName = ''
  267. this.show = true
  268. this.pageNum = 1
  269. this.getList()
  270. },
  271. close() {
  272. this.show = false
  273. },
  274. lower(event) {
  275. if(this.total>this.storeList.length){
  276. this.pageNum++;
  277. this.getList();
  278. }
  279. },
  280. handleClick(item,type) {
  281. if(type=='order') {
  282. this.showOrder = false
  283. item.items = item.items.map(it=>({
  284. ...it,
  285. checked: true
  286. }))
  287. this.item = item
  288. this.orderId = item.id
  289. console.log("this.item==",this.item)
  290. } else if(type=='store') {
  291. this.storeId = item.store.storeId
  292. this.storeName = item.store.storeName
  293. this.show = false
  294. }
  295. },
  296. checkShopChange(item) {
  297. item.checked = !item.checked;
  298. },
  299. getList(){
  300. if(this.isLastPage){
  301. return;
  302. }
  303. const param = {
  304. pageNum: this.pageNum,
  305. pageSize: 10
  306. };
  307. recommendList(param).then(res => {
  308. if(res.code==200){
  309. //设置列表数据
  310. if (this.pageNum == 1) {
  311. this.storeList = res.rows;
  312. } else {
  313. this.storeList = this.storeList.concat(res.rows);
  314. }
  315. this.total=res.total
  316. this.isLastPage=this.storeList.length>=res.total
  317. }else{
  318. uni.showToast({
  319. icon:'none',
  320. title: "请求失败",
  321. });
  322. }
  323. });
  324. },
  325. navTo() {
  326. this.$isLogin().then(
  327. res => {
  328. if (res) {
  329. uni.navigateTo({
  330. url: '/pages_user/complaintList'
  331. })
  332. } else {
  333. uni.navigateTo({
  334. url: '/pages/auth/login'
  335. })
  336. }
  337. }
  338. );
  339. },
  340. submit() {
  341. if (this.fileList1.length > 0) {
  342. this.formdata.images = this.fileList1.map(item=>item.url).join(',')
  343. }
  344. if(this.formdata.complaintType == 2&&!this.formdata.images) {
  345. uni.showToast({
  346. title: '请上传凭证',
  347. icon: 'none'
  348. })
  349. return
  350. }
  351. if(this.formdata.complaintType == 2&&this.formdata.type == 1&&!this.storeId) {
  352. uni.showToast({
  353. title: '请选择店铺',
  354. icon: 'none'
  355. })
  356. return
  357. }
  358. let productIds = ''
  359. if(this.formdata.complaintType == 2&&this.formdata.type == 2) {
  360. if(this.item==null || JSON.stringify(this.item)=='{}') {
  361. uni.showToast({
  362. title: '请选择订单',
  363. icon: 'none'
  364. })
  365. return
  366. }
  367. productIds = this.item.items.filter(it => it.checked == true).map(ele=>ele.productId).join(',')
  368. if(!productIds) {
  369. uni.showToast({
  370. title: '请选择商品',
  371. icon: 'none'
  372. })
  373. return
  374. }
  375. }
  376. this.$refs.uForm.validate().then(res => {
  377. if (res) {
  378. this.$isLogin().then(res => {
  379. if (res) {
  380. this.formdata = {
  381. ...this.formdata,
  382. storeId: this.storeId || undefined,
  383. orderId: this.orderId || undefined,
  384. productIds: productIds || undefined
  385. }
  386. storeComplaint(this.formdata).then(res => {
  387. if (res.code == 200) {
  388. uni.showModal({
  389. title: '',
  390. content: '我们已收到您的反馈,谢谢',
  391. showCancel: false,
  392. success: function(res) {
  393. if (res.confirm) {
  394. uni.navigateBack()
  395. } else if (res.cancel) {
  396. uni.navigateBack()
  397. }
  398. }
  399. });
  400. } else {
  401. uni.showToast({
  402. title: res.msg,
  403. icon: 'none'
  404. })
  405. }
  406. })
  407. } else {
  408. uni.navigateTo({
  409. url: '/pages/auth/login'
  410. })
  411. }
  412. });
  413. }
  414. })
  415. },
  416. deletePic(event) {
  417. this[`fileList${event.name}`].splice(event.index, 1)
  418. },
  419. async afterRead(event) {
  420. // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
  421. let lists = [].concat(event.file)
  422. let fileListLen = this[`fileList${event.name}`].length
  423. lists.map((item) => {
  424. this[`fileList${event.name}`].push({
  425. ...item,
  426. status: 'uploading',
  427. message: '上传中'
  428. })
  429. })
  430. for (let i = 0; i < lists.length; i++) {
  431. const result = await this.uploadFilePromise(lists[i].url)
  432. let item = this[`fileList${event.name}`][fileListLen]
  433. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  434. status: 'success',
  435. message: '',
  436. url: result
  437. }))
  438. fileListLen++
  439. }
  440. },
  441. uploadFilePromise(url) {
  442. return new Promise((resolve, reject) => {
  443. let a = uni.uploadFile({
  444. url: uni.getStorageSync('requestPath') + '/app/common/uploadOSS',
  445. filePath: url,
  446. name: 'file',
  447. formData: {
  448. user: 'test'
  449. },
  450. success: (res) => {
  451. setTimeout(() => {
  452. console.log(JSON.parse(res.data).url)
  453. resolve(JSON.parse(res.data).url)
  454. }, 1000)
  455. }
  456. });
  457. })
  458. },
  459. openOrder() {
  460. this.showOrder = true
  461. this.orderParamQuery.pageNum = 1
  462. this.getOrderList()
  463. },
  464. closeOrder() {
  465. this.showOrder = false
  466. },
  467. lowerOrder(event) {
  468. if(this.orderParamQuery.total>this.orderList.length){
  469. this.orderParamQuery.pageNum++;
  470. this.getOrderList();
  471. }
  472. },
  473. getOrderList(){
  474. if(this.orderParamQuery.isLastPage){
  475. return;
  476. }
  477. const param = {
  478. pageSize: 10,
  479. statusList:'3,4',
  480. page: this.orderParamQuery.pageNum,
  481. };
  482. getMyStoreOrderList(param).then(res => {
  483. if(res.code==200){
  484. //设置列表数据
  485. if (this.orderParamQuery.pageNum == 1) {
  486. this.orderList = res.data.list;
  487. } else {
  488. this.orderList = this.orderList.concat(res.data.list);
  489. }
  490. this.orderParamQuery.total=res.data.total
  491. this.orderParamQuery.isLastPage=res.data.isLastPage
  492. }else{
  493. uni.showToast({
  494. icon:'none',
  495. title: "请求失败",
  496. });
  497. }
  498. });
  499. },
  500. }
  501. }
  502. </script>
  503. <style scoped lang="scss">
  504. .container {
  505. padding: 24rpx;
  506. }
  507. .scroll-list {
  508. height: 60vh;
  509. padding: 24rpx;
  510. box-sizing: border-box;
  511. }
  512. ::v-deep .u-form-item__body {
  513. padding: 0 !important;
  514. }
  515. .chooseorder {
  516. padding: 0 !important;
  517. .item {
  518. padding: 0 !important;
  519. margin-bottom: 0 !important;
  520. }
  521. .ordersn-box {
  522. padding: 20rpx 0 !important;
  523. }
  524. }
  525. .storePop{
  526. background-color: #f5f5f5;
  527. &-title {
  528. padding: 24rpx;
  529. text-align: center;
  530. border-bottom: 1rpx solid #eee;
  531. background-color: #fff;
  532. }
  533. .storebox {
  534. background-color: #fff;
  535. padding: 20rpx;
  536. font-family: PingFang SC;
  537. color: #333333;
  538. border-radius: 16rpx 16rpx 16rpx 16rpx;
  539. overflow: hidden;
  540. display: flex;
  541. align-items: flex-start;
  542. margin-bottom: 24rpx;
  543. .logo {
  544. flex-shrink: 0;
  545. width: 104rpx;
  546. height: 104rpx;
  547. background: #fff;
  548. border-radius: 16rpx 16rpx 16rpx 16rpx;
  549. border: 1rpx solid #eee;
  550. margin-right: 16rpx;
  551. box-sizing: border-box;
  552. }
  553. .storename {
  554. font-weight: 500;
  555. font-size: 32rpx;
  556. }
  557. .storedesc {
  558. margin-top: 12rpx;
  559. font-weight: 400;
  560. font-size: 22rpx;
  561. }
  562. .storebox-r {
  563. flex: 1;
  564. overflow: hidden;
  565. }
  566. }
  567. }
  568. .storebox-btn {
  569. flex-shrink: 0;
  570. padding: 10rpx 24rpx;
  571. font-size: 28rpx;
  572. border-radius: 28rpx 28rpx 28rpx 28rpx;
  573. border: 2rpx solid #FF5C03;
  574. font-weight: 500;
  575. font-size: 24rpx;
  576. color: #FF5C03;
  577. }
  578. .btn-box {
  579. width: 100%;
  580. height: 120upx;
  581. padding: 0 30upx;
  582. display: flex;
  583. align-items: center;
  584. justify-content: center;
  585. .sub-btn {
  586. width: 100%;
  587. height: 88upx;
  588. line-height: 88upx;
  589. text-align: center;
  590. font-size: 30upx;
  591. font-family: PingFang SC;
  592. font-weight: bold;
  593. color: #FFFFFF;
  594. background: #2583EB;
  595. border-radius: 44upx;
  596. }
  597. }
  598. .tagbox {
  599. display: flex;
  600. align-items: center;
  601. flex-wrap: wrap;
  602. .tagitem {
  603. min-width: 100rpx;
  604. box-sizing: border-box;
  605. font-family: PingFang SC, PingFang SC;
  606. font-weight: 400;
  607. font-size: 30rpx;
  608. padding: 8rpx 12rpx;
  609. background: #FFF;
  610. border: 1rpx solid #2583EB;
  611. color: #2583EB;
  612. border-radius: 4rpx 4rpx 4rpx 4rpx;
  613. margin-right: 24rpx;
  614. text-align: center;
  615. }
  616. .active {
  617. color: #FFFFFF;
  618. border: 1rpx solid #2583EB;
  619. background: #2583EB;
  620. }
  621. }
  622. .form-item {
  623. background-color: #fff;
  624. border-radius: 16rpx;
  625. padding: 0 24rpx 24rpx 24rpx;
  626. margin-bottom: 16rpx;
  627. &-title {
  628. font-family: PingFang SC, PingFang SC;
  629. font-weight: 600;
  630. font-size: 32rpx;
  631. color: #222222;
  632. padding: 24rpx 0;
  633. }
  634. }
  635. .top_item {
  636. font-family: PingFang SC, PingFang SC;
  637. font-weight: 400;
  638. font-size: 30rpx;
  639. color: #222222;
  640. display: flex;
  641. align-items: center;
  642. justify-content: space-between;
  643. padding: 24rpx !important;
  644. }
  645. .orderbox{
  646. padding: 20upx;
  647. }
  648. .item{
  649. background: #FFFFFF;
  650. border-radius: 16upx;
  651. padding: 0 30upx;
  652. margin-bottom: 20upx;
  653. .ordersn-box{
  654. display: flex;
  655. align-items: center;
  656. justify-content: space-between;
  657. padding: 34upx 0 20upx;
  658. .num{
  659. font-size: 26upx;
  660. font-family: PingFang SC;
  661. font-weight: 500;
  662. color: #999999;
  663. line-height: 1;
  664. }
  665. .status-box{
  666. display: flex;
  667. align-items: center;
  668. .recom-box{
  669. width: 108upx;
  670. height: 30upx;
  671. line-height: 30upx;
  672. text-align: left;
  673. padding-left: 8upx;
  674. font-size: 22upx;
  675. font-family: PingFang SC;
  676. font-weight: 500;
  677. color: #FFFFFF;
  678. background-image: url('https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/shopping/recom.png');
  679. background-repeat: no-repeat;
  680. background-size: 100% 100%;
  681. margin-right: 8upx;
  682. }
  683. .text{
  684. font-size: 28upx;
  685. font-family: PingFang SC;
  686. font-weight: 500;
  687. line-height: 1;
  688. &.success{
  689. color: #2BC7B9;
  690. }
  691. &.black{
  692. color: #111111;
  693. }
  694. &.info{
  695. color: #999999;
  696. }
  697. }
  698. }
  699. }
  700. .drug-list{
  701. .drug-item{
  702. padding: 30upx 0;
  703. border-bottom: 1px soli #F0F0F0;
  704. display: flex;
  705. align-items: center;
  706. .img-box{
  707. width: 160upx;
  708. height: 160upx;
  709. margin-right: 30upx;
  710. flex-shrink: 0;
  711. image{
  712. width: 100%;
  713. height: 100%;
  714. }
  715. }
  716. .drug-info{
  717. width: calc(100% - 190upx);
  718. height: 160upx;
  719. display: flex;
  720. flex-direction: column;
  721. justify-content: space-between;
  722. .name-box{
  723. font-size: 28upx;
  724. font-family: PingFang SC;
  725. font-weight: 500;
  726. color: #111111;
  727. line-height: 40upx;
  728. .tag{
  729. display: inline-block;
  730. padding: 0 6upx;
  731. height: 30upx;
  732. background: linear-gradient(90deg, #2BC7B9 0%, #2BC7A4 100%);
  733. border-radius: 4upx;
  734. margin-right: 10upx;
  735. font-size: 22upx;
  736. font-family: PingFang SC;
  737. font-weight: bold;
  738. color: #FFFFFF;
  739. line-height: 30upx;
  740. float: left;
  741. margin-top: 7upx;
  742. }
  743. }
  744. .spec{
  745. font-size: 24upx;
  746. font-family: PingFang SC;
  747. font-weight: 500;
  748. color: #999999;
  749. line-height: 1;
  750. margin-top: 10upx;
  751. }
  752. .num-box{
  753. display: flex;
  754. align-items: center;
  755. justify-content: space-between;
  756. .price{
  757. display: flex;
  758. align-items: flex-end;
  759. .unit{
  760. font-size: 24upx;
  761. font-family: PingFang SC;
  762. font-weight: 500;
  763. color: #111111;
  764. line-height: 1.2;
  765. margin-right: 4upx;
  766. }
  767. .num{
  768. font-size: 32upx;
  769. font-family: PingFang SC;
  770. font-weight: 500;
  771. color: #111111;
  772. line-height: 1;
  773. }
  774. }
  775. .amount{
  776. font-size: 24upx;
  777. font-family: PingFang SC;
  778. font-weight: 500;
  779. color: #999999;
  780. line-height: 1;
  781. }
  782. }
  783. }
  784. }
  785. }
  786. }
  787. </style>