makeOut.vue 19 KB

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