爱简收旧衣按件回收前端代码仓库
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.

2371 lines
66 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
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
1 month 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
1 month ago
1 month 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
1 month 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
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
1 month 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
2 months ago
2 months ago
2 months ago
2 months ago
1 month 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
1 month 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
1 month ago
1 month ago
1 month ago
1 month 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
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
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month 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
1 month 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="请输入要查询的内容" @input="onBrandSearchInput" />
  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.logo" 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.logo" 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.logo" 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. logo: '',
  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. currentProductId: null, // 当前查看品牌的商品ID
  348. searchTimer: null, // 搜索防抖定时器
  349. }
  350. },
  351. computed: {
  352. recycle_banner() {
  353. const item = getApp().globalData.configData.find(i => i.keyName === 'recycle_banner')
  354. return item ? item.keyContent : ''
  355. },
  356. recycle_toast() {
  357. const item = getApp().globalData.configData.find(i => i.keyName === 'recycle_toast')
  358. return item ? item.keyContent : ''
  359. },
  360. huodong_text() {
  361. const item = getApp().globalData.configData.find(i => i.keyName === 'huodong_text')
  362. return item ? item.keyContent : ''
  363. },
  364. // 当前分类的商品列表
  365. recycleList() {
  366. const currentCategoryId = this.categories[this.currentCategory]?.id
  367. return this.allProducts[currentCategoryId] || []
  368. },
  369. // 计算总数量
  370. totalCount() {
  371. return Object.values(this.allProducts).reduce((total, categoryItems) => {
  372. return total + categoryItems.reduce((sum, item) => {
  373. // 如果商品有品牌数量,汇总所有品牌的数量
  374. if (item.brandQuantities && Object.keys(item.brandQuantities).length > 0) {
  375. return sum + Object.values(item.brandQuantities).reduce((brandSum, qty) => brandSum + qty, 0)
  376. }
  377. // 否则使用原来的quantity字段
  378. return sum + (item.quantity || 0)
  379. }, 0)
  380. }, 0)
  381. },
  382. // 计算总单位文本
  383. totalUnitText() {
  384. // 获取所有已选商品的单位
  385. const units = new Set()
  386. Object.values(this.allProducts).forEach(categoryItems => {
  387. categoryItems.forEach(item => {
  388. let hasQuantity = false
  389. if (item.brandQuantities && Object.keys(item.brandQuantities).length > 0) {
  390. hasQuantity = Object.values(item.brandQuantities).some(qty => qty > 0)
  391. } else {
  392. hasQuantity = (item.quantity || 0) > 0
  393. }
  394. if (hasQuantity) {
  395. units.add(item.unit || '件')
  396. }
  397. })
  398. })
  399. // 如果只有一种单位,显示单位;如果混合多种单位,显示"项"
  400. if (units.size === 0) return '件'
  401. if (units.size === 1) return Array.from(units)[0]
  402. return '项'
  403. },
  404. // 计算总价格范围
  405. totalPriceRange() {
  406. const result = Object.values(this.allProducts).reduce((categoryTotal, categoryItems) => {
  407. return categoryItems.reduce((sum, item) => {
  408. let itemQuantity = 0
  409. // 如果商品有品牌数量,汇总所有品牌的数量
  410. if (item.brandQuantities && Object.keys(item.brandQuantities).length > 0) {
  411. itemQuantity = Object.values(item.brandQuantities).reduce((brandSum, qty) => brandSum + qty, 0)
  412. } else {
  413. itemQuantity = item.quantity || 0
  414. }
  415. if (itemQuantity > 0) {
  416. const minPrice = Number(item.price) || 0
  417. const maxPrice = Number(item.maxPrice) || Number(item.price) || 0
  418. sum.min += itemQuantity * minPrice
  419. sum.max += itemQuantity * maxPrice
  420. }
  421. return sum
  422. }, categoryTotal)
  423. }, { min: 0, max: 0 })
  424. return {
  425. min: result.min.toFixed(1),
  426. max: result.max.toFixed(1)
  427. }
  428. },
  429. // 计算总价格 (保持兼容性,使用最低价格)
  430. totalPrice() {
  431. return this.totalPriceRange.min
  432. },
  433. // 计算价格范围
  434. priceRange() {
  435. if (this.totalCount === 0) {
  436. return {
  437. min: '0.0',
  438. max: '0.0'
  439. }
  440. }
  441. return this.totalPriceRange
  442. },
  443. selectedProducts() {
  444. // 返回所有分类下所有已选商品,按品牌分组
  445. const products = []
  446. Object.values(this.allProducts).flat().forEach(item => {
  447. if (item.brandQuantities && Object.keys(item.brandQuantities).length > 0) {
  448. // 按品牌分别添加
  449. Object.entries(item.brandQuantities).forEach(([brandId, quantity]) => {
  450. if (quantity > 0) {
  451. const brandInfo = this.getBrandInfo(brandId)
  452. products.push({
  453. ...item,
  454. quantity: quantity,
  455. brandId: brandId,
  456. brandName: brandInfo ? brandInfo.name : '未知品牌',
  457. brandImage: brandInfo ? brandInfo.logo : '',
  458. uniqueKey: `${item.id}_${brandId}` // 用于区分同商品不同品牌
  459. })
  460. }
  461. })
  462. } else if (item.quantity > 0) {
  463. // 没有品牌的商品
  464. products.push({
  465. ...item,
  466. uniqueKey: item.id
  467. })
  468. }
  469. })
  470. return products
  471. },
  472. filteredBrandList() {
  473. return this.brandList
  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. logo: brandInfo ? brandInfo.logo : ''
  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. this.brandSearch = ''
  738. this.currentProductId = null
  739. if (this.searchTimer) {
  740. clearTimeout(this.searchTimer)
  741. this.searchTimer = null
  742. }
  743. },
  744. scrollToLetter(letter) {
  745. this.currentLetter = letter
  746. this.scrollToView = 'brand-letter-' + letter
  747. },
  748. // 添加下拉刷新方法
  749. async refreshData() {
  750. try {
  751. // 这里可以添加刷新数据的逻辑,比如重新获取商品列表等
  752. // 示例:重新初始化数据
  753. this.currentCategory = 0
  754. Object.values(this.allProducts).forEach(categoryItems => {
  755. categoryItems.forEach(item => {
  756. item.quantity = 0
  757. if (item.brandQuantities) {
  758. item.brandQuantities = {}
  759. }
  760. })
  761. })
  762. // 清空已查看规则的记录
  763. this.viewedRuleItems.clear()
  764. // 模拟网络请求延迟
  765. await new Promise(resolve => setTimeout(resolve, 1000))
  766. uni.showToast({
  767. title: '刷新成功',
  768. icon: 'success'
  769. })
  770. } catch (error) {
  771. uni.showToast({
  772. title: '刷新失败',
  773. icon: 'none'
  774. })
  775. } finally {
  776. // 停止下拉刷新动画
  777. uni.stopPullDownRefresh()
  778. }
  779. },
  780. toggleDetailPanel() {
  781. this.showDetailPanel = !this.showDetailPanel
  782. },
  783. fetchUserInfo() {
  784. if(uni.getStorageSync('token')){
  785. this.login_status = getApp().globalData.login_status;
  786. this.$api("getUserByToken",{},(res)=>{
  787. if(res.code == 200){
  788. this.userInfo = res.result
  789. // 检查用户是否被拉入黑名单
  790. this.isUserBlacklisted = res.result.isBlack === 'Y'
  791. // isTuiType 为0用户,1推广达人,2推广大使
  792. }
  793. })
  794. } else {
  795. this.login_status = false;
  796. }
  797. },
  798. updateQuantityByProduct(item, delta) {
  799. // 在明细弹窗中更新数量
  800. if (item.brandId) {
  801. // 有品牌ID的商品
  802. const originalItem = this.findOriginalItem(item.id)
  803. if (originalItem && originalItem.brandQuantities) {
  804. const currentQty = originalItem.brandQuantities[item.brandId] || 0
  805. const newQty = Math.max(0, currentQty + delta)
  806. this.$set(originalItem.brandQuantities, item.brandId, newQty)
  807. // 如果数量为0,删除该品牌
  808. if (newQty === 0) {
  809. this.$delete(originalItem.brandQuantities, item.brandId)
  810. }
  811. // 同步更新显示的数量
  812. item.quantity = newQty
  813. }
  814. } else {
  815. // 没有品牌的商品
  816. if (!item.quantity) item.quantity = 0
  817. item.quantity += delta
  818. if (item.quantity < 0) item.quantity = 0
  819. // 同步到原商品
  820. const originalItem = this.findOriginalItem(item.id)
  821. if (originalItem) {
  822. this.$set(originalItem, 'quantity', item.quantity)
  823. }
  824. }
  825. },
  826. // 查找原始商品对象
  827. findOriginalItem(itemId) {
  828. for (const categoryItems of Object.values(this.allProducts)) {
  829. const item = categoryItems.find(i => i.id === itemId)
  830. if (item) return item
  831. }
  832. return null
  833. },
  834. openRulePopup() {
  835. this.showRulePopup = true
  836. },
  837. closeRulePopup() {
  838. this.showRulePopup = false;
  839. // 如果是在等待品牌选择的状态下关闭规则弹窗,则接着打开品牌选择
  840. if (this.isWaitingForBrandSelection) {
  841. this.isWaitingForBrandSelection = false; // 清除等待状态
  842. const categoryId = this.categories[this.currentCategory]?.id;
  843. const item = this.allProducts[categoryId]?.[this.pendingBrandIndex];
  844. // 记录该商品的规则已被查看
  845. this.viewedRuleItems.add(item.id);
  846. this.getGoodsBrandList(item.id);
  847. this.showBrandPopup = true; // 打开品牌索引弹窗
  848. }
  849. },
  850. loadMoreGoods() {
  851. const categoryId = this.categories[this.currentCategory]?.id
  852. const page = (this.allProductsPage[categoryId] || 1) + 1
  853. const total = this.allProductsTotal[categoryId] || 0
  854. const loaded = (this.allProducts[categoryId] || []).length
  855. if (this.loadingMore || this.finished) return
  856. if (loaded < total) {
  857. this.loadingMore = true
  858. this.fetchGoodsList(categoryId, page, () => {
  859. this.loadingMore = false
  860. // 判断是否加载完
  861. const newLoaded = (this.allProducts[categoryId] || []).length
  862. this.finished = newLoaded >= (this.allProductsTotal[categoryId] || 0)
  863. })
  864. } else {
  865. this.finished = true
  866. }
  867. },
  868. openBrandConfirm(brand) {
  869. this.brandConfirmInfo = {
  870. id: brand.id,
  871. logo: brand.logo,
  872. name: brand.name
  873. }
  874. this.showBrandConfirm = true
  875. },
  876. closeBrandConfirm() {
  877. this.showBrandConfirm = false
  878. },
  879. confirmBrand() {
  880. this.showBrandConfirm = false
  881. this.showBrandPopup = false
  882. // 确认后将待加一的商品数量+1,并记录品牌ID
  883. if (this.pendingBrandIndex !== null) {
  884. const categoryId = this.categories[this.currentCategory]?.id
  885. const item = this.allProducts[categoryId]?.[this.pendingBrandIndex]
  886. if (item) {
  887. // 初始化品牌数量对象
  888. if (!item.brandQuantities) {
  889. this.$set(item, 'brandQuantities', {})
  890. }
  891. // 增加该品牌的数量
  892. const currentQty = item.brandQuantities[this.brandConfirmInfo.id] || 0
  893. this.$set(item.brandQuantities, this.brandConfirmInfo.id, currentQty + 1)
  894. // 清除原来的quantity(如果存在)
  895. if (item.quantity) {
  896. this.$set(item, 'quantity', 0)
  897. }
  898. }
  899. this.pendingBrandIndex = null
  900. }
  901. },
  902. getGoodsBrandList(productId, searchName = '') {
  903. this.currentProductId = productId
  904. const params = { productId }
  905. if (searchName.trim()) {
  906. params.name = searchName.trim()
  907. }
  908. this.$api('getGoodsBrandList', params, res => {
  909. // console.log(res,'res')
  910. if (res && res.success && res.result && res.result.records) {
  911. this.brandList = res.result.records.map(item => {
  912. // 获取品牌名称的拼音首字母
  913. const firstChar = this.getPinyinFirstLetter(item.name)
  914. return {
  915. id: item.id,
  916. logo: item.image || '/static/brand/alexander.png',
  917. name: item.name,
  918. letter: firstChar
  919. }
  920. })
  921. // console.log(this.brandList,'this.brandList')
  922. }
  923. })
  924. },
  925. // 获取中文拼音首字母
  926. getPinyinFirstLetter(str) {
  927. if (!str) return '#'
  928. const firstChar = str.charAt(0)
  929. // 遍历pinyin对象,查找包含该汉字的拼音
  930. for (let key in pinyin) {
  931. const chars = pinyin[key]
  932. if (chars && chars.indexOf(firstChar) !== -1) {
  933. return key.charAt(0).toUpperCase()
  934. }
  935. }
  936. let index = this.brandIndexList.indexOf(firstChar.toUpperCase())
  937. if (index != -1) {
  938. return this.brandIndexList[index]
  939. }
  940. return '#'
  941. },
  942. // 品牌搜索输入事件处理
  943. onBrandSearchInput(e) {
  944. const searchValue = e.detail.value
  945. // 清除之前的定时器
  946. if (this.searchTimer) {
  947. clearTimeout(this.searchTimer)
  948. }
  949. // 设置防抖,500ms后执行搜索
  950. this.searchTimer = setTimeout(() => {
  951. if (this.currentProductId) {
  952. this.getGoodsBrandList(this.currentProductId, searchValue)
  953. }
  954. }, 500)
  955. },
  956. // 初始化页面数据的方法
  957. initializePageData() {
  958. const options = this.loadOptions || {}
  959. if (options && options.categoryId) {
  960. const idx = this.categories.findIndex(c => c.id == options.categoryId)
  961. if (idx !== -1) this.currentCategory = idx
  962. }
  963. if (this.categories.length > 0) {
  964. this.fetchGoodsList(this.categories[this.currentCategory].id, 1)
  965. }
  966. uni.$on('bannerListUpdated', () => {
  967. this.$forceUpdate && this.$forceUpdate()
  968. })
  969. if (getApp().globalData.bannerList && getApp().globalData.bannerList.length > 0) {
  970. this.$forceUpdate && this.$forceUpdate()
  971. }
  972. // 检查全局清空标志(兼容 reLaunch)
  973. if (getApp().globalData.shouldClearRecycle) {
  974. Object.values(this.allProducts).forEach(categoryItems => {
  975. categoryItems.forEach(item => {
  976. this.$set(item, 'quantity', 0)
  977. if (item.brandQuantities) {
  978. this.$set(item, 'brandQuantities', {})
  979. }
  980. })
  981. })
  982. // 清空已查看规则的记录
  983. this.viewedRuleItems.clear()
  984. this.showDetailPanel = false
  985. this.$forceUpdate()
  986. getApp().globalData.shouldClearRecycle = false
  987. }
  988. },
  989. },
  990. created() {
  991. this.currentCategory = 0
  992. this.$nextTick(() => {
  993. if (this.categories.length > 0) {
  994. const firstCategoryId = this.categories[0]?.id
  995. if (firstCategoryId) {
  996. this.fetchGoodsList(firstCategoryId, 1)
  997. }
  998. }
  999. })
  1000. },
  1001. mounted() {
  1002. this.$nextTick(() => {
  1003. const query = uni.createSelectorQuery().in(this)
  1004. query.select('.uv-tabbar').boundingClientRect(rect => {
  1005. if (rect && rect.height) {
  1006. this.tabbarHeight = rect.height
  1007. } else {
  1008. this.tabbarHeight = uni.upx2px ? uni.upx2px(95) : 45
  1009. }
  1010. // console.log(this.tabbarHeight,'tabbarHeight')
  1011. }).exec()
  1012. })
  1013. },
  1014. onLoad(options) {
  1015. // 保存options参数
  1016. this.loadOptions = options
  1017. // 检查App数据是否已经准备好
  1018. if (!getApp().globalData.isAppDataReady) {
  1019. // 显示加载状态
  1020. uni.showLoading({
  1021. title: '加载中...',
  1022. mask: true
  1023. })
  1024. // 监听App数据准备完成事件
  1025. uni.$on('appDataReady', () => {
  1026. uni.hideLoading()
  1027. this.initializePageData()
  1028. })
  1029. } else {
  1030. // App数据已经准备好,直接初始化页面数据
  1031. this.initializePageData()
  1032. }
  1033. },
  1034. onUnload() {
  1035. uni.$off('bannerListUpdated')
  1036. // 移除事件监听
  1037. uni.$off('clearRecycleOrderData')
  1038. },
  1039. onShow() {
  1040. // 获取用户信息,检查黑名单状态
  1041. this.fetchUserInfo()
  1042. const id = getApp().globalData.targetRecycleCategoryId
  1043. if (id) {
  1044. const trySwitch = () => {
  1045. if (this.categories.length > 0) {
  1046. const idx = this.categories.findIndex(c => String(c.id) === String(id))
  1047. if (idx !== -1) {
  1048. this.currentCategory = idx
  1049. const categoryId = this.categories[idx]?.id
  1050. if (categoryId && !this.allProducts[categoryId]) {
  1051. this.loadingMore = false
  1052. this.finished = false
  1053. this.fetchGoodsList(categoryId, 1)
  1054. }
  1055. }
  1056. getApp().globalData.targetRecycleCategoryId = null
  1057. } else {
  1058. setTimeout(trySwitch, 100)
  1059. }
  1060. }
  1061. trySwitch()
  1062. }
  1063. // 检查全局清空标志
  1064. if (getApp().globalData.shouldClearRecycle) {
  1065. Object.values(this.allProducts).forEach(categoryItems => {
  1066. categoryItems.forEach(item => {
  1067. this.$set(item, 'quantity', 0)
  1068. if (item.brandQuantities) {
  1069. this.$set(item, 'brandQuantities', {})
  1070. }
  1071. })
  1072. })
  1073. // 清空已查看规则的记录
  1074. this.viewedRuleItems.clear()
  1075. this.showDetailPanel = false
  1076. this.$forceUpdate()
  1077. getApp().globalData.shouldClearRecycle = false
  1078. }
  1079. // 监听清除订单数据的事件
  1080. uni.$on('clearRecycleOrderData', () => {
  1081. // 清除所有商品的选中数量,保证响应式
  1082. Object.values(this.allProducts).forEach(categoryItems => {
  1083. categoryItems.forEach(item => {
  1084. this.$set(item, 'quantity', 0)
  1085. if (item.brandQuantities) {
  1086. this.$set(item, 'brandQuantities', {})
  1087. }
  1088. })
  1089. })
  1090. // 清空已查看规则的记录
  1091. this.viewedRuleItems.clear()
  1092. // 重置其他相关数据
  1093. this.showDetailPanel = false
  1094. this.$forceUpdate()
  1095. })
  1096. },
  1097. watch: {
  1098. categories(newVal) {
  1099. const id = getApp().globalData.targetRecycleCategoryId
  1100. const idx = newVal.findIndex(c => String(c.id) === String(id))
  1101. if (id && newVal.length > 0 && idx !== -1) {
  1102. this.currentCategory = idx
  1103. getApp().globalData.targetRecycleCategoryId = null
  1104. // 自动加载右侧商品
  1105. const categoryId = newVal[idx]?.id
  1106. if (categoryId && !this.allProducts[categoryId]) {
  1107. this.loadingMore = false
  1108. this.finished = false
  1109. this.fetchGoodsList(categoryId, 1)
  1110. }
  1111. }
  1112. }
  1113. },
  1114. }
  1115. </script>
  1116. <style lang="scss" scoped>
  1117. .container {
  1118. display: flex;
  1119. flex-direction: column;
  1120. height: 100vh;
  1121. background-color: #f5f5f5;
  1122. overflow: hidden;
  1123. }
  1124. .banner {
  1125. background: linear-gradient(135deg, #ff9500,#ff5e00);
  1126. position: relative;
  1127. height: 350rpx;
  1128. z-index: 1;
  1129. image {
  1130. width: 100%;
  1131. height: 90%;
  1132. }
  1133. }
  1134. .goods-list {
  1135. // flex: 1;
  1136. display: flex;
  1137. position: relative;
  1138. height: calc(100vh - 320rpx - 120rpx - env(safe-area-inset-bottom)); /* 减去banner和底部栏的高度 */
  1139. margin-top: -10rpx;
  1140. z-index: 2;
  1141. border-radius: 20rpx 20rpx 0 0;
  1142. overflow: hidden;
  1143. padding: 30rpx;
  1144. box-shadow: 0 -4rpx 8rpx rgba(0, 0, 0, 0.05);
  1145. background: linear-gradient(to bottom, #fff7e8, 20%,#ffffff);
  1146. .category-nav {
  1147. width: 20%;
  1148. background: #ffffff;
  1149. height: 100%;
  1150. border-right: 1rpx solid rgba(255, 126, 14, 0.1);
  1151. margin: 1rpx;
  1152. border-radius: 20rpx 0 0 0;
  1153. margin-right: 20rpx;
  1154. overflow-y: auto;
  1155. scrollbar-width: none; /* Firefox */
  1156. -ms-overflow-style: none; /* IE and Edge */
  1157. &::-webkit-scrollbar {
  1158. width: 0 !important;
  1159. display: none; /* Chrome, Safari, Opera */
  1160. }
  1161. .category-item {
  1162. position: relative;
  1163. padding: 28rpx 20rpx;
  1164. text-align: center;
  1165. font-family: PingFang SC;
  1166. font-weight: 600;
  1167. font-size: 15px;
  1168. line-height: 100%;
  1169. letter-spacing: 0px;
  1170. color: #666;
  1171. .category-dot {
  1172. position: absolute;
  1173. top: 15rpx;
  1174. right: 15rpx;
  1175. min-width: 32rpx;
  1176. height: 32rpx;
  1177. padding: 0 6rpx;
  1178. background: #ff7a0e;
  1179. border-radius: 16rpx;
  1180. color: #fff;
  1181. font-size: 20rpx;
  1182. text-align: center;
  1183. line-height: 32rpx;
  1184. box-sizing: border-box;
  1185. }
  1186. &.active {
  1187. color: #ff7a0e;
  1188. font-weight: bold;
  1189. background: #fff7e8;
  1190. position: relative;
  1191. &::before {
  1192. content: '';
  1193. position: absolute;
  1194. left: 0;
  1195. top: 50%;
  1196. transform: translateY(-50%);
  1197. width: 6rpx;
  1198. height: 36rpx;
  1199. background: #ff7a0e;
  1200. border-radius: 3rpx;
  1201. }
  1202. }
  1203. }
  1204. }
  1205. .goods-content {
  1206. flex: 1;
  1207. height: 100%;
  1208. padding: 0 30rpx;
  1209. background: #ffffff;
  1210. width: 70%;
  1211. margin: 1rpx;
  1212. margin-left: 0;
  1213. border-radius: 0 20rpx 0 0;
  1214. overflow-y: auto;
  1215. scrollbar-width: none; /* Firefox */
  1216. -ms-overflow-style: none; /* IE and Edge */
  1217. &::-webkit-scrollbar {
  1218. width: 0 !important;
  1219. display: none; /* Chrome, Safari, Opera */
  1220. }
  1221. }
  1222. }
  1223. .goods-item {
  1224. display: flex;
  1225. align-items: flex-start;
  1226. padding: 30rpx 0;
  1227. border-bottom: 1rpx solid #f5f5f5;
  1228. .goods-item-img {
  1229. width: 120rpx;
  1230. height: 120rpx;
  1231. border-radius: 24rpx;
  1232. background: #f8f8f8;
  1233. margin-right: 28rpx;
  1234. object-fit: contain;
  1235. flex-shrink: 0;
  1236. }
  1237. .goods-info-wrap {
  1238. flex: 1;
  1239. display: flex;
  1240. flex-direction: column;
  1241. justify-content: center;
  1242. min-width: 0;
  1243. }
  1244. .goods-header {
  1245. display: flex;
  1246. justify-content: space-between;
  1247. align-items: center;
  1248. margin-bottom: 10rpx;
  1249. }
  1250. .goods-name {
  1251. font-family: PingFang SC;
  1252. font-weight: 500;
  1253. font-size: 14px;
  1254. line-height: 140%;
  1255. letter-spacing: 0%;
  1256. vertical-align: middle;
  1257. color: #333;
  1258. font-weight: bold;
  1259. flex-shrink: 1;
  1260. flex-grow: 1;
  1261. }
  1262. .brand-check-placeholder {
  1263. flex-shrink: 0;
  1264. margin-left: 10rpx;
  1265. }
  1266. .brand-check {
  1267. display: flex;
  1268. flex-direction: row;
  1269. align-items: center;
  1270. justify-content: center;
  1271. border: 1px solid #f8a01d;
  1272. border-radius: 8rpx;
  1273. color: #ff7a0e;
  1274. font-family: PingFang SC;
  1275. font-weight: 400;
  1276. font-size: 12px;
  1277. padding: 4rpx 10rpx;
  1278. line-height: 1;
  1279. white-space: nowrap;
  1280. text {
  1281. margin-right: 4rpx;
  1282. }
  1283. }
  1284. .goods-desc {
  1285. font-size: 20rpx;
  1286. color: #999;
  1287. display: block;
  1288. margin-bottom: 20rpx;
  1289. white-space: nowrap;
  1290. overflow: hidden;
  1291. text-overflow: ellipsis;
  1292. }
  1293. .goods-info {
  1294. display: flex;
  1295. justify-content: space-between;
  1296. align-items: center;
  1297. }
  1298. .price-info {
  1299. display: flex;
  1300. align-items: baseline;
  1301. .price-symbol {
  1302. font-size: 24rpx;
  1303. color: #ff7a0e;
  1304. }
  1305. .price-value {
  1306. font-size: 36rpx;
  1307. color: #ff7a0e;
  1308. font-weight: bold;
  1309. margin: 0 4rpx;
  1310. }
  1311. .price-unit {
  1312. font-size: 24rpx;
  1313. color: #999;
  1314. }
  1315. }
  1316. .quantity-control {
  1317. display: flex;
  1318. align-items: center;
  1319. button {
  1320. width: 60rpx;
  1321. height: 60rpx;
  1322. padding: 0;
  1323. margin: 0;
  1324. display: flex;
  1325. align-items: center;
  1326. justify-content: center;
  1327. font-size: 28rpx;
  1328. color: #666;
  1329. background: #ffffff;
  1330. border: none;
  1331. border-radius: 50%;
  1332. &::after {
  1333. border: none;
  1334. }
  1335. &:active {
  1336. opacity: 0.8;
  1337. }
  1338. }
  1339. .quantity {
  1340. width: 80rpx;
  1341. text-align: center;
  1342. font-size: 32rpx;
  1343. color: #333;
  1344. }
  1345. }
  1346. .rules-link {
  1347. margin-top: 20rpx;
  1348. }
  1349. .rules-link .rules {
  1350. display: flex;
  1351. align-items: center;
  1352. font-family: PingFang SC;
  1353. font-weight: 400;
  1354. font-size: 12px;
  1355. line-height: 140%;
  1356. letter-spacing: 0%;
  1357. color: #666;
  1358. }
  1359. }
  1360. .other-unrecycle-card {
  1361. display: flex;
  1362. align-items: center;
  1363. background: #fff;
  1364. border-radius: 24rpx;
  1365. box-shadow: 0 4rpx 24rpx rgba(0,0,0,0.06);
  1366. padding: 30rpx 30rpx 30rpx 30rpx;
  1367. margin: 30rpx 0 0 0;
  1368. }
  1369. .other-unrecycle-img {
  1370. width: 120rpx;
  1371. height: 120rpx;
  1372. border-radius: 24rpx;
  1373. background: #f8f8f8;
  1374. margin-right: 28rpx;
  1375. object-fit: contain;
  1376. flex-shrink: 0;
  1377. }
  1378. .other-unrecycle-info {
  1379. flex: 1;
  1380. display: flex;
  1381. flex-direction: column;
  1382. justify-content: center;
  1383. min-width: 0;
  1384. }
  1385. .other-unrecycle-title {
  1386. font-size: 30rpx;
  1387. color: #222;
  1388. font-weight: bold;
  1389. margin-bottom: 8rpx;
  1390. word-break: break-all;
  1391. white-space: normal;
  1392. overflow: visible;
  1393. }
  1394. .other-unrecycle-desc {
  1395. font-size: 24rpx;
  1396. color: #999;
  1397. margin-bottom: 12rpx;
  1398. text-overflow: ellipsis;
  1399. overflow: hidden;
  1400. white-space: nowrap;
  1401. }
  1402. .other-unrecycle-price-row {
  1403. display: flex;
  1404. align-items: center;
  1405. }
  1406. .other-unrecycle-price {
  1407. font-size: 28rpx;
  1408. color: #ff9c00;
  1409. font-weight: bold;
  1410. }
  1411. .other-unrecycle-btn {
  1412. width: 60rpx;
  1413. height: 60rpx;
  1414. margin-left: 24rpx;
  1415. border-radius: 50%;
  1416. background: #fff;
  1417. color: #666;
  1418. font-size: 36rpx;
  1419. border: none;
  1420. display: flex;
  1421. align-items: center;
  1422. justify-content: center;
  1423. }
  1424. .fixed-bottom-wrap {
  1425. position: fixed;
  1426. left: 0;
  1427. right: 0;
  1428. bottom: calc(v-bind('tabbarHeight + "px"') + env(safe-area-inset-bottom));
  1429. width: 100vw;
  1430. z-index: 1001;
  1431. background: transparent;
  1432. box-sizing: border-box;
  1433. pointer-events: auto;
  1434. }
  1435. .bottom-bar-divider {
  1436. width: 100%;
  1437. height: 1px;
  1438. background: #f0f0f0;
  1439. position: absolute;
  1440. left: 0;
  1441. bottom: 0;
  1442. z-index: 1;
  1443. }
  1444. .green-tip-bar {
  1445. width: 100%;
  1446. background: #eaffea;
  1447. color: #13ac47;
  1448. font-size: 20rpx;
  1449. // padding: 16rpx 30rpx 0 30rpx;
  1450. box-sizing: border-box;
  1451. text-align: left;
  1452. display: flex;
  1453. align-items: center;
  1454. justify-content: center;
  1455. // flex-direction: r;
  1456. .tip-highlight {
  1457. color: #ff9c00;
  1458. font-weight: bold;
  1459. font-size: 20rpx;
  1460. }
  1461. }
  1462. .bottom-bar {
  1463. width: 100%;
  1464. background-color: #fff;
  1465. display: flex;
  1466. align-items: center;
  1467. justify-content: space-between;
  1468. padding: 0 30rpx;
  1469. box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
  1470. height: 120rpx;
  1471. border-top-left-radius: 0;
  1472. border-top-right-radius: 0;
  1473. border-bottom-left-radius: env(safe-area-inset-bottom);
  1474. border-bottom-right-radius: env(safe-area-inset-bottom);
  1475. .bottom-left {
  1476. // flex: 1;
  1477. display: flex;
  1478. flex-direction: column;
  1479. justify-content: center;
  1480. .summary-row {
  1481. display: flex;
  1482. align-items: center;
  1483. font-size: 26rpx;
  1484. color: #333;
  1485. .summary-label {
  1486. color: #333;
  1487. }
  1488. .summary-count {
  1489. color: #ff9c00;
  1490. font-weight: bold;
  1491. font-size: 28rpx;
  1492. }
  1493. }
  1494. .amount-row {
  1495. display: flex;
  1496. align-items: center;
  1497. margin-top: 4rpx;
  1498. .amount {
  1499. color: #ff9c00;
  1500. font-size: 44rpx;
  1501. font-weight: bold;
  1502. vertical-align: middle;
  1503. }
  1504. }
  1505. }
  1506. .submit-btn {
  1507. width: 300rpx;
  1508. height: 88rpx;
  1509. background: linear-gradient(to right, #ffd01e, #ff8917);
  1510. border-radius: 44rpx;
  1511. color: #fff;
  1512. font-size: 32rpx;
  1513. font-weight: bold;
  1514. display: flex;
  1515. align-items: center;
  1516. justify-content: center;
  1517. border: none;
  1518. // margin-left: 0rpx;
  1519. box-shadow: 0 4rpx 16rpx rgba(255, 156, 0, 0.08);
  1520. &::after {
  1521. border: none;
  1522. }
  1523. &:active {
  1524. opacity: 0.9;
  1525. }
  1526. }
  1527. }
  1528. .detail-popup-mask {
  1529. position: fixed;
  1530. left: 0;
  1531. right: 0;
  1532. top: 0;
  1533. bottom: calc(90rpx + env(safe-area-inset-bottom)); /* tabbar高度+安全区 */
  1534. background: rgba(0,0,0,0.35);
  1535. z-index: 8;
  1536. display: flex;
  1537. align-items: flex-end;
  1538. justify-content: center;
  1539. }
  1540. .detail-popup {
  1541. width: 100vw;
  1542. max-width: none;
  1543. background: #fff;
  1544. border-radius: 48rpx 48rpx 0 0;
  1545. box-shadow: 0 8rpx 48rpx rgba(0,0,0,0.18);
  1546. display: flex;
  1547. flex-direction: column;
  1548. align-items: stretch;
  1549. position: relative;
  1550. padding: 0;
  1551. overflow: hidden;
  1552. min-height: 520rpx;
  1553. max-height: 80vh;
  1554. bottom: 0;
  1555. }
  1556. .detail-popup-close {
  1557. position: absolute;
  1558. right: 36rpx;
  1559. top: 36rpx;
  1560. font-size: 36rpx;
  1561. color: #bbb;
  1562. z-index: 2;
  1563. }
  1564. .popup-green-tip {
  1565. border-radius: 48rpx 48rpx 0 0;
  1566. font-size: 20rpx;
  1567. padding: 24rpx 30rpx 0 30rpx;
  1568. background: #eaffea;
  1569. color: #13ac47;
  1570. text-align: left;
  1571. }
  1572. .panel-header {
  1573. display: flex;
  1574. align-items: center;
  1575. justify-content: center;
  1576. font-size: 32rpx;
  1577. font-weight: bold;
  1578. padding: 40rpx 36rpx 0 36rpx;
  1579. background: #fff;
  1580. position: relative;
  1581. }
  1582. .panel-title {
  1583. font-size: 32rpx;
  1584. color: #222;
  1585. font-weight: bold;
  1586. text-align: center;
  1587. flex: 1;
  1588. }
  1589. .popup-panel-list {
  1590. flex: 1;
  1591. overflow-y: auto;
  1592. max-height: 36vh;
  1593. padding: 0 24rpx;
  1594. scrollbar-width: none; /* Firefox */
  1595. -ms-overflow-style: none; /* IE and Edge */
  1596. &::-webkit-scrollbar {
  1597. width: 0 !important;
  1598. display: none; /* Chrome, Safari, Opera */
  1599. }
  1600. }
  1601. .panel-item {
  1602. display: flex;
  1603. align-items: center;
  1604. justify-content: flex-start;
  1605. padding: 24rpx 0;
  1606. border-bottom: 1px solid #f0f0f0;
  1607. }
  1608. .panel-item-img {
  1609. width: 100rpx;
  1610. height: 100rpx;
  1611. margin-right: 20rpx;
  1612. border-radius: 16rpx;
  1613. background: #f8f8f8;
  1614. }
  1615. .panel-item-info {
  1616. flex: 1;
  1617. display: flex;
  1618. flex-direction: column;
  1619. justify-content: center;
  1620. min-width: 0;
  1621. }
  1622. .panel-item-name {
  1623. font-size: 30rpx;
  1624. color: #222;
  1625. font-weight: bold;
  1626. margin-bottom: 4rpx;
  1627. text-overflow: ellipsis;
  1628. overflow: hidden;
  1629. white-space: nowrap;
  1630. }
  1631. .panel-item-desc {
  1632. font-size: 24rpx;
  1633. color: #999;
  1634. margin-bottom: 4rpx;
  1635. text-overflow: ellipsis;
  1636. overflow: hidden;
  1637. white-space: nowrap;
  1638. }
  1639. .panel-item-price {
  1640. font-size: 26rpx;
  1641. color: #ff9c00;
  1642. margin-top: 2rpx;
  1643. }
  1644. .panel-quantity-control {
  1645. display: flex;
  1646. align-items: center;
  1647. margin-left: 20rpx;
  1648. }
  1649. .panel-quantity-control button {
  1650. width: 48rpx;
  1651. height: 48rpx;
  1652. padding: 0;
  1653. margin: 0 8rpx;
  1654. display: flex;
  1655. align-items: center;
  1656. justify-content: center;
  1657. font-size: 32rpx;
  1658. color: #666;
  1659. background: #ffffff;
  1660. border: none;
  1661. border-radius: 50%;
  1662. &::after {
  1663. border: none;
  1664. }
  1665. &:active {
  1666. opacity: 0.8;
  1667. }
  1668. }
  1669. .panel-quantity-control .quantity {
  1670. width: 40rpx;
  1671. text-align: center;
  1672. font-size: 28rpx;
  1673. color: #333;
  1674. }
  1675. .popup-bottom-bar {
  1676. width: 100%;
  1677. background-color: #fff;
  1678. display: flex;
  1679. align-items: center;
  1680. justify-content: space-between;
  1681. padding: 0 30rpx;
  1682. box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
  1683. height: 120rpx;
  1684. border-top: 1px solid #f0f0f0;
  1685. border-bottom-left-radius: 48rpx;
  1686. border-bottom-right-radius: 48rpx;
  1687. // padding-bottom: env(safe-area-inset-bottom);
  1688. .bottom-left {
  1689. display: flex;
  1690. flex-direction: column;
  1691. justify-content: center;
  1692. .summary-row {
  1693. display: flex;
  1694. align-items: center;
  1695. font-size: 26rpx;
  1696. color: #333;
  1697. .summary-label {
  1698. color: #333;
  1699. }
  1700. .summary-count {
  1701. color: #ff9c00;
  1702. font-weight: bold;
  1703. font-size: 28rpx;
  1704. }
  1705. }
  1706. .amount-row {
  1707. display: flex;
  1708. align-items: center;
  1709. margin-top: 4rpx;
  1710. .amount {
  1711. color: #ff9c00;
  1712. font-size: 44rpx;
  1713. font-weight: bold;
  1714. vertical-align: middle;
  1715. }
  1716. }
  1717. }
  1718. .submit-btn {
  1719. width: 300rpx;
  1720. height: 88rpx;
  1721. background: linear-gradient(to right, #ffd01e, #ff8917);
  1722. border-radius: 44rpx;
  1723. color: #fff;
  1724. font-size: 32rpx;
  1725. font-weight: bold;
  1726. display: flex;
  1727. align-items: center;
  1728. justify-content: center;
  1729. border: none;
  1730. box-shadow: 0 4rpx 16rpx rgba(255, 156, 0, 0.08);
  1731. &::after {
  1732. border: none;
  1733. }
  1734. &:active {
  1735. opacity: 0.9;
  1736. }
  1737. }
  1738. }
  1739. .brand-popup-mask {
  1740. position: fixed;
  1741. left: 0;
  1742. right: 0;
  1743. top: 0;
  1744. bottom: 0;
  1745. background: rgba(0,0,0,0.35);
  1746. z-index: 3000;
  1747. display: flex;
  1748. align-items: flex-end;
  1749. justify-content: center;
  1750. }
  1751. .brand-popup {
  1752. position: relative;
  1753. width: 100%;
  1754. max-width: 750px;
  1755. background: #fff;
  1756. border-radius: 32rpx 32rpx 0 0;
  1757. box-shadow: 0 -4rpx 24rpx rgba(0,0,0,0.08);
  1758. padding-bottom: 40rpx;
  1759. max-height: 90vh;
  1760. display: flex;
  1761. flex-direction: column;
  1762. overflow: hidden;
  1763. }
  1764. .brand-popup-header {
  1765. display: flex;
  1766. align-items: center;
  1767. justify-content: center;
  1768. padding: 32rpx 24rpx 0 24rpx;
  1769. font-size: 32rpx;
  1770. font-weight: bold;
  1771. position: relative;
  1772. }
  1773. .brand-popup-close {
  1774. position: absolute;
  1775. left: 24rpx;
  1776. font-size: 28rpx;
  1777. color: #888;
  1778. }
  1779. .brand-popup-title {
  1780. font-size: 32rpx;
  1781. color: #222;
  1782. font-weight: bold;
  1783. }
  1784. .brand-popup-search {
  1785. padding: 20rpx 24rpx 0 24rpx;
  1786. }
  1787. .brand-search-input {
  1788. width: 100%;
  1789. height: 60rpx;
  1790. border-radius: 30rpx;
  1791. background: #f5f5f5;
  1792. border: none;
  1793. padding-left: 40rpx;
  1794. font-size: 28rpx;
  1795. color: #888;
  1796. }
  1797. .brand-popup-list {
  1798. flex: 1;
  1799. overflow-y: auto;
  1800. max-height: 60vh;
  1801. padding: 0 24rpx;
  1802. scrollbar-width: none; /* Firefox */
  1803. -ms-overflow-style: none; /* IE and Edge */
  1804. &::-webkit-scrollbar {
  1805. width: 0 !important;
  1806. display: none; /* Chrome, Safari, Opera */
  1807. }
  1808. }
  1809. .brand-letter {
  1810. font-size: 28rpx;
  1811. color: #888;
  1812. margin: 24rpx 0 8rpx 0;
  1813. font-weight: bold;
  1814. }
  1815. .brand-item {
  1816. display: flex;
  1817. align-items: center;
  1818. padding: 16rpx 0;
  1819. border-bottom: 1px solid #f0f0f0;
  1820. }
  1821. .brand-logo {
  1822. width: 60rpx;
  1823. height: 60rpx;
  1824. margin-right: 20rpx;
  1825. border-radius: 8rpx;
  1826. background: #f8f8f8;
  1827. }
  1828. .brand-name {
  1829. font-size: 28rpx;
  1830. color: #222;
  1831. }
  1832. .brand-index-bar {
  1833. position: absolute;
  1834. right: 12rpx;
  1835. top: 120rpx;
  1836. width: 32rpx;
  1837. display: flex;
  1838. flex-direction: column;
  1839. align-items: center;
  1840. z-index: 10;
  1841. }
  1842. .brand-index-bar text {
  1843. font-size: 22rpx;
  1844. color: #bbb;
  1845. margin: 4rpx 0;
  1846. font-weight: bold;
  1847. &.active {
  1848. color: #ff9c00;
  1849. }
  1850. }
  1851. .rule-popup-mask {
  1852. position: fixed;
  1853. left: 0;
  1854. right: 0;
  1855. top: 0;
  1856. bottom: 0;
  1857. background: rgba(0,0,0,0.35);
  1858. z-index: 4000;
  1859. display: flex;
  1860. align-items: center;
  1861. justify-content: center;
  1862. }
  1863. .rule-popup {
  1864. width: 90vw;
  1865. max-width: 600rpx;
  1866. background: #fff;
  1867. border-radius: 48rpx;
  1868. box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.12);
  1869. display: flex;
  1870. flex-direction: column;
  1871. align-items: center;
  1872. position: relative;
  1873. padding-bottom: 40rpx;
  1874. }
  1875. .rule-popup-title {
  1876. font-size: 36rpx;
  1877. color: #222;
  1878. font-weight: bold;
  1879. text-align: center;
  1880. margin-top: 48rpx;
  1881. margin-bottom: 16rpx;
  1882. }
  1883. .rule-popup-content {
  1884. width: 100%;
  1885. max-height: 420rpx;
  1886. padding: 0 40rpx;
  1887. box-sizing: border-box;
  1888. overflow-y: auto;
  1889. scrollbar-width: none; /* Firefox */
  1890. -ms-overflow-style: none; /* IE and Edge */
  1891. &::-webkit-scrollbar {
  1892. width: 0 !important;
  1893. display: none; /* Chrome, Safari, Opera */
  1894. }
  1895. }
  1896. .rule-popup-desc {
  1897. font-size: 26rpx;
  1898. color: #888;
  1899. text-align: center;
  1900. margin-bottom: 24rpx;
  1901. margin-top: 0;
  1902. }
  1903. .rule-popup-warning {
  1904. width: 100%;
  1905. border: 2rpx solid #ffb800;
  1906. color: #ffb800;
  1907. background: #fffbe6;
  1908. border-radius: 32rpx;
  1909. font-size: 28rpx;
  1910. text-align: center;
  1911. padding: 16rpx 0;
  1912. margin-bottom: 24rpx;
  1913. font-weight: bold;
  1914. }
  1915. .rule-popup-img {
  1916. display: block;
  1917. margin: 0 auto 24rpx auto;
  1918. max-width: 80%;
  1919. max-height: 300rpx;
  1920. border-radius: 16rpx;
  1921. object-fit: contain;
  1922. }
  1923. .rule-popup-btn {
  1924. width: 80%;
  1925. height: 88rpx;
  1926. background: linear-gradient(to right, #ffd01e, #ff8917);
  1927. border-radius: 44rpx;
  1928. color: #fff;
  1929. font-size: 32rpx;
  1930. font-weight: bold;
  1931. display: flex;
  1932. align-items: center;
  1933. justify-content: center;
  1934. border: none;
  1935. margin: 0 auto;
  1936. margin-top: 16rpx;
  1937. box-shadow: 0 4rpx 16rpx rgba(255, 156, 0, 0.08);
  1938. &::after {
  1939. border: none;
  1940. }
  1941. &:active {
  1942. opacity: 0.9;
  1943. }
  1944. }
  1945. .rule-popup-close {
  1946. position: absolute;
  1947. right: 32rpx;
  1948. bottom: 32rpx;
  1949. width: 72rpx;
  1950. height: 72rpx;
  1951. background: #ff5a5f;
  1952. border-radius: 50%;
  1953. display: flex;
  1954. align-items: center;
  1955. justify-content: center;
  1956. z-index: 10;
  1957. box-shadow: 0 2rpx 8rpx rgba(255,90,95,0.12);
  1958. }
  1959. /* 预约上门取件弹窗样式 */
  1960. .pickup-confirm-mask {
  1961. position: fixed;
  1962. left: 0;
  1963. right: 0;
  1964. top: 0;
  1965. bottom: 0;
  1966. background: rgba(0,0,0,0.35);
  1967. z-index: 5000;
  1968. display: flex;
  1969. align-items: center;
  1970. justify-content: center;
  1971. }
  1972. .pickup-confirm-popup {
  1973. width: 90vw;
  1974. max-width: 600rpx;
  1975. background: #fff;
  1976. border-radius: 48rpx;
  1977. box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.12);
  1978. display: flex;
  1979. flex-direction: column;
  1980. align-items: center;
  1981. position: relative;
  1982. padding: 48rpx 36rpx 40rpx 36rpx;
  1983. }
  1984. .pickup-confirm-title {
  1985. font-size: 36rpx;
  1986. color: #222;
  1987. font-weight: bold;
  1988. text-align: center;
  1989. margin-bottom: 24rpx;
  1990. }
  1991. .pickup-confirm-content {
  1992. width: 100%;
  1993. font-size: 26rpx;
  1994. color: #333;
  1995. text-align: left;
  1996. line-height: 1.7;
  1997. margin-bottom: 36rpx;
  1998. .confirm-item {
  1999. margin-bottom: 24rpx;
  2000. &:last-child {
  2001. margin-bottom: 0;
  2002. }
  2003. }
  2004. .confirm-item-red {
  2005. color: red;
  2006. }
  2007. }
  2008. .pickup-confirm-btn-row {
  2009. width: 100%;
  2010. display: flex;
  2011. justify-content: space-between;
  2012. gap: 32rpx;
  2013. }
  2014. .pickup-confirm-btn {
  2015. flex: 1;
  2016. height: 88rpx;
  2017. border-radius: 44rpx;
  2018. font-size: 32rpx;
  2019. font-weight: bold;
  2020. display: flex;
  2021. align-items: center;
  2022. justify-content: center;
  2023. border: 2rpx solid #ffd01e;
  2024. background: #fff;
  2025. color: #ff9c00;
  2026. box-shadow: 0 4rpx 16rpx rgba(255, 156, 0, 0.08);
  2027. }
  2028. .pickup-confirm-btn:not(.agree) {
  2029. background: #fff0d2;
  2030. }
  2031. .pickup-confirm-btn.agree {
  2032. background: linear-gradient(to right, #ffd01e, #ff8917);
  2033. color: #fff;
  2034. border: none;
  2035. }
  2036. .uv-tabbar {
  2037. z-index: 1000;
  2038. }
  2039. .loading-more {
  2040. text-align: center;
  2041. color: #999;
  2042. padding: 20rpx 0;
  2043. font-size: 26rpx;
  2044. }
  2045. .brand-confirm-mask {
  2046. position: fixed;
  2047. left: 0;
  2048. right: 0;
  2049. top: 0;
  2050. bottom: 0;
  2051. background: rgba(0,0,0,0.25);
  2052. z-index: 5001;
  2053. display: flex;
  2054. align-items: center;
  2055. justify-content: center;
  2056. }
  2057. .brand-confirm-popup {
  2058. width: 70vw;
  2059. max-width: 270px;
  2060. background: #fff;
  2061. border-radius: 32rpx;
  2062. box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.12);
  2063. display: flex;
  2064. flex-direction: column;
  2065. align-items: center;
  2066. padding: 48rpx 20rpx 36rpx 20rpx;
  2067. position: relative;
  2068. }
  2069. .brand-confirm-title {
  2070. font-size: 36rpx;
  2071. color: #222;
  2072. font-weight: bold;
  2073. text-align: center;
  2074. margin-bottom: 24rpx;
  2075. }
  2076. .brand-confirm-logo-wrap {
  2077. width: 120rpx;
  2078. height: 120rpx;
  2079. background: #f8f8f8;
  2080. border-radius: 50%;
  2081. display: flex;
  2082. align-items: center;
  2083. justify-content: center;
  2084. margin-bottom: 18rpx;
  2085. }
  2086. .brand-confirm-logo {
  2087. width: 80rpx;
  2088. height: 80rpx;
  2089. border-radius: 50%;
  2090. }
  2091. .brand-confirm-name {
  2092. font-size: 28rpx;
  2093. color: #222;
  2094. font-weight: bold;
  2095. text-align: center;
  2096. margin-bottom: 16rpx;
  2097. }
  2098. .brand-confirm-desc {
  2099. font-size: 24rpx;
  2100. color: #999;
  2101. text-align: center;
  2102. margin-bottom: 32rpx;
  2103. line-height: 1.6;
  2104. }
  2105. .brand-confirm-btn-row {
  2106. width: 100%;
  2107. display: flex;
  2108. justify-content: space-between;
  2109. gap: 24rpx;
  2110. }
  2111. .brand-confirm-btn {
  2112. flex: 1;
  2113. height: 72rpx;
  2114. border-radius: 36rpx;
  2115. font-size: 28rpx;
  2116. font-weight: bold;
  2117. display: flex;
  2118. align-items: center;
  2119. justify-content: center;
  2120. border: none;
  2121. margin: 0 0;
  2122. }
  2123. .brand-confirm-btn.retry {
  2124. background: #fff;
  2125. color: #ff9c00;
  2126. border: 2rpx solid #ff9c00;
  2127. }
  2128. .brand-confirm-btn.confirm {
  2129. background: linear-gradient(to right, #ffd01e, #ff8917);
  2130. color: #fff;
  2131. border: none;
  2132. }
  2133. .price-info-popup-mask {
  2134. position: fixed;
  2135. left: 0;
  2136. right: 0;
  2137. top: 0;
  2138. bottom: 0;
  2139. background: rgba(0,0,0,0.4);
  2140. z-index: 6000;
  2141. display: flex;
  2142. align-items: center;
  2143. justify-content: center;
  2144. }
  2145. .price-info-popup {
  2146. width: 85vw;
  2147. max-width: 600rpx;
  2148. background: #fff;
  2149. border-radius: 24rpx;
  2150. box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.12);
  2151. display: flex;
  2152. flex-direction: column;
  2153. align-items: center;
  2154. position: relative;
  2155. padding: 40rpx 40rpx;
  2156. .price-info-popup-title {
  2157. font-size: 34rpx;
  2158. color: #333;
  2159. font-weight: bold;
  2160. text-align: center;
  2161. margin-bottom: 30rpx;
  2162. }
  2163. .price-info-popup-content {
  2164. width: 100%;
  2165. max-height: 50vh;
  2166. .price-info-section {
  2167. margin-bottom: 30rpx;
  2168. &:last-child {
  2169. margin-bottom: 0;
  2170. }
  2171. .price-info-heading {
  2172. font-size: 28rpx;
  2173. color: #333;
  2174. font-weight: 500;
  2175. margin-bottom: 15rpx;
  2176. }
  2177. .price-info-text {
  2178. font-size: 26rpx;
  2179. color: #666;
  2180. line-height: 1.6;
  2181. }
  2182. }
  2183. }
  2184. .price-info-popup-btn {
  2185. width: 100%;
  2186. height: 88rpx;
  2187. background: linear-gradient(to right, #ffd01e, #ff8917);
  2188. border-radius: 44rpx;
  2189. color: #fff;
  2190. font-size: 32rpx;
  2191. font-weight: bold;
  2192. display: flex;
  2193. align-items: center;
  2194. justify-content: center;
  2195. border: none;
  2196. margin-top: 40rpx;
  2197. box-shadow: 0 4rpx 16rpx rgba(255, 156, 0, 0.08);
  2198. &::after {
  2199. border: none;
  2200. }
  2201. &:active {
  2202. opacity: 0.9;
  2203. }
  2204. }
  2205. }
  2206. /* 减少数量时的品牌选择弹窗 */
  2207. .brand-reduce-popup-mask {
  2208. position: fixed;
  2209. left: 0;
  2210. right: 0;
  2211. top: 0;
  2212. bottom: 0;
  2213. background: rgba(0,0,0,0.35);
  2214. z-index: 5001;
  2215. display: flex;
  2216. align-items: center;
  2217. justify-content: center;
  2218. }
  2219. .brand-reduce-popup {
  2220. width: 70vw;
  2221. max-width: 270px;
  2222. background: #fff;
  2223. border-radius: 32rpx;
  2224. box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.12);
  2225. display: flex;
  2226. flex-direction: column;
  2227. align-items: center;
  2228. padding: 48rpx 20rpx 36rpx 20rpx;
  2229. position: relative;
  2230. }
  2231. .brand-reduce-popup-header {
  2232. display: flex;
  2233. align-items: center;
  2234. justify-content: center;
  2235. padding: 32rpx 24rpx 0 24rpx;
  2236. font-size: 32rpx;
  2237. font-weight: bold;
  2238. position: relative;
  2239. }
  2240. .brand-reduce-popup-close {
  2241. position: absolute;
  2242. left: 24rpx;
  2243. font-size: 28rpx;
  2244. color: #888;
  2245. }
  2246. .brand-reduce-popup-title {
  2247. font-size: 32rpx;
  2248. color: #222;
  2249. font-weight: bold;
  2250. }
  2251. .brand-reduce-popup-list {
  2252. flex: 1;
  2253. overflow-y: auto;
  2254. max-height: 60vh;
  2255. padding: 0 24rpx;
  2256. scrollbar-width: none; /* Firefox */
  2257. -ms-overflow-style: none; /* IE and Edge */
  2258. &::-webkit-scrollbar {
  2259. width: 0 !important;
  2260. display: none; /* Chrome, Safari, Opera */
  2261. }
  2262. }
  2263. .brand-item {
  2264. display: flex;
  2265. align-items: center;
  2266. padding: 16rpx 0;
  2267. border-bottom: 1px solid #f0f0f0;
  2268. }
  2269. .brand-logo {
  2270. width: 60rpx;
  2271. height: 60rpx;
  2272. margin-right: 20rpx;
  2273. border-radius: 8rpx;
  2274. background: #f8f8f8;
  2275. }
  2276. .brand-name {
  2277. font-size: 28rpx;
  2278. color: #222;
  2279. }
  2280. </style>