makeOut.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768
  1. <template>
  2. <view class="makeOut">
  3. <view class="content signUp-info">
  4. <view class="title">
  5. {{activity.activityName}}
  6. </view>
  7. <view class="time">
  8. 活动时间:{{activity.activityStartTime}} 至 {{activity.activityEndTime}}
  9. </view>
  10. <view class="signUp-box">
  11. <view class="label-box">
  12. <view class="label">
  13. 报名人数
  14. </view>
  15. <view class="desc">
  16. {{activity.limited?`(最多${activity.limited}人)`:'(不限制)'}}
  17. </view>
  18. </view>
  19. <view class="num-box">
  20. <view class="btn" :class="[num == 1?'disabled':'']" @click="add(-1)">
  21. -
  22. </view>
  23. <view class="num">
  24. {{num}}
  25. </view>
  26. <view class="btn" :class="[num == activity.limited?'disabled':'']" @click="add(1)">
  27. +
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="content" v-for="(test,d) in modelQuery">
  33. <u--form
  34. labelPosition="left"
  35. :model="modelQuery[d]"
  36. :rules="rules"
  37. :ref="'uForm'+d"
  38. labelWidth="150rpx"
  39. >
  40. <view v-for="(item,index) in setQuery.data" :key="index">
  41. <u-form-item
  42. :label="item.dataName"
  43. :prop="'data_'+index+'_value'"
  44. :borderBottom="index != (setQuery.data.length-1)"
  45. :required="item.requiredEnable == 1?true:false"
  46. ref="item1"
  47. >
  48. <u--input v-if="item.dataType == 1" :placeholder="'请输入'+item.dataName" :maxlength="getLength(item)" v-model="modelQuery[d][`data_${index}_value`]" border="none"></u--input>
  49. <u-textarea v-else-if="item.dataType == 2" v-model="modelQuery[d][`data_${index}_value`]" border="surround" :maxlength="400" count ></u-textarea>
  50. <u-radio-group v-model="modelQuery[d][`data_${index}_value`]" v-else-if="item.dataType == 3">
  51. <u-radio labelSize="34rpx" v-for="i in item.content" :key="i" :name="i" :label="i"></u-radio>
  52. </u-radio-group>
  53. <!-- <template v-else-if="item.dataType == 3">
  54. <u--input @focus="handeChoose" :placeholder="'请选择'+item.dataName" v-model="modelQuery[d][`data_${index}_value`]" border="none"></u--input>
  55. <u-picker :show="show" ref="uPicker" closeOnClickOverlay :columns="[item.content]" @cancel="cancel" @confirm="confirm($event,d,index)"></u-picker>
  56. </template> -->
  57. <u-checkbox-group
  58. v-model="modelQuery[d][`data_${index}_value`]"
  59. v-else-if="item.dataType == 4"
  60. >
  61. <u-checkbox
  62. labelSize="34rpx"
  63. iconSize="34rpx"
  64. v-for="i in item.content"
  65. :key="index"
  66. :label="i"
  67. :name="i"
  68. >
  69. </u-checkbox>
  70. </u-checkbox-group>
  71. <u-upload
  72. width="200rpx"
  73. height="200rpx"
  74. v-else-if="item.dataType == 5"
  75. :fileList="modelQuery[d][`data_${index}_value`]"
  76. @afterRead="afterRead($event,d,index)"
  77. @delete="deletePic($event,modelQuery[d][`data_${index}_value`])"
  78. @oversize="oversize($event,item)"
  79. name="1"
  80. :maxSize="item.size*1024*1024"
  81. multiple
  82. :maxCount="item.num"
  83. ></u-upload>
  84. </u-form-item>
  85. </view>
  86. </u--form>
  87. </view>
  88. <view class="btn-box">
  89. <view class="left">
  90. <view class="num">
  91. 共{{num}}人
  92. </view>
  93. <view class="total">
  94. 合计 <view class="price-box">
  95. <view class="unit">
  96. </view>
  97. <view class="price">
  98. {{total}}
  99. </view>
  100. </view>
  101. </view>
  102. </view>
  103. <button class="btn" @click="handleSignUp" :loading="loading">
  104. 立即报名
  105. </button>
  106. </view>
  107. </view>
  108. </template>
  109. <script>
  110. import {getTemplateDetail,signUp,createOrder,calc} from '@/api/activity.js'
  111. import {upload} from '@/utils/upload.js'
  112. import {
  113. creatPayOrder,
  114. queryPayOrder,
  115. payDetails
  116. } from '@/api/payment.js'
  117. export default {
  118. data() {
  119. return {
  120. maxLength:40,
  121. num: 1,
  122. modelQuery:[{}],
  123. setQuery:{},
  124. activity:{},
  125. rules: {},
  126. loading:false,
  127. show:false,
  128. pickerObj:{
  129. },
  130. price:0,
  131. query: {
  132. "msgType": "wx.unifiedOrder",
  133. "orderDesc": "",
  134. "orderNo": "",
  135. "subOpenId": "",
  136. "userId": ""
  137. },
  138. // 支付信息
  139. payData: {}
  140. }
  141. },
  142. computed: {
  143. total() {
  144. return this.price || this.activity.price
  145. }
  146. },
  147. methods: {
  148. handeChoose(){
  149. this.show = true
  150. },
  151. cancel(){
  152. this.show = false
  153. },
  154. confirm(val,d,index){
  155. this.modelQuery[d][`data_${index}_value`] = val.value[0]
  156. this.show = false
  157. console.log(val,d,index);
  158. },
  159. oversize(val,item){
  160. console.log(val,item);
  161. uni.showToast({
  162. title:`请上传${item.size}MB以内的图片`,
  163. icon:'none'
  164. })
  165. },
  166. getLength(item){
  167. if(item.validType == 1){
  168. return 11
  169. }else if(item.validType == 2){
  170. return 18
  171. }else{
  172. return 40
  173. }
  174. },
  175. add(val){
  176. if((val==-1&&this.num == 1)||(val==1&&this.num == this.activity.limited)) return
  177. this.num += val
  178. if(val == 1){
  179. let obj = {}
  180. this.setQuery.data.map((item,index)=>{
  181. if(item.dataType == 1){
  182. // this.$set(this.modelQuery[this.modelQuery.length], `data_${index}_value`,'')
  183. obj[`data_${index}_value`] = ''
  184. }else if(item.dataType == 2 ){
  185. // this.$set(this.modelQuery[this.modelQuery.length], `data_${index}_value`,'')
  186. obj[`data_${index}_value`] = ''
  187. }
  188. else if(item.dataType == 3 ){
  189. // this.$set(this.modelQuery[this.modelQuery.length], `data_${index}_value`,'')
  190. obj[`data_${index}_value`] = ''
  191. }
  192. else if(item.dataType == 4 ){
  193. // this.$set(this.modelQuery[this.modelQuery.length], `data_${index}_value`,[])
  194. obj[`data_${index}_value`] = []
  195. }else if( item.dataType == 5){
  196. // this.$set(this.modelQuery[this.modelQuery.length], `data_${index}_value`,[])
  197. obj[`data_${index}_value`] = []
  198. }
  199. })
  200. this.modelQuery.push(obj)
  201. this.$nextTick(() => {
  202. this.$refs['uForm'+(this.modelQuery.length-1)][0].setRules(this.rules);
  203. })
  204. }else{
  205. this.modelQuery.pop()
  206. }
  207. // 计算价格
  208. calc({activityId:this.activity.id,num:this.num}).then(res=>{
  209. if (res.state == 'Success') {
  210. this.price = res.content.price
  211. }
  212. })
  213. },
  214. getTemplateDetail(activityId){
  215. getTemplateDetail({activityId}).then(res=>{
  216. if (res.state == 'Success') {
  217. this.setQuery = res.content.content
  218. this.setQuery.data.map((item,index)=>{
  219. if(item.dataType == 1){
  220. // this.$set(item,'value','')
  221. this.$set(this.modelQuery[0], `data_${index}_value`,'')
  222. if(item.requiredEnable == 1){
  223. let obj; //校验规则
  224. if(item.validType == 0){
  225. console.log(11111);
  226. obj = {
  227. required: true,
  228. message: `请输入${item.dataName}`,
  229. trigger: ['blur']
  230. }
  231. }else if(item.validType == 1){
  232. console.log(22222);
  233. obj ={
  234. pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/,
  235. message: '请输入正确的手机号'
  236. }
  237. }else if(item.validType == 2){
  238. obj ={
  239. len:18,
  240. message: '请输入正确的身份证号'
  241. }
  242. }else if(item.validType == 3){
  243. obj ={
  244. pattern: /^[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]/,
  245. // 正则检验前先将值转为字符串
  246. transform(value) {
  247. return String(value);
  248. },
  249. message: '请输入正确的邮箱'
  250. }
  251. }else if(item.validType == 4){
  252. obj ={
  253. pattern: /^(\-|\+)?\d+(\.\d+)?$/,
  254. message: '只能输入数字'
  255. }
  256. }
  257. this.$set(this.rules, `data_${index}_value`, [{
  258. required: true,
  259. message: `请输入${item.dataName}`,
  260. trigger: ['blur']
  261. },obj])
  262. }
  263. }else if(item.dataType == 2 ){
  264. // this.$set(item,'value','')
  265. this.$set(this.modelQuery[0], `data_${index}_value`,'')
  266. if(item.requiredEnable == 1){
  267. this.$set(this.rules, `data_${index}_value`, [{
  268. required: true,
  269. message: `请输入${item.dataName}`,
  270. trigger: ['blur']
  271. }])
  272. }
  273. }
  274. else if(item.dataType == 3 ){
  275. // this.$set(item,'value','')
  276. this.$set(this.modelQuery[0], `data_${index}_value`,'')
  277. if(item.requiredEnable == 1){
  278. this.$set(this.rules, `data_${index}_value`, [{
  279. required: true,
  280. message: `请选择${item.dataName}`,
  281. trigger: ['blur','change']
  282. }])
  283. }
  284. }
  285. else if(item.dataType == 4 ){
  286. // this.$set(item,'value',[])
  287. this.$set(this.modelQuery[0], `data_${index}_value`,[])
  288. if(item.requiredEnable == 1){
  289. this.$set(this.rules, `data_${index}_value`, [{
  290. type: 'array',
  291. required: true,
  292. message: `请选择${item.dataName}`,
  293. trigger: ['change']
  294. }])
  295. }
  296. }else if( item.dataType == 5){
  297. // this.$set(item,'value',[])
  298. this.$set(this.modelQuery[0], `data_${index}_value`,[])
  299. if(item.requiredEnable == 1){
  300. this.$set(this.rules, `data_${index}_value`, [{
  301. type: 'array',
  302. required: true,
  303. message: `请上传${item.dataName}`,
  304. trigger: ['change']
  305. }])
  306. }
  307. }
  308. })
  309. this.$nextTick(() => {
  310. console.log( this.$refs.uForm0);
  311. this.$refs.uForm0[0].setRules(this.rules);
  312. })
  313. }
  314. })
  315. },
  316. // 删除图片
  317. deletePic(event,data) {
  318. data.splice(event.index, 1)
  319. },
  320. // 新增图片
  321. async afterRead(event,d,index) {
  322. console.log(event);
  323. // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
  324. let lists = [].concat(event.file)
  325. let fileListLen = this.modelQuery[d][`data_${index}_value`].length
  326. lists.map((item) => {
  327. console.log(this.setQuery.data[index],this.setQuery.data[index].dataName);
  328. this.modelQuery[d][`data_${index}_value`].push({
  329. ...item,
  330. status: 'uploading',
  331. message: '上传中'
  332. })
  333. })
  334. for (let i = 0; i < lists.length; i++) {
  335. const result = await this.uploadFilePromise(lists[i])
  336. let item = this.modelQuery[d][`data_${index}_value`][fileListLen]
  337. this.modelQuery[d][`data_${index}_value`].splice(fileListLen, 1, Object.assign(item, {
  338. status: 'success',
  339. message: '',
  340. url: result
  341. }))
  342. fileListLen++
  343. }
  344. },
  345. uploadFilePromise(file) {
  346. return new Promise((resolve, reject) => {
  347. upload(file,'SHOP_INFO').then(res=>{
  348. // this.form[key] = [{url:res}]
  349. resolve(res)
  350. })
  351. })
  352. },
  353. formatData(){
  354. console.log(this.modelQuery);
  355. },
  356. // 点击提交报名
  357. handleSignUp(){
  358. let obj = {
  359. "activitySignupId": this.activity.id,
  360. "dataInfos": [],
  361. "num": this.num,
  362. "userId": JSON.parse(uni.getStorageSync('userInfo')).userId
  363. }
  364. let arr = []
  365. console.log( 11111111,this.modelQuery);
  366. new Promise((resolve,reject)=>{
  367. this.modelQuery.map((item,index)=>{
  368. let personData = {data:[]}//每个人的填写数据
  369. // 循环校验表单
  370. this['a'+index] = new Promise((resolve1,reject1)=>{
  371. console.log( this.$refs['uForm' + index][0]);
  372. if( Object.keys(this.rules).length){//有必填项
  373. this.$refs['uForm' + index][0].validate().then(res => {
  374. // 把每个人的资料全部放在personData的data属性里面 依次排列
  375. let dataItem
  376. for(let key in item){
  377. let i = key.split('_')[1]
  378. console.log(item,i,this.setQuery.data[i]);
  379. dataItem = JSON.parse(JSON.stringify(this.setQuery.data[i]))
  380. // 值是数组直接赋值
  381. if(Array.isArray(item[key])){
  382. if(dataItem.dataType == 5){//取出图片里面的地址
  383. dataItem.content = item[key].map(item1=>{ return item1.url})
  384. }else{
  385. dataItem.content = item[key]
  386. }
  387. }else{
  388. dataItem.content = [item[key]]
  389. }
  390. personData.data.push(dataItem)
  391. }
  392. resolve1(1)
  393. }).catch(errors => {
  394. console.log(errors);
  395. })
  396. }else{
  397. // 把每个人的资料全部放在personData的data属性里面 依次排列
  398. let dataItem
  399. for(let key in item){
  400. let i = key.split('_')[1]
  401. console.log(item,i,this.setQuery.data[i]);
  402. dataItem = JSON.parse(JSON.stringify(this.setQuery.data[i]))
  403. // 值是数组直接赋值
  404. if(Array.isArray(item[key])){
  405. if(dataItem.dataType == 5){//取出图片里面的地址
  406. dataItem.content = [item[key][0].url]
  407. }else{
  408. dataItem.content = item[key]
  409. }
  410. }else{
  411. dataItem.content = [item[key]]
  412. }
  413. personData.data.push(dataItem)
  414. }
  415. resolve1(1)
  416. }
  417. })
  418. obj.dataInfos.push(personData)
  419. // 校验的promise数组 用于获取全部校验成功
  420. arr.push(this['a'+index])
  421. })
  422. // 全部校验成功
  423. Promise.all(arr).then(res=>{
  424. console.log('结果',res);
  425. resolve()
  426. }).catch(e=>{
  427. console.log('报错',e);
  428. })
  429. }).then(()=>{
  430. console.log(this.modelQuery,this.setQuery,obj)
  431. this.signUp(obj).then(id=>{
  432. this.creat(id)
  433. })
  434. })
  435. },
  436. signUp(obj){
  437. return new Promise((resolve,reject)=>{
  438. this.loading = true
  439. signUp(obj).then(res=>{
  440. this.loading = false
  441. if (res.state == 'Success') {
  442. resolve(res.content.serviceId)
  443. // uni.hideLoading()
  444. // uni.showToast({
  445. // title:'报名成功',
  446. // icon:'success'
  447. // })
  448. // uni.reLaunch({
  449. // url: '/my/order/index'
  450. // })
  451. }
  452. })
  453. })
  454. },
  455. //创建订单
  456. creat(serviceId) {
  457. if (this.loading) return
  458. this.loading = true
  459. uni.showLoading({
  460. title: '支付中'
  461. })
  462. let that = this
  463. if (!this.payData.timeStamp) {
  464. createOrder({
  465. activityId: this.activity.id,
  466. serviceId,
  467. channel:'ZhongShu',
  468. num:this.num,
  469. userId: JSON.parse(uni.getStorageSync('userInfo')).userId
  470. }).then(res => {
  471. this.loading = false
  472. if (res.state == 'Success') {
  473. if (!this.activity.price) { //价格为0
  474. uni.hideLoading()
  475. uni.reLaunch({
  476. url: '/my/order/index'
  477. })
  478. } else {
  479. this.query.orderNo = res.content.orderNo
  480. this.query.subOpenId = JSON.parse(uni.getStorageSync('userInfo')).openId
  481. this.query.orderDesc = this.activity.activityName
  482. creatPayOrder(this.query).then(data => {
  483. that.payData = JSON.parse(data.content.miniPayRequest)
  484. if (data.content.miniPayRequest == null) return uni.hideLoading()
  485. uni.requestPayment({
  486. "provider": "wxpay",
  487. "orderInfo": that.payData,
  488. "appid": that.payData
  489. .appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
  490. "paySign": that.payData.paySign,
  491. "nonceStr": that.payData.nonceStr, // 随机字符串
  492. "package": that.payData.package, // 固定值
  493. // "prepayid": that.payData.package, // 统一下单订单号
  494. "timeStamp": that.payData.timeStamp, // 时间戳(单位:秒)
  495. "signType": that.payData.signType, //签名算法
  496. success(msg) {
  497. console.log('msg', msg, res);
  498. queryPayOrder(that.query.orderNo).then(res1 => {
  499. if (res1.state == 'Success') {
  500. uni.hideLoading()
  501. uni.reLaunch({
  502. url: '/my/order/index'
  503. })
  504. }
  505. })
  506. },
  507. fail(e) {
  508. console.log('err', e);
  509. that.loading = false
  510. uni.hideLoading()
  511. uni.showToast({
  512. title: '取消支付',
  513. icon: 'fail'
  514. })
  515. // 取消支付后,获取支付信息以备再次支付
  516. uni.reLaunch({
  517. url:'/my/order/signUp/signUpDetail?id='+that.query.orderNo
  518. })
  519. // payDetails(that.query.orderNo).then(r => {
  520. // if (r.state == 'Success') {
  521. // that.payData = JSON.parse(r.content.miniPayRequest)
  522. // }
  523. // })
  524. }
  525. })
  526. })
  527. }
  528. }
  529. })
  530. } else { // 取消支付后再次支付
  531. uni.requestPayment({
  532. "provider": "wxpay",
  533. "orderInfo": that.payData,
  534. "appid": that.payData.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
  535. "paySign": that.payData.paySign,
  536. "nonceStr": that.payData.nonceStr, // 随机字符串
  537. "package": that.payData.package, // 固定值
  538. // "prepayid": that.payData.package, // 统一下单订单号
  539. "timeStamp": that.payData.timeStamp, // 时间戳(单位:秒)
  540. "signType": that.payData.signType, //签名算法
  541. success(msg) {
  542. console.log('msg', msg);
  543. queryPayOrder(that.query.orderNo).then(res1 => {
  544. if (res1.state == 'Success') {
  545. uni.hideLoading()
  546. uni.reLaunch({
  547. url: '/my/order/index'
  548. })
  549. }
  550. })
  551. },
  552. fail(e) {
  553. that.loading = false
  554. uni.hideLoading()
  555. uni.showToast({
  556. title: '取消支付',
  557. icon: 'fail'
  558. })
  559. // 取消支付后,获取支付信息以备再次支付
  560. payDetails(that.query.orderNo).then(r => {
  561. if (r.state == 'Success') {
  562. that.payData = JSON.parse(r.content.miniPayRequest)
  563. }
  564. })
  565. console.log('err', e);
  566. }
  567. })
  568. }
  569. }
  570. },
  571. onLoad(options) {
  572. let userInfo = JSON.parse(uni.getStorageSync('userInfo'))
  573. this.query.userId = userInfo.userId
  574. this.activity = JSON.parse(uni.getStorageSync('activity'))
  575. this.getTemplateDetail(this.activity.id)
  576. }
  577. }
  578. </script>
  579. <style lang="scss" >
  580. .makeOut{
  581. background: #F9F9F9;
  582. min-height: 100vh;
  583. padding-top: 20rpx;
  584. padding-bottom: 150rpx;
  585. .content{
  586. margin: 0 24rpx 20rpx;
  587. padding: 28rpx 24rpx;
  588. background: #fff;
  589. box-sizing: border-box;
  590. border-radius: 16rpx;
  591. }
  592. .signUp-info{
  593. .title{
  594. font-weight: 600;
  595. font-size: 32rpx;
  596. color: #181818;
  597. overflow: hidden;
  598. text-overflow: ellipsis;
  599. /* 弹性伸缩盒子模型显示 */
  600. display: -webkit-box;
  601. /* 限制在一个块元素显示的文本的行数 */
  602. -webkit-line-clamp: 2;
  603. /* 设置或检索伸缩盒对象的子元素的排列方式 */
  604. -webkit-box-orient: vertical;
  605. }
  606. .time{
  607. font-weight: 300;
  608. font-size: 24rpx;
  609. color: #AAAAAA;
  610. padding: 20rpx 0;
  611. border-bottom: 1rpx solid #F0F0F0;
  612. }
  613. .signUp-box{
  614. display: flex;
  615. justify-content: space-between;
  616. align-items: center;
  617. padding-top: 20rpx;
  618. .label-box{
  619. display: flex;
  620. align-items: center;
  621. .label{
  622. font-weight: 300;
  623. font-size: 24rpx;
  624. color: #181818;
  625. }
  626. .desc{
  627. font-weight: 300;
  628. font-size: 24rpx;
  629. color: #AAAAAA;
  630. }
  631. }
  632. .num-box{
  633. display: flex;
  634. align-items: center;
  635. .btn.disabled{
  636. background: #F0F0F0;
  637. color: #AAAAAA;
  638. }
  639. .btn{
  640. width: 36rpx;
  641. height: 36rpx;
  642. line-height: 36rpx;
  643. border-radius: 50%;
  644. background: #FFEDEB;
  645. color: $uni-color-primary;
  646. font-size: 30rpx;
  647. text-align: center;
  648. vertical-align: top;
  649. }
  650. .num{
  651. font-weight: 400;
  652. font-size: 24rpx;
  653. color: #222222;
  654. width: 50rpx;
  655. text-align: center;
  656. }
  657. }
  658. }
  659. }
  660. .btn-box {
  661. position: fixed;
  662. bottom: 0%;
  663. left: 0%;
  664. z-index: 2;
  665. width: 100%;
  666. display: flex;
  667. align-items: center;
  668. justify-content: space-between;
  669. box-sizing: border-box;
  670. padding: 10rpx 24rpx env(safe-area-inset-bottom);
  671. background: #fff;
  672. border-top: 1rpx solid #EEEEEE;
  673. .left{
  674. display: flex;
  675. align-items: flex-end;
  676. .num{
  677. font-weight: 300;
  678. font-size: 24rpx;
  679. color: #AAAAAA;
  680. }
  681. .total{
  682. font-weight: 300;
  683. font-size: 24rpx;
  684. color: #222222;
  685. display: flex;
  686. align-items: flex-end;
  687. margin-left: 6rpx;
  688. .price-box{
  689. display: flex;
  690. align-items: flex-end;
  691. font-weight: 400;
  692. font-size: 32rpx;
  693. color: #222222;
  694. .unit{
  695. font-size: 20rpx;
  696. }
  697. }
  698. }
  699. }
  700. .btn {
  701. width: 280rpx;
  702. height: 80rpx;
  703. line-height: 80rpx;
  704. text-align: center;
  705. background: $uni-color-primary;
  706. border-radius: 40rpx;
  707. font-weight: 600;
  708. font-size: 28rpx;
  709. color: #FFFFFF;
  710. margin: 0;
  711. }
  712. }
  713. .u-form-item{
  714. display: flex;
  715. justify-content: flex-start;
  716. .u-form-item__body__left{
  717. align-self: flex-start !important;
  718. }
  719. .u-radio-group{
  720. flex-wrap: wrap;
  721. }
  722. .u-radio,.u-checkbox{
  723. margin-right: 20rpx;
  724. margin-bottom: 20rpx;
  725. }
  726. .u-radio__icon-wrap--circle,.u-checkbox__icon-wrap--square{
  727. width: 28rpx!important;
  728. height: 28rpx!important;
  729. }
  730. .u-checkbox-group{
  731. flex-wrap: wrap;
  732. .u-radio,.u-checkbox-label--left{
  733. margin-bottom: 20rpx;
  734. }
  735. }
  736. }
  737. }
  738. </style>