爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2341 lines
65 KiB

2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. <template>
  2. <view class="container">
  3. <!-- 顶部banner -->
  4. <view class="banner">
  5. <!-- <swiper
  6. :indicator-dots="false"
  7. :autoplay="true"
  8. :interval="3000"
  9. :duration="500"
  10. circular
  11. style="width: 100%; height: 320rpx;"
  12. > -->
  13. <!-- <swiper-item v-for="(item, index) in bannerList" :key="item.id || index">
  14. <video
  15. v-if="item.type == 1"
  16. :src="item.voUrl"
  17. autoplay
  18. muted
  19. loop
  20. :controls="false"
  21. :show-play-btn="false"
  22. :show-center-play-btn="false"
  23. object-fit="cover"
  24. style="width: 100%; height: 100%;"
  25. ></video>
  26. <image v-else :src="item.image" mode="aspectFill" style="width: 100%; height: 100%;" />
  27. </swiper-item>
  28. </swiper> -->
  29. <image v-if="recycle_banner" :src="recycle_banner" mode="aspectFill" style="width: 100%; height: 100%;" />
  30. </view>
  31. <!-- 商品列表 -->
  32. <view class="goods-list">
  33. <!-- 左侧分类导航 -->
  34. <view class="category-nav">
  35. <view
  36. v-for="(category, index) in categories"
  37. :key="category.id || index"
  38. class="category-item"
  39. :class="{ active: currentCategory === index }"
  40. @click="switchCategory(index)"
  41. >
  42. <view class="category-dot" v-if="getCategoryItemCount(index) > 0">{{ getCategoryItemCount(index) }}</view>
  43. {{ category.title }}
  44. </view>
  45. </view>
  46. <!-- 右侧商品列表 -->
  47. <scroll-view class="goods-content" scroll-y @scrolltolower="loadMoreGoods">
  48. <view class="goods-section">
  49. <view class="goods-item" v-for="(item, index) in recycleList" :key="index">
  50. <image v-if="item.image" :src="item.image" class="goods-item-img" mode="aspectFit" />
  51. <view class="goods-info-wrap">
  52. <view class="goods-header">
  53. <text class="goods-name">{{item.name}}</text>
  54. <view class="brand-check-placeholder" >
  55. <view class="brand-check" @click="checkBrand(index)">
  56. <text>查看品牌</text>
  57. <uni-icons type="right" size="12" color="#ff7a0e"></uni-icons>
  58. </view>
  59. </view>
  60. </view>
  61. <text class="goods-desc">{{item.service}}</text>
  62. <view class="rules-link" @click="showRules(item)">
  63. <view class="rules">
  64. <text>回收规则</text>
  65. <uni-icons type="right" size="14" color="#999"></uni-icons>
  66. </view>
  67. </view>
  68. <view class="goods-info">
  69. <view class="price-info">
  70. <text class="price-symbol">¥</text>
  71. <text class="price-value">{{item.price}}</text>
  72. <text class="price-unit">/{{ item.unit || '件' }}</text>
  73. </view>
  74. <view class="quantity-control">
  75. <button class="btn-minus" @click="updateQuantity(index, -1)">-</button>
  76. <text class="quantity">{{getItemTotalQuantity(item)}}</text>
  77. <button class="btn-plus" @click="updateQuantity(index, 1)">+</button>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. <!-- 不可回收商品 -->
  84. <view class="other-unrecycle-card">
  85. <image class="other-unrecycle-img" src="/static/回收/衣物.png" mode="aspectFit" />
  86. <view class="other-unrecycle-info">
  87. <view class="other-unrecycle-title">其他上衣需咨询顾问暂不回收</view>
  88. <view class="other-unrecycle-desc">需连线回收顾问筛选</view>
  89. <view class="other-unrecycle-price-row">
  90. <text class="other-unrecycle-price">¥ /</text>
  91. </view>
  92. </view>
  93. <button class="other-unrecycle-btn" open-type="contact">+</button>
  94. </view>
  95. <view v-if="loadingMore" class="loading-more">加载中...</view>
  96. <view v-else-if="finished" class="loading-more">没有更多了</view>
  97. </scroll-view>
  98. </view>
  99. <!-- 固定底部区域 -->
  100. <view class="fixed-bottom-wrap" v-if="!showDetailPanel" >
  101. <view class="green-tip-bar">
  102. 回收范围仅支持回收以上品类按件回收预计比称重回收多
  103. <text class="tip-highlight"> 3.76</text>
  104. </view>
  105. <view class="bottom-bar">
  106. <view class="bottom-left">
  107. <view class="summary-row">
  108. <text class="summary-label">已选 <text class="summary-count">{{totalCount}}</text> {{ totalUnitText }} 预计回收可得</text>
  109. <uni-icons type="help" size="18" color="#b2b2b2" style="margin: 0 8rpx;" @tap="showPriceInfoPopups" />
  110. </view>
  111. <view class="amount-row">
  112. <uni-icons :type="showDetailPanel ? 'up' : 'down'" size="18" color="#5e5e5e" style="margin-right: 8rpx;vertical-align: middle;" @click="toggleDetailPanel" />
  113. <text class="amount">¥{{priceRange.min}}-{{priceRange.max}}</text>
  114. </view>
  115. </view>
  116. <button class="submit-btn" @click="submitOrder">预约上门取件</button>
  117. </view>
  118. <view class="bottom-bar-divider"></view>
  119. </view>
  120. <!-- 明细弹窗遮罩和弹窗 -->
  121. <view v-if="showDetailPanel" class="detail-popup-mask" @click.self="toggleDetailPanel">
  122. <view class="detail-popup" @click.stop>
  123. <view class="detail-popup-close" @click="toggleDetailPanel">×</view>
  124. <view class="green-tip-bar popup-green-tip">
  125. 回收范围仅支持回收以上品类按件回收预计比称重回收多
  126. <text class="tip-highlight"> 3.76</text>
  127. </view>
  128. <view class="panel-header">
  129. <text class="panel-title">已选商品明细</text>
  130. </view>
  131. <scroll-view class="panel-list popup-panel-list" scroll-y>
  132. <view v-for="(item, idx) in selectedProducts" :key="item.uniqueKey || idx" class="panel-item">
  133. <image v-if="item.image" :src="item.image" class="panel-item-img" mode="aspectFit" />
  134. <view class="panel-item-info">
  135. <text class="panel-item-name">{{item.name}}</text>
  136. <text class="panel-item-desc" v-if="item.brandName">品牌{{item.brandName}}</text>
  137. <text class="panel-item-desc" v-else>{{item.service}}</text>
  138. <text class="panel-item-price">¥{{item.price}}/{{ item.unit || '件' }}</text>
  139. </view>
  140. <view class="panel-quantity-control">
  141. <button class="btn-minus" @click="updateQuantityByProduct(item, -1)">-</button>
  142. <text class="quantity">{{item.quantity}}</text>
  143. <button class="btn-plus" @click="updateQuantityByProduct(item, 1)">+</button>
  144. </view>
  145. </view>
  146. </scroll-view>
  147. <view class="popup-bottom-bar">
  148. <view class="bottom-left">
  149. <view class="summary-row">
  150. <text class="summary-label">已选 <text class="summary-count">{{totalCount}}</text> {{ totalUnitText }} 预计回收可得</text>
  151. <uni-icons type="help" size="18" color="#b2b2b2" style="margin: 0 8rpx;" @tap="showPriceInfoPopups" />
  152. </view>
  153. <view class="amount-row">
  154. <uni-icons :type="showDetailPanel ? 'up' : 'down'" size="18" color="#5e5e5e" style="margin-right: 8rpx;vertical-align: middle;" @click="toggleDetailPanel" />
  155. <text class="amount">¥{{priceRange.min}}-{{priceRange.max}}</text>
  156. </view>
  157. </view>
  158. <button class="submit-btn" @click="submitOrder">预约上门取件</button>
  159. </view>
  160. </view>
  161. </view>
  162. <!-- 价格说明弹窗 -->
  163. <view v-if="showPriceInfoPopup" class="price-info-popup-mask" @click.self="closePriceInfoPopup">
  164. <view class="price-info-popup">
  165. <view class="price-info-popup-title">回收规则</view>
  166. <scroll-view class="price-info-popup-content" scroll-y>
  167. <!-- <view class="price-info-section">
  168. <view class="price-info-heading">关于旧衣质检</view>
  169. <view class="price-info-text">请确认本次回收旧衣是可以进行二次穿着的程度如回收旧衣有破损磨损开线变形起球发黄染色污渍配饰脱落或款式老旧等问题无法通过质检</view>
  170. </view>
  171. <view class="price-info-section">
  172. <view class="price-info-heading">质检报告</view>
  173. <view class="price-info-text">回收商收到衣后1-3个工作日内完成衣质检报告</view>
  174. </view>
  175. <view class="price-info-section">
  176. <view class="price-info-heading">质检结果与回收价格</view>
  177. <view class="price-info-text">若回收旧衣质检通过质检价格与用户提交订单时的预估价格一致回收商将按照预估价打款至您的小程序账户余额</view>
  178. </view> -->
  179. <uv-parse :content="huodong_text"></uv-parse>
  180. </scroll-view>
  181. <button class="price-info-popup-btn" @click="closePriceInfoPopup">我知道了</button>
  182. </view>
  183. </view>
  184. <!-- 根据角色显示不同的导航栏 -->
  185. <uv-tabbar
  186. v-if="ishow"
  187. :value="value"
  188. :fixed="true"
  189. @change="changeTo"
  190. class="uv-tabbar"
  191. >
  192. <uv-tabbar-item text="首页" >
  193. <template v-slot:active-icon>
  194. <image class="icon" src="/static/home/首页-点击.png"></image>
  195. </template>
  196. <template v-slot:inactive-icon>
  197. <image class="icon" src="/static/home/首页-未点击.png"></image>
  198. </template>
  199. </uv-tabbar-item>
  200. <uv-tabbar-item text="回收" >
  201. <template v-slot:active-icon>
  202. <image class="icon" src="/static/home/回收-点击.png"></image>
  203. </template>
  204. <template v-slot:inactive-icon>
  205. <image class="icon" src="/static/home/回收-未点击.png"></image>
  206. </template>
  207. </uv-tabbar-item>
  208. <uv-tabbar-item text="我的" >
  209. <template v-slot:active-icon>
  210. <image class="icon" src="/static/home/我的-点击.png"></image>
  211. </template>
  212. <template v-slot:inactive-icon>
  213. <image class="icon" src="/static/home/我的-未点击.png"></image>
  214. </template>
  215. </uv-tabbar-item>
  216. </uv-tabbar>
  217. <!-- 品牌索引弹窗 -->
  218. <view v-if="showBrandPopup" class="brand-popup-mask">
  219. <view class="brand-popup">
  220. <view class="brand-popup-header">
  221. <text class="brand-popup-close" @click="closeBrandPopup">关闭</text>
  222. <text class="brand-popup-title">可回收的品牌</text>
  223. </view>
  224. <view class="brand-popup-search">
  225. <input class="brand-search-input" v-model="brandSearch" placeholder="请输入要查询的内容" />
  226. </view>
  227. <scroll-view class="brand-popup-list" scroll-y :scroll-into-view="scrollToView">
  228. <view v-for="letter in brandIndexList" :key="letter" :id="'brand-letter-' + letter">
  229. <view class="brand-letter">{{letter}}</view>
  230. <view v-for="brand in filteredBrandList.filter(b => b.letter === letter)" :key="brand.name" class="brand-item" @click="openBrandConfirm(brand)">
  231. <image :src="brand.image" class="brand-logo" mode="aspectFit" />
  232. <text class="brand-name">{{brand.name}}</text>
  233. </view>
  234. </view>
  235. </scroll-view>
  236. <view class="brand-index-bar">
  237. <text v-for="letter in brandIndexList" :key="letter" :class="{active: currentLetter === letter}" @click="scrollToLetter(letter)">{{letter}}</text>
  238. </view>
  239. </view>
  240. </view>
  241. <!-- 回收规则弹窗 -->
  242. <view v-if="showRulePopup" class="rule-popup-mask" @click.self="closeRulePopup">
  243. <view class="rule-popup">
  244. <view class="rule-popup-title">回收规则</view>
  245. <scroll-view class="rule-popup-content" scroll-y>
  246. <uv-parse :content="ruleHtml"></uv-parse>
  247. </scroll-view>
  248. <button class="rule-popup-btn" @click="closeRulePopup">我知道了</button>
  249. <!-- <view class="rule-popup-close" @tap="closeRulePopup">
  250. <uni-icons type="close" size="36" color="#fff" />
  251. </view> -->
  252. </view>
  253. </view>
  254. <!-- 预约上门取件弹窗 -->
  255. <view v-if="showPickupConfirm" class="pickup-confirm-mask">
  256. <view class="pickup-confirm-popup">
  257. <view class="pickup-confirm-title">温馨提示</view>
  258. <view class="pickup-confirm-content">
  259. <uv-parse :content="recycle_toast"></uv-parse>
  260. <!-- <view class="confirm-item confirm-item-red">1.当前回收快递免费上门由于快递成本较高为避免不必要的成本及资源二次浪费不属于可回收品类或不符合回收标准的物品请勿寄出</view>
  261. <view class="confirm-item">2.已通过的回收物品将正常结算不符合回收要求的物品可选择快递取回运费自付请在订单结算后48小时内联系在线客服安排取回逾期未联系将默认捐赠无法再次取回</view>
  262. <view class="confirm-item">3.若用户寄出大量不可回收的物品平台有权限制下次回收权限或取消下次包邮服务</view>
  263. <view class="confirm-item">4.对于合格率高的回收订单平台将根据实际情况给予额外回收奖励</view> -->
  264. </view>
  265. <view class="pickup-confirm-btn-row">
  266. <button class="pickup-confirm-btn" @click="handlePickupCancel">取消回收</button>
  267. <button class="pickup-confirm-btn agree" @click="handlePickupAgree">我同意</button>
  268. </view>
  269. </view>
  270. </view>
  271. <!-- 品牌确认弹窗 -->
  272. <view v-if="showBrandConfirm" class="brand-confirm-mask" @click.self="closeBrandConfirm">
  273. <view class="brand-confirm-popup">
  274. <view class="brand-confirm-title">品牌确认提示</view>
  275. <view class="brand-confirm-logo-wrap">
  276. <image :src="brandConfirmInfo.image" class="brand-confirm-logo" mode="aspectFit" />
  277. </view>
  278. <view class="brand-confirm-name">{{ brandConfirmInfo.name }}</view>
  279. <view class="brand-confirm-desc">请确认所选品牌是否与实物品牌信息一致否则将无法进行回收</view>
  280. <view class="brand-confirm-btn-row">
  281. <button class="brand-confirm-btn retry" @click="closeBrandConfirm">重新选择</button>
  282. <button class="brand-confirm-btn confirm" @click="confirmBrand">确认一致</button>
  283. </view>
  284. </view>
  285. </view>
  286. <!-- 减少数量时的品牌选择弹窗 -->
  287. <view v-if="showBrandReducePopup" class="brand-reduce-popup-mask" @click.self="closeBrandReducePopup">
  288. <view class="brand-reduce-popup">
  289. <view class="brand-reduce-popup-header">
  290. <text class="brand-reduce-popup-close" @click="closeBrandReducePopup">关闭</text>
  291. <text class="brand-reduce-popup-title">选择要减少的品牌</text>
  292. </view>
  293. <scroll-view class="brand-reduce-popup-list" scroll-y>
  294. <view v-for="brand in reduceBrandList" :key="brand.brandId" class="brand-item" @click="selectReduceBrand(brand)">
  295. <image :src="brand.image" class="brand-logo" mode="aspectFit" />
  296. <text class="brand-name">{{brand.name}}</text>
  297. </view>
  298. </scroll-view>
  299. </view>
  300. </view>
  301. </view>
  302. </template>
  303. <script>
  304. import tabBarMixin from '../mixins/tabBarMixin.js'
  305. import { pinyin } from '../../utils/pinyin.js'
  306. export default {
  307. mixins: [tabBarMixin],
  308. data() {
  309. return {
  310. value:1,
  311. ishow:true,
  312. // 动态数据
  313. allProducts: {}, // { [categoryId]: [商品数组] }
  314. allProductsPage: {}, // { [categoryId]: 当前已加载页码 }
  315. allProductsTotal: {}, // { [categoryId]: 总数 }
  316. pageSize: 10,
  317. currentCategory: 0,
  318. tabbarHeight: 0,
  319. showDetailPanel: false,
  320. showBrandPopup: false,
  321. showRulePopup: false,
  322. ruleImgUrl: '/static/回收/回收规则.png',
  323. showPickupConfirm: false,
  324. showBrandConfirm: false,
  325. brandConfirmInfo: {
  326. image: '',
  327. name: ''
  328. },
  329. brandList: [],
  330. brandIndexList: ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'],
  331. currentLetter: 'A',
  332. scrollToView: '',
  333. brandSearch: '',
  334. ruleHtml: '', // 回收规则富文本内容
  335. loadingMore: false,
  336. finished: false,
  337. pendingBrandIndex: null, // 记录待加一的品牌商品index
  338. showPriceInfoPopup: false,
  339. isWaitingForBrandSelection: false, // 等待品牌选择的标志
  340. showBrandReducePopup: false, // 显示减少数量时的品牌选择弹窗
  341. reduceItem: null, // 待减少数量的商品
  342. reduceBrandList: [], // 可减少的品牌列表
  343. viewedRuleItems: new Set(), // 已查看过规则的商品ID集合
  344. loadOptions: null, // 保存options参数
  345. userInfo: null, // 用户信息
  346. isUserBlacklisted: false, // 用户是否被拉黑
  347. }
  348. },
  349. computed: {
  350. recycle_banner() {
  351. const item = getApp().globalData.configData.find(i => i.keyName === 'recycle_banner')
  352. return item ? item.keyContent : ''
  353. },
  354. recycle_toast() {
  355. const item = getApp().globalData.configData.find(i => i.keyName === 'recycle_toast')
  356. return item ? item.keyContent : ''
  357. },
  358. huodong_text() {
  359. const item = getApp().globalData.configData.find(i => i.keyName === 'huodong_text')
  360. return item ? item.keyContent : ''
  361. },
  362. // 当前分类的商品列表
  363. recycleList() {
  364. const currentCategoryId = this.categories[this.currentCategory]?.id
  365. return this.allProducts[currentCategoryId] || []
  366. },
  367. // 计算总数量
  368. totalCount() {
  369. return Object.values(this.allProducts).reduce((total, categoryItems) => {
  370. return total + categoryItems.reduce((sum, item) => {
  371. // 如果商品有品牌数量,汇总所有品牌的数量
  372. if (item.brandQuantities && Object.keys(item.brandQuantities).length > 0) {
  373. return sum + Object.values(item.brandQuantities).reduce((brandSum, qty) => brandSum + qty, 0)
  374. }
  375. // 否则使用原来的quantity字段
  376. return sum + (item.quantity || 0)
  377. }, 0)
  378. }, 0)
  379. },
  380. // 计算总单位文本
  381. totalUnitText() {
  382. // 获取所有已选商品的单位
  383. const units = new Set()
  384. Object.values(this.allProducts).forEach(categoryItems => {
  385. categoryItems.forEach(item => {
  386. let hasQuantity = false
  387. if (item.brandQuantities && Object.keys(item.brandQuantities).length > 0) {
  388. hasQuantity = Object.values(item.brandQuantities).some(qty => qty > 0)
  389. } else {
  390. hasQuantity = (item.quantity || 0) > 0
  391. }
  392. if (hasQuantity) {
  393. units.add(item.unit || '件')
  394. }
  395. })
  396. })
  397. // 如果只有一种单位,显示单位;如果混合多种单位,显示"项"
  398. if (units.size === 0) return '件'
  399. if (units.size === 1) return Array.from(units)[0]
  400. return '项'
  401. },
  402. // 计算总价格范围
  403. totalPriceRange() {
  404. const result = Object.values(this.allProducts).reduce((categoryTotal, categoryItems) => {
  405. return categoryItems.reduce((sum, item) => {
  406. let itemQuantity = 0
  407. // 如果商品有品牌数量,汇总所有品牌的数量
  408. if (item.brandQuantities && Object.keys(item.brandQuantities).length > 0) {
  409. itemQuantity = Object.values(item.brandQuantities).reduce((brandSum, qty) => brandSum + qty, 0)
  410. } else {
  411. itemQuantity = item.quantity || 0
  412. }
  413. if (itemQuantity > 0) {
  414. const minPrice = Number(item.price) || 0
  415. const maxPrice = Number(item.maxPrice) || Number(item.price) || 0
  416. sum.min += itemQuantity * minPrice
  417. sum.max += itemQuantity * maxPrice
  418. }
  419. return sum
  420. }, categoryTotal)
  421. }, { min: 0, max: 0 })
  422. return {
  423. min: result.min.toFixed(1),
  424. max: result.max.toFixed(1)
  425. }
  426. },
  427. // 计算总价格 (保持兼容性,使用最低价格)
  428. totalPrice() {
  429. return this.totalPriceRange.min
  430. },
  431. // 计算价格范围
  432. priceRange() {
  433. if (this.totalCount === 0) {
  434. return {
  435. min: '0.0',
  436. max: '0.0'
  437. }
  438. }
  439. return this.totalPriceRange
  440. },
  441. selectedProducts() {
  442. // 返回所有分类下所有已选商品,按品牌分组
  443. const products = []
  444. Object.values(this.allProducts).flat().forEach(item => {
  445. if (item.brandQuantities && Object.keys(item.brandQuantities).length > 0) {
  446. // 按品牌分别添加
  447. Object.entries(item.brandQuantities).forEach(([brandId, quantity]) => {
  448. if (quantity > 0) {
  449. const brandInfo = this.getBrandInfo(brandId)
  450. products.push({
  451. ...item,
  452. quantity: quantity,
  453. brandId: brandId,
  454. brandName: brandInfo ? brandInfo.name : '未知品牌',
  455. brandImage: brandInfo ? brandInfo.image : '',
  456. uniqueKey: `${item.id}_${brandId}` // 用于区分同商品不同品牌
  457. })
  458. }
  459. })
  460. } else if (item.quantity > 0) {
  461. // 没有品牌的商品
  462. products.push({
  463. ...item,
  464. uniqueKey: item.id
  465. })
  466. }
  467. })
  468. return products
  469. },
  470. filteredBrandList() {
  471. if (!this.brandSearch) return this.brandList
  472. const keyword = this.brandSearch.trim().toLowerCase()
  473. return this.brandList.filter(b => b.name.toLowerCase().includes(keyword))
  474. },
  475. bannerList() {
  476. return getApp().globalData.bannerList || []
  477. },
  478. categories() {
  479. const list = getApp().globalData.pricePreviewList || []
  480. return list.filter(item => item.pid === '0').sort((a, b) => a.sort - b.sort)
  481. },
  482. minMoney() {
  483. const config = getApp().globalData.configData || [];
  484. const item = config.find(i => i.keyName === 'min_money');
  485. return item ? parseFloat(item.keyContent) : 0;
  486. }
  487. },
  488. methods: {
  489. showPriceInfoPopups() {
  490. console.log('showPriceInfoPopup called');
  491. this.showPriceInfoPopup = true
  492. },
  493. closePriceInfoPopup() {
  494. console.log('closePriceInfoPopup called');
  495. this.showPriceInfoPopup = false
  496. },
  497. changeTo(e){
  498. this.value = e
  499. if(e==2){
  500. uni.reLaunch({
  501. url: '/pages/component/my'
  502. });
  503. }else if(e==0){
  504. console.log(e,'111')
  505. uni.reLaunch({
  506. url: '/pages/component/home'
  507. });
  508. }
  509. },
  510. fetchGoodsList(categoryId, page = 1, callback) {
  511. this.$api('getClassGoodsList', {
  512. classId: categoryId,
  513. pageNo: page,
  514. pageSize: this.pageSize
  515. }, res => {
  516. if (res.code === 200 && res.result && Array.isArray(res.result.records)) {
  517. const oldList = this.allProducts[categoryId] || []
  518. const newList = page === 1 ? res.result.records : oldList.concat(res.result.records)
  519. this.$set(this.allProducts, categoryId, newList)
  520. this.$set(this.allProductsPage, categoryId, page)
  521. this.$set(this.allProductsTotal, categoryId, res.result.total)
  522. }
  523. if (callback) callback()
  524. })
  525. },
  526. // 获取分类商品总数
  527. getCategoryItemCount(index) {
  528. const categoryId = this.categories[index]?.id
  529. const categoryItems = this.allProducts[categoryId] || []
  530. return categoryItems.reduce((sum, item) => {
  531. if (item.brandQuantities && Object.keys(item.brandQuantities).length > 0) {
  532. return sum + Object.values(item.brandQuantities).reduce((brandSum, qty) => brandSum + qty, 0)
  533. }
  534. return sum + (item.quantity || 0)
  535. }, 0)
  536. },
  537. // 切换分类
  538. switchCategory(index) {
  539. this.currentCategory = index
  540. this.loadingMore = false
  541. this.finished = false
  542. const categoryId = this.categories[index]?.id
  543. // console.log(categoryId,'switchCategory')
  544. if (!this.allProducts[categoryId]) {
  545. this.fetchGoodsList(categoryId, 1)
  546. }
  547. },
  548. // 更新商品数量
  549. updateQuantity(index, delta) {
  550. const categoryId = this.categories[this.currentCategory]?.id
  551. const item = this.allProducts[categoryId]?.[index]
  552. if (!item) return
  553. // 如果是减少数量且delta为负数
  554. if (delta < 0) {
  555. // 检查是否有多个品牌
  556. if (item.brandQuantities && Object.keys(item.brandQuantities).length > 1) {
  557. // 有多个品牌,显示选择弹窗
  558. this.reduceItem = { item, index, delta }
  559. this.reduceBrandList = Object.entries(item.brandQuantities)
  560. .filter(([brandId, quantity]) => quantity > 0)
  561. .map(([brandId, quantity]) => {
  562. const brandInfo = this.getBrandInfo(brandId)
  563. return {
  564. brandId,
  565. quantity,
  566. name: brandInfo ? brandInfo.name : '未知品牌',
  567. image: brandInfo ? brandInfo.image : ''
  568. }
  569. })
  570. this.showBrandReducePopup = true
  571. return
  572. } else if (item.brandQuantities && Object.keys(item.brandQuantities).length === 1) {
  573. // 只有一个品牌,直接减少
  574. const brandId = Object.keys(item.brandQuantities)[0]
  575. const currentQty = item.brandQuantities[brandId] || 0
  576. const newQty = Math.max(0, currentQty + delta)
  577. this.$set(item.brandQuantities, brandId, newQty)
  578. // 如果数量为0,删除该品牌
  579. if (newQty === 0) {
  580. this.$delete(item.brandQuantities, brandId)
  581. }
  582. return
  583. } else {
  584. // 没有品牌数量,使用原来的逻辑
  585. let newQuantity = (item.quantity || 0) + delta
  586. if (newQuantity < 0) newQuantity = 0
  587. this.$set(item, 'quantity', newQuantity)
  588. return
  589. }
  590. }
  591. // 品牌商品且数量为0且加一时
  592. if ((item.quantity || 0) === 0 && delta > 0) {
  593. this.pendingBrandIndex = index
  594. this.isWaitingForBrandSelection = true;
  595. this.showRules(item); // 先显示回收规则
  596. return
  597. }
  598. },
  599. // 选择要减少的品牌
  600. selectReduceBrand(brandInfo) {
  601. const { item, index, delta } = this.reduceItem
  602. const currentQty = item.brandQuantities[brandInfo.brandId] || 0
  603. const newQty = Math.max(0, currentQty + delta)
  604. this.$set(item.brandQuantities, brandInfo.brandId, newQty)
  605. // 如果数量为0,删除该品牌
  606. if (newQty === 0) {
  607. this.$delete(item.brandQuantities, brandInfo.brandId)
  608. }
  609. this.closeBrandReducePopup()
  610. },
  611. // 关闭减少品牌选择弹窗
  612. closeBrandReducePopup() {
  613. this.showBrandReducePopup = false
  614. this.reduceItem = null
  615. this.reduceBrandList = []
  616. },
  617. // 获取品牌信息
  618. getBrandInfo(brandId) {
  619. return this.brandList.find(brand => brand.id === brandId)
  620. },
  621. // 获取商品的总数量(所有品牌)
  622. getItemTotalQuantity(item) {
  623. if (item.brandQuantities && Object.keys(item.brandQuantities).length > 0) {
  624. return Object.values(item.brandQuantities).reduce((sum, qty) => sum + qty, 0)
  625. }
  626. return item.quantity || 0
  627. },
  628. // 显示回收规则
  629. showRules(item) {
  630. // 检查该商品是否已经查看过规则
  631. if (this.viewedRuleItems.has(item.id)) {
  632. // 如果已经查看过,直接跳过规则弹窗,进入品牌选择
  633. this.isWaitingForBrandSelection = false;
  634. this.getGoodsBrandList(item.id);
  635. this.showBrandPopup = true;
  636. return;
  637. }
  638. // 获取回收规则富文本
  639. this.$api('getGoodsRecycleRule', { goodsId: item.id }, res => {
  640. if (res.code === 200 && res.result) {
  641. this.ruleHtml = res.result
  642. } else {
  643. this.ruleHtml = '<p>暂无回收规则</p>'
  644. }
  645. this.showRulePopup = true
  646. })
  647. },
  648. showMore() {
  649. uni.showToast({
  650. title: '更多规则请咨询客服',
  651. icon: 'none'
  652. })
  653. },
  654. submitOrder() {
  655. // 检查用户是否被拉入黑名单
  656. if (this.isUserBlacklisted) {
  657. uni.showModal({
  658. title: '提示',
  659. content: '您的账户已被限制使用回收服务,如有疑问请联系客服。',
  660. showCancel: false,
  661. confirmText: '我知道了'
  662. })
  663. return
  664. }
  665. if (this.totalCount < 3) {
  666. uni.showToast({
  667. title: `各品类混合需要满3${this.totalUnitText}才能回收哦`,
  668. icon: 'none'
  669. })
  670. return
  671. }
  672. if (Number(this.totalPrice) < this.minMoney) {
  673. uni.showToast({
  674. title: `回收总价需满${this.minMoney}元才能预约`,
  675. icon: 'none'
  676. })
  677. return
  678. }
  679. this.showPickupConfirm = true;
  680. },
  681. handlePickupCancel() {
  682. this.showPickupConfirm = false;
  683. },
  684. handlePickupAgree() {
  685. this.showPickupConfirm = false;
  686. uni.showLoading({
  687. title: '提交中...'
  688. })
  689. setTimeout(() => {
  690. uni.hideLoading()
  691. uni.showToast({
  692. title: '预约成功',
  693. icon: 'success'
  694. })
  695. this.goToPickup()
  696. }, 1500)
  697. },
  698. goToPickup() {
  699. // 获取所有选中的衣物(所有分类)
  700. const selectedItems = this.selectedProducts.map(item => {
  701. const baseItem = {
  702. id: item.id,
  703. name: item.name,
  704. icon: item.image,
  705. quantity: item.quantity,
  706. unitPrice: item.price,
  707. desc: item.brandName ? `品牌:${item.brandName}` : '允许脏破烂,160码以上'
  708. }
  709. // 如果有品牌信息,添加品牌相关字段
  710. if (item.brandId) {
  711. baseItem.brandId = item.brandId
  712. baseItem.brandName = item.brandName
  713. baseItem.brandImage = item.brandImage
  714. }
  715. return baseItem
  716. })
  717. const itemsStr = encodeURIComponent(JSON.stringify(selectedItems))
  718. uni.navigateTo({
  719. url: `/pages/subcomponent/pickup?fromRecycle=true&items=${itemsStr}`
  720. })
  721. },
  722. checkBrand(index) {
  723. const categoryId = this.categories[this.currentCategory]?.id
  724. const item = this.allProducts[categoryId]?.[index]
  725. if (item?.id) {
  726. this.pendingBrandIndex = index
  727. this.getGoodsBrandList(item.id)
  728. this.showBrandPopup = true
  729. }
  730. },
  731. closeBrandPopup() {
  732. this.showBrandPopup = false
  733. // 如果用户取消品牌选择,重置状态
  734. this.pendingBrandIndex = null;
  735. this.isWaitingForBrandSelection = false;
  736. },
  737. scrollToLetter(letter) {
  738. this.currentLetter = letter
  739. this.scrollToView = 'brand-letter-' + letter
  740. },
  741. // 添加下拉刷新方法
  742. async refreshData() {
  743. try {
  744. // 这里可以添加刷新数据的逻辑,比如重新获取商品列表等
  745. // 示例:重新初始化数据
  746. this.currentCategory = 0
  747. Object.values(this.allProducts).forEach(categoryItems => {
  748. categoryItems.forEach(item => {
  749. item.quantity = 0
  750. if (item.brandQuantities) {
  751. item.brandQuantities = {}
  752. }
  753. })
  754. })
  755. // 清空已查看规则的记录
  756. this.viewedRuleItems.clear()
  757. // 模拟网络请求延迟
  758. await new Promise(resolve => setTimeout(resolve, 1000))
  759. uni.showToast({
  760. title: '刷新成功',
  761. icon: 'success'
  762. })
  763. } catch (error) {
  764. uni.showToast({
  765. title: '刷新失败',
  766. icon: 'none'
  767. })
  768. } finally {
  769. // 停止下拉刷新动画
  770. uni.stopPullDownRefresh()
  771. }
  772. },
  773. toggleDetailPanel() {
  774. this.showDetailPanel = !this.showDetailPanel
  775. },
  776. fetchUserInfo() {
  777. if(uni.getStorageSync('token')){
  778. this.login_status = getApp().globalData.login_status;
  779. this.$api("getUserByToken",{},(res)=>{
  780. if(res.code == 200){
  781. this.userInfo = res.result
  782. // 检查用户是否被拉入黑名单
  783. this.isUserBlacklisted = res.result.isBlack === 'Y'
  784. // isTuiType 为0用户,1推广达人,2推广大使
  785. }
  786. })
  787. } else {
  788. this.login_status = false;
  789. }
  790. },
  791. updateQuantityByProduct(item, delta) {
  792. // 在明细弹窗中更新数量
  793. if (item.brandId) {
  794. // 有品牌ID的商品
  795. const originalItem = this.findOriginalItem(item.id)
  796. if (originalItem && originalItem.brandQuantities) {
  797. const currentQty = originalItem.brandQuantities[item.brandId] || 0
  798. const newQty = Math.max(0, currentQty + delta)
  799. this.$set(originalItem.brandQuantities, item.brandId, newQty)
  800. // 如果数量为0,删除该品牌
  801. if (newQty === 0) {
  802. this.$delete(originalItem.brandQuantities, item.brandId)
  803. }
  804. // 同步更新显示的数量
  805. item.quantity = newQty
  806. }
  807. } else {
  808. // 没有品牌的商品
  809. if (!item.quantity) item.quantity = 0
  810. item.quantity += delta
  811. if (item.quantity < 0) item.quantity = 0
  812. // 同步到原商品
  813. const originalItem = this.findOriginalItem(item.id)
  814. if (originalItem) {
  815. this.$set(originalItem, 'quantity', item.quantity)
  816. }
  817. }
  818. },
  819. // 查找原始商品对象
  820. findOriginalItem(itemId) {
  821. for (const categoryItems of Object.values(this.allProducts)) {
  822. const item = categoryItems.find(i => i.id === itemId)
  823. if (item) return item
  824. }
  825. return null
  826. },
  827. openRulePopup() {
  828. this.showRulePopup = true
  829. },
  830. closeRulePopup() {
  831. this.showRulePopup = false;
  832. // 如果是在等待品牌选择的状态下关闭规则弹窗,则接着打开品牌选择
  833. if (this.isWaitingForBrandSelection) {
  834. this.isWaitingForBrandSelection = false; // 清除等待状态
  835. const categoryId = this.categories[this.currentCategory]?.id;
  836. const item = this.allProducts[categoryId]?.[this.pendingBrandIndex];
  837. // 记录该商品的规则已被查看
  838. this.viewedRuleItems.add(item.id);
  839. this.getGoodsBrandList(item.id);
  840. this.showBrandPopup = true; // 打开品牌索引弹窗
  841. }
  842. },
  843. loadMoreGoods() {
  844. const categoryId = this.categories[this.currentCategory]?.id
  845. const page = (this.allProductsPage[categoryId] || 1) + 1
  846. const total = this.allProductsTotal[categoryId] || 0
  847. const loaded = (this.allProducts[categoryId] || []).length
  848. if (this.loadingMore || this.finished) return
  849. if (loaded < total) {
  850. this.loadingMore = true
  851. this.fetchGoodsList(categoryId, page, () => {
  852. this.loadingMore = false
  853. // 判断是否加载完
  854. const newLoaded = (this.allProducts[categoryId] || []).length
  855. this.finished = newLoaded >= (this.allProductsTotal[categoryId] || 0)
  856. })
  857. } else {
  858. this.finished = true
  859. }
  860. },
  861. openBrandConfirm(brand) {
  862. this.brandConfirmInfo = {
  863. id: brand.id,
  864. image: brand.image,
  865. name: brand.name
  866. }
  867. this.showBrandConfirm = true
  868. },
  869. closeBrandConfirm() {
  870. this.showBrandConfirm = false
  871. },
  872. confirmBrand() {
  873. this.showBrandConfirm = false
  874. this.showBrandPopup = false
  875. // 确认后将待加一的商品数量+1,并记录品牌ID
  876. if (this.pendingBrandIndex !== null) {
  877. const categoryId = this.categories[this.currentCategory]?.id
  878. const item = this.allProducts[categoryId]?.[this.pendingBrandIndex]
  879. if (item) {
  880. // 初始化品牌数量对象
  881. if (!item.brandQuantities) {
  882. this.$set(item, 'brandQuantities', {})
  883. }
  884. // 增加该品牌的数量
  885. const currentQty = item.brandQuantities[this.brandConfirmInfo.id] || 0
  886. this.$set(item.brandQuantities, this.brandConfirmInfo.id, currentQty + 1)
  887. // 清除原来的quantity(如果存在)
  888. if (item.quantity) {
  889. this.$set(item, 'quantity', 0)
  890. }
  891. }
  892. this.pendingBrandIndex = null
  893. }
  894. },
  895. getGoodsBrandList(productId) {
  896. this.$api('getGoodsBrandList', { productId }, res => {
  897. // console.log(res,'res')
  898. if (res && res.success && res.result && res.result.records) {
  899. this.brandList = res.result.records.map(item => {
  900. // 获取品牌名称的拼音首字母
  901. const firstChar = this.getPinyinFirstLetter(item.name)
  902. return {
  903. id: item.id,
  904. logo: item.image || '/static/brand/alexander.png',
  905. name: item.name,
  906. letter: firstChar
  907. }
  908. })
  909. // console.log(this.brandList,'this.brandList')
  910. }
  911. })
  912. },
  913. // 获取中文拼音首字母
  914. getPinyinFirstLetter(str) {
  915. if (!str) return '#'
  916. const firstChar = str.charAt(0)
  917. // 遍历pinyin对象,查找包含该汉字的拼音
  918. for (let key in pinyin) {
  919. const chars = pinyin[key]
  920. if (chars && chars.indexOf(firstChar) !== -1) {
  921. return key.charAt(0).toUpperCase()
  922. }
  923. }
  924. let index = this.brandIndexList.indexOf(firstChar.toUpperCase())
  925. if (index != -1) {
  926. return this.brandIndexList[index]
  927. }
  928. return '#'
  929. },
  930. // 初始化页面数据的方法
  931. initializePageData() {
  932. const options = this.loadOptions || {}
  933. if (options && options.categoryId) {
  934. const idx = this.categories.findIndex(c => c.id == options.categoryId)
  935. if (idx !== -1) this.currentCategory = idx
  936. }
  937. if (this.categories.length > 0) {
  938. this.fetchGoodsList(this.categories[this.currentCategory].id, 1)
  939. }
  940. uni.$on('bannerListUpdated', () => {
  941. this.$forceUpdate && this.$forceUpdate()
  942. })
  943. if (getApp().globalData.bannerList && getApp().globalData.bannerList.length > 0) {
  944. this.$forceUpdate && this.$forceUpdate()
  945. }
  946. // 检查全局清空标志(兼容 reLaunch)
  947. if (getApp().globalData.shouldClearRecycle) {
  948. Object.values(this.allProducts).forEach(categoryItems => {
  949. categoryItems.forEach(item => {
  950. this.$set(item, 'quantity', 0)
  951. if (item.brandQuantities) {
  952. this.$set(item, 'brandQuantities', {})
  953. }
  954. })
  955. })
  956. // 清空已查看规则的记录
  957. this.viewedRuleItems.clear()
  958. this.showDetailPanel = false
  959. this.$forceUpdate()
  960. getApp().globalData.shouldClearRecycle = false
  961. }
  962. },
  963. },
  964. created() {
  965. this.currentCategory = 0
  966. this.$nextTick(() => {
  967. if (this.categories.length > 0) {
  968. const firstCategoryId = this.categories[0]?.id
  969. if (firstCategoryId) {
  970. this.fetchGoodsList(firstCategoryId, 1)
  971. }
  972. }
  973. })
  974. },
  975. mounted() {
  976. this.$nextTick(() => {
  977. const query = uni.createSelectorQuery().in(this)
  978. query.select('.uv-tabbar').boundingClientRect(rect => {
  979. if (rect && rect.height) {
  980. this.tabbarHeight = rect.height
  981. } else {
  982. this.tabbarHeight = uni.upx2px ? uni.upx2px(95) : 45
  983. }
  984. // console.log(this.tabbarHeight,'tabbarHeight')
  985. }).exec()
  986. })
  987. },
  988. onLoad(options) {
  989. // 保存options参数
  990. this.loadOptions = options
  991. // 检查App数据是否已经准备好
  992. if (!getApp().globalData.isAppDataReady) {
  993. // 显示加载状态
  994. uni.showLoading({
  995. title: '加载中...',
  996. mask: true
  997. })
  998. // 监听App数据准备完成事件
  999. uni.$on('appDataReady', () => {
  1000. uni.hideLoading()
  1001. this.initializePageData()
  1002. })
  1003. } else {
  1004. // App数据已经准备好,直接初始化页面数据
  1005. this.initializePageData()
  1006. }
  1007. },
  1008. onUnload() {
  1009. uni.$off('bannerListUpdated')
  1010. // 移除事件监听
  1011. uni.$off('clearRecycleOrderData')
  1012. },
  1013. onShow() {
  1014. // 获取用户信息,检查黑名单状态
  1015. this.fetchUserInfo()
  1016. const id = getApp().globalData.targetRecycleCategoryId
  1017. if (id) {
  1018. const trySwitch = () => {
  1019. if (this.categories.length > 0) {
  1020. const idx = this.categories.findIndex(c => String(c.id) === String(id))
  1021. if (idx !== -1) {
  1022. this.currentCategory = idx
  1023. const categoryId = this.categories[idx]?.id
  1024. if (categoryId && !this.allProducts[categoryId]) {
  1025. this.loadingMore = false
  1026. this.finished = false
  1027. this.fetchGoodsList(categoryId, 1)
  1028. }
  1029. }
  1030. getApp().globalData.targetRecycleCategoryId = null
  1031. } else {
  1032. setTimeout(trySwitch, 100)
  1033. }
  1034. }
  1035. trySwitch()
  1036. }
  1037. // 检查全局清空标志
  1038. if (getApp().globalData.shouldClearRecycle) {
  1039. Object.values(this.allProducts).forEach(categoryItems => {
  1040. categoryItems.forEach(item => {
  1041. this.$set(item, 'quantity', 0)
  1042. if (item.brandQuantities) {
  1043. this.$set(item, 'brandQuantities', {})
  1044. }
  1045. })
  1046. })
  1047. // 清空已查看规则的记录
  1048. this.viewedRuleItems.clear()
  1049. this.showDetailPanel = false
  1050. this.$forceUpdate()
  1051. getApp().globalData.shouldClearRecycle = false
  1052. }
  1053. // 监听清除订单数据的事件
  1054. uni.$on('clearRecycleOrderData', () => {
  1055. // 清除所有商品的选中数量,保证响应式
  1056. Object.values(this.allProducts).forEach(categoryItems => {
  1057. categoryItems.forEach(item => {
  1058. this.$set(item, 'quantity', 0)
  1059. if (item.brandQuantities) {
  1060. this.$set(item, 'brandQuantities', {})
  1061. }
  1062. })
  1063. })
  1064. // 清空已查看规则的记录
  1065. this.viewedRuleItems.clear()
  1066. // 重置其他相关数据
  1067. this.showDetailPanel = false
  1068. this.$forceUpdate()
  1069. })
  1070. },
  1071. watch: {
  1072. categories(newVal) {
  1073. const id = getApp().globalData.targetRecycleCategoryId
  1074. const idx = newVal.findIndex(c => String(c.id) === String(id))
  1075. if (id && newVal.length > 0 && idx !== -1) {
  1076. this.currentCategory = idx
  1077. getApp().globalData.targetRecycleCategoryId = null
  1078. // 自动加载右侧商品
  1079. const categoryId = newVal[idx]?.id
  1080. if (categoryId && !this.allProducts[categoryId]) {
  1081. this.loadingMore = false
  1082. this.finished = false
  1083. this.fetchGoodsList(categoryId, 1)
  1084. }
  1085. }
  1086. }
  1087. },
  1088. }
  1089. </script>
  1090. <style lang="scss" scoped>
  1091. .container {
  1092. display: flex;
  1093. flex-direction: column;
  1094. height: 100vh;
  1095. background-color: #f5f5f5;
  1096. overflow: hidden;
  1097. }
  1098. .banner {
  1099. background: linear-gradient(135deg, #ff9500,#ff5e00);
  1100. position: relative;
  1101. height: 350rpx;
  1102. z-index: 1;
  1103. image {
  1104. width: 100%;
  1105. height: 90%;
  1106. }
  1107. }
  1108. .goods-list {
  1109. // flex: 1;
  1110. display: flex;
  1111. position: relative;
  1112. height: calc(100vh - 320rpx - 120rpx - env(safe-area-inset-bottom)); /* 减去banner和底部栏的高度 */
  1113. margin-top: -10rpx;
  1114. z-index: 2;
  1115. border-radius: 20rpx 20rpx 0 0;
  1116. overflow: hidden;
  1117. padding: 30rpx;
  1118. box-shadow: 0 -4rpx 8rpx rgba(0, 0, 0, 0.05);
  1119. background: linear-gradient(to bottom, #fff7e8, 20%,#ffffff);
  1120. .category-nav {
  1121. width: 20%;
  1122. background: #ffffff;
  1123. height: 100%;
  1124. border-right: 1rpx solid rgba(255, 126, 14, 0.1);
  1125. margin: 1rpx;
  1126. border-radius: 20rpx 0 0 0;
  1127. margin-right: 20rpx;
  1128. overflow-y: auto;
  1129. scrollbar-width: none; /* Firefox */
  1130. -ms-overflow-style: none; /* IE and Edge */
  1131. &::-webkit-scrollbar {
  1132. width: 0 !important;
  1133. display: none; /* Chrome, Safari, Opera */
  1134. }
  1135. .category-item {
  1136. position: relative;
  1137. padding: 28rpx 20rpx;
  1138. text-align: center;
  1139. font-family: PingFang SC;
  1140. font-weight: 600;
  1141. font-size: 15px;
  1142. line-height: 100%;
  1143. letter-spacing: 0px;
  1144. color: #666;
  1145. .category-dot {
  1146. position: absolute;
  1147. top: 15rpx;
  1148. right: 15rpx;
  1149. min-width: 32rpx;
  1150. height: 32rpx;
  1151. padding: 0 6rpx;
  1152. background: #ff7a0e;
  1153. border-radius: 16rpx;
  1154. color: #fff;
  1155. font-size: 20rpx;
  1156. text-align: center;
  1157. line-height: 32rpx;
  1158. box-sizing: border-box;
  1159. }
  1160. &.active {
  1161. color: #ff7a0e;
  1162. font-weight: bold;
  1163. background: #fff7e8;
  1164. position: relative;
  1165. &::before {
  1166. content: '';
  1167. position: absolute;
  1168. left: 0;
  1169. top: 50%;
  1170. transform: translateY(-50%);
  1171. width: 6rpx;
  1172. height: 36rpx;
  1173. background: #ff7a0e;
  1174. border-radius: 3rpx;
  1175. }
  1176. }
  1177. }
  1178. }
  1179. .goods-content {
  1180. flex: 1;
  1181. height: 100%;
  1182. padding: 0 30rpx;
  1183. background: #ffffff;
  1184. width: 70%;
  1185. margin: 1rpx;
  1186. margin-left: 0;
  1187. border-radius: 0 20rpx 0 0;
  1188. overflow-y: auto;
  1189. scrollbar-width: none; /* Firefox */
  1190. -ms-overflow-style: none; /* IE and Edge */
  1191. &::-webkit-scrollbar {
  1192. width: 0 !important;
  1193. display: none; /* Chrome, Safari, Opera */
  1194. }
  1195. }
  1196. }
  1197. .goods-item {
  1198. display: flex;
  1199. align-items: flex-start;
  1200. padding: 30rpx 0;
  1201. border-bottom: 1rpx solid #f5f5f5;
  1202. .goods-item-img {
  1203. width: 120rpx;
  1204. height: 120rpx;
  1205. border-radius: 24rpx;
  1206. background: #f8f8f8;
  1207. margin-right: 28rpx;
  1208. object-fit: contain;
  1209. flex-shrink: 0;
  1210. }
  1211. .goods-info-wrap {
  1212. flex: 1;
  1213. display: flex;
  1214. flex-direction: column;
  1215. justify-content: center;
  1216. min-width: 0;
  1217. }
  1218. .goods-header {
  1219. display: flex;
  1220. justify-content: space-between;
  1221. align-items: center;
  1222. margin-bottom: 10rpx;
  1223. }
  1224. .goods-name {
  1225. font-family: PingFang SC;
  1226. font-weight: 500;
  1227. font-size: 14px;
  1228. line-height: 140%;
  1229. letter-spacing: 0%;
  1230. vertical-align: middle;
  1231. color: #333;
  1232. font-weight: bold;
  1233. flex-shrink: 1;
  1234. flex-grow: 1;
  1235. }
  1236. .brand-check-placeholder {
  1237. flex-shrink: 0;
  1238. margin-left: 10rpx;
  1239. }
  1240. .brand-check {
  1241. display: flex;
  1242. flex-direction: row;
  1243. align-items: center;
  1244. justify-content: center;
  1245. border: 1px solid #f8a01d;
  1246. border-radius: 8rpx;
  1247. color: #ff7a0e;
  1248. font-family: PingFang SC;
  1249. font-weight: 400;
  1250. font-size: 12px;
  1251. padding: 4rpx 10rpx;
  1252. line-height: 1;
  1253. white-space: nowrap;
  1254. text {
  1255. margin-right: 4rpx;
  1256. }
  1257. }
  1258. .goods-desc {
  1259. font-size: 20rpx;
  1260. color: #999;
  1261. display: block;
  1262. margin-bottom: 20rpx;
  1263. white-space: nowrap;
  1264. overflow: hidden;
  1265. text-overflow: ellipsis;
  1266. }
  1267. .goods-info {
  1268. display: flex;
  1269. justify-content: space-between;
  1270. align-items: center;
  1271. }
  1272. .price-info {
  1273. display: flex;
  1274. align-items: baseline;
  1275. .price-symbol {
  1276. font-size: 24rpx;
  1277. color: #ff7a0e;
  1278. }
  1279. .price-value {
  1280. font-size: 36rpx;
  1281. color: #ff7a0e;
  1282. font-weight: bold;
  1283. margin: 0 4rpx;
  1284. }
  1285. .price-unit {
  1286. font-size: 24rpx;
  1287. color: #999;
  1288. }
  1289. }
  1290. .quantity-control {
  1291. display: flex;
  1292. align-items: center;
  1293. button {
  1294. width: 60rpx;
  1295. height: 60rpx;
  1296. padding: 0;
  1297. margin: 0;
  1298. display: flex;
  1299. align-items: center;
  1300. justify-content: center;
  1301. font-size: 28rpx;
  1302. color: #666;
  1303. background: #ffffff;
  1304. border: none;
  1305. border-radius: 50%;
  1306. &::after {
  1307. border: none;
  1308. }
  1309. &:active {
  1310. opacity: 0.8;
  1311. }
  1312. }
  1313. .quantity {
  1314. width: 80rpx;
  1315. text-align: center;
  1316. font-size: 32rpx;
  1317. color: #333;
  1318. }
  1319. }
  1320. .rules-link {
  1321. margin-top: 20rpx;
  1322. }
  1323. .rules-link .rules {
  1324. display: flex;
  1325. align-items: center;
  1326. font-family: PingFang SC;
  1327. font-weight: 400;
  1328. font-size: 12px;
  1329. line-height: 140%;
  1330. letter-spacing: 0%;
  1331. color: #666;
  1332. }
  1333. }
  1334. .other-unrecycle-card {
  1335. display: flex;
  1336. align-items: center;
  1337. background: #fff;
  1338. border-radius: 24rpx;
  1339. box-shadow: 0 4rpx 24rpx rgba(0,0,0,0.06);
  1340. padding: 30rpx 30rpx 30rpx 30rpx;
  1341. margin: 30rpx 0 0 0;
  1342. }
  1343. .other-unrecycle-img {
  1344. width: 120rpx;
  1345. height: 120rpx;
  1346. border-radius: 24rpx;
  1347. background: #f8f8f8;
  1348. margin-right: 28rpx;
  1349. object-fit: contain;
  1350. flex-shrink: 0;
  1351. }
  1352. .other-unrecycle-info {
  1353. flex: 1;
  1354. display: flex;
  1355. flex-direction: column;
  1356. justify-content: center;
  1357. min-width: 0;
  1358. }
  1359. .other-unrecycle-title {
  1360. font-size: 30rpx;
  1361. color: #222;
  1362. font-weight: bold;
  1363. margin-bottom: 8rpx;
  1364. word-break: break-all;
  1365. white-space: normal;
  1366. overflow: visible;
  1367. }
  1368. .other-unrecycle-desc {
  1369. font-size: 24rpx;
  1370. color: #999;
  1371. margin-bottom: 12rpx;
  1372. text-overflow: ellipsis;
  1373. overflow: hidden;
  1374. white-space: nowrap;
  1375. }
  1376. .other-unrecycle-price-row {
  1377. display: flex;
  1378. align-items: center;
  1379. }
  1380. .other-unrecycle-price {
  1381. font-size: 28rpx;
  1382. color: #ff9c00;
  1383. font-weight: bold;
  1384. }
  1385. .other-unrecycle-btn {
  1386. width: 60rpx;
  1387. height: 60rpx;
  1388. margin-left: 24rpx;
  1389. border-radius: 50%;
  1390. background: #fff;
  1391. color: #666;
  1392. font-size: 36rpx;
  1393. border: none;
  1394. display: flex;
  1395. align-items: center;
  1396. justify-content: center;
  1397. }
  1398. .fixed-bottom-wrap {
  1399. position: fixed;
  1400. left: 0;
  1401. right: 0;
  1402. bottom: calc(v-bind('tabbarHeight + "px"') + env(safe-area-inset-bottom));
  1403. width: 100vw;
  1404. z-index: 1001;
  1405. background: transparent;
  1406. box-sizing: border-box;
  1407. pointer-events: auto;
  1408. }
  1409. .bottom-bar-divider {
  1410. width: 100%;
  1411. height: 1px;
  1412. background: #f0f0f0;
  1413. position: absolute;
  1414. left: 0;
  1415. bottom: 0;
  1416. z-index: 1;
  1417. }
  1418. .green-tip-bar {
  1419. width: 100%;
  1420. background: #eaffea;
  1421. color: #13ac47;
  1422. font-size: 20rpx;
  1423. // padding: 16rpx 30rpx 0 30rpx;
  1424. box-sizing: border-box;
  1425. text-align: left;
  1426. display: flex;
  1427. align-items: center;
  1428. justify-content: center;
  1429. // flex-direction: r;
  1430. .tip-highlight {
  1431. color: #ff9c00;
  1432. font-weight: bold;
  1433. font-size: 20rpx;
  1434. }
  1435. }
  1436. .bottom-bar {
  1437. width: 100%;
  1438. background-color: #fff;
  1439. display: flex;
  1440. align-items: center;
  1441. justify-content: space-between;
  1442. padding: 0 30rpx;
  1443. box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
  1444. height: 120rpx;
  1445. border-top-left-radius: 0;
  1446. border-top-right-radius: 0;
  1447. border-bottom-left-radius: env(safe-area-inset-bottom);
  1448. border-bottom-right-radius: env(safe-area-inset-bottom);
  1449. .bottom-left {
  1450. // flex: 1;
  1451. display: flex;
  1452. flex-direction: column;
  1453. justify-content: center;
  1454. .summary-row {
  1455. display: flex;
  1456. align-items: center;
  1457. font-size: 26rpx;
  1458. color: #333;
  1459. .summary-label {
  1460. color: #333;
  1461. }
  1462. .summary-count {
  1463. color: #ff9c00;
  1464. font-weight: bold;
  1465. font-size: 28rpx;
  1466. }
  1467. }
  1468. .amount-row {
  1469. display: flex;
  1470. align-items: center;
  1471. margin-top: 4rpx;
  1472. .amount {
  1473. color: #ff9c00;
  1474. font-size: 44rpx;
  1475. font-weight: bold;
  1476. vertical-align: middle;
  1477. }
  1478. }
  1479. }
  1480. .submit-btn {
  1481. width: 300rpx;
  1482. height: 88rpx;
  1483. background: linear-gradient(to right, #ffd01e, #ff8917);
  1484. border-radius: 44rpx;
  1485. color: #fff;
  1486. font-size: 32rpx;
  1487. font-weight: bold;
  1488. display: flex;
  1489. align-items: center;
  1490. justify-content: center;
  1491. border: none;
  1492. // margin-left: 0rpx;
  1493. box-shadow: 0 4rpx 16rpx rgba(255, 156, 0, 0.08);
  1494. &::after {
  1495. border: none;
  1496. }
  1497. &:active {
  1498. opacity: 0.9;
  1499. }
  1500. }
  1501. }
  1502. .detail-popup-mask {
  1503. position: fixed;
  1504. left: 0;
  1505. right: 0;
  1506. top: 0;
  1507. bottom: calc(90rpx + env(safe-area-inset-bottom)); /* tabbar高度+安全区 */
  1508. background: rgba(0,0,0,0.35);
  1509. z-index: 8;
  1510. display: flex;
  1511. align-items: flex-end;
  1512. justify-content: center;
  1513. }
  1514. .detail-popup {
  1515. width: 100vw;
  1516. max-width: none;
  1517. background: #fff;
  1518. border-radius: 48rpx 48rpx 0 0;
  1519. box-shadow: 0 8rpx 48rpx rgba(0,0,0,0.18);
  1520. display: flex;
  1521. flex-direction: column;
  1522. align-items: stretch;
  1523. position: relative;
  1524. padding: 0;
  1525. overflow: hidden;
  1526. min-height: 520rpx;
  1527. max-height: 80vh;
  1528. bottom: 0;
  1529. }
  1530. .detail-popup-close {
  1531. position: absolute;
  1532. right: 36rpx;
  1533. top: 36rpx;
  1534. font-size: 36rpx;
  1535. color: #bbb;
  1536. z-index: 2;
  1537. }
  1538. .popup-green-tip {
  1539. border-radius: 48rpx 48rpx 0 0;
  1540. font-size: 20rpx;
  1541. padding: 24rpx 30rpx 0 30rpx;
  1542. background: #eaffea;
  1543. color: #13ac47;
  1544. text-align: left;
  1545. }
  1546. .panel-header {
  1547. display: flex;
  1548. align-items: center;
  1549. justify-content: center;
  1550. font-size: 32rpx;
  1551. font-weight: bold;
  1552. padding: 40rpx 36rpx 0 36rpx;
  1553. background: #fff;
  1554. position: relative;
  1555. }
  1556. .panel-title {
  1557. font-size: 32rpx;
  1558. color: #222;
  1559. font-weight: bold;
  1560. text-align: center;
  1561. flex: 1;
  1562. }
  1563. .popup-panel-list {
  1564. flex: 1;
  1565. overflow-y: auto;
  1566. max-height: 36vh;
  1567. padding: 0 24rpx;
  1568. scrollbar-width: none; /* Firefox */
  1569. -ms-overflow-style: none; /* IE and Edge */
  1570. &::-webkit-scrollbar {
  1571. width: 0 !important;
  1572. display: none; /* Chrome, Safari, Opera */
  1573. }
  1574. }
  1575. .panel-item {
  1576. display: flex;
  1577. align-items: center;
  1578. justify-content: flex-start;
  1579. padding: 24rpx 0;
  1580. border-bottom: 1px solid #f0f0f0;
  1581. }
  1582. .panel-item-img {
  1583. width: 100rpx;
  1584. height: 100rpx;
  1585. margin-right: 20rpx;
  1586. border-radius: 16rpx;
  1587. background: #f8f8f8;
  1588. }
  1589. .panel-item-info {
  1590. flex: 1;
  1591. display: flex;
  1592. flex-direction: column;
  1593. justify-content: center;
  1594. min-width: 0;
  1595. }
  1596. .panel-item-name {
  1597. font-size: 30rpx;
  1598. color: #222;
  1599. font-weight: bold;
  1600. margin-bottom: 4rpx;
  1601. text-overflow: ellipsis;
  1602. overflow: hidden;
  1603. white-space: nowrap;
  1604. }
  1605. .panel-item-desc {
  1606. font-size: 24rpx;
  1607. color: #999;
  1608. margin-bottom: 4rpx;
  1609. text-overflow: ellipsis;
  1610. overflow: hidden;
  1611. white-space: nowrap;
  1612. }
  1613. .panel-item-price {
  1614. font-size: 26rpx;
  1615. color: #ff9c00;
  1616. margin-top: 2rpx;
  1617. }
  1618. .panel-quantity-control {
  1619. display: flex;
  1620. align-items: center;
  1621. margin-left: 20rpx;
  1622. }
  1623. .panel-quantity-control button {
  1624. width: 48rpx;
  1625. height: 48rpx;
  1626. padding: 0;
  1627. margin: 0 8rpx;
  1628. display: flex;
  1629. align-items: center;
  1630. justify-content: center;
  1631. font-size: 32rpx;
  1632. color: #666;
  1633. background: #ffffff;
  1634. border: none;
  1635. border-radius: 50%;
  1636. &::after {
  1637. border: none;
  1638. }
  1639. &:active {
  1640. opacity: 0.8;
  1641. }
  1642. }
  1643. .panel-quantity-control .quantity {
  1644. width: 40rpx;
  1645. text-align: center;
  1646. font-size: 28rpx;
  1647. color: #333;
  1648. }
  1649. .popup-bottom-bar {
  1650. width: 100%;
  1651. background-color: #fff;
  1652. display: flex;
  1653. align-items: center;
  1654. justify-content: space-between;
  1655. padding: 0 30rpx;
  1656. box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
  1657. height: 120rpx;
  1658. border-top: 1px solid #f0f0f0;
  1659. border-bottom-left-radius: 48rpx;
  1660. border-bottom-right-radius: 48rpx;
  1661. // padding-bottom: env(safe-area-inset-bottom);
  1662. .bottom-left {
  1663. display: flex;
  1664. flex-direction: column;
  1665. justify-content: center;
  1666. .summary-row {
  1667. display: flex;
  1668. align-items: center;
  1669. font-size: 26rpx;
  1670. color: #333;
  1671. .summary-label {
  1672. color: #333;
  1673. }
  1674. .summary-count {
  1675. color: #ff9c00;
  1676. font-weight: bold;
  1677. font-size: 28rpx;
  1678. }
  1679. }
  1680. .amount-row {
  1681. display: flex;
  1682. align-items: center;
  1683. margin-top: 4rpx;
  1684. .amount {
  1685. color: #ff9c00;
  1686. font-size: 44rpx;
  1687. font-weight: bold;
  1688. vertical-align: middle;
  1689. }
  1690. }
  1691. }
  1692. .submit-btn {
  1693. width: 300rpx;
  1694. height: 88rpx;
  1695. background: linear-gradient(to right, #ffd01e, #ff8917);
  1696. border-radius: 44rpx;
  1697. color: #fff;
  1698. font-size: 32rpx;
  1699. font-weight: bold;
  1700. display: flex;
  1701. align-items: center;
  1702. justify-content: center;
  1703. border: none;
  1704. box-shadow: 0 4rpx 16rpx rgba(255, 156, 0, 0.08);
  1705. &::after {
  1706. border: none;
  1707. }
  1708. &:active {
  1709. opacity: 0.9;
  1710. }
  1711. }
  1712. }
  1713. .brand-popup-mask {
  1714. position: fixed;
  1715. left: 0;
  1716. right: 0;
  1717. top: 0;
  1718. bottom: 0;
  1719. background: rgba(0,0,0,0.35);
  1720. z-index: 3000;
  1721. display: flex;
  1722. align-items: flex-end;
  1723. justify-content: center;
  1724. }
  1725. .brand-popup {
  1726. position: relative;
  1727. width: 100%;
  1728. max-width: 750px;
  1729. background: #fff;
  1730. border-radius: 32rpx 32rpx 0 0;
  1731. box-shadow: 0 -4rpx 24rpx rgba(0,0,0,0.08);
  1732. padding-bottom: 40rpx;
  1733. max-height: 90vh;
  1734. display: flex;
  1735. flex-direction: column;
  1736. overflow: hidden;
  1737. }
  1738. .brand-popup-header {
  1739. display: flex;
  1740. align-items: center;
  1741. justify-content: center;
  1742. padding: 32rpx 24rpx 0 24rpx;
  1743. font-size: 32rpx;
  1744. font-weight: bold;
  1745. position: relative;
  1746. }
  1747. .brand-popup-close {
  1748. position: absolute;
  1749. left: 24rpx;
  1750. font-size: 28rpx;
  1751. color: #888;
  1752. }
  1753. .brand-popup-title {
  1754. font-size: 32rpx;
  1755. color: #222;
  1756. font-weight: bold;
  1757. }
  1758. .brand-popup-search {
  1759. padding: 20rpx 24rpx 0 24rpx;
  1760. }
  1761. .brand-search-input {
  1762. width: 100%;
  1763. height: 60rpx;
  1764. border-radius: 30rpx;
  1765. background: #f5f5f5;
  1766. border: none;
  1767. padding-left: 40rpx;
  1768. font-size: 28rpx;
  1769. color: #888;
  1770. }
  1771. .brand-popup-list {
  1772. flex: 1;
  1773. overflow-y: auto;
  1774. max-height: 60vh;
  1775. padding: 0 24rpx;
  1776. scrollbar-width: none; /* Firefox */
  1777. -ms-overflow-style: none; /* IE and Edge */
  1778. &::-webkit-scrollbar {
  1779. width: 0 !important;
  1780. display: none; /* Chrome, Safari, Opera */
  1781. }
  1782. }
  1783. .brand-letter {
  1784. font-size: 28rpx;
  1785. color: #888;
  1786. margin: 24rpx 0 8rpx 0;
  1787. font-weight: bold;
  1788. }
  1789. .brand-item {
  1790. display: flex;
  1791. align-items: center;
  1792. padding: 16rpx 0;
  1793. border-bottom: 1px solid #f0f0f0;
  1794. }
  1795. .brand-logo {
  1796. width: 60rpx;
  1797. height: 60rpx;
  1798. margin-right: 20rpx;
  1799. border-radius: 8rpx;
  1800. background: #f8f8f8;
  1801. }
  1802. .brand-name {
  1803. font-size: 28rpx;
  1804. color: #222;
  1805. }
  1806. .brand-index-bar {
  1807. position: absolute;
  1808. right: 12rpx;
  1809. top: 120rpx;
  1810. width: 32rpx;
  1811. display: flex;
  1812. flex-direction: column;
  1813. align-items: center;
  1814. z-index: 10;
  1815. }
  1816. .brand-index-bar text {
  1817. font-size: 22rpx;
  1818. color: #bbb;
  1819. margin: 4rpx 0;
  1820. font-weight: bold;
  1821. &.active {
  1822. color: #ff9c00;
  1823. }
  1824. }
  1825. .rule-popup-mask {
  1826. position: fixed;
  1827. left: 0;
  1828. right: 0;
  1829. top: 0;
  1830. bottom: 0;
  1831. background: rgba(0,0,0,0.35);
  1832. z-index: 4000;
  1833. display: flex;
  1834. align-items: center;
  1835. justify-content: center;
  1836. }
  1837. .rule-popup {
  1838. width: 90vw;
  1839. max-width: 600rpx;
  1840. background: #fff;
  1841. border-radius: 48rpx;
  1842. box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.12);
  1843. display: flex;
  1844. flex-direction: column;
  1845. align-items: center;
  1846. position: relative;
  1847. padding-bottom: 40rpx;
  1848. }
  1849. .rule-popup-title {
  1850. font-size: 36rpx;
  1851. color: #222;
  1852. font-weight: bold;
  1853. text-align: center;
  1854. margin-top: 48rpx;
  1855. margin-bottom: 16rpx;
  1856. }
  1857. .rule-popup-content {
  1858. width: 100%;
  1859. max-height: 420rpx;
  1860. padding: 0 40rpx;
  1861. box-sizing: border-box;
  1862. overflow-y: auto;
  1863. scrollbar-width: none; /* Firefox */
  1864. -ms-overflow-style: none; /* IE and Edge */
  1865. &::-webkit-scrollbar {
  1866. width: 0 !important;
  1867. display: none; /* Chrome, Safari, Opera */
  1868. }
  1869. }
  1870. .rule-popup-desc {
  1871. font-size: 26rpx;
  1872. color: #888;
  1873. text-align: center;
  1874. margin-bottom: 24rpx;
  1875. margin-top: 0;
  1876. }
  1877. .rule-popup-warning {
  1878. width: 100%;
  1879. border: 2rpx solid #ffb800;
  1880. color: #ffb800;
  1881. background: #fffbe6;
  1882. border-radius: 32rpx;
  1883. font-size: 28rpx;
  1884. text-align: center;
  1885. padding: 16rpx 0;
  1886. margin-bottom: 24rpx;
  1887. font-weight: bold;
  1888. }
  1889. .rule-popup-img {
  1890. display: block;
  1891. margin: 0 auto 24rpx auto;
  1892. max-width: 80%;
  1893. max-height: 300rpx;
  1894. border-radius: 16rpx;
  1895. object-fit: contain;
  1896. }
  1897. .rule-popup-btn {
  1898. width: 80%;
  1899. height: 88rpx;
  1900. background: linear-gradient(to right, #ffd01e, #ff8917);
  1901. border-radius: 44rpx;
  1902. color: #fff;
  1903. font-size: 32rpx;
  1904. font-weight: bold;
  1905. display: flex;
  1906. align-items: center;
  1907. justify-content: center;
  1908. border: none;
  1909. margin: 0 auto;
  1910. margin-top: 16rpx;
  1911. box-shadow: 0 4rpx 16rpx rgba(255, 156, 0, 0.08);
  1912. &::after {
  1913. border: none;
  1914. }
  1915. &:active {
  1916. opacity: 0.9;
  1917. }
  1918. }
  1919. .rule-popup-close {
  1920. position: absolute;
  1921. right: 32rpx;
  1922. bottom: 32rpx;
  1923. width: 72rpx;
  1924. height: 72rpx;
  1925. background: #ff5a5f;
  1926. border-radius: 50%;
  1927. display: flex;
  1928. align-items: center;
  1929. justify-content: center;
  1930. z-index: 10;
  1931. box-shadow: 0 2rpx 8rpx rgba(255,90,95,0.12);
  1932. }
  1933. /* 预约上门取件弹窗样式 */
  1934. .pickup-confirm-mask {
  1935. position: fixed;
  1936. left: 0;
  1937. right: 0;
  1938. top: 0;
  1939. bottom: 0;
  1940. background: rgba(0,0,0,0.35);
  1941. z-index: 5000;
  1942. display: flex;
  1943. align-items: center;
  1944. justify-content: center;
  1945. }
  1946. .pickup-confirm-popup {
  1947. width: 90vw;
  1948. max-width: 600rpx;
  1949. background: #fff;
  1950. border-radius: 48rpx;
  1951. box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.12);
  1952. display: flex;
  1953. flex-direction: column;
  1954. align-items: center;
  1955. position: relative;
  1956. padding: 48rpx 36rpx 40rpx 36rpx;
  1957. }
  1958. .pickup-confirm-title {
  1959. font-size: 36rpx;
  1960. color: #222;
  1961. font-weight: bold;
  1962. text-align: center;
  1963. margin-bottom: 24rpx;
  1964. }
  1965. .pickup-confirm-content {
  1966. width: 100%;
  1967. font-size: 26rpx;
  1968. color: #333;
  1969. text-align: left;
  1970. line-height: 1.7;
  1971. margin-bottom: 36rpx;
  1972. .confirm-item {
  1973. margin-bottom: 24rpx;
  1974. &:last-child {
  1975. margin-bottom: 0;
  1976. }
  1977. }
  1978. .confirm-item-red {
  1979. color: red;
  1980. }
  1981. }
  1982. .pickup-confirm-btn-row {
  1983. width: 100%;
  1984. display: flex;
  1985. justify-content: space-between;
  1986. gap: 32rpx;
  1987. }
  1988. .pickup-confirm-btn {
  1989. flex: 1;
  1990. height: 88rpx;
  1991. border-radius: 44rpx;
  1992. font-size: 32rpx;
  1993. font-weight: bold;
  1994. display: flex;
  1995. align-items: center;
  1996. justify-content: center;
  1997. border: 2rpx solid #ffd01e;
  1998. background: #fff;
  1999. color: #ff9c00;
  2000. box-shadow: 0 4rpx 16rpx rgba(255, 156, 0, 0.08);
  2001. }
  2002. .pickup-confirm-btn:not(.agree) {
  2003. background: #fff0d2;
  2004. }
  2005. .pickup-confirm-btn.agree {
  2006. background: linear-gradient(to right, #ffd01e, #ff8917);
  2007. color: #fff;
  2008. border: none;
  2009. }
  2010. .uv-tabbar {
  2011. z-index: 1000;
  2012. }
  2013. .loading-more {
  2014. text-align: center;
  2015. color: #999;
  2016. padding: 20rpx 0;
  2017. font-size: 26rpx;
  2018. }
  2019. .brand-confirm-mask {
  2020. position: fixed;
  2021. left: 0;
  2022. right: 0;
  2023. top: 0;
  2024. bottom: 0;
  2025. background: rgba(0,0,0,0.25);
  2026. z-index: 5001;
  2027. display: flex;
  2028. align-items: center;
  2029. justify-content: center;
  2030. }
  2031. .brand-confirm-popup {
  2032. width: 70vw;
  2033. max-width: 270px;
  2034. background: #fff;
  2035. border-radius: 32rpx;
  2036. box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.12);
  2037. display: flex;
  2038. flex-direction: column;
  2039. align-items: center;
  2040. padding: 48rpx 20rpx 36rpx 20rpx;
  2041. position: relative;
  2042. }
  2043. .brand-confirm-title {
  2044. font-size: 36rpx;
  2045. color: #222;
  2046. font-weight: bold;
  2047. text-align: center;
  2048. margin-bottom: 24rpx;
  2049. }
  2050. .brand-confirm-logo-wrap {
  2051. width: 120rpx;
  2052. height: 120rpx;
  2053. background: #f8f8f8;
  2054. border-radius: 50%;
  2055. display: flex;
  2056. align-items: center;
  2057. justify-content: center;
  2058. margin-bottom: 18rpx;
  2059. }
  2060. .brand-confirm-logo {
  2061. width: 80rpx;
  2062. height: 80rpx;
  2063. border-radius: 50%;
  2064. }
  2065. .brand-confirm-name {
  2066. font-size: 28rpx;
  2067. color: #222;
  2068. font-weight: bold;
  2069. text-align: center;
  2070. margin-bottom: 16rpx;
  2071. }
  2072. .brand-confirm-desc {
  2073. font-size: 24rpx;
  2074. color: #999;
  2075. text-align: center;
  2076. margin-bottom: 32rpx;
  2077. line-height: 1.6;
  2078. }
  2079. .brand-confirm-btn-row {
  2080. width: 100%;
  2081. display: flex;
  2082. justify-content: space-between;
  2083. gap: 24rpx;
  2084. }
  2085. .brand-confirm-btn {
  2086. flex: 1;
  2087. height: 72rpx;
  2088. border-radius: 36rpx;
  2089. font-size: 28rpx;
  2090. font-weight: bold;
  2091. display: flex;
  2092. align-items: center;
  2093. justify-content: center;
  2094. border: none;
  2095. margin: 0 0;
  2096. }
  2097. .brand-confirm-btn.retry {
  2098. background: #fff;
  2099. color: #ff9c00;
  2100. border: 2rpx solid #ff9c00;
  2101. }
  2102. .brand-confirm-btn.confirm {
  2103. background: linear-gradient(to right, #ffd01e, #ff8917);
  2104. color: #fff;
  2105. border: none;
  2106. }
  2107. .price-info-popup-mask {
  2108. position: fixed;
  2109. left: 0;
  2110. right: 0;
  2111. top: 0;
  2112. bottom: 0;
  2113. background: rgba(0,0,0,0.4);
  2114. z-index: 6000;
  2115. display: flex;
  2116. align-items: center;
  2117. justify-content: center;
  2118. }
  2119. .price-info-popup {
  2120. width: 85vw;
  2121. max-width: 600rpx;
  2122. background: #fff;
  2123. border-radius: 24rpx;
  2124. box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.12);
  2125. display: flex;
  2126. flex-direction: column;
  2127. align-items: center;
  2128. position: relative;
  2129. padding: 40rpx 40rpx;
  2130. .price-info-popup-title {
  2131. font-size: 34rpx;
  2132. color: #333;
  2133. font-weight: bold;
  2134. text-align: center;
  2135. margin-bottom: 30rpx;
  2136. }
  2137. .price-info-popup-content {
  2138. width: 100%;
  2139. max-height: 50vh;
  2140. .price-info-section {
  2141. margin-bottom: 30rpx;
  2142. &:last-child {
  2143. margin-bottom: 0;
  2144. }
  2145. .price-info-heading {
  2146. font-size: 28rpx;
  2147. color: #333;
  2148. font-weight: 500;
  2149. margin-bottom: 15rpx;
  2150. }
  2151. .price-info-text {
  2152. font-size: 26rpx;
  2153. color: #666;
  2154. line-height: 1.6;
  2155. }
  2156. }
  2157. }
  2158. .price-info-popup-btn {
  2159. width: 100%;
  2160. height: 88rpx;
  2161. background: linear-gradient(to right, #ffd01e, #ff8917);
  2162. border-radius: 44rpx;
  2163. color: #fff;
  2164. font-size: 32rpx;
  2165. font-weight: bold;
  2166. display: flex;
  2167. align-items: center;
  2168. justify-content: center;
  2169. border: none;
  2170. margin-top: 40rpx;
  2171. box-shadow: 0 4rpx 16rpx rgba(255, 156, 0, 0.08);
  2172. &::after {
  2173. border: none;
  2174. }
  2175. &:active {
  2176. opacity: 0.9;
  2177. }
  2178. }
  2179. }
  2180. /* 减少数量时的品牌选择弹窗 */
  2181. .brand-reduce-popup-mask {
  2182. position: fixed;
  2183. left: 0;
  2184. right: 0;
  2185. top: 0;
  2186. bottom: 0;
  2187. background: rgba(0,0,0,0.35);
  2188. z-index: 5001;
  2189. display: flex;
  2190. align-items: center;
  2191. justify-content: center;
  2192. }
  2193. .brand-reduce-popup {
  2194. width: 70vw;
  2195. max-width: 270px;
  2196. background: #fff;
  2197. border-radius: 32rpx;
  2198. box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.12);
  2199. display: flex;
  2200. flex-direction: column;
  2201. align-items: center;
  2202. padding: 48rpx 20rpx 36rpx 20rpx;
  2203. position: relative;
  2204. }
  2205. .brand-reduce-popup-header {
  2206. display: flex;
  2207. align-items: center;
  2208. justify-content: center;
  2209. padding: 32rpx 24rpx 0 24rpx;
  2210. font-size: 32rpx;
  2211. font-weight: bold;
  2212. position: relative;
  2213. }
  2214. .brand-reduce-popup-close {
  2215. position: absolute;
  2216. left: 24rpx;
  2217. font-size: 28rpx;
  2218. color: #888;
  2219. }
  2220. .brand-reduce-popup-title {
  2221. font-size: 32rpx;
  2222. color: #222;
  2223. font-weight: bold;
  2224. }
  2225. .brand-reduce-popup-list {
  2226. flex: 1;
  2227. overflow-y: auto;
  2228. max-height: 60vh;
  2229. padding: 0 24rpx;
  2230. scrollbar-width: none; /* Firefox */
  2231. -ms-overflow-style: none; /* IE and Edge */
  2232. &::-webkit-scrollbar {
  2233. width: 0 !important;
  2234. display: none; /* Chrome, Safari, Opera */
  2235. }
  2236. }
  2237. .brand-item {
  2238. display: flex;
  2239. align-items: center;
  2240. padding: 16rpx 0;
  2241. border-bottom: 1px solid #f0f0f0;
  2242. }
  2243. .brand-logo {
  2244. width: 60rpx;
  2245. height: 60rpx;
  2246. margin-right: 20rpx;
  2247. border-radius: 8rpx;
  2248. background: #f8f8f8;
  2249. }
  2250. .brand-name {
  2251. font-size: 28rpx;
  2252. color: #222;
  2253. }
  2254. </style>