category.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
  1. <template>
  2. <view>
  3. <view id="top"
  4. style="background-image: url(https://kxmalls.oss-cn-hangzhou.aliyuncs.com/bg/top.png);background-repeat: no-repeat; background-size: cover; width: 750rpx;position: fixed;top: 0;z-index: 999;">
  5. <view class="status-bar"></view>
  6. <!-- #ifndef H5 -->
  7. <view class="flex align-center justify-center text-white"
  8. style="font-size: 36rpx;font-weight: 500; position: absolute;width: 750rpx;"
  9. :style="'top:'+navbarTop+'px;height:'+navHeight+'px;'">
  10. 商品品类
  11. </view>
  12. <!-- #endif -->
  13. <view :style="'margin-top:'+MT2+'px;'" class="padding-lr" style="padding-bottom: 22rpx;padding-top: 24rpx;">
  14. <view @click="naviageToPage('/pages/product/search')" style="height: 64rpx;"
  15. class="bg-white round flex align-center">
  16. <view class="flex align-center padding-left">
  17. <text class="yticon icon-sousuo" style="margin-right: 10rpx;"></text><text class="lem-text-gray"
  18. style="font-size: 26rpx;">新鲜,搜一下就涞了</text>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <view :style="'height: '+topHeight+'px;'" style="width: 750rpx;display: flex; position: relative;"></view>
  24. <view v-if="storage" class="bg-white">
  25. <view style="position: fixed;left:0;" :style="'top:'+topHeight+'px;'">
  26. <scroll-view scroll-y class="left-aside" :style="'height:'+scollHeight+'px;'">
  27. <view v-for="item in flist" :key="item.id" class="f-item " :class="{active: item.id === currentId}"
  28. @click="tabtap(item)">
  29. {{item.cateName}}
  30. </view>
  31. </scroll-view>
  32. </view>
  33. <view @click="showCover" class="flex align-center justify-center" :style="'top:'+topHeight+'px;'"
  34. style="background-color: rgba(255,255,255,0.9);margin: 24rpx 0;box-sizing: content-box; position: fixed; right: 0;z-index: 999;height: 50rpx;width: 70rpx;padding-right: 10rpx;">
  35. <image v-if="!cover" src="../../static/category/arrow_down.png" mode="aspectFit"
  36. style="width: 22rpx;height: 14rpx;"></image>
  37. <image v-if="cover" src="../../static/category/arrow_up.png" mode="aspectFit"
  38. style="width: 22rpx;height: 14rpx;"></image>
  39. </view>
  40. <scroll-view scroll-with-animation scroll-x :scroll-into-view="curentTabView" class="bg-white"
  41. style="width: 600rpx;right:0;position: fixed; height: 100rpx;overflow-x: scroll;"
  42. :style="'top:'+topHeight+'px;'">
  43. <view class="flex align-start padding-left-sm">
  44. <view v-for="item in slist" :key="item.id" @click="sTabTap(item)" :id="'id'+item.id"
  45. :class="{actived: item.id === currentIded}" class="flex align-center justify-center margin-left-sm"
  46. style="padding: 20rpx 0; box-sizing: border-box;width: auto;flex-shrink: 0;">
  47. <view style="font-size: 28rpx;line-height: 40rpx;">{{item.cateName}}</view>
  48. </view>
  49. <view class="flex align-center justify-center margin-left-sm"
  50. style="padding: 20rpx 0; box-sizing: border-box;width: auto;flex-shrink: 0;width: 70rpx;">
  51. <view style="font-size: 28rpx;line-height: 40rpx;"></view>
  52. </view>
  53. </view>
  54. </scroll-view>
  55. <view v-if="cover"
  56. style="z-index: 9999; position: fixed;right: 0;width: 600rpx;margin-top: 90rpx;background-color: rgba(255,255,255,0.9);"
  57. :style="'top:'+topHeight+'px;height:'+scollHeight+'px;'">
  58. <view class="bg-white flex flex-wrap padding-bottom padding-top-sm solid-bottom padding-left-xs">
  59. <view v-for="item in slist" :key="item.id" @click="sTabTap(item)"
  60. class="lem-btn round margin-bottom-sm margin-lr-xs" style="width: 28%;"
  61. :class="{'line-green': item.id === currentIded}">{{item.cateName}}</view>
  62. </view>
  63. </view>
  64. <view :style="'top:'+topHeight+'px;'" style="padding-left: 140rpx;padding-top: 90rpx;">
  65. <image src="https://nontax.oss-cn-beijing.aliyuncs.com/kxmall/G2uavD.png" mode="aspectFit"
  66. style="margin: 30rpx;width: 550rpx;height: 160rpx;border-radius: 15rpx;"></image>
  67. <view style="padding:0rpx 20rpx 30rpx 20rpx;">
  68. {{sTitle}}
  69. </view>
  70. <view v-for="(item,index) in tlist" :key="index" @click="navToDetail(item.id)"
  71. class="margin-lr padding-tb-sm padding-lr-xs flex"
  72. style="width: 558rpx;height: 180rpx;border-bottom: solid #E6E6E6 1rpx;">
  73. <image :src="JSON.parse(item.image)[0].url" mode="aspectFill" class="round"
  74. style="width: 144rpx;height: 144rpx;margin-right: 50rpx;"></image>
  75. <view style="padding-top: 4rpx;padding-bottom: 2rpx;flex-grow: 1;">
  76. <view class="text-black padding-bottom-xs text-cut"
  77. style="font-size: 30rpx;line-height: 42rpx;width: 300rpx;font-weight: bold;">{{item.storeName}}</view>
  78. <view style="font-size: 24rpx;line-height: 34rpx;width: 300rpx;">
  79. <view class="text-gray text-cut" style="width: 50%;display: inline-block;vertical-align: middle;">
  80. {{item.storeInfo}}
  81. </view>
  82. <view class="text-red" v-if="item.kxStockVo.stock<=10"
  83. style="width: 50%;display: inline-block;border-radius: 8px;border:1px solid red;text-align: center;vertical-align: middle;position: relative;overflow: hidden;">
  84. <view style="background-color: red;position: absolute;left:0;height: 100%;"
  85. :style="{width:item.kxStockVo.stock+'%'}">
  86. </view>
  87. 库存 {{item.kxStockVo.stock}}%
  88. </view>
  89. </view>
  90. <view class="flex justify-between" style="width: 100%;padding-top: 12rpx;">
  91. <view style="flex-grow: 1;" class="flex align-center">
  92. <view class="text-black padding-right-sm" style="font-size: 30rpx;line-height: 42rpx;color: red; font-weight: bold; font-family: 'Arial', sans-serif;">
  93. ¥{{item.kxStockVo.price}}</view>
  94. <!-- <view style="border: solid #FC6620 2rpx;color: #FC6620;border-radius: 4rpx;width: 80rpx;height: 30rpx;font-size: 20rpx;line-height: auto;text-align: center;">
  95. 专享价
  96. </view> -->
  97. <view
  98. style="color: #AEAEAE;font-size: 24rpx;line-height: 44rpx;padding: 0 10rpx;text-decoration: line-through;">
  99. ¥{{item.otPrice}}
  100. </view>
  101. </view>
  102. <view v-if="item.kxStockVo.stock===0"
  103. style="float: right;color: #AEAEAE;font-size: 24rpx;line-height: 44rpx;padding: 0 10rpx;">
  104. 即将到货
  105. </view>
  106. <uni-number-box class="number-box" :min="0" :value="item.num" :isMin="item.num==0" :index="index"
  107. @eventChange="numberChange" v-if="item.num!=0"></uni-number-box>
  108. <image @click.stop="addCart(index)" src="/static/add.png" mode="aspectFit"
  109. style="width: 44rpx;height: 44rpx;" v-if="item.num==0 && item.kxStockVo.stock"></image>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. <view v-else style="padding-top: 180rpx;padding-bottom: 180rpx;">
  116. <missing :buttonName="'换个地址试试吧~'" :handlerName="'buttonClick'" @buttonClick="chooseLocation"
  117. :imgUrl="'http://qiniuoss.nauzone.cn/%E7%BB%84%204%20%E6%8B%B7%E8%B4%9D@3x.png'" :desc="'当前地区不在配送范围哦'">
  118. </missing>
  119. </view>
  120. <view v-show="false">{{cartNums}}</view>
  121. </view>
  122. </template>
  123. <script>
  124. import missing from "@/components/missing.vue"
  125. import uniNumberBox from '@/components/uni-number-box.vue'
  126. export default {
  127. data() {
  128. return {
  129. isUpdating: false, // 新增状态字段
  130. sizeCalcState: false,
  131. tabScrollTop: 0,
  132. currentId: 1,
  133. flist: [],
  134. slist: [],
  135. sTitle: '',
  136. tlist: [],
  137. rawData: [],
  138. storage: true,
  139. currentIded: 0,
  140. //自适应头部
  141. navbarTop: 26,
  142. navHeight: 32,
  143. navBottom: 58,
  144. MT: 38,
  145. MT2: 20,
  146. statusHeight: 20,
  147. topHeight: 156,
  148. scollHeight: 500,
  149. count: 1,
  150. pageNo: 1,
  151. pageSize: 10,
  152. cover: false,
  153. curentTabView: '',
  154. cartNums: '',
  155. loaded: false,
  156. banner: {
  157. imgUrl: ''
  158. }
  159. }
  160. },
  161. components: {
  162. missing,
  163. uniNumberBox
  164. },
  165. onReachBottom() {
  166. if (this.isUpdating) return; // 防止重复加载
  167. // 如果当前分类还有更多商品未加载
  168. if (this.pageNo < this.count) {
  169. this.pageNo++;
  170. this.loadMoreProducts();
  171. return;
  172. }
  173. // 当前分类已加载完毕,尝试切换到下一个分类
  174. this.loadNextCategoryProducts();
  175. },
  176. onReady() {
  177. const res = uni.getSystemInfoSync();
  178. console.log(res.statusBarHeight);
  179. this.statusHeight = res.statusBarHeight
  180. // #ifdef MP-WEIXIN
  181. console.log('状态栏高度')
  182. console.log(this.statusHeight + 'px')
  183. this.navbarTop = wx.getMenuButtonBoundingClientRect().top
  184. this.navHeight = wx.getMenuButtonBoundingClientRect().height
  185. console.log('标题栏高度')
  186. console.log(this.navHeight + 'px')
  187. this.navBottom = wx.getMenuButtonBoundingClientRect().bottom
  188. console.log('底部坐标')
  189. console.log(this.navBottom + 'px')
  190. this.MT = this.navBottom
  191. console.log('定位栏外边框高度')
  192. console.log(this.MT + 'px')
  193. // #endif
  194. this.MT2 = this.MT - 20
  195. // #ifdef APP-PLUS
  196. this.navbarTop = this.statusHeight
  197. this.navHeight = 44
  198. // this.navBottom = this.navHeight + 20
  199. // this.MT = this.navBottom
  200. this.navBottom = this.navHeight
  201. this.MT2 = this.navBottom
  202. // #endif
  203. const that = this
  204. const query = uni.createSelectorQuery().in(this);
  205. query.select('#top').boundingClientRect(data => {
  206. console.log("得到布局位置信息" + JSON.stringify(data));
  207. console.log("节点离页面顶部的距离为" + data.top);
  208. that.topHeight = data.height + that.statusHeight - 2
  209. that.scollHeight = res.screenHeight - 75 - that.topHeight
  210. // #ifdef APP-PLUS
  211. that.topHeight = data.height + (that.statusHeight / 2)
  212. // that.topHeight = 146
  213. that.scollHeight = res.screenHeight - that.topHeight
  214. // #endif
  215. console.log('可使用高度为:')
  216. console.log(that.scollHeight)
  217. }).exec();
  218. },
  219. onLoad() {
  220. // console.log(this.$store.state.storageId)
  221. this.loadData();
  222. this.$api.request('get', 'carousel/app/getCarouselActive', {
  223. adType: 7
  224. }).then(res => {
  225. this.banner = res.data[0]
  226. })
  227. },
  228. onShow() {
  229. this.$store.state.storageId ? this.storage = true : this.storage = false
  230. //如果用户已登录,获取购物车数量
  231. if (this.$store.state.userInfo.accessToken) {
  232. this.countTabNum()
  233. }
  234. if (this.loaded) {
  235. this.loadCartData()
  236. }
  237. },
  238. methods: {
  239. // 加载当前分类的更多商品
  240. loadMoreProducts() {
  241. this.isUpdating = true;
  242. uni.showLoading({ title: '加载中...' });
  243. this.$api.request('get', 'storage/position/getGoodsPageByStorage', {
  244. storageId: this.$store.state.storageId,
  245. categoryId: this.currentIded || this.currentId,
  246. pageNo: this.pageNo,
  247. pageSize: this.pageSize
  248. }).then(res => {
  249. this.tlist = this.tlist.concat(res.data.rows);
  250. this.loadCartData();
  251. this.count = Math.ceil(res.data.total / this.pageSize);
  252. }).finally(() => {
  253. this.isUpdating = false;
  254. uni.hideLoading();
  255. });
  256. },
  257. // 加载下一个分类的商品
  258. loadNextCategoryProducts() {
  259. // 如果是一级分类
  260. const currentIndex = this.flist.findIndex(item => item.id === this.currentId);
  261. if (currentIndex < this.flist.length - 1) {
  262. // 切换到下一个一级分类
  263. this.tabtapNoRefresh(this.flist[currentIndex + 1]);
  264. } else {
  265. uni.showToast({ title: '已加载全部商品', icon: 'none' });
  266. }
  267. },
  268. loadData() {
  269. const that = this
  270. this.$api.request('get', 'product/app/categoryList').then(res => {
  271. that.rawData = res.data
  272. that.flist = res.data
  273. that.currentId = res.data[0].id
  274. that.slist[0] = {
  275. cateName: '全部',
  276. id: that.currentId
  277. }
  278. that.slist = that.slist.concat(res.data[0].children)
  279. that.sTitle = that.slist[1].cateName
  280. that.sTabTap(that.slist[0])
  281. console.log(that.slist)
  282. })
  283. },
  284. // 修改原有的sTabTap方法,重置分页参数
  285. sTabTap(item) {
  286. this.isUpdating = true;
  287. uni.showLoading({ title: '加载中...' });
  288. this.currentIded = item.id;
  289. this.sTitle = item.cateName;
  290. this.curentTabView = 'id' + item.id;
  291. this.pageNo = 1; // 重置页码
  292. this.$api.request('get', 'storage/position/getGoodsPageByStorage', {
  293. storageId: this.$store.state.storageId,
  294. categoryId: item.id,
  295. pageSize: this.pageSize
  296. }).then(res => {
  297. this.tlist = res.data.rows;
  298. for (let i = 0; i < this.tlist.length; i++) {
  299. this.tlist[i].num = 0;
  300. }
  301. this.loadCartData();
  302. this.count = Math.ceil(res.data.total / this.pageSize);
  303. }).finally(() => {
  304. this.isUpdating = false;
  305. uni.hideLoading();
  306. if (!this.loaded) {
  307. this.loaded = true;
  308. }
  309. });
  310. },
  311. // 修改原有的sTabTap方法,重置分页参数
  312. sTabTapNoRefresh(item) {
  313. const that = this
  314. this.isUpdating = true;
  315. uni.showLoading({ title: '加载中...' });
  316. this.currentIded = item.id;
  317. this.sTitle = item.cateName;
  318. this.curentTabView = 'id' + item.id;
  319. this.pageNo = 1; // 重置页码
  320. this.$api.request('get', 'storage/position/getGoodsPageByStorage', {
  321. storageId: this.$store.state.storageId,
  322. categoryId: item.id,
  323. pageSize: this.pageSize
  324. }).then(res => {
  325. this.tlist = this.tlist.concat(res.data.rows);
  326. for (let i = 0; i < this.tlist.length; i++) {
  327. this.tlist[i].num = 0;
  328. }
  329. this.loadCartData();
  330. this.count = Math.ceil(res.data.total / this.pageSize);
  331. }).finally(() => {
  332. this.isUpdating = false;
  333. uni.hideLoading();
  334. if (!this.loaded) {
  335. this.loaded = true;
  336. }
  337. });
  338. },
  339. // 修改原有的tabtap方法,重置分页参数
  340. tabtap(item) {
  341. this.currentId = item.id;
  342. this.slist = [];
  343. this.slist[0] = {
  344. cateName: '全部',
  345. id: this.currentId
  346. };
  347. if (item.children) {
  348. this.slist = this.slist.concat(item.children);
  349. this.sTitle = this.slist[1].cateName;
  350. }
  351. this.pageNo = 1; // 重置页码
  352. this.sTabTap(this.slist[0]);
  353. this.tabScrollTop = this.tabScrollTop === 0 ? 1 : 0;
  354. },
  355. tabtapNoRefresh(item) {
  356. this.currentId = item.id;
  357. this.slist = [];
  358. this.slist[0] = {
  359. cateName: '全部',
  360. id: this.currentId
  361. };
  362. if (item.children) {
  363. this.slist = this.slist.concat(item.children);
  364. this.sTitle = this.slist[1].cateName;
  365. }
  366. this.pageNo = 1; // 重置页码
  367. this.sTabTapNoRefresh(this.slist[0]);
  368. this.tabScrollTop = this.tabScrollTop === 0 ? 1 : 0;
  369. },
  370. navToList(tid) {
  371. uni.navigateTo({
  372. url: `/pages/product/list?tid=${tid}`
  373. })
  374. },
  375. navToDetail(id) {
  376. // console.log()
  377. uni.navigateTo({
  378. url: `../product/detail?id=${id}`
  379. })
  380. },
  381. naviageToPage(page) {
  382. uni.navigateTo({
  383. url: page
  384. })
  385. },
  386. showCover() {
  387. this.cover ? this.cover = false : this.cover = true
  388. },
  389. cartNumFn() {
  390. let cartNum = 0
  391. this.tlist.forEach((item, i) => {
  392. cartNum += item.num
  393. })
  394. this.cartNums = cartNum
  395. },
  396. addCart(index) {
  397. const that = this
  398. that.$api.request('get', 'cart/app/addCartItem', {
  399. productId: that.tlist[index].id,
  400. // activityId:that.tlist[index].skuDto.activityId,
  401. // couponId:that.tlist[index].skuDto.couponId,
  402. num: 1
  403. }).then(res => {
  404. that.$api.msg('添加购物车成功')
  405. this.tlist[index].num++
  406. this.cartNumFn()
  407. this.tlist[index].cartId = res.data.id
  408. console.log(that.tlist)
  409. var cartNum = this.$store.state.cartNum + 1
  410. that.$store.commit('addCart', cartNum)
  411. uni.setTabBarBadge({
  412. index: 2,
  413. text: cartNum + ''
  414. })
  415. })
  416. },
  417. //数量
  418. numberChange(data) {
  419. const that = this
  420. const index = data.index;
  421. const item = this.tlist[index];
  422. // 如果正在更新,直接返回
  423. if (item.isUpdating) return;
  424. // 标记为更新中
  425. item.isUpdating = true;
  426. if (data.number == 0) {
  427. this.deleteCartItem(data.index)
  428. item.isUpdating = false; // 删除操作后重置状态
  429. return
  430. }
  431. that.$api.request('get', 'cart/app/updateCartItemNum', {
  432. cartId: this.tlist[data.index].cartId,
  433. num: data.number
  434. }).then(res => {
  435. this.tlist[data.index].num = data.number
  436. this.cartNumFn()
  437. this.countTabNum()
  438. }).catch(err => {
  439. console.error("更新购物车失败:", err);
  440. }).finally(() => {
  441. item.isUpdating = false; // 无论成功失败,重置状态
  442. });
  443. },
  444. loadCartData() {
  445. const that = this
  446. that.$api.request('get', 'cart/app/getCartList', {
  447. storageId: this.$store.state.storageId
  448. }).then(res => {
  449. //遍历查询当前展示的商品中是否有数量
  450. var cartIds = []
  451. var goodsIds = []
  452. for (var i = 0; i < res.data.length; i++) {
  453. cartIds.push(res.data[i].productId)
  454. for (var j = 0; j < that.tlist.length; j++) {
  455. if (that.tlist[j].id === res.data[i].productId) {
  456. that.tlist[j].num = res.data[i].cartNum
  457. that.tlist[j].cartId = res.data[i].id
  458. console.log(that.tlist[j])
  459. }
  460. }
  461. }
  462. for (var j = 0; j < that.tlist.length; j++) {
  463. if (!cartIds.includes(that.tlist[j].id)) {
  464. that.tlist[j].num = 0
  465. that.tlist[j].cartId = 0
  466. }
  467. }
  468. //触发视图更新
  469. that.cartNums += 1
  470. console.log(that.tlist)
  471. })
  472. },
  473. //删除
  474. deleteCartItem(index) {
  475. const that = this
  476. that.$api.request('get', 'cart/app/removeCartItem', {
  477. cartId: that.tlist[index].cartId
  478. }).then(res => {
  479. // that.tlist.splice(index, 1);
  480. // that.calcTotal();
  481. that.tlist[index].num = 0
  482. that.cartNumFn()
  483. this.countTabNum()
  484. //uni.hideLoading();
  485. })
  486. },
  487. countTabNum() {
  488. this.$api.request('get', 'cart/app/countCart', {
  489. storageId: this.$store.state.storageId
  490. }).then(res => {
  491. if (res.data > 0) {
  492. uni.setTabBarBadge({
  493. index: 2,
  494. text: res.data + ''
  495. })
  496. } else if (res.data <= 0) {
  497. uni.removeTabBarBadge({
  498. index: 2
  499. })
  500. }
  501. this.$store.commit('addCart', res.data)
  502. }).catch(err => {
  503. // this.$api.msg('请求失败,请稍后再试')
  504. })
  505. },
  506. //配送外区域选择区域
  507. chooseLocation() {
  508. uni.chooseLocation({
  509. success: (res1) => {
  510. console.log(res1)
  511. this.district = res1.name
  512. uni.showLoading({
  513. title: "加载中..."
  514. })
  515. this.$api.request('get', 'storage/position/getRecentlyStorage', {
  516. lng: res1.longitude,
  517. lat: res1.latitude
  518. }, failres => {
  519. uni.hideLoading()
  520. this.logining = false
  521. this.$api.msg(failres.msg)
  522. this.storage ? this.storage = false : this.storage = true
  523. }).then(res => {
  524. uni.hideLoading()
  525. console.log(res)
  526. // res.data.id = 11
  527. this.$store.commit('setStorage', res.data.id)
  528. this.newTop = []
  529. this.cheapRecommend = []
  530. this.salesTop = []
  531. this.loadData(res.data.id)
  532. if (!res.data.id) {
  533. this.storage = false
  534. } else {
  535. this.storage ? this.storage = false : this.storage = true
  536. // this.loadRecommand('refresh')
  537. }
  538. })
  539. }
  540. });
  541. }
  542. }
  543. }
  544. </script>
  545. <style lang='scss'>
  546. page,
  547. .content {
  548. min-height: 50%;
  549. background-color: #f8f8f8;
  550. }
  551. .number-box {
  552. width: 73px;
  553. }
  554. .actived {
  555. font-size: 28rpx;
  556. color: #2AAC34;
  557. border-bottom: #2AAC34 solid 8rpx;
  558. }
  559. .line-orange::after,
  560. .lines-orange::after {
  561. border-color: #FC6620;
  562. }
  563. .solid-bottom::after {
  564. border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
  565. }
  566. .content {
  567. display: flex;
  568. }
  569. .left-aside {
  570. flex-shrink: 0;
  571. width: 150upx;
  572. height: 100%;
  573. background-color: #f8f8f8;
  574. }
  575. .f-item {
  576. display: flex;
  577. align-items: center;
  578. justify-content: center;
  579. width: 100%;
  580. height: 100upx;
  581. font-size: 28upx;
  582. color: $font-color-base;
  583. position: relative;
  584. &.active {
  585. color: $base-color;
  586. background: #fff;
  587. &:before {
  588. content: '';
  589. position: absolute;
  590. left: 0;
  591. top: 50%;
  592. transform: translateY(-50%);
  593. height: 30upx;
  594. width: 8upx;
  595. background-color: $base-color;
  596. opacity: .8;
  597. }
  598. }
  599. }
  600. .right-aside {
  601. flex: 1;
  602. overflow: hidden;
  603. padding-left: 20upx;
  604. }
  605. .s-item {
  606. display: flex;
  607. align-items: center;
  608. height: 70upx;
  609. padding-top: 8upx;
  610. font-size: 28upx;
  611. color: $font-color-dark;
  612. }
  613. .t-list {
  614. display: flex;
  615. flex-wrap: wrap;
  616. width: 100%;
  617. background: #fff;
  618. padding-top: 12upx;
  619. &:after {
  620. content: '';
  621. flex: 99;
  622. height: 0;
  623. }
  624. }
  625. .t-item {
  626. flex-shrink: 0;
  627. display: flex;
  628. justify-content: center;
  629. align-items: center;
  630. flex-direction: column;
  631. width: 176upx;
  632. font-size: 26upx;
  633. color: #666;
  634. padding-bottom: 20upx;
  635. image {
  636. width: 140upx;
  637. height: 140upx;
  638. }
  639. }
  640. </style>