index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835
  1. <template>
  2. <mobile-frame :frameStyle="frameStyle" @toPath="toPath">
  3. <view class="main">
  4. <view class="top" v-if="list.length !=0">
  5. <view class="text_1">
  6. <checkbox class="checkbox" @click="selectAll(false)" :checked="isAll">全选</checkbox>
  7. </view>
  8. <view class="text_2" v-if="num==0" @click="edit(1)">编辑</view>
  9. <view class="text_2" v-if="num==1" @click="edit(0)">完成</view>
  10. </view>
  11. <view class="one" v-if="!user._id">
  12. <view class="logo"><text class="iconfont icon-geren2"></text></view>
  13. <view class="one_1">您还没有登录</view>
  14. <view class="btn">
  15. <button type="primary" size="mini" @click="toCommon('/pages/login/index')">去登录</button>
  16. </view>
  17. </view>
  18. <view class="one" v-if="list.length==0&&user._id">
  19. <view class="logo"><text class="iconfont icon-gouwuche"></text></view>
  20. <view class="one_1">购物车空空如也~</view>
  21. <view class="btn">
  22. <button type="primary" size="mini" @click="toCommon('/pages/home/index')">去逛逛</button>
  23. </view>
  24. </view>
  25. <view class="two" v-if="list.length !=0">
  26. <scroll-view scroll-y="true" class="scroll-view">
  27. <view class="list-scroll-view">
  28. <checkbox-group name="checkbox" @change="marketChange">
  29. <view class="list" v-for="(item, index) in list" :key="index">
  30. <view class="list_1" v-if="item.is_set=='0'">
  31. <view class="title">
  32. <checkbox :value="item._id" :checked="item.check">
  33. 优惠套装---{{item.name||'暂无名称'}}</checkbox>
  34. </view>
  35. <view class="content" v-for="(gs,indexx) in item.goods" :key="indexx">
  36. <view class="img">
  37. <image :src="getFile(gs)"></image>
  38. </view>
  39. <view class="one_1" @click="toCommon('/pagesHome/order/detail',gs)">
  40. <view class="name"><text class="set">套装</text> {{gs.goods_name}}
  41. </view>
  42. <view class="info">
  43. <view class="title_1" v-if="gs.spec_name">
  44. <text>规格:{{gs.spec_name}}</text>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="money">
  49. <view>{{gs.set_num}}件/套x{{gs.set_num}}</view>
  50. </view>
  51. </view>
  52. <view class="total">
  53. <view class="total_1"> <text>套装价</text>¥{{item.sell_money||0}} </view>
  54. <view class="total_2">
  55. <view class="num">
  56. <uni-number-box @change="changeValue(item)" name="num" value="item"
  57. :min="1" v-model="item.num" />
  58. </view>
  59. <view class="del">
  60. <text class="iconfont icon-del-copy" @click="toDel(item)"></text>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. <view class="list_2" v-else>
  66. <view class="title">
  67. <checkbox :value="item.shop" :checked="item.check">
  68. <text class="iconfont icon-shangdian"></text>
  69. {{item.shop_name}}
  70. </checkbox>
  71. </view>
  72. <checkbox-group name="checkbox" @change="goodsChange">
  73. <view class="content" v-for="gs in item.goods" :key="gs.goodsSpec_id">
  74. <view class="box">
  75. <checkbox :value="gs.goodsSpec_id" :checked="gs.check" />
  76. </view>
  77. <view class="img">
  78. <image :src="getFile(gs)"></image>
  79. </view>
  80. <view class="one_1" v-if="num==0"
  81. @click="toCommon('/pagesHome/order/detail',gs)">
  82. <view class="name">{{gs.goods_name}}</view>
  83. <view class="info">
  84. <view class="title_1" v-if="gs.goodsSpec_name">
  85. <text>规格:{{gs.goodsSpec_name}}</text>
  86. </view>
  87. </view>
  88. <view class="info">
  89. <text v-if="gs.gift&&gs.gift.length>0" class="gift">赠品</text>
  90. <text v-if="gs.sp_price" class="act">特价</text>
  91. </view>
  92. </view>
  93. <view class="money" v-if="num==0">
  94. <view>¥{{gs.price}}</view>
  95. <view>x{{gs.num}}</view>
  96. </view>
  97. <view class="num" v-if="num==1">
  98. <uni-number-box @change="changeValue(gs)" name="num" value="gs" :min="1"
  99. v-model="gs.num" />
  100. </view>
  101. <view class="del" v-if="num==1">
  102. <text class="iconfont icon-del-copy" @click="toDel(gs)"></text>
  103. </view>
  104. </view>
  105. </checkbox-group>
  106. </view>
  107. </view>
  108. </checkbox-group>
  109. </view>
  110. </scroll-view>
  111. </view>
  112. <view class="foot" v-if="list.length !=0">
  113. <view class="total">总价:<text>¥{{totalMoney}}(不含运费)</text></view>
  114. <view class="btn" v-if="hasCheck()">
  115. <button type="primary" size="mini" @click="toSettle()" v-if="num==0">提交订单</button>
  116. <button type="primary" size="mini" @click="toDel()" v-if="num==1">删除</button>
  117. </view>
  118. </view>
  119. </view>
  120. </mobile-frame>
  121. </template>
  122. <script>
  123. export default {
  124. data() {
  125. return {
  126. frameStyle: {
  127. useBar: true
  128. },
  129. // 用户
  130. user: {},
  131. // 购物车列表
  132. list: [],
  133. // 全选
  134. isAll: false,
  135. // 编辑/完成按钮传的数字
  136. num: 0,
  137. // 总额
  138. totalMoney: 0,
  139. };
  140. },
  141. onShow() {
  142. const that = this;
  143. // 监听登录
  144. that.watchLogin();
  145. },
  146. methods: {
  147. // 监听登录
  148. watchLogin() {
  149. const that = this;
  150. uni.getStorage({
  151. key: 'token',
  152. success: (res) => {
  153. let user = that.$jwt(res.data);
  154. if (user) {
  155. that.$set(that, `user`, user)
  156. that.searchMarket();
  157. }
  158. },
  159. fail: (err) => {}
  160. })
  161. },
  162. // 查询购物车信息
  163. async searchMarket() {
  164. const that = this;
  165. const res = await that.$api(`/cart/selfCart`, 'GET', {
  166. customer: that.user.id
  167. });
  168. if (res.errcode == '0') {
  169. that.$set(that, `list`, res.data)
  170. that.$set(that, `isAll`, false)
  171. that.$set(that, `totalMoney`, 0)
  172. }
  173. },
  174. // 编辑
  175. edit(num) {
  176. const that = this;
  177. that.$set(that, `num`, num)
  178. },
  179. //全选
  180. selectAll(e) {
  181. const that = this;
  182. const list = that.list;
  183. const isAll = that.isAll;
  184. let data = [];
  185. for (const val of list) {
  186. let a = isAll ? false : true;
  187. val.check = a;
  188. for (let s of val.goods) {
  189. s.check = a
  190. }
  191. data.push(val);
  192. }
  193. that.$set(that, `list`, data)
  194. // 计算总额
  195. that.countMoney();
  196. // 赋值是否全选
  197. that.$set(that, `isAll`, isAll ? false : true)
  198. },
  199. // 选择店铺
  200. marketChange(e) {
  201. const that = this;
  202. const list = this.list;
  203. const {
  204. value
  205. } = e.detail;
  206. for (const p1 of list) {
  207. let p2;
  208. // 判断是套装还是正常商品
  209. if (p1.is_set == '0') p2 = value.find((i) => i == p1._id);
  210. else p2 = value.find((i) => i == p1.shop);
  211. let a = p2 ? true : false;
  212. p1.check = a;
  213. for (let s of p1.goods) {
  214. s.check = a
  215. }
  216. }
  217. that.$set(that, `list`, list);
  218. that.marketAllChange();
  219. // 计算总额
  220. that.countMoney();
  221. },
  222. //店铺全部选择true,全选自动选择,
  223. marketAllChange() {
  224. const that = this;
  225. let list = that.list;
  226. for (let val of list) {
  227. if (val.check == true) {
  228. that.$set(that, `isAll`, true)
  229. } else {
  230. that.$set(that, `isAll`, false)
  231. }
  232. }
  233. that.$set(that, `list`, list)
  234. // 计算总额
  235. that.countMoney();
  236. },
  237. //选择商品
  238. goodsChange(e) {
  239. const that = this;
  240. let list = that.list;
  241. const {
  242. value
  243. } = e.detail;
  244. let shop = list.find(f => f.goods.find(i => value.find(s => s == i.goodsSpec_id)))
  245. if (shop) {
  246. for (let val of shop.goods) {
  247. let p2 = value.find((i) => i == val.goodsSpec_id);
  248. if (p2) val.check = true;
  249. else val.check = false;
  250. }
  251. } else {
  252. list = list.map(i => {
  253. i.goods = i.goods.map(g => ({
  254. ...g,
  255. check: false
  256. }))
  257. return i;
  258. })
  259. }
  260. that.$set(that, `list`, list)
  261. that.goodsAllChange();
  262. // 计算总额
  263. that.countMoney();
  264. },
  265. //商品全部选择true,店铺自动选择,
  266. // 所有店铺为true,则全选为true
  267. goodsAllChange() {
  268. const that = this;
  269. let list = that.list;
  270. list = list.map(i => {
  271. const isAllSelect = i.goods.every(f => f.check);
  272. if (isAllSelect) i.check = true;
  273. else i.check = false;
  274. return i;
  275. })
  276. const allSelect = list.every(e => e.check)
  277. if (allSelect) this.$set(this, `isAll`, true)
  278. else this.$set(this, `isAll`, false)
  279. // 计算总额
  280. that.countMoney();
  281. },
  282. // 加减商品数量
  283. async changeValue(value) {
  284. const that = this;
  285. this.$nextTick(async () => {
  286. let res;
  287. // 判断是套装还是正常商品
  288. if (value.is_set == '0') {
  289. const {
  290. _id: set_id,
  291. num,
  292. cart_id: cartId
  293. } = value
  294. res = await that.$api(`/cart/checkGoodsNum`, 'GET', {
  295. cartId,
  296. set_id,
  297. num
  298. });
  299. } else {
  300. const {
  301. goodsSpec_id: goodsSpecId,
  302. num,
  303. cart_id: cartId
  304. } = value
  305. res = await that.$api(`/cart/checkGoodsNum`, 'GET', {
  306. cartId,
  307. goodsSpecId,
  308. num
  309. });
  310. }
  311. if (res.errcode === 0) {
  312. const {
  313. enough,
  314. total
  315. } = res.data
  316. if (!enough) {
  317. uni.showToast({
  318. title: `库存最大为${total}`,
  319. icon: 'error',
  320. });
  321. // 将该商品的库存量修改为最大值
  322. value.num = total;
  323. }
  324. }
  325. // 计算总额
  326. that.countMoney();
  327. })
  328. },
  329. // 删除, 接口,购物车删除,然后将该数据移除
  330. async toDel(e) {
  331. let list = this.list;
  332. let set_list = [];
  333. let goods_list = [];
  334. uni.showModal({
  335. title: '提示',
  336. content: '请选择要删除的商品',
  337. success: async (res) => {
  338. if (!res.confirm) return
  339. if (e?.cart_id) {
  340. const result = await this.$api(`/cart/${e.cart_id}`, 'DELETE');
  341. if (result.errcode === 0) {
  342. // 判断是套装还是正常商品
  343. set_list = list.filter(i => i.is_set == '0')
  344. goods_list = list.filter(i => i.is_set !== '0')
  345. set_list = set_list.filter(i => i.cart_id !== e.cart_id)
  346. goods_list = goods_list.map(i => ({
  347. ...i,
  348. goods: i.goods.filter(f => f.cart_id !== e.cart_id)
  349. }))
  350. this.$set(this, `list`, [...set_list, ...goods_list]);
  351. // 检查店铺内是否还有商品
  352. this.checkShopGoodsExist();
  353. // 计算总额
  354. this.countMoney();
  355. }
  356. } else {
  357. let goodsList = [];
  358. let cartIds = [];
  359. for (let val of this.list) {
  360. // 判断是套装还是正常商品
  361. if (val.is_set == '0') goodsList.push(val)
  362. else goodsList.push(val.goods)
  363. }
  364. for (let val of goodsList) {
  365. // 判断是套装还是正常商品
  366. if (val.is_set == '0') {
  367. if (val.check) cartIds.push(val.cart_id)
  368. } else {
  369. for (let set of val) {
  370. if (set.check) cartIds.push(set.cart_id)
  371. }
  372. }
  373. }
  374. set_list = list.filter(i => i.is_set == '0')
  375. goods_list = list.filter(i => i.is_set !== '0')
  376. for (let val of cartIds) {
  377. const result = await this.$api(`/cart/${val}`, 'DELETE');
  378. if (result.errcode === 0) {
  379. // 判断是套装还是正常商品
  380. set_list = set_list.filter(i => i.cart_id !== val)
  381. goods_list = goods_list.map(i => ({
  382. ...i,
  383. goods: i.goods.filter(f => f.cart_id !== val)
  384. }))
  385. this.$set(this, `list`, [...set_list, ...goods_list]);
  386. // 检查店铺内是否还有商品
  387. this.checkShopGoodsExist();
  388. // 计算总额
  389. this.countMoney();
  390. }
  391. }
  392. }
  393. }
  394. });
  395. },
  396. //检查店铺内是否还有商品
  397. checkShopGoodsExist() {
  398. let list = this.list;
  399. list = list.filter(f => f.goods && f.goods.length > 0)
  400. this.$set(this, `list`, list);
  401. },
  402. // 计算总额
  403. countMoney() {
  404. const that = this;
  405. const list = that.list;
  406. let totalMoney = 0;
  407. // 渲染结束执行下面方法
  408. that.$nextTick(() => {
  409. for (const val of list) {
  410. // 判断是套装还是正常商品
  411. if (val.is_set == '0') {
  412. if (val.check == true) {
  413. let total = that.$multiply(val.sell_money, val.num);
  414. totalMoney += Number(total);
  415. }
  416. } else {
  417. for (let s of val.goods) {
  418. if (s.check == true) {
  419. let total = that.$multiply(s.price, s.num);
  420. totalMoney += Number(total);
  421. }
  422. }
  423. }
  424. }
  425. that.$set(that, `totalMoney`, totalMoney.toFixed(2))
  426. })
  427. },
  428. getFile(data) {
  429. const file = data.file;
  430. if (!file) return '';
  431. if (file.length && file.length > 0) return file[0].url
  432. },
  433. // 去结算
  434. async toSettle() {
  435. // 将选中的购物车放到数组中,传回服务端进行检查.然后拿着key去订单页请求数据
  436. let goodsList = [];
  437. let cartIds = [];
  438. for (let val of this.list) {
  439. // 判断是套装还是正常商品
  440. if (val.is_set == '0') goodsList.push(val)
  441. else goodsList.push(val.goods)
  442. }
  443. for (let val of goodsList) {
  444. // 判断是套装还是正常商品
  445. if (val.is_set == '0') {
  446. if (val.check) cartIds.push(val.cart_id)
  447. } else {
  448. for (let set of val) {
  449. if (set.check) cartIds.push(set.cart_id)
  450. }
  451. }
  452. }
  453. const res = await this.$api(`/util/checkCartBuy`, 'POST', {
  454. cartIds
  455. });
  456. if (res.errcode == '0') {
  457. const {
  458. data
  459. } = res
  460. if (data.result) {
  461. const key = data.key;
  462. uni.navigateTo({
  463. url: `/pagesHome/order/order?key=${key}`
  464. })
  465. }
  466. }
  467. },
  468. // 是否选中商品,控制提交订单按钮
  469. hasCheck() {
  470. return this.list.some(e => e.goods.some(eg => eg.check))
  471. },
  472. // 公共跳转
  473. toCommon(route, e) {
  474. uni.navigateTo({
  475. url: `${route}?id=${e && e.goods_id}`
  476. })
  477. },
  478. toPath(e) {
  479. let url = `/${e.route}`;
  480. if (e.type == '0') uni.redirectTo({
  481. url
  482. })
  483. else {
  484. uni.navigateTo({
  485. url
  486. })
  487. }
  488. }
  489. }
  490. }
  491. </script>
  492. <style lang="scss">
  493. .main {
  494. display: flex;
  495. flex-direction: column;
  496. width: 100vw;
  497. height: 92vh;
  498. background-color: var(--footColor);
  499. .top {
  500. display: flex;
  501. flex-direction: row;
  502. background-color: var(--mainColor);
  503. height: 35px;
  504. margin: 0 0 4px 0;
  505. padding: 5px 4vw;
  506. .text_1 {
  507. flex-grow: 1;
  508. line-height: 30px;
  509. }
  510. .text_2 {
  511. line-height: 35px;
  512. }
  513. }
  514. .one {
  515. text-align: center;
  516. margin: 2vw 0;
  517. .logo {
  518. margin: 10vw 0 2vw 0;
  519. .iconfont {
  520. font-size: 35vw;
  521. }
  522. }
  523. .one_1 {
  524. margin: 3vw 0;
  525. }
  526. button {
  527. background-color: var(--fFB1Color);
  528. }
  529. }
  530. .two {
  531. position: relative;
  532. flex-grow: 1;
  533. margin: 0 2vw;
  534. .list_1 {
  535. background-color: var(--mainColor);
  536. margin: 2vw 0 2vw 0;
  537. padding: 2vw 3vw;
  538. border-radius: 4px;
  539. .title {
  540. border-bottom: 1px solid var(--fcColor);
  541. padding: 0 0 2vw 0;
  542. font-size: var(--font18Size);
  543. text {
  544. margin: 0 1vw;
  545. }
  546. }
  547. .content {
  548. display: flex;
  549. flex-direction: row;
  550. padding: 2vw 0;
  551. font-size: var(--font16Size);
  552. border-bottom: 1px dashed var(--fcColor);
  553. .img {
  554. width: 20vw;
  555. height: 20vw;
  556. border-radius: 2vw;
  557. border: 1px solid var(--fcColor);
  558. image {
  559. width: 20vw;
  560. height: 20vw;
  561. }
  562. }
  563. .one_1 {
  564. margin: 0 2.5vw;
  565. flex-grow: 1;
  566. .name {
  567. .set {
  568. margin: 0 1vw 0 0;
  569. font-size: 12px;
  570. border-radius: 5px;
  571. padding: 0 1vw;
  572. color: #ffffff;
  573. background-color: #FF6347;
  574. border: 1px solid #FFA500;
  575. }
  576. }
  577. .info {
  578. width: 100%;
  579. display: flex;
  580. flex-direction: row;
  581. .title_1 {
  582. font-size: 12px;
  583. color: #666;
  584. margin-top: 10px;
  585. text {
  586. background-color: #eee;
  587. padding: 5px;
  588. }
  589. }
  590. .gift {
  591. margin: 2vw 1vw 0 0;
  592. font-size: 12px;
  593. color: #FFA500;
  594. border: 1px solid #FFA500;
  595. border-radius: 5px;
  596. padding: 0 1vw;
  597. }
  598. .act {
  599. margin: 2vw 0 0 0;
  600. font-size: 12px;
  601. border-radius: 5px;
  602. padding: 0 1vw;
  603. border: 1px solid var(--fFB1Color);
  604. color: var(--fFB1Color);
  605. }
  606. }
  607. }
  608. .money {
  609. font-size: 14px;
  610. margin-top: 2vw;
  611. text-align: right;
  612. flex-grow: 1;
  613. }
  614. }
  615. .total {
  616. display: flex;
  617. justify-content: space-between;
  618. padding: 1vw;
  619. .total_1 {
  620. font-size: 20px;
  621. color: var(--fFB1Color);
  622. text {
  623. font-size: 12px;
  624. }
  625. }
  626. .total_2 {
  627. display: flex;
  628. justify-content: space-between;
  629. align-items: center;
  630. .del {
  631. margin: 0 0 0 3vw;
  632. }
  633. }
  634. }
  635. }
  636. .list_2 {
  637. background-color: var(--mainColor);
  638. margin: 2vw 0 2vw 0;
  639. padding: 2vw 3vw;
  640. border-radius: 4px;
  641. .title {
  642. border-bottom: 1px solid var(--fcColor);
  643. padding: 0 0 2vw 0;
  644. font-size: var(--font18Size);
  645. text {
  646. margin: 0 1vw;
  647. }
  648. }
  649. .content {
  650. display: flex;
  651. flex-direction: row;
  652. padding: 2vw 0;
  653. font-size: var(--font16Size);
  654. border-bottom: 1px dashed var(--fcColor);
  655. .box {
  656. line-height: 20vw;
  657. }
  658. .img {
  659. width: 20vw;
  660. height: 20vw;
  661. border-radius: 2vw;
  662. border: 1px solid var(--fcColor);
  663. image {
  664. width: 20vw;
  665. height: 20vw;
  666. }
  667. }
  668. .one_1 {
  669. margin: 0 2.5vw;
  670. flex-grow: 1;
  671. .info {
  672. width: 100%;
  673. display: flex;
  674. flex-direction: row;
  675. .title_1 {
  676. font-size: 12px;
  677. color: #666;
  678. margin-top: 10px;
  679. text {
  680. background-color: #eee;
  681. padding: 5px;
  682. }
  683. }
  684. .gift {
  685. margin: 2vw 1vw 0 0;
  686. font-size: 12px;
  687. color: #FFA500;
  688. border: 1px solid #FFA500;
  689. border-radius: 5px;
  690. padding: 0 1vw;
  691. }
  692. .act {
  693. margin: 2vw 0 0 0;
  694. font-size: 12px;
  695. border-radius: 5px;
  696. padding: 0 1vw;
  697. border: 1px solid var(--fFB1Color);
  698. color: var(--fFB1Color);
  699. }
  700. }
  701. }
  702. .money {
  703. margin-top: 2vw;
  704. text-align: right;
  705. flex-grow: 1;
  706. }
  707. .num {
  708. margin: 6vw 4vw;
  709. font-size: 20px;
  710. }
  711. .del {
  712. margin: 6vw 0;
  713. text-align: right;
  714. flex-grow: 1;
  715. }
  716. }
  717. }
  718. }
  719. .foot {
  720. background-color: var(--fffColor);
  721. display: flex;
  722. flex-direction: row;
  723. justify-content: space-between;
  724. height: 44px;
  725. padding: 0 0 0 6vw;
  726. border-right: 1px solid var(--f99Color);
  727. .total {
  728. flex-grow: 1;
  729. display: flex;
  730. align-content: flex-end;
  731. line-height: 40px;
  732. text {
  733. color: var(--fFB1Color);
  734. }
  735. }
  736. .btn {
  737. button {
  738. width: 30vw;
  739. height: 44px;
  740. line-height: 44px;
  741. border-radius: 0px;
  742. background-color: var(--fFB1Color);
  743. text-align: center;
  744. font-weight: normal;
  745. font-size: var(--font15Size);
  746. color: var(--fffColor);
  747. }
  748. }
  749. }
  750. }
  751. .scroll-view {
  752. position: absolute;
  753. top: 0;
  754. left: 0;
  755. right: 0;
  756. bottom: 0;
  757. .list-scroll-view {
  758. display: flex;
  759. flex-direction: column;
  760. }
  761. }
  762. // 复选框样式
  763. checkbox .wx-checkbox-input {
  764. width: 40rpx;
  765. height: 40rpx;
  766. border-radius: 50%;
  767. border-color: var(--f99Color);
  768. background-color: var(--mainColor);
  769. }
  770. // 复选框选中样式
  771. checkbox .wx-checkbox-input.wx-checkbox-input-checked {
  772. border-color: var(--fFB1Color);
  773. background-color: var(--fFB1Color);
  774. }
  775. // 复选框选中之后对号的样式
  776. checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
  777. color: var(--fffColor);
  778. }
  779. </style>