payment.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889
  1. <template>
  2. <view>
  3. <!-- 弹窗 v-model双向绑定值 mode弹出位置 border-radius弹出层圆角-->
  4. <u-popup v-model="discountshow" mode="bottom" border-radius="14" safe-area-inset-bottom="true">
  5. <view class="header-Discount">
  6. 优惠卷
  7. </view>
  8. <view class="body-Discount">
  9. <view class="collar">
  10. <!-- <view class="title-Discount">
  11. 领券
  12. </view> -->
  13. <scroll-view scroll-y="true" style="height: 550rpx;">
  14. <view class="couponList">
  15. <view class="couponItem" v-for="(item,index) in list" :key="index">
  16. <view class="couponItem-subject">
  17. <view class="couponItem-subject-left">
  18. <view class="couponItem-subject-price">
  19. <text class="couponItem-subject-icon">¥</text>
  20. <text class="couponItem-subject-price-min">{{item.money/100}}</text>
  21. <view class="couponItem-subject-price-reduce">{{item.name}}</view>
  22. </view>
  23. </view>
  24. <view class="couponItem-subject-right">
  25. <view class="couponItem-subject-right-header">
  26. <span class="couponItem-subject-right-header-icon">{{item.type==1?'满减':'折扣'}}</span>
  27. {{item.title}}
  28. </view>
  29. <button :data-index="index" @click="collectCoupons(item,index)" class="couponItem-subject-right-btn">使用</button>
  30. <view class="closing-date">
  31. {{item.start_time}} - {{item.end_time}}
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </scroll-view>
  38. </view>
  39. </view>
  40. </u-popup>
  41. <u-popup v-model="popupShow" mode="center" border-radius="14" width="80%" height="40%" close-icon-pos="top-left"
  42. :closeable="true" close-icon-color="#333333" negative-top="250">
  43. <view style="height: 100%;width: 100%;">
  44. <!-- 标题占20% -->
  45. <view style="height: 20%;width: auto;">
  46. <text style="font-size: 30rpx;font-weight: bold;display: flex;justify-content: center;align-items: flex-end;height: 100%;">超级妈力</text>
  47. </view>
  48. <!-- 金额占30% -->
  49. <view style="height: 30%;width: auto;border-bottom: 1rpx solid #EFEFEF;margin-left: 20rpx;margin-right: 20rpx;">
  50. <text style="font-size: 78rpx;font-weight: 700;display: flex;justify-content: center;align-items: center;height: 100%;">¥{{norderAmount}}</text>
  51. </view>
  52. <!-- 支付方式占20% -->
  53. <view style="height: 20%;width: auto;padding-left: 40rpx;">
  54. <view style="font-size: 30rpx;display: flex;align-items: center;height: 100%;">
  55. <text>余额支付 (余额¥{{info.balance/100}}元)</text>
  56. <!-- <text v-else>微信支付</text> -->
  57. </view>
  58. </view>
  59. <!-- 按钮占25% -->
  60. <!-- <view style="height: 25%;width: auto;">
  61. <view style="display: flex;justify-content: center;align-items: center;height: 100%;">
  62. <u-button type="primary" style="width: 100%;" @click="payment">确认支付</u-button>
  63. </view>
  64. </view> -->
  65. <u-message-input :maxlength="maxnum" :disabled-keyboard="true" :value="password" mode="bottomLine" :breathe="true"
  66. :focus="true" :dot-fill="true"></u-message-input>
  67. </view>
  68. </u-popup>
  69. <uni-list :border="false">
  70. <image src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/caixian.png" style="width: 100%; height: 5rpx; background-color: #FFFFFF;"></image>
  71. <uni-list-item :border="false">
  72. <view slot="header" style="color:#666666 ; font-size: 28rpx;">
  73. <text v-if="infodata.product_type == '1' ">{{infodata.doctorname}} 电话咨询</text>
  74. <text v-if="infodata.product_type == '2' ">{{infodata.doctorname}} 图文咨询</text>
  75. <text v-if="infodata.product_type == '3' ">{{infodata.doctorname}} 门诊预约</text>
  76. <text v-if="infodata.product_type == '4' ">疫苗接种预约</text>
  77. <text v-if="infodata.product_type == '5' ">儿保预约</text>
  78. <text v-if="infodata.product_type == '6' ">服务包</text>
  79. </view>
  80. <view slot="footer" style="color:#FF4F61 ;font-weight: 500;">
  81. {{orderAmount}}
  82. </view>
  83. </uni-list-item>
  84. <!-- 线条 -->
  85. <u-line color="#EFEFEF" />
  86. <uni-list-item :border="false" :link="true" @click="discountshow = true">
  87. <view slot="header" style="color:#666666 ; font-size: 28rpx;">
  88. 优惠券
  89. </view>
  90. <view slot="footer" style="font-size: 30rpx;">
  91. {{coupon}}
  92. </view>
  93. </uni-list-item>
  94. </uni-list>
  95. <u-gap height="20" bg-color="#F6F6F6"></u-gap>
  96. <uni-list :border="false">
  97. <uni-list-item :border="false">
  98. <view slot="header" style="font-size: 28rpx; font-weight: 500;color: #666666;">支付方式</view>
  99. </uni-list-item>
  100. <!-- 加一个单选 -->
  101. <u-radio-group v-model="value" v-for="(item, index) in paymenMethod">
  102. <uni-list-item :border="false" @click="value=item.name" :clickable="true">
  103. <view slot="header">
  104. <text style="font-size: 28rpx;font-weight: 400;color: #333333;">{{item.name}}</text>
  105. </view>
  106. <view slot="footer">
  107. <u-radio @change="radioChange" :key="index" :name="item.name" :disabled="item.disabled">
  108. </u-radio>
  109. </view>
  110. </uni-list-item>
  111. <u-line color="#EFEFEF" />
  112. </u-radio-group>
  113. </uni-list>
  114. <!-- 按钮 -->
  115. <view class="cu-bar bg-white tabbar border shop" style="position: fixed; bottom: 0; z-index: 99;width: 100%;">
  116. <view class="" style="width:75%;">
  117. <text style="padding-left: 30rpx;font-size: 32rpx;">合计:</text>
  118. <text style="padding-left: 20rpx;font-size: 36;font-weight: 500;color: #FF4F61;">{{orderAmount}}</text>
  119. </view>
  120. <view class="submit text-white" @click="confirmpay" style="background-color: rgb(11,115,186); font-size: 32rpx;">确认支付</view>
  121. </view>
  122. <u-keyboard @change="valChange" @backspace="backspace" ref="uKeyboard" mode="number" v-model="popupShow" :tooltip="false"
  123. :mask="false"></u-keyboard>
  124. <u-no-network></u-no-network>
  125. </view>
  126. </template>
  127. <script>
  128. import store from '@/store'
  129. export default {
  130. onLoad(op) {
  131. this.infodata = JSON.parse(op.data)
  132. this.norderAmount = this.infodata.total_amount
  133. console.log(this.infodata)
  134. },
  135. onShow() {
  136. this.orderAmount = this.norderAmount + "元"
  137. this.getUserInfo()
  138. this.getcoupon()
  139. },
  140. data() {
  141. return {
  142. //医生名称
  143. doctorName: '',
  144. ndoctorName: '渣渣宝',
  145. //订单金额
  146. orderAmount: '',
  147. norderAmount: 19.9,
  148. //优惠券
  149. coupon: '不使用优惠券',
  150. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  151. value: '钱包余额支付',
  152. paymenMethod: [{
  153. name: '钱包余额支付',
  154. disabled: false
  155. }],
  156. //弹出层控制
  157. popupShow: false,
  158. //订单类型
  159. //支付数据类型
  160. infodata: {},
  161. info: {},
  162. show: false,
  163. maxnum: 6,
  164. password: "",
  165. discountshow: false,
  166. list: [],
  167. couponid: ""
  168. }
  169. },
  170. methods: {
  171. getcoupon: async function() {
  172. let res = await this.$request.post("/api/v1/coupon/userCouponList", {
  173. page: this.pageindex
  174. })
  175. console.log(res)
  176. if (res.status == 0) {
  177. if (this.pageindex > res.data.last_page) {
  178. uni.showToast({
  179. title: "没有更多了",
  180. icon: "none"
  181. })
  182. } else {
  183. this.list = this.list.concat(res.data.data)
  184. this.list.forEach(item => {
  185. item.start_time = this.$util.formatDate(item.start_time)
  186. item.end_time = this.$util.formatDate(item.end_time)
  187. })
  188. this.pageindex++
  189. }
  190. }
  191. },
  192. // 选中某个单选框时,由radio时触发
  193. discount() {
  194. },
  195. radioChange(e) {
  196. console.log(e);
  197. },
  198. // 选中任一radio时,由radio-group触发
  199. radioGroupChange(e) {
  200. // console.log(e);
  201. },
  202. //充值
  203. recharge(e) {
  204. },
  205. click(e) {
  206. console.log(e)
  207. },
  208. collectCoupons(item, index) {
  209. if (item.type == 1) {
  210. if (item.max_reduce_amount > this.infodata.total_amount * 100) {
  211. uni.showToast({
  212. title: "满减金额不够",
  213. icon: "none"
  214. })
  215. return false
  216. } else {
  217. this.coupon = item.name
  218. this.couponid = item.id
  219. let price = (this.norderAmount * 100) - item.money
  220. this.norderAmount = price
  221. this.$forceUpdate()
  222. }
  223. }
  224. },
  225. confirmpay() {
  226. if (this.info.balance < this.infodata.total_amount * 100) {
  227. uni.showModal({
  228. title: "错误提示",
  229. content: "余额不足,请先充值",
  230. confirmText: "去充值",
  231. success(res) {
  232. if (res.confirm) {
  233. uni.navigateTo({
  234. url: "../personal/recharge"
  235. })
  236. }
  237. }
  238. })
  239. } else {
  240. this.popupShow = true
  241. this.show = true
  242. }
  243. },
  244. getUserInfo: async function() {
  245. let res = await this.$request.post('/api/v1/user/userInfo')
  246. if (res.status == 0) {
  247. this.info = res.data
  248. console.log(this.info)
  249. }
  250. },
  251. payyuyue: async function() {
  252. let res = await this.$request.post("/api/v1/order/appointPlaceOrder", {
  253. product_type: this.infodata.product_type,
  254. docter_id: this.infodata.docter_id,
  255. patient_id: this.infodata.patient_id,
  256. total_amount: this.infodata.total_amount * 100,
  257. organization_id: this.infodata.organization_id,
  258. schedule_date: this.infodata.schedule_date,
  259. time_period_id: this.infodata.time_period_id,
  260. payment_type: this.infodata.payment_type,
  261. pay_password: this.password,
  262. user_coupon_id:this.couponid
  263. })
  264. if (res.status == 0) {
  265. this.popupShow = false
  266. this.show = false
  267. uni.showToast({
  268. title: "支付成功!",
  269. duration: 1500
  270. })
  271. setTimeout(() => {
  272. uni.redirectTo({
  273. url: "order?type=" + this.infodata.product_type
  274. })
  275. }, 1500)
  276. } else {
  277. if (res.message == '密码错误') {
  278. uni.showModal({
  279. title: "提示",
  280. content: res.message,
  281. confirmText: "重试",
  282. success: (res) => {
  283. if (res.confirm) {
  284. this.password = ""
  285. } else if (res.cancel) {
  286. this.popupShow = false
  287. this.show = false
  288. this.password = ""
  289. }
  290. },
  291. })
  292. } else if (res.message == '未设置支付密码') {
  293. uni.showModal({
  294. title: "提示",
  295. content: res.message,
  296. confirmText: "设置",
  297. success: (res) => {
  298. if (res.confirm) {
  299. this.password = ""
  300. uni.navigateTo({
  301. url: "../index/paypassword"
  302. })
  303. } else if (res.cancel) {
  304. this.popupShow = false
  305. this.show = false
  306. this.password = ""
  307. }
  308. },
  309. })
  310. }
  311. }
  312. },
  313. paypacks: async function() {
  314. let res = await this.$request.post("/api/v1/order/packPlaceOrder", {
  315. patient_id: this.infodata.patient_id,
  316. total_amount: this.infodata.total_amount * 100,
  317. service_pack_id: this.infodata.service_pack_id,
  318. is_security: this.infodata.is_security,
  319. guardian_name: this.infodata.guardian_name,
  320. relationship_type: this.infodata.relationship_type,
  321. payment_type: this.infodata.payment_type,
  322. pay_password: this.password,
  323. user_coupon_id:this.couponid
  324. })
  325. console.log(res)
  326. if (res.status == 0) {
  327. this.popupShow = false
  328. this.show = false
  329. uni.showToast({
  330. title: "支付成功!",
  331. duration: 1500
  332. })
  333. setTimeout(() => {
  334. uni.redirectTo({
  335. url: "order?type=" + this.infodata.product_type
  336. })
  337. }, 1500)
  338. } else {
  339. if (res.message == '密码错误') {
  340. uni.showModal({
  341. title: "提示",
  342. content: res.message,
  343. confirmText: "重试",
  344. success: (res) => {
  345. if (res.confirm) {
  346. this.password = ""
  347. } else if (res.cancel) {
  348. this.popupShow = false
  349. this.show = false
  350. this.password = ""
  351. }
  352. },
  353. })
  354. } else if (res.message == '未设置支付密码') {
  355. uni.showModal({
  356. title: "提示",
  357. content: res.message,
  358. confirmText: "设置",
  359. success: (res) => {
  360. if (res.confirm) {
  361. this.password = ""
  362. uni.navigateTo({
  363. url: "../index/paypassword"
  364. })
  365. } else if (res.cancel) {
  366. this.popupShow = false
  367. this.show = false
  368. this.password = ""
  369. }
  370. },
  371. })
  372. }
  373. }
  374. },
  375. payphone: async function() {
  376. let res = await this.$request.post("/api/v1/order/consultPlaceOrder", {
  377. product_type: this.infodata.product_type,
  378. docter_id: this.infodata.docter_id,
  379. patient_id: this.infodata.patient_id,
  380. total_amount: this.infodata.total_amount * 100,
  381. phone: this.infodata.phone,
  382. phone_minutes: this.infodata.phone_minutes,
  383. payment_type: 2,
  384. pay_password: this.password,
  385. user_coupon_id:this.couponid
  386. })
  387. if (res.status == 0) {
  388. this.popupShow = false
  389. this.show = false
  390. uni.showToast({
  391. title: "支付成功!",
  392. duration: 1500
  393. })
  394. setTimeout(() => {
  395. uni.redirectTo({
  396. url: "order?type=" + this.infodata.product_type
  397. })
  398. }, 1500)
  399. } else {
  400. if (res.message == '密码错误') {
  401. uni.showModal({
  402. title: "提示",
  403. content: res.message,
  404. confirmText: "重试",
  405. success: (res) => {
  406. if (res.confirm) {
  407. this.password = ""
  408. } else if (res.cancel) {
  409. this.popupShow = false
  410. this.show = false
  411. this.password = ""
  412. }
  413. },
  414. })
  415. } else if (res.message == '未设置支付密码') {
  416. uni.showModal({
  417. title: "提示",
  418. content: res.message,
  419. confirmText: "设置",
  420. success: (res) => {
  421. if (res.confirm) {
  422. this.password = ""
  423. uni.navigateTo({
  424. url: "../index/paypassword"
  425. })
  426. } else if (res.cancel) {
  427. this.popupShow = false
  428. this.show = false
  429. this.password = ""
  430. }
  431. },
  432. })
  433. }
  434. }
  435. },
  436. paychat: async function() {
  437. let res = await this.$request.post("/api/v1/order/consultPlaceOrder", {
  438. product_type: this.infodata.product_type,
  439. docter_id: this.infodata.docter_id,
  440. patient_id: this.infodata.patient_id,
  441. total_amount: this.infodata.total_amount * 100,
  442. symptoms: this.infodata.symptoms,
  443. medical_imgs: JSON.stringify(this.infodata.medical_imgs),
  444. payment_type: 2,
  445. pay_password: this.password,
  446. user_coupon_id:this.couponid
  447. })
  448. if (res.status == 0) {
  449. this.popupShow = false
  450. this.show = false
  451. uni.showToast({
  452. title: "支付成功!",
  453. duration: 1500
  454. })
  455. setTimeout(() => {
  456. uni.redirectTo({
  457. url: "order?type=" + this.infodata.product_type
  458. })
  459. }, 1500)
  460. } else {
  461. if (res.message == '密码错误') {
  462. uni.showModal({
  463. title: "提示",
  464. content: res.message,
  465. confirmText: "重试",
  466. success: (res) => {
  467. if (res.confirm) {
  468. this.password = ""
  469. } else if (res.cancel) {
  470. this.popupShow = false
  471. this.show = false
  472. this.password = ""
  473. }
  474. },
  475. })
  476. } else if (res.message == '未设置支付密码') {
  477. uni.showModal({
  478. title: "提示",
  479. content: res.message,
  480. confirmText: "设置",
  481. success: (res) => {
  482. if (res.confirm) {
  483. this.password = ""
  484. uni.navigateTo({
  485. url: "../index/paypassword"
  486. })
  487. } else if (res.cancel) {
  488. this.popupShow = false
  489. this.show = false
  490. this.password = ""
  491. }
  492. },
  493. })
  494. }
  495. }
  496. },
  497. payvaccines: async function() {
  498. let res = await this.$request.post("/api/v1/order/appointPlaceOrder", {
  499. product_type: this.infodata.product_type,
  500. patient_id: this.infodata.patient_id,
  501. total_amount: this.infodata.total_amount * 100,
  502. organization_id: this.infodata.organization_id,
  503. schedule_date: this.infodata.schedule_date,
  504. time_period_id: this.infodata.time_period_id,
  505. vaccine_id: this.infodata.vaccine_id,
  506. payment_type: this.infodata.payment_type,
  507. pay_password: this.password,
  508. user_coupon_id:this.couponid
  509. })
  510. if (res.status == 0) {
  511. this.popupShow = false
  512. this.show = false
  513. uni.showToast({
  514. title: "支付成功!",
  515. duration: 1500
  516. })
  517. setTimeout(() => {
  518. uni.redirectTo({
  519. url: "order?type=" + this.infodata.product_type
  520. })
  521. }, 1500)
  522. } else {
  523. if (res.message == '密码错误') {
  524. uni.showModal({
  525. title: "提示",
  526. content: res.message,
  527. confirmText: "重试",
  528. success: (res) => {
  529. if (res.confirm) {
  530. this.password = ""
  531. } else if (res.cancel) {
  532. this.popupShow = false
  533. this.show = false
  534. this.password = ""
  535. }
  536. },
  537. })
  538. } else if (res.message == '未设置支付密码') {
  539. uni.showModal({
  540. title: "提示",
  541. content: res.message,
  542. confirmText: "设置",
  543. success: (res) => {
  544. if (res.confirm) {
  545. this.password = ""
  546. uni.navigateTo({
  547. url: "../index/paypassword"
  548. })
  549. } else if (res.cancel) {
  550. this.popupShow = false
  551. this.show = false
  552. this.password = ""
  553. }
  554. },
  555. })
  556. }
  557. }
  558. },
  559. paychildcare: async function() {
  560. console.log(this.infodata.nurse_ids)
  561. let res = await this.$request.post("/api/v1/order/appointPlaceOrder", {
  562. product_type: this.infodata.product_type,
  563. patient_id: this.infodata.patient_id,
  564. total_amount: this.infodata.total_amount * 100,
  565. organization_id: this.infodata.organization_id,
  566. schedule_date: this.infodata.schedule_date,
  567. time_period_id: this.infodata.time_period_id,
  568. nurse_ids: JSON.stringify(this.infodata.nurse_ids),
  569. payment_type: this.infodata.payment_type,
  570. pay_password: this.password,
  571. user_coupon_id:this.couponid
  572. })
  573. console.log(res)
  574. if (res.status == 0) {
  575. this.popupShow = false
  576. this.show = false
  577. uni.showToast({
  578. title: "支付成功!",
  579. duration: 1500
  580. })
  581. setTimeout(() => {
  582. uni.redirectTo({
  583. url: "order?type=" + this.infodata.product_type
  584. })
  585. }, 1500)
  586. } else {
  587. if (res.message == '密码错误') {
  588. uni.showModal({
  589. title: "提示",
  590. content: res.message,
  591. confirmText: "重试",
  592. success: (res) => {
  593. if (res.confirm) {
  594. this.password = ""
  595. } else if (res.cancel) {
  596. this.popupShow = false
  597. this.show = false
  598. this.password = ""
  599. }
  600. },
  601. })
  602. } else if (res.message == '未设置支付密码') {
  603. uni.showModal({
  604. title: "提示",
  605. content: res.message,
  606. confirmText: "设置",
  607. success: (res) => {
  608. if (res.confirm) {
  609. this.password = ""
  610. uni.navigateTo({
  611. url: "../index/paypassword"
  612. })
  613. } else if (res.cancel) {
  614. this.popupShow = false
  615. this.show = false
  616. this.password = ""
  617. }
  618. },
  619. })
  620. }
  621. }
  622. },
  623. //点击确认支付
  624. payment(e) {
  625. if (this.infodata.product_type == 1) {
  626. this.payphone()
  627. } else if (this.infodata.product_type == 2) {
  628. this.paychat()
  629. } else if (this.infodata.product_type == 6) {
  630. this.paypacks()
  631. } else if (this.infodata.product_type == 3) {
  632. this.payyuyue()
  633. } else if (this.infodata.product_type == 4) {
  634. this.payvaccines()
  635. } else if (this.infodata.product_type == 5) {
  636. this.paychildcare()
  637. }
  638. },
  639. // 按键被点击(点击退格键不会触发此事件)
  640. valChange(val) {
  641. // 将每次按键的值拼接到value变量中,注意+=写法
  642. this.password += val;
  643. console.log(this.password)
  644. if (this.password.length == 6) {
  645. this.payment()
  646. }
  647. },
  648. // 退格键被点击
  649. backspace() {
  650. // 删除value的最后一个字符
  651. if (this.password.length) this.password = this.password.substr(0, this.password.length - 1);
  652. console.log(this.password);
  653. }
  654. },
  655. onHide() {
  656. this.popupShow = false
  657. },
  658. }
  659. </script>
  660. <style>
  661. /* 支付文字 */
  662. .paymentText {
  663. height: 60rpx;
  664. width: auto;
  665. background-color: #FFFFFF;
  666. padding: 30rpx 0 0 30rpx;
  667. font-size: 24rpx;
  668. }
  669. /* 优惠券样式 */
  670. .discount {
  671. position: relative;
  672. display: inline-block;
  673. margin-right: 5px;
  674. margin-left: 15px;
  675. padding: 0 9px 0 12px;
  676. border-top: 1px solid rgb(11, 115, 186);
  677. border-bottom: 1px solid rgb(11, 115, 186);
  678. height: 16px;
  679. line-height: 16px;
  680. color: rgb(11, 115, 186);
  681. font-size: 10px;
  682. }
  683. .discount::before {
  684. content: "";
  685. left: 0;
  686. width: 7px;
  687. position: absolute;
  688. top: -1px;
  689. height: 18px;
  690. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAkCAMAAACpD3pbAAAAPFBMVEUAAAD////kOTzqaGr+9vb4zc32vL3sdXfnTE/mRUfxmpz87O3yn6HqZ2npXWDlQEP97e33xsf3xsbxl5nHV2NIAAAAAXRSTlMAQObYZgAAAJpJREFUOMvllEsSwiAQRMnjF8g/3v+uKhIrjhHK0l16B4+C7hlALS07qSyS2kVlKnHmCpqdNvwYwTdY6yKGX7AeKtb+jmN3jLuYMMEd5XYBUMZ6cO/BHHhr7ut6wizxHOhvM+kUT5S5I77ZsGWU1kbsExsmiSdMBVc3l9a0tJaDdR+CVcryWtRBFLXYkku1oae955Xnv5Y+j/UKs1MGwyraxf4AAAAASUVORK5CYII=);
  691. background-size: 15px 18px;
  692. background-repeat: no-repeat;
  693. }
  694. .discount::after {
  695. right: 0;
  696. width: 4px;
  697. background-position: -11px 0;
  698. content: "";
  699. position: absolute;
  700. top: -1px;
  701. height: 18px;
  702. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAkCAMAAACpD3pbAAAAPFBMVEUAAAD////kOTzqaGr+9vb4zc32vL3sdXfnTE/mRUfxmpz87O3yn6HqZ2npXWDlQEP97e33xsf3xsbxl5nHV2NIAAAAAXRSTlMAQObYZgAAAJpJREFUOMvllEsSwiAQRMnjF8g/3v+uKhIrjhHK0l16B4+C7hlALS07qSyS2kVlKnHmCpqdNvwYwTdY6yKGX7AeKtb+jmN3jLuYMMEd5XYBUMZ6cO/BHHhr7ut6wizxHOhvM+kUT5S5I77ZsGWU1kbsExsmiSdMBVc3l9a0tJaDdR+CVcryWtRBFLXYkku1oae955Xnv5Y+j/UKs1MGwyraxf4AAAAASUVORK5CYII=);
  703. background-size: 15px 18px;
  704. background-repeat: no-repeat;
  705. }
  706. /* 优惠头部 */
  707. .header-Discount {
  708. position: relative;
  709. height: 46px;
  710. line-height: 46px;
  711. padding-left: 10px;
  712. font-size: 15px;
  713. color: #333;
  714. text-align: center;
  715. font-weight: 700;
  716. }
  717. .body-Discount {
  718. padding: 0 18px;
  719. font-size: 13px;
  720. color: #333;
  721. margin-bottom: 50px;
  722. }
  723. .body-Discount>.collar {
  724. position: relative;
  725. padding-bottom: 9px;
  726. }
  727. .body-Discount>.collar>.title-Discount {
  728. height: 40px;
  729. line-height: 40px;
  730. color: #262626;
  731. font-weight: 700;
  732. }
  733. .body-Discount>.collar .couponList>.couponItem {
  734. color: rgb(11, 115, 186);
  735. margin-bottom: 18px;
  736. padding: 12px 10px;
  737. border-top: 6px solid currentColor;
  738. box-shadow: 0 0 6px 0 rgba(0, 0, 0, .1);
  739. border-radius: 6px;
  740. }
  741. .body-Discount>.collar .couponList>.couponItem>.couponItem-subject {
  742. display: flex;
  743. min-height: 58px;
  744. color: rgb(11, 115, 186);
  745. }
  746. .body-Discount>.collar .couponList>.couponItem>.couponItem-subject>.couponItem-subject-left {
  747. width: 220rpx;
  748. margin-right: 10px;
  749. line-height: 1;
  750. text-align: center;
  751. display: flex;
  752. flex-direction: column;
  753. justify-content: center;
  754. overflow: hidden;
  755. }
  756. .couponItem-subject-price {
  757. overflow: hidden;
  758. text-overflow: ellipsis;
  759. white-space: nowrap;
  760. line-height: 1;
  761. text-align: center;
  762. }
  763. .couponItem-subject-icon {
  764. font-size: 14px;
  765. display: inline-block;
  766. vertical-align: bottom;
  767. margin: 0 4px 3px 0;
  768. }
  769. .couponItem-subject-price-min {
  770. position: relative;
  771. top: 1px;
  772. font-size: 36px;
  773. letter-spacing: 0;
  774. }
  775. .couponItem-subject-price-reduce {
  776. font-size: 14px;
  777. margin-top: 5px;
  778. }
  779. .couponItem-subject-right {
  780. flex: 1;
  781. position: relative;
  782. }
  783. .couponItem-subject-right-header {
  784. height: 36px;
  785. line-height: 18px;
  786. overflow: hidden;
  787. text-overflow: ellipsis;
  788. display: -webkit-box;
  789. -webkit-line-clamp: 1;
  790. -webkit-box-orient: vertical;
  791. font-size: 12px;
  792. color: #666;
  793. }
  794. .couponItem-subject-right-header-icon {
  795. background-color: rgb(11, 115, 186);
  796. color: #fff;
  797. font-size: 12px;
  798. display: inline-block;
  799. padding: 0 6px 0 12px;
  800. height: 14px;
  801. margin-right: 4px;
  802. line-height: 14px;
  803. position: relative;
  804. border-radius: 0 3px 3px 0;
  805. }
  806. .couponItem-subject-right-header-icon::before {
  807. position: absolute;
  808. z-index: 1;
  809. content: "";
  810. width: 0;
  811. top: 0;
  812. left: -7px;
  813. height: 0;
  814. border-top: 7px solid #fff;
  815. border-right: 7px solid transparent;
  816. border-bottom: 7px solid #fff;
  817. border-left: 7px solid #fff;
  818. }
  819. .couponItem-subject-right-header-icon::after {
  820. content: ".";
  821. position: absolute;
  822. color: #fff;
  823. left: 5px;
  824. top: -6px;
  825. font-size: 20px;
  826. }
  827. .couponItem-subject-right-btn {
  828. background-color: rgb(11, 115, 186);
  829. color: #fff;
  830. font-size: 12px;
  831. position: absolute;
  832. right: 0;
  833. bottom: 0;
  834. width: 68px;
  835. height: 20px;
  836. line-height: 20px;
  837. text-align: center;
  838. border-radius: 10px;
  839. box-sizing: border-box;
  840. z-index: 2;
  841. }
  842. .desc-style {
  843. padding: 5px 18px 10px 18px;
  844. line-height: 1.3;
  845. position: relative;
  846. font-size: 12px;
  847. max-height: 46px;
  848. overflow: hidden;
  849. color: #666;
  850. background-color: white;
  851. }
  852. .closing-date {
  853. padding-right: 68px;
  854. position: absolute;
  855. left: 0;
  856. bottom: 0;
  857. box-sizing: border-box;
  858. width: 100%;
  859. line-height: 20px;
  860. font-size: 10px;
  861. color: #8c8c8c;
  862. }
  863. </style>