makeOut.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923
  1. <template>
  2. <view class="scenic-makeOut">
  3. <u--form
  4. labelPosition="left"
  5. :model="form"
  6. ref="uForm"
  7. labelWidth="150rpx"
  8. >
  9. <view class="content info">
  10. <view class="title">
  11. {{ticketInfo.productName}}
  12. </view>
  13. <view class="notice" @click="showNotice = true">
  14. <view class="text">
  15. 预定须知
  16. </view>
  17. <image class="jiantou" src="../static/right.png" mode=""></image>
  18. </view>
  19. <u-form-item
  20. label="出游日期"
  21. borderBottom
  22. ref="startTime"
  23. required
  24. prop="startTime"
  25. >
  26. <view class="time-box" @click="chooseTime">
  27. {{form.startTime}}
  28. <image class="right-icon" src="../static/right.png" mode=""></image>
  29. </view>
  30. </u-form-item>
  31. <view class="signUp-box">
  32. <view class="label-box">
  33. <view class="label">
  34. 预订数量
  35. </view>
  36. <view class="desc">
  37. (最多10张)
  38. </view>
  39. </view>
  40. <view class="num-box">
  41. <view class="btn" :class="[form.bookNumber == 1?'disabled':'']" @click="add(-1)">
  42. -
  43. </view>
  44. <view class="num">
  45. {{form.bookNumber}}
  46. </view>
  47. <view class="btn" :class="[form.bookNumber == 10?'disabled':'']" @click="add(1)">
  48. +
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="content ">
  54. <view class="sub-title">
  55. 取票人信息
  56. </view>
  57. <u-form-item
  58. label="姓名"
  59. borderBottom
  60. ref="item1"
  61. prop="contact.contactName"
  62. required
  63. >
  64. <u--input
  65. v-model="form.contact.contactName"
  66. border="none"
  67. placeholder="请输入姓名"
  68. ></u--input>
  69. </u-form-item>
  70. <u-form-item
  71. label="手机号"
  72. borderBottom
  73. ref="item1"
  74. prop="contact.contactTel"
  75. required
  76. >
  77. <u--input
  78. v-model="form.contact.contactTel"
  79. border="none"
  80. :maxlength="11"
  81. placeholder="请输入手机号"
  82. ></u--input>
  83. </u-form-item>
  84. <u-form-item
  85. label="邮箱"
  86. borderBottom
  87. ref="item1"
  88. prop="contact.contactEmail"
  89. required
  90. v-if="ticketInfo.admissionVoucher.admissionVoucherCode == 205 || ticketInfo.admissionVoucher.admissionVoucherCode == 302"
  91. >
  92. <u--input
  93. v-model="form.contact.contactEmail"
  94. border="none"
  95. placeholder="请输入邮箱号"
  96. ></u--input>
  97. </u-form-item>
  98. <u-form-item
  99. label="证件类型"
  100. borderBottom
  101. ref="item1"
  102. :required="showContact"
  103. v-if="showContact"
  104. >
  105. <view class="time-box" @click="chooseType('取票')">
  106. {{form.contact.psptType | filterType(that)}}
  107. <image class="right-icon" src="../static/right.png" mode=""></image>
  108. </view>
  109. </u-form-item>
  110. <u-form-item
  111. label="证件号"
  112. ref="item1"
  113. prop="contact.psptId"
  114. :required="showContact"
  115. v-if="showContact"
  116. >
  117. <u--input
  118. v-model="form.contact.psptId"
  119. border="none"
  120. placeholder="请输入证件号"
  121. :maxlength="18"
  122. ></u--input>
  123. </u-form-item>
  124. </view>
  125. <template v-if="required">
  126. <view class="content" v-for="(item,index) in form.touristList" :key="item">
  127. <view class="sub-title">
  128. 出游人信息
  129. </view>
  130. <view class="no">
  131. 第{{index+1}}位
  132. </view>
  133. <u-form-item
  134. label="姓名"
  135. borderBottom
  136. :ref="'touristList'+index+'name'"
  137. :prop="`touristList.${index}.name`"
  138. :required="required"
  139. >
  140. <u--input
  141. v-model="item.name"
  142. border="none"
  143. placeholder="请输入姓名"
  144. ></u--input>
  145. </u-form-item>
  146. <u-form-item
  147. label="手机号"
  148. borderBottom
  149. :ref="'touristList'+index+'tel'"
  150. :prop="'touristList.'+index+'.tel'"
  151. :required="required"
  152. >
  153. <u--input
  154. v-model="item.tel"
  155. border="none"
  156. :maxlength="11"
  157. placeholder="请输入手机号"
  158. ></u--input>
  159. </u-form-item>
  160. <u-form-item
  161. label="证件类型"
  162. borderBottom
  163. ref="item13"
  164. prop="name"
  165. :required="idRequired"
  166. v-if="idRequired"
  167. >
  168. <view class="time-box" @click="chooseType(index)">
  169. {{item.psptType | filterType(that)}}
  170. <image class="right-icon" src="../static/right.png" mode=""></image>
  171. </view>
  172. </u-form-item>
  173. <u-form-item
  174. label="证件号"
  175. ref="item14"
  176. :ref="'touristList'+index+'psptId'"
  177. :prop="'touristList.'+index+'.psptId'"
  178. :required="idRequired"
  179. v-if="idRequired"
  180. >
  181. <u--input
  182. v-model="item.psptId"
  183. border="none"
  184. placeholder="请输入证件号"
  185. :maxlength="18"
  186. ></u--input>
  187. </u-form-item>
  188. </view>
  189. </template>
  190. </u--form>
  191. <view class="btn-box">
  192. <view class="left">
  193. <view class="num">
  194. 共{{form.bookNumber}}件
  195. </view>
  196. <view class="total">
  197. 合计 <view class="price-box">
  198. <view class="unit">
  199. </view>
  200. <view class="price">
  201. {{total}}
  202. </view>
  203. </view>
  204. </view>
  205. </view>
  206. <button class="btn" @click="handleBuy" :loading="loading">
  207. 提交订单
  208. </button>
  209. </view>
  210. <u-calendar
  211. confirmDisabledText="请选择日期"
  212. :show="show"
  213. @confirm="confirmTime"
  214. @close="show = false"
  215. ref="calendar"
  216. :rowHeight="120"
  217. closeOnClickOverlay
  218. color="#EE4320"
  219. :customList="ticketInfo.priceCalendar"
  220. :monthNum="12"
  221. >
  222. </u-calendar>
  223. <u-picker :show="show1" :columns="columns" closeOnClickOverlay keyName="label" @cancel="close" @close="close" @confirm="confirm"></u-picker>
  224. <!-- 预定须知 -->
  225. <u-popup :show="showNotice" round="16rpx" mode="bottom" @close="showNotice = false">
  226. <view class="popup-title">
  227. {{ticketInfo.shopName}}
  228. </view>
  229. <view class="box">
  230. <template v-if="ticketInfo.drawAddress">
  231. <view class="sub-title">
  232. 取票地点
  233. </view>
  234. <view class="intro">
  235. {{ticketInfo.drawAddress}}
  236. </view>
  237. </template>
  238. <view class="sub-title">
  239. 入园方式
  240. </view>
  241. <view class="intro">
  242. {{ticketInfo.admissionVoucher.admissionVoucherCode | filterVoucherType}}
  243. </view>
  244. <view class="sub-title">
  245. 有效期
  246. </view>
  247. <view class="intro">
  248. {{ticketInfo.indate || '-'}}
  249. </view>
  250. <view class="sub-title">
  251. 预定截止
  252. </view>
  253. <view class="intro">
  254. {{ticketInfo.advanceDay}}天 {{ticketInfo.advanceHour}}小时
  255. </view>
  256. <view class="sub-title">
  257. 退改规则
  258. </view>
  259. <rich-text class="intro" :nodes="ticketInfo.mpLossInfo"></rich-text>
  260. <view class="sub-title">
  261. 预定须知
  262. </view>
  263. <rich-text class="intro" :nodes="ticketInfo.bookNotice"></rich-text>
  264. <view class="sub-title">
  265. 其他说明
  266. </view>
  267. <rich-text class="intro" :nodes="ticketInfo.info"></rich-text>
  268. </view>
  269. </u-popup>
  270. </view>
  271. </template>
  272. <script>
  273. import {createOrderNew} from '@/api/scenic.js'
  274. import {
  275. creatPayOrder,
  276. queryPayOrder,
  277. } from '@/api/payment.js'
  278. export default {
  279. data() {
  280. return {
  281. that:this,
  282. show:false,
  283. show1:false,
  284. showNotice:false,
  285. loading:false,
  286. form:{
  287. "scenicId":0,
  288. "epId":0,
  289. "channel":'ZhongShu',
  290. "bookNumber": 1,
  291. "contact": {
  292. "contactEmail": "",
  293. "contactName": "",
  294. "contactTel": "",
  295. "psptId": "",
  296. "psptType": 1
  297. },
  298. "couponValue": 0,
  299. "delivery": {
  300. "deliveryEndAddress": "",
  301. "deliveryType": 0,
  302. "receiverName": "",
  303. "telNum": "",
  304. "zipCode": ""
  305. },
  306. "productId": 0,
  307. "startTime": "",
  308. "touristList": [
  309. {
  310. "email": "",
  311. "name": "",
  312. "psptId": "",
  313. "psptType": 1,
  314. "tel": ""
  315. }
  316. ]
  317. },
  318. required:false,//游客信息是否必填
  319. idRequired:false,//游客身份证信息是否必填
  320. showContact:false,//取票人信息是否必填
  321. rules: {
  322. 'startTime':[
  323. {
  324. required: true,
  325. message: '请选择出游日期',
  326. trigger: ['blur', 'change']
  327. },
  328. ],
  329. contact:{
  330. contactName:[
  331. {
  332. required: true,
  333. message: '请输入姓名',
  334. trigger: ['blur', 'change']
  335. },
  336. ],
  337. contactTel:[
  338. {
  339. required: true,
  340. message: '请输入手机号',
  341. trigger: ['blur', 'change']
  342. },
  343. {
  344. // 自定义验证函数,见上说明
  345. validator: (rule, value, callback) => {
  346. // 上面有说,返回true表示校验通过,返回false表示不通过
  347. // uni.$u.test.mobile()就是返回true或者false的
  348. return uni.$u.test.mobile(value);
  349. },
  350. message: '手机号码不正确',
  351. // 触发器可以同时用blur和change
  352. trigger: ['change','blur'],
  353. }
  354. ],
  355. contactEmail:[
  356. {
  357. required: true,
  358. message: '请输入取票人邮箱',
  359. trigger: ['blur', 'change']
  360. },
  361. {
  362. // 自定义验证函数,见上说明
  363. validator: (rule, value, callback) => {
  364. // 上面有说,返回true表示校验通过,返回false表示不通过
  365. // uni.$u.test.mobile()就是返回true或者false的
  366. return uni.$u.test.email(value);
  367. },
  368. message: '邮箱号不正确',
  369. // 触发器可以同时用blur和change
  370. trigger: ['change','blur'],
  371. }
  372. ],
  373. psptId:[
  374. {
  375. required: true,
  376. message: '请输入证件号码',
  377. trigger: ['blur', 'change']
  378. }
  379. ],
  380. },
  381. touristList:[]
  382. },
  383. ticketInfo:{salePrice:0},
  384. columns: [
  385. [
  386. {
  387. label: '身份证',
  388. id: 1
  389. },
  390. {
  391. label: '护照',
  392. id: 2
  393. },
  394. {
  395. label: '军官证',
  396. id: 3
  397. },
  398. {
  399. label: '港澳通行证',
  400. id: 4
  401. },
  402. {
  403. label: '台胞证',
  404. id: 7
  405. },
  406. {
  407. label: '回乡证',
  408. id: 8
  409. },
  410. {
  411. label: '户口簿',
  412. id: 9
  413. },
  414. {
  415. label: '出生证明',
  416. id: 10
  417. },
  418. {
  419. label: '台湾通行证',
  420. id: 11
  421. },
  422. ]
  423. ],
  424. active:0,
  425. query: {
  426. "msgType": "wx.unifiedOrder",
  427. "orderDesc": "",
  428. "orderNo": "",
  429. "channel":'ZhongShu',
  430. "subOpenId": "",
  431. "userId": ""
  432. },
  433. payData:null
  434. }
  435. },
  436. filters: {
  437. filterType: function(value,that) {
  438. let msg
  439. that.columns[0].map(item=>{
  440. if(value == item.id){
  441. msg = item.label
  442. }
  443. })
  444. return msg;
  445. },
  446. filterVoucherType: function(val) {
  447. if(val == 1){
  448. return '实体票入园'
  449. }else if(val == 201){
  450. return '换票入园短信'
  451. }else if(val == 202){
  452. return '换票入园二维码'
  453. }else if(val == 203){
  454. return '换票入园数字码'
  455. }else if(val == 204){
  456. return '换票入园换票证'
  457. }else if(val == 205){
  458. return '换票入园邮件'
  459. }else if(val == 206){
  460. return '换票入园身份证'
  461. }else if(val == 207){
  462. return '换票入园护照'
  463. }else if(val == 208){
  464. return '换票入园港澳通行证'
  465. }else if(val == 209){
  466. return '换票入园军官证'
  467. }else if(val == 210){
  468. return '换票入园台胞证'
  469. }else if(val == 301){
  470. return '直接验证入园二维码'
  471. }else if(val == 302){
  472. return '直接验证入园邮件'
  473. }else if(val == 303){
  474. return '直接验证入园身份证'
  475. }else if(val == 304){
  476. return '直接验证入园护照'
  477. }else if(val == 305){
  478. return '直接验证入园港澳通行证'
  479. }else if(val == 306){
  480. return '直接验证入园军官证'
  481. }else if(val == 307){
  482. return '直接验证入园台胞证'
  483. }
  484. }
  485. },
  486. computed: {
  487. total() {
  488. return this.ticketInfo.salePrice*this.form.bookNumber
  489. }
  490. },
  491. methods: {
  492. confirmTime(val){
  493. if(!val.length) return uni.showToast({
  494. title:'请选择日期',
  495. icon:'none'
  496. })
  497. this.show = false
  498. this.form.startTime = val[0]
  499. this.$refs.uForm.validateField('startTime')
  500. },
  501. confirm(val){
  502. console.log(val);
  503. this.show1 = false
  504. if(this.active == '取票'){
  505. this.form.contact.psptType = val.value[0].id
  506. }else{
  507. this.form.touristList[this.active].psptType = val.value[0].id
  508. }
  509. },
  510. close(){
  511. console.log(9999);
  512. this.show1 = false
  513. },
  514. chooseTime() {
  515. this.show = true
  516. },
  517. chooseType(index){
  518. this.show1 = true
  519. this.active = index
  520. },
  521. add(val){
  522. if((val==-1&&this.form.bookNumber == 1)||(val==1&&this.form.bookNumber == 10)) return
  523. if(val == 1){
  524. if(this.required){
  525. this.form.touristList.push({
  526. "email": "",
  527. "name": "",
  528. "psptId": "",
  529. "psptType": 1,
  530. "tel": ""
  531. })
  532. }
  533. }else{
  534. this.form.touristList.pop()
  535. }
  536. this.form.bookNumber+=val
  537. this.setRules()
  538. },
  539. handleBuy(){
  540. this.$refs.uForm.validate().then(res => {
  541. this.createOrderNew(this.form)
  542. })
  543. },
  544. createOrderNew(query){
  545. if (this.loading) return
  546. this.loading = true
  547. uni.showLoading({
  548. title: '支付中'
  549. })
  550. let that = this
  551. createOrderNew(query).then(res=>{
  552. if(res.state == 'Success'){
  553. this.query.orderNo = res.content.orderNo
  554. this.query.subOpenId = JSON.parse(uni.getStorageSync('userInfo')).openId
  555. this.query.orderDesc = this.ticketInfo.productName
  556. creatPayOrder(this.query).then(data => {
  557. that.payData = JSON.parse(data.content.miniPayRequest)
  558. if (data.content.miniPayRequest == null) return uni.hideLoading()
  559. console.log(666,that.payData);
  560. uni.requestPayment({
  561. "provider": "wxpay",
  562. "orderInfo": that.payData,
  563. "appid": that.payData
  564. .appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
  565. "paySign": that.payData.paySign,
  566. "nonceStr": that.payData.nonceStr, // 随机字符串
  567. "package": that.payData.package, // 固定值
  568. // "prepayid": that.payData.package, // 统一下单订单号
  569. "timeStamp": that.payData.timeStamp, // 时间戳(单位:秒)
  570. "signType": that.payData.signType, //签名算法
  571. success(msg) {
  572. console.log('msg', that.query.orderNo);
  573. queryPayOrder(that.query.orderNo).then(res1 => {
  574. uni.hideLoading()
  575. that.loading = false
  576. if (res1.state == 'Success') {
  577. uni.reLaunch({
  578. url: '/my/order/index'
  579. })
  580. }
  581. })
  582. },
  583. fail(e) {
  584. console.log('err', e);
  585. that.loading = false
  586. uni.hideLoading()
  587. uni.showToast({
  588. title: '取消支付',
  589. icon: 'fail'
  590. })
  591. // 取消支付后
  592. uni.reLaunch({
  593. url:'/my/order/scenic/detail?id='+that.query.orderNo
  594. })
  595. }
  596. })
  597. })
  598. }else{
  599. that.loading = false
  600. uni.hideLoading()
  601. uni.hideToast()
  602. if(res.content.indexOf('不符合资源') != -1){
  603. uni.showToast({
  604. title: res.content.split('不符合资源')[0]+'不合法',
  605. icon: 'none'
  606. })
  607. }else{
  608. uni.showToast({
  609. title: res.content,
  610. icon: 'none'
  611. })
  612. }
  613. }
  614. })
  615. },
  616. setRules() {
  617. //custInfoLimit=2,3,6,7这几种类型 游客信息必填 否则直接不填
  618. if(this.required){
  619. this.form.touristList.forEach((ele, index) => {
  620. this.$set(this.rules, `touristList.${index}.name`, [
  621. {
  622. required: true,
  623. message: '请填写姓名',
  624. trigger: ['blur', 'change']
  625. }
  626. ])
  627. this.$set(this.rules, `touristList.${index}.tel`, [
  628. {
  629. required: true,
  630. message: '请填写手机号',
  631. trigger: ['blur', 'change']
  632. },
  633. {
  634. validator: (rule, value, callback) => {
  635. // 上面有说,返回true表示校验通过,返回false表示不通过
  636. return uni.$u.test.mobile(value);
  637. },
  638. message: '手机号码不正确',
  639. // 触发器可以同时用blur和change
  640. trigger: ['change','blur'],
  641. }
  642. ])
  643. if(this.idRequired){
  644. this.$set(this.rules, `touristList.${index}.psptId`, [
  645. {
  646. required: true,
  647. message: '请填写证件号码',
  648. trigger: ['blur', 'change']
  649. }
  650. ])
  651. }
  652. })
  653. }
  654. console.log('rule',this.rules);
  655. this.$nextTick(() => {
  656. this.$refs.uForm.setRules(this.rules)
  657. })
  658. },
  659. },
  660. onReady() {
  661. //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
  662. // this.$refs.uForm.setRules(this.rules)
  663. this.setRules()
  664. },
  665. mounted() {
  666. // this.setRules()
  667. },
  668. onLoad(options) {
  669. let userInfo = JSON.parse(uni.getStorageSync('userInfo'))
  670. this.query.userId = userInfo.userId
  671. this.form.scenicId = options.id
  672. let that = this
  673. const eventChannel = this.getOpenerEventChannel();
  674. eventChannel.on('pay', function(data) {
  675. that.form.epId = data.epId
  676. that.ticketInfo = data
  677. that.ticketInfo.priceCalendar.map(i=>{i.bottomInfo = i.salePrice})
  678. that.form.productId = data.productId
  679. // 这几种类型 才需要填写游客信息
  680. if([2,3,6,7].includes(that.ticketInfo.custInfoLimit)){
  681. that.required = true
  682. // 必填游客身份证
  683. if([3,6].includes(that.ticketInfo.custInfoLimit)){
  684. that.idRequired = true
  685. }else{
  686. that.idRequired = false
  687. }
  688. }else{
  689. that.required = false
  690. that.form.touristList = []
  691. }
  692. // 这几种类型 才需要填写取票人证件信息
  693. if([4,6,7].includes(that.ticketInfo.custInfoLimit)){
  694. that.showContact = true
  695. }else{
  696. that.showContact = false
  697. delete that.form.contact.psptType
  698. delete that.form.contact.psptId
  699. }
  700. console.log('数据:',data,that.form);
  701. })
  702. }
  703. }
  704. </script>
  705. <style lang="scss" >
  706. .scenic-makeOut{
  707. background: #F9F9F9;
  708. border-radius: 0rpx 0rpx 0rpx 0rpx;
  709. padding: 20rpx 24rpx 120rpx;
  710. min-height: 100vh;
  711. .content{
  712. background: #FFFFFF;
  713. border-radius: 16rpx 16rpx 16rpx 16rpx;
  714. margin-bottom: 20rpx;
  715. padding: 24rpx;
  716. }
  717. .sub-title{
  718. font-weight: 600;
  719. font-size: 28rpx;
  720. color: #222222;
  721. padding-bottom: 24rpx;
  722. border-bottom: 1rpx solid #F0F0F0;
  723. }
  724. .no{
  725. padding: 24rpx 0;
  726. font-size: 28rpx;
  727. color: #222222;
  728. font-weight: bold;
  729. }
  730. .time-box{
  731. display: flex;
  732. justify-content: flex-end;
  733. text-align: center;
  734. .right-icon{
  735. width: 48rpx;
  736. height: 48rpx;
  737. }
  738. }
  739. .info{
  740. .title{
  741. font-weight: 600;
  742. font-size: 36rpx;
  743. color: #222222;
  744. width: 100%;
  745. white-space: nowrap;
  746. overflow: hidden;
  747. text-overflow: ellipsis;
  748. margin-top: 10rpx;
  749. }
  750. .notice{
  751. display: flex;
  752. align-items: center;
  753. font-size: 24rpx;
  754. color: #AAAAAA;
  755. margin-top: 20rpx;
  756. .jiantou{
  757. width: 48rpx;
  758. height: 48rpx;
  759. }
  760. }
  761. .signUp-box{
  762. display: flex;
  763. justify-content: space-between;
  764. align-items: center;
  765. padding-top: 20rpx;
  766. .label-box{
  767. display: flex;
  768. align-items: center;
  769. .label{
  770. font-weight: 300;
  771. font-size: 24rpx;
  772. color: #181818;
  773. }
  774. .desc{
  775. font-weight: 300;
  776. font-size: 24rpx;
  777. color: #AAAAAA;
  778. }
  779. }
  780. .num-box{
  781. display: flex;
  782. align-items: center;
  783. .btn.disabled{
  784. background: #F0F0F0;
  785. color: #AAAAAA;
  786. }
  787. .btn{
  788. width: 36rpx;
  789. height: 36rpx;
  790. line-height: 36rpx;
  791. border-radius: 50%;
  792. background: #E2ECFF;
  793. color: #3879F9;
  794. font-size: 30rpx;
  795. text-align: center;
  796. vertical-align: top;
  797. }
  798. .num{
  799. font-weight: 400;
  800. font-size: 24rpx;
  801. color: #222222;
  802. width: 50rpx;
  803. text-align: center;
  804. }
  805. }
  806. }
  807. }
  808. .btn-box {
  809. position: fixed;
  810. bottom: 0%;
  811. left: 0%;
  812. z-index: 2;
  813. width: 100%;
  814. display: flex;
  815. align-items: center;
  816. justify-content: space-between;
  817. box-sizing: border-box;
  818. padding: 10rpx 24rpx env(safe-area-inset-bottom);
  819. background: #fff;
  820. border-top: 1rpx solid #EEEEEE;
  821. .left{
  822. display: flex;
  823. align-items: flex-end;
  824. .num{
  825. font-weight: 300;
  826. font-size: 24rpx;
  827. color: #AAAAAA;
  828. }
  829. .total{
  830. font-weight: 300;
  831. font-size: 24rpx;
  832. color: #222222;
  833. display: flex;
  834. align-items: flex-end;
  835. margin-left: 6rpx;
  836. .price-box{
  837. display: flex;
  838. align-items: flex-end;
  839. font-weight: 400;
  840. font-size: 32rpx;
  841. color: #222222;
  842. .unit{
  843. font-size: 20rpx;
  844. }
  845. .price{
  846. font-weight: bold;
  847. }
  848. }
  849. }
  850. }
  851. .btn {
  852. width: 280rpx;
  853. height: 80rpx;
  854. line-height: 80rpx;
  855. text-align: center;
  856. background: $uni-color-primary;
  857. border-radius: 40rpx;
  858. font-weight: 600;
  859. font-size: 28rpx;
  860. color: #FFFFFF;
  861. margin: 0;
  862. }
  863. }
  864. .u-popup__content{
  865. padding: 0 24rpx 28rpx;
  866. position: relative;
  867. .popup-title{
  868. font-weight: 600;
  869. font-size: 32rpx;
  870. color: #222222;
  871. padding: 28rpx 0;
  872. border-bottom: 1rpx solid #F0F0F0;
  873. }
  874. .box{
  875. max-height: 70vh;
  876. overflow: auto;
  877. .sub-title{
  878. font-weight: 600;
  879. font-size: 28rpx;
  880. color: #222222;
  881. margin: 20rpx 0;
  882. border: none;
  883. }
  884. .intro{
  885. font-weight: 300;
  886. font-size: 24rpx;
  887. color: #AAAAAA;
  888. line-height: 40rpx;
  889. padding-bottom: 24rpx;
  890. }
  891. .border-bottom{
  892. border-bottom: 1rpx solid #F0F0F0!important;
  893. }
  894. }
  895. }
  896. }
  897. </style>