index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833
  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. onLoad: function() {
  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. }
  171. },
  172. // 编辑
  173. edit(num) {
  174. const that = this;
  175. that.$set(that, `num`, num)
  176. },
  177. //全选
  178. selectAll(e) {
  179. const that = this;
  180. const list = that.list;
  181. const isAll = that.isAll;
  182. let data = [];
  183. for (const val of list) {
  184. let a = isAll ? false : true;
  185. val.check = a;
  186. for (let s of val.goods) {
  187. s.check = a
  188. }
  189. data.push(val);
  190. }
  191. that.$set(that, `list`, data)
  192. // 计算总额
  193. that.countMoney();
  194. // 赋值是否全选
  195. that.$set(that, `isAll`, isAll ? false : true)
  196. },
  197. // 选择店铺
  198. marketChange(e) {
  199. const that = this;
  200. const list = this.list;
  201. const {
  202. value
  203. } = e.detail;
  204. for (const p1 of list) {
  205. let p2;
  206. // 判断是套装还是正常商品
  207. if (p1.is_set == '0') p2 = value.find((i) => i == p1._id);
  208. else p2 = value.find((i) => i == p1.shop);
  209. let a = p2 ? true : false;
  210. p1.check = a;
  211. for (let s of p1.goods) {
  212. s.check = a
  213. }
  214. }
  215. that.$set(that, `list`, list);
  216. that.marketAllChange();
  217. // 计算总额
  218. that.countMoney();
  219. },
  220. //店铺全部选择true,全选自动选择,
  221. marketAllChange() {
  222. const that = this;
  223. let list = that.list;
  224. for (let val of list) {
  225. if (val.check == true) {
  226. that.$set(that, `isAll`, true)
  227. } else {
  228. that.$set(that, `isAll`, false)
  229. }
  230. }
  231. that.$set(that, `list`, list)
  232. // 计算总额
  233. that.countMoney();
  234. },
  235. //选择商品
  236. goodsChange(e) {
  237. const that = this;
  238. let list = that.list;
  239. const {
  240. value
  241. } = e.detail;
  242. let shop = list.find(f => f.goods.find(i => value.find(s => s == i.goodsSpec_id)))
  243. if (shop) {
  244. for (let val of shop.goods) {
  245. let p2 = value.find((i) => i == val.goodsSpec_id);
  246. if (p2) val.check = true;
  247. else val.check = false;
  248. }
  249. } else {
  250. list = list.map(i => {
  251. i.goods = i.goods.map(g => ({
  252. ...g,
  253. check: false
  254. }))
  255. return i;
  256. })
  257. }
  258. that.$set(that, `list`, list)
  259. that.goodsAllChange();
  260. // 计算总额
  261. that.countMoney();
  262. },
  263. //商品全部选择true,店铺自动选择,
  264. // 所有店铺为true,则全选为true
  265. goodsAllChange() {
  266. const that = this;
  267. let list = that.list;
  268. list = list.map(i => {
  269. const isAllSelect = i.goods.every(f => f.check);
  270. if (isAllSelect) i.check = true;
  271. else i.check = false;
  272. return i;
  273. })
  274. const allSelect = list.every(e => e.check)
  275. if (allSelect) this.$set(this, `isAll`, true)
  276. else this.$set(this, `isAll`, false)
  277. // 计算总额
  278. that.countMoney();
  279. },
  280. // 加减商品数量
  281. async changeValue(value) {
  282. const that = this;
  283. this.$nextTick(async () => {
  284. let res;
  285. // 判断是套装还是正常商品
  286. if (value.is_set == '0') {
  287. const {
  288. _id: set_id,
  289. num,
  290. cart_id: cartId
  291. } = value
  292. res = await that.$api(`/cart/checkGoodsNum`, 'GET', {
  293. cartId,
  294. set_id,
  295. num
  296. });
  297. } else {
  298. const {
  299. goodsSpec_id: goodsSpecId,
  300. num,
  301. cart_id: cartId
  302. } = value
  303. res = await that.$api(`/cart/checkGoodsNum`, 'GET', {
  304. cartId,
  305. goodsSpecId,
  306. num
  307. });
  308. }
  309. if (res.errcode === 0) {
  310. const {
  311. enough,
  312. total
  313. } = res.data
  314. if (!enough) {
  315. uni.showToast({
  316. title: `库存最大为${total}`,
  317. icon: 'error',
  318. });
  319. // 将该商品的库存量修改为最大值
  320. value.num = total;
  321. }
  322. }
  323. // 计算总额
  324. that.countMoney();
  325. })
  326. },
  327. // 删除, 接口,购物车删除,然后将该数据移除
  328. async toDel(e) {
  329. let list = this.list;
  330. let set_list = [];
  331. let goods_list = [];
  332. uni.showModal({
  333. title: '提示',
  334. content: '请选择要删除的商品',
  335. success: async (res) => {
  336. if (!res.confirm) return
  337. if (e?.cart_id) {
  338. const result = await this.$api(`/cart/${e.cart_id}`, 'Delete');
  339. if (result.errcode === 0) {
  340. // 判断是套装还是正常商品
  341. set_list = list.filter(i => i.is_set == '0')
  342. goods_list = list.filter(i => i.is_set !== '0')
  343. set_list = set_list.filter(i => i.cart_id !== e.cart_id)
  344. goods_list = goods_list.map(i => ({
  345. ...i,
  346. goods: i.goods.filter(f => f.cart_id !== e.cart_id)
  347. }))
  348. this.$set(this, `list`, [...set_list, ...goods_list]);
  349. // 检查店铺内是否还有商品
  350. this.checkShopGoodsExist();
  351. // 计算总额
  352. this.countMoney();
  353. }
  354. } else {
  355. let goodsList = [];
  356. let cartIds = [];
  357. for (let val of this.list) {
  358. // 判断是套装还是正常商品
  359. if (val.is_set == '0') goodsList.push(val)
  360. else goodsList.push(val.goods)
  361. }
  362. for (let val of goodsList) {
  363. // 判断是套装还是正常商品
  364. if (val.is_set == '0') {
  365. if (val.check) cartIds.push(val.cart_id)
  366. } else {
  367. for (let set of val) {
  368. if (set.check) cartIds.push(set.cart_id)
  369. }
  370. }
  371. }
  372. set_list = list.filter(i => i.is_set == '0')
  373. goods_list = list.filter(i => i.is_set !== '0')
  374. for (let val of cartIds) {
  375. const result = await this.$api(`/cart/${val}`, 'Delete');
  376. if (result.errcode === 0) {
  377. // 判断是套装还是正常商品
  378. set_list = set_list.filter(i => i.cart_id !== val)
  379. goods_list = goods_list.map(i => ({
  380. ...i,
  381. goods: i.goods.filter(f => f.cart_id !== val)
  382. }))
  383. this.$set(this, `list`, [...set_list, ...goods_list]);
  384. // 检查店铺内是否还有商品
  385. this.checkShopGoodsExist();
  386. // 计算总额
  387. this.countMoney();
  388. }
  389. }
  390. }
  391. }
  392. });
  393. },
  394. //检查店铺内是否还有商品
  395. checkShopGoodsExist() {
  396. let list = this.list;
  397. list = list.filter(f => f.goods && f.goods.length > 0)
  398. this.$set(this, `list`, list);
  399. },
  400. // 计算总额
  401. countMoney() {
  402. const that = this;
  403. const list = that.list;
  404. let totalMoney = 0;
  405. // 渲染结束执行下面方法
  406. that.$nextTick(() => {
  407. for (const val of list) {
  408. // 判断是套装还是正常商品
  409. if (val.is_set == '0') {
  410. if (val.check == true) {
  411. let total = that.$multiply(val.sell_money, val.num);
  412. totalMoney += Number(total);
  413. }
  414. } else {
  415. for (let s of val.goods) {
  416. if (s.check == true) {
  417. let total = that.$multiply(s.price, s.num);
  418. totalMoney += Number(total);
  419. }
  420. }
  421. }
  422. }
  423. that.$set(that, `totalMoney`, totalMoney.toFixed(2))
  424. })
  425. },
  426. getFile(data) {
  427. const file = data.file;
  428. if (!file) return '';
  429. if (file.length && file.length > 0) return file[0].url
  430. },
  431. // 去结算
  432. async toSettle() {
  433. // 将选中的购物车放到数组中,传回服务端进行检查.然后拿着key去订单页请求数据
  434. let goodsList = [];
  435. let cartIds = [];
  436. for (let val of this.list) {
  437. // 判断是套装还是正常商品
  438. if (val.is_set == '0') goodsList.push(val)
  439. else goodsList.push(val.goods)
  440. }
  441. for (let val of goodsList) {
  442. // 判断是套装还是正常商品
  443. if (val.is_set == '0') {
  444. if (val.check) cartIds.push(val.cart_id)
  445. } else {
  446. for (let set of val) {
  447. if (set.check) cartIds.push(set.cart_id)
  448. }
  449. }
  450. }
  451. const res = await this.$api(`/util/checkCartBuy`, 'POST', {
  452. cartIds
  453. });
  454. if (res.errcode == '0') {
  455. const {
  456. data
  457. } = res
  458. if (data.result) {
  459. const key = data.key;
  460. uni.navigateTo({
  461. url: `/pagesHome/order/order?key=${key}`
  462. })
  463. }
  464. }
  465. },
  466. // 是否选中商品,控制提交订单按钮
  467. hasCheck() {
  468. return this.list.some(e => e.goods.some(eg => eg.check))
  469. },
  470. // 公共跳转
  471. toCommon(route, e) {
  472. uni.navigateTo({
  473. url: `${route}?id=${e && e.goods_id}`
  474. })
  475. },
  476. toPath(e) {
  477. let url = `/${e.route}`;
  478. if (e.type == '0') uni.redirectTo({
  479. url
  480. })
  481. else {
  482. uni.navigateTo({
  483. url
  484. })
  485. }
  486. }
  487. }
  488. }
  489. </script>
  490. <style lang="scss">
  491. .main {
  492. display: flex;
  493. flex-direction: column;
  494. width: 100vw;
  495. height: 92vh;
  496. background-color: var(--footColor);
  497. .top {
  498. display: flex;
  499. flex-direction: row;
  500. background-color: var(--mainColor);
  501. height: 35px;
  502. margin: 0 0 4px 0;
  503. padding: 5px 4vw;
  504. .text_1 {
  505. flex-grow: 1;
  506. line-height: 30px;
  507. }
  508. .text_2 {
  509. line-height: 35px;
  510. }
  511. }
  512. .one {
  513. text-align: center;
  514. margin: 2vw 0;
  515. .logo {
  516. margin: 10vw 0 2vw 0;
  517. .iconfont {
  518. font-size: 35vw;
  519. }
  520. }
  521. .one_1 {
  522. margin: 3vw 0;
  523. }
  524. button {
  525. background-color: var(--fFB1Color);
  526. }
  527. }
  528. .two {
  529. position: relative;
  530. flex-grow: 1;
  531. margin: 0 2vw;
  532. .list_1 {
  533. background-color: var(--mainColor);
  534. margin: 2vw 0 2vw 0;
  535. padding: 2vw 3vw;
  536. border-radius: 4px;
  537. .title {
  538. border-bottom: 1px solid var(--fcColor);
  539. padding: 0 0 2vw 0;
  540. font-size: var(--font18Size);
  541. text {
  542. margin: 0 1vw;
  543. }
  544. }
  545. .content {
  546. display: flex;
  547. flex-direction: row;
  548. padding: 2vw 0;
  549. font-size: var(--font16Size);
  550. border-bottom: 1px dashed var(--fcColor);
  551. .img {
  552. width: 20vw;
  553. height: 20vw;
  554. border-radius: 2vw;
  555. border: 1px solid var(--fcColor);
  556. image {
  557. width: 20vw;
  558. height: 20vw;
  559. }
  560. }
  561. .one_1 {
  562. margin: 0 2.5vw;
  563. flex-grow: 1;
  564. .name {
  565. .set {
  566. margin: 0 1vw 0 0;
  567. font-size: 12px;
  568. border-radius: 5px;
  569. padding: 0 1vw;
  570. color: #ffffff;
  571. background-color: #FF6347;
  572. border: 1px solid #FFA500;
  573. }
  574. }
  575. .info {
  576. width: 100%;
  577. display: flex;
  578. flex-direction: row;
  579. .title_1 {
  580. font-size: 12px;
  581. color: #666;
  582. margin-top: 10px;
  583. text {
  584. background-color: #eee;
  585. padding: 5px;
  586. }
  587. }
  588. .gift {
  589. margin: 2vw 1vw 0 0;
  590. font-size: 12px;
  591. color: #FFA500;
  592. border: 1px solid #FFA500;
  593. border-radius: 5px;
  594. padding: 0 1vw;
  595. }
  596. .act {
  597. margin: 2vw 0 0 0;
  598. font-size: 12px;
  599. border-radius: 5px;
  600. padding: 0 1vw;
  601. border: 1px solid var(--fFB1Color);
  602. color: var(--fFB1Color);
  603. }
  604. }
  605. }
  606. .money {
  607. font-size: 14px;
  608. margin-top: 2vw;
  609. text-align: right;
  610. flex-grow: 1;
  611. }
  612. }
  613. .total {
  614. display: flex;
  615. justify-content: space-between;
  616. padding: 1vw;
  617. .total_1 {
  618. font-size: 20px;
  619. color: var(--fFB1Color);
  620. text {
  621. font-size: 12px;
  622. }
  623. }
  624. .total_2 {
  625. display: flex;
  626. justify-content: space-between;
  627. align-items: center;
  628. .del {
  629. margin: 0 0 0 3vw;
  630. }
  631. }
  632. }
  633. }
  634. .list_2 {
  635. background-color: var(--mainColor);
  636. margin: 2vw 0 2vw 0;
  637. padding: 2vw 3vw;
  638. border-radius: 4px;
  639. .title {
  640. border-bottom: 1px solid var(--fcColor);
  641. padding: 0 0 2vw 0;
  642. font-size: var(--font18Size);
  643. text {
  644. margin: 0 1vw;
  645. }
  646. }
  647. .content {
  648. display: flex;
  649. flex-direction: row;
  650. padding: 2vw 0;
  651. font-size: var(--font16Size);
  652. border-bottom: 1px dashed var(--fcColor);
  653. .box {
  654. line-height: 20vw;
  655. }
  656. .img {
  657. width: 20vw;
  658. height: 20vw;
  659. border-radius: 2vw;
  660. border: 1px solid var(--fcColor);
  661. image {
  662. width: 20vw;
  663. height: 20vw;
  664. }
  665. }
  666. .one_1 {
  667. margin: 0 2.5vw;
  668. flex-grow: 1;
  669. .info {
  670. width: 100%;
  671. display: flex;
  672. flex-direction: row;
  673. .title_1 {
  674. font-size: 12px;
  675. color: #666;
  676. margin-top: 10px;
  677. text {
  678. background-color: #eee;
  679. padding: 5px;
  680. }
  681. }
  682. .gift {
  683. margin: 2vw 1vw 0 0;
  684. font-size: 12px;
  685. color: #FFA500;
  686. border: 1px solid #FFA500;
  687. border-radius: 5px;
  688. padding: 0 1vw;
  689. }
  690. .act {
  691. margin: 2vw 0 0 0;
  692. font-size: 12px;
  693. border-radius: 5px;
  694. padding: 0 1vw;
  695. border: 1px solid var(--fFB1Color);
  696. color: var(--fFB1Color);
  697. }
  698. }
  699. }
  700. .money {
  701. margin-top: 2vw;
  702. text-align: right;
  703. flex-grow: 1;
  704. }
  705. .num {
  706. margin: 6vw 4vw;
  707. font-size: 20px;
  708. }
  709. .del {
  710. margin: 6vw 0;
  711. text-align: right;
  712. flex-grow: 1;
  713. }
  714. }
  715. }
  716. }
  717. .foot {
  718. background-color: var(--fffColor);
  719. display: flex;
  720. flex-direction: row;
  721. justify-content: space-between;
  722. height: 44px;
  723. padding: 0 0 0 6vw;
  724. border-right: 1px solid var(--f99Color);
  725. .total {
  726. flex-grow: 1;
  727. display: flex;
  728. align-content: flex-end;
  729. line-height: 40px;
  730. text {
  731. color: var(--fFB1Color);
  732. }
  733. }
  734. .btn {
  735. button {
  736. width: 30vw;
  737. height: 44px;
  738. line-height: 44px;
  739. border-radius: 0px;
  740. background-color: var(--fFB1Color);
  741. text-align: center;
  742. font-weight: normal;
  743. font-size: var(--font15Size);
  744. color: var(--fffColor);
  745. }
  746. }
  747. }
  748. }
  749. .scroll-view {
  750. position: absolute;
  751. top: 0;
  752. left: 0;
  753. right: 0;
  754. bottom: 0;
  755. .list-scroll-view {
  756. display: flex;
  757. flex-direction: column;
  758. }
  759. }
  760. // 复选框样式
  761. checkbox .wx-checkbox-input {
  762. width: 40rpx;
  763. height: 40rpx;
  764. border-radius: 50%;
  765. border-color: var(--f99Color);
  766. background-color: var(--mainColor);
  767. }
  768. // 复选框选中样式
  769. checkbox .wx-checkbox-input.wx-checkbox-input-checked {
  770. border-color: var(--fFB1Color);
  771. background-color: var(--fFB1Color);
  772. }
  773. // 复选框选中之后对号的样式
  774. checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
  775. color: var(--fffColor);
  776. }
  777. </style>