index.vue 19 KB

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