goodsList.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113
  1. <template>
  2. <view class="container">
  3. <!--header-->
  4. <view class="tui-header-box">
  5. <view class="tui-header" :style="{ width: width + 'px', height: height + 'px' }">
  6. <view class="tui-back" :style="{ marginTop: arrowTop + 'px' }" @tap="back">
  7. <tui-icon name="arrowleft" color="#000"></tui-icon>
  8. </view>
  9. <view class="tui-searchbox tui-search-mr" :style="{ marginTop: inputTop + 'px' }" @tap="search">
  10. <icon type="search" :size="13" color="#999"></icon>
  11. <text class="tui-search-text" v-if="!searchKey">搜索</text>
  12. <view class="tui-search-key" v-if="searchKey">
  13. <view class="tui-key-text">{{ searchKey }}</view>
  14. <tui-icon name="shut" :size="12" color="#fff"></tui-icon>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. <!--header-->
  20. <!--screen-->
  21. <view class="tui-header-screen" :style="{ top: height + 'px' }">
  22. <view class="tui-screen-top">
  23. <view class="tui-top-item tui-icon-ml" :class="[tabIndex == 0 ? 'tui-active tui-bold' : '']"
  24. data-index="0" @tap="screen">
  25. <view>{{ selectedName }}</view>
  26. <tui-icon :name="selectH > 0 ? 'arrowup' : 'arrowdown'" :size="14"
  27. :color="tabIndex == 0 ? '#e41f19' : '#444'"></tui-icon>
  28. </view>
  29. <view class="tui-top-item" :class="[tabIndex == 1 ? 'tui-active tui-bold' : '']" @tap="screen"
  30. data-index="1">销量</view>
  31. <view class="tui-top-item" :class="[tabIndex == 4 ? 'tui-active tui-bold' : '']" @tap="screen"
  32. data-index="4">新品</view>
  33. <view class="tui-top-item" @tap="screen" data-index="2">
  34. <tui-icon :name="isList ? 'manage' : 'listview'" :size="isList ? 22 : 18"
  35. :bold="isList ? false : true" color="#333"></tui-icon>
  36. </view>
  37. <!--<view class="tui-top-item tui-icon-ml" @tap="screen" data-index="3">
  38. <text>筛选</text>
  39. <tui-icon name="screen" :size="12" color="#333" :bold="true"></tui-icon>
  40. </view>-->
  41. <!--下拉选择列表-综合-->
  42. <view class="tui-dropdownlist" :class="[selectH > 0 ? 'tui-dropdownlist-show' : '']"
  43. :style="{ height: selectH + 'rpx' }">
  44. <view class="tui-dropdownlist-item tui-icon-middle" :class="[item.selected ? 'tui-bold' : '']"
  45. v-for="(item, index) in dropdownList" :key="index" @tap.stop="dropdownItem" :data-index="index">
  46. <text class="tui-ml tui-middle">{{ item.name }}</text>
  47. <tui-icon name="check" :size="16" color="#e41f19" :bold="true" v-if="item.selected"></tui-icon>
  48. </view>
  49. </view>
  50. <view class="tui-dropdownlist-mask" :class="[selectH > 0 ? 'tui-mask-show' : '']"
  51. @tap.stop="hideDropdownList"></view>
  52. <!--下拉选择列表--综合-->
  53. </view>
  54. </view>
  55. <!--screen-->
  56. <!--list-->
  57. <view class="tui-product-list" :style="{ marginTop: px(dropScreenH + 18) }">
  58. <view class="tui-product-container">
  59. <block v-for="(item, index) in goodsList" :key="index">
  60. <!--商品列表-->
  61. <view class="tui-pro-item" :class="[isList ? 'tui-flex-list' : 'tui-flex-card']"
  62. hover-class="tui-hover" :hover-start-time="150"
  63. :data-url="'/pages/goodsDetail/goodsDetail?id=' + item.id" @tap="navigationTo">
  64. <image :src="item.pic" class="tui-pro-img" :class="[isList ? 'tui-proimg-list' : '']"
  65. mode="widthFix" />
  66. <view class="tui-pro-content">
  67. <view class="tui-pro-tit">{{ item.name }}</view>
  68. <view>
  69. <view class="tui-pro-price">
  70. <text v-if="item.is_points_goods==1"
  71. class="tui-sale-price">{{lang.points}}:{{ item.pay_points }}</text>
  72. <text v-if="item.is_points_goods!=1" class="tui-sale-price">¥{{ item.price }}</text>
  73. <text v-if="item.original_price>0"
  74. class="tui-factory-price">¥{{ item.original_price }}</text>
  75. </view>
  76. <view v-if="item.sale_count>30" class="tui-pro-pay">{{ item.sale_count }}人付款</view>
  77. </view>
  78. </view>
  79. </view>
  80. <!--商品列表-->
  81. </block>
  82. </view>
  83. </view>
  84. <!--list-->
  85. <!--顶部下拉筛选弹层 属性-->
  86. <tui-top-dropdown backgroundColor="#f7f7f7" :show="dropScreenShow" :paddingbtm="110" :translatey="dropScreenH"
  87. @close="btnCloseDrop">
  88. <scroll-view class="tui-scroll-box" scroll-y :scroll-top="scrollTop">
  89. <view class="tui-seizeaseat-20"></view>
  90. <view class="tui-drop-item tui-icon-middle" :class="[item.selected ? 'tui-bold' : '']"
  91. v-for="(item, index) in attrData" :key="index" @tap.stop="btnSelected" :data-index="index">
  92. <tui-icon name="check" :size="16" color="#e41f19" :bold="true" v-if="item.selected"></tui-icon>
  93. <text class="tui-ml tui-middle">{{ item.name }}</text>
  94. </view>
  95. <view class="tui-seizeaseat-30"></view>
  96. </scroll-view>
  97. <view class="tui-drop-btnbox">
  98. <view class="tui-drop-btn tui-btn-white" hover-class="tui-white-hover" :hover-stay-time="150"
  99. @tap="reset">重置</view>
  100. <view class="tui-drop-btn tui-btn-red" hover-class="tui-red-hover" :hover-stay-time="150"
  101. @tap="btnSure">确定</view>
  102. </view>
  103. </tui-top-dropdown>
  104. <!---顶部下拉筛选弹层 属性-->
  105. <!--左抽屉弹层 筛选 -->
  106. <tui-drawer mode="right" :visible="drawer" @close="closeDrawer">
  107. <view class="tui-drawer-box" :style="{ paddingTop: height + 'px' }">
  108. <scroll-view class="tui-drawer-scroll" scroll-y :style="{ height: drawerH + 'px' }">
  109. <view class="tui-drawer-title">
  110. <text class="tui-title-bold">价格区间</text>
  111. <view class="tui-attr-right">
  112. <tui-icon name="position-fill" color="#e41f19" :size="14" class="tui-location"></tui-icon>
  113. <text class="tui-addr-left">北京朝阳区三环到四环之间</text>
  114. </view>
  115. </view>
  116. <view class="tui-drawer-content">
  117. <input placeholder-class="tui-phcolor" class="tui-input" placeholder="最低价" maxlength="11"
  118. type="number" />
  119. <tui-icon name="reduce" color="#333" :size="14"></tui-icon>
  120. <input placeholder-class="tui-phcolor" class="tui-input" placeholder="最高价" maxlength="11"
  121. type="number" />
  122. </view>
  123. <view class="tui-drawer-title">
  124. <text class="tui-title-bold">全部分类</text>
  125. <view class="tui-all-box tui-icon-ml">
  126. <view class="tui-attr-right">全部</view>
  127. <tui-icon name="arrowdown" :size="14" color="#444"></tui-icon>
  128. </view>
  129. </view>
  130. <view class="tui-drawer-content tui-flex-attr">
  131. <view class="tui-attr-item tui-btmItem-active">
  132. <view class="tui-attr-ellipsis">男装</view>
  133. </view>
  134. <view class="tui-attr-item">
  135. <view class="tui-attr-ellipsis">女装</view>
  136. </view>
  137. <view class="tui-attr-item">
  138. <view class="tui-attr-ellipsis">运动服饰</view>
  139. </view>
  140. <view class="tui-attr-item">
  141. <view class="tui-attr-ellipsis">户外鞋服</view>
  142. </view>
  143. <view class="tui-attr-item">
  144. <view class="tui-attr-ellipsis">文化</view>
  145. </view>
  146. <view class="tui-attr-item">
  147. <view class="tui-attr-ellipsis">服饰配件</view>
  148. </view>
  149. <view class="tui-attr-item">
  150. <view class="tui-attr-ellipsis">流行男鞋</view>
  151. </view>
  152. <view class="tui-attr-item">
  153. <view class="tui-attr-ellipsis">艺术</view>
  154. </view>
  155. </view>
  156. <view class="tui-drawer-title">
  157. <text class="tui-title-bold">品牌</text>
  158. <view class="tui-all-box tui-icon-ml">
  159. <view class="tui-attr-right tui-active ">花花公子,七匹狼(SEPTWOLVES)</view>
  160. <tui-icon name="arrowdown" :size="14" color="#444"></tui-icon>
  161. </view>
  162. </view>
  163. <view class="tui-drawer-content tui-flex-attr">
  164. <view class="tui-attr-item tui-btmItem-active">
  165. <view class="tui-attr-ellipsis">花花公子</view>
  166. </view>
  167. <view class="tui-attr-item tui-btmItem-active">
  168. <view class="tui-attr-ellipsis">七匹狼(SEPTWOLVES)</view>
  169. </view>
  170. <view class="tui-attr-item">
  171. <view class="tui-attr-ellipsis">吉普</view>
  172. </view>
  173. </view>
  174. <view class="tui-drawer-title">
  175. <text class="tui-title-bold">尺码</text>
  176. <view class="tui-all-box tui-icon-ml">
  177. <view class="tui-attr-right">全部</view>
  178. <tui-icon name="arrowup" :size="14" color="#444"></tui-icon>
  179. </view>
  180. </view>
  181. <view class="tui-drawer-content tui-flex-attr">
  182. <view class="tui-attr-item tui-btmItem-active">
  183. <view class="tui-attr-ellipsis">27</view>
  184. </view>
  185. <view class="tui-attr-item">
  186. <view class="tui-attr-ellipsis">28</view>
  187. </view>
  188. <view class="tui-attr-item">
  189. <view class="tui-attr-ellipsis">29</view>
  190. </view>
  191. <view class="tui-attr-item">
  192. <view class="tui-attr-ellipsis">30</view>
  193. </view>
  194. <view class="tui-attr-item">
  195. <view class="tui-attr-ellipsis">31</view>
  196. </view>
  197. <view class="tui-attr-item">
  198. <view class="tui-attr-ellipsis">32</view>
  199. </view>
  200. <view class="tui-attr-item">
  201. <view class="tui-attr-ellipsis">33</view>
  202. </view>
  203. <view class="tui-attr-item">
  204. <view class="tui-attr-ellipsis">34</view>
  205. </view>
  206. <view class="tui-attr-item">
  207. <view class="tui-attr-ellipsis">35</view>
  208. </view>
  209. <view class="tui-attr-item">
  210. <view class="tui-attr-ellipsis">36</view>
  211. </view>
  212. <view class="tui-attr-item">
  213. <view class="tui-attr-ellipsis">37</view>
  214. </view>
  215. <view class="tui-attr-item">
  216. <view class="tui-attr-ellipsis">38</view>
  217. </view>
  218. <view class="tui-attr-item">
  219. <view class="tui-attr-ellipsis">39</view>
  220. </view>
  221. <view class="tui-attr-item">
  222. <view class="tui-attr-ellipsis">40</view>
  223. </view>
  224. <view class="tui-attr-item">
  225. <view class="tui-attr-ellipsis">41</view>
  226. </view>
  227. <view class="tui-attr-item">
  228. <view class="tui-attr-ellipsis">42</view>
  229. </view>
  230. <view class="tui-attr-item">
  231. <view class="tui-attr-ellipsis">43</view>
  232. </view>
  233. <view class="tui-attr-item">
  234. <view class="tui-attr-ellipsis">44</view>
  235. </view>
  236. </view>
  237. <view class="tui-safearea-bottom"></view>
  238. </scroll-view>
  239. <view class="tui-attr-btnbox">
  240. <view class="tui-attr-safearea">
  241. <view class="tui-drawer-btn tui-drawerbtn-black" hover-class="tui-white-hover"
  242. :hover-stay-time="150">重置</view>
  243. <view class="tui-drawer-btn tui-drawerbtn-primary" hover-class="tui-red-hover"
  244. :hover-stay-time="150" @tap="closeDrawer">确定(80万+件商品)</view>
  245. </view>
  246. </view>
  247. </view>
  248. </tui-drawer>
  249. <!--左抽屉弹层 筛选-->
  250. <!--加载loadding-->
  251. <tui-loadmore v-if="loadding" :index="3" type="red"></tui-loadmore>
  252. <tui-nomore v-if="!pullUpOn && isList" backgroundColor="#f7f7f7"></tui-nomore>
  253. <!--加载loadding-->
  254. </view>
  255. </template>
  256. <script>
  257. export default {
  258. data() {
  259. return {
  260. lang:{},
  261. searchKey: '', //搜索关键词
  262. width: 200, //header宽度
  263. height: 64, //header高度
  264. inputTop: 0, //搜索框距离顶部距离
  265. arrowTop: 0, //箭头距离顶部距离
  266. dropScreenH: 0, //下拉筛选框距顶部距离
  267. attrData: [],
  268. attrIndex: -1,
  269. dropScreenShow: false,
  270. scrollTop: 0,
  271. tabIndex: 0, //顶部筛选索引
  272. isList: false, //是否以列表展示 | 列表或大图
  273. drawer: false,
  274. drawerH: 0, //抽屉内部scrollview高度
  275. selectedName: '综合',
  276. selectH: 0,
  277. dropdownList: [{
  278. name: '综合',
  279. selected: true
  280. },
  281. {
  282. name: '价格升序',
  283. selected: false
  284. },
  285. {
  286. name: '价格降序',
  287. selected: false
  288. }
  289. ],
  290. goodsList: [],
  291. where: {
  292. sid: 0,
  293. keyword: '',
  294. priceOrder: '',
  295. salesOrder: '',
  296. news: 0,
  297. page: 1,
  298. limit: 10,
  299. categoryId: 0,
  300. },
  301. price: 0,
  302. stock: 0,
  303. pageIndex: 1,
  304. loadding: false,
  305. pullUpOn: true
  306. };
  307. },
  308. onLoad: function(options) {
  309. let _this = this;
  310. this.where.categoryId = options.cid || ''
  311. this.where.keyword = options.keyword || '';
  312. let obj = {};
  313. // #ifdef MP-WEIXIN
  314. obj = wx.getMenuButtonBoundingClientRect();
  315. // #endif
  316. // #ifdef MP-BAIDU
  317. obj = swan.getMenuButtonBoundingClientRect();
  318. // #endif
  319. // #ifdef MP-ALIPAY
  320. my.hideAddToDesktopMenu();
  321. // #endif
  322. uni.getSystemInfo({
  323. success: res => {
  324. this.width = obj.left || res.windowWidth;
  325. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44;
  326. this.inputTop = obj.top ? obj.top + (obj.height - 30) / 2 : res.statusBarHeight + 7;
  327. this.arrowTop = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6;
  328. this.searchKey = options.keyword || options.searchKey || '';
  329. //略小,避免误差带来的影响
  330. this.dropScreenH = (this.height * 750) / res.windowWidth + 85;
  331. this.drawerH = res.windowHeight - uni.upx2px(100) - this.height;
  332. }
  333. });
  334. _this.$request.get('Lang.getlang').then(res => {
  335. if (res.errno == 0) {
  336. _this.lang = res.data;
  337. }
  338. });
  339. this.get_product_list();
  340. },
  341. methods: {
  342. px(num) {
  343. return uni.upx2px(num) + 'px';
  344. },
  345. btnSelected: function(e) {
  346. let index = e.currentTarget.dataset.index;
  347. this.$set(this.attrData[index], 'selected', !this.attrData[index].selected);
  348. },
  349. reset() {
  350. let arr = this.attrData;
  351. for (let item of arr) {
  352. item.selected = false;
  353. }
  354. this.attrData = arr;
  355. },
  356. btnCloseDrop() {
  357. this.scrollTop = 1;
  358. this.$nextTick(() => {
  359. this.scrollTop = 0;
  360. });
  361. this.dropScreenShow = false;
  362. this.attrIndex = -1;
  363. },
  364. btnSure: function() {
  365. let index = this.attrIndex;
  366. let arr = this.attrData;
  367. let active = false;
  368. let attrName = '';
  369. //这里只是为了展示选中效果,并非实际场景
  370. for (let item of arr) {
  371. if (item.selected) {
  372. active = true;
  373. attrName += attrName ? ';' + item.name : item.name;
  374. }
  375. }
  376. let obj = this.attrArr[index];
  377. this.btnCloseDrop();
  378. this.$set(obj, 'isActive', active);
  379. this.$set(obj, 'selectedName', attrName);
  380. },
  381. showDropdownList: function() {
  382. this.selectH = 246;
  383. this.tabIndex = 0;
  384. },
  385. hideDropdownList: function() {
  386. this.selectH = 0;
  387. },
  388. dropdownItem: function(e) {
  389. let index = Number(e.currentTarget.dataset.index);
  390. let arr = this.dropdownList;
  391. if (index == 0) {
  392. }
  393. for (let i = 0; i < arr.length; i++) {
  394. if (i === index) {
  395. arr[i].selected = true;
  396. } else {
  397. arr[i].selected = false;
  398. }
  399. }
  400. this.dropdownList = arr;
  401. this.selectedName = index == 0 ? '综合' : '价格';
  402. this.selectH = 0;
  403. this.price = index;
  404. this.where.page = 1;
  405. this.get_product_list(true);
  406. },
  407. screen: function(e) {
  408. let index = e.currentTarget.dataset.index;
  409. this.hideDropdownList();
  410. this.btnCloseDrop();
  411. if (index == 0) {
  412. this.showDropdownList();
  413. } else if (index == 1) {
  414. this.tabIndex = 1;
  415. if (this.stock == 1) {
  416. this.stock = 2
  417. } else {
  418. this.stock = 1
  419. }
  420. } else if (index == 2) {
  421. this.isList = !this.isList;
  422. } else if (index == 3) {
  423. this.drawer = true;
  424. } else if (index == 4) {
  425. if (this.tabIndex == 4) {
  426. this.tabIndex = 0;
  427. } else {
  428. this.tabIndex = 4;
  429. }
  430. if (this.where.news == 1) {
  431. this.where.news = 0;
  432. } else {
  433. this.where.news = 1;
  434. }
  435. }
  436. this.loadend = false;
  437. this.where.page = 1;
  438. this.get_product_list(true);
  439. },
  440. closeDrawer: function() {
  441. this.drawer = false;
  442. },
  443. back: function() {
  444. if (this.drawer) {
  445. this.closeDrawer();
  446. } else {
  447. uni.navigateBack();
  448. }
  449. },
  450. search: function() {
  451. this.sam.navigateTo('/pages/common/search/search');
  452. },
  453. navigationTo: function(e) {
  454. this.sam.navigateTo(e.currentTarget.dataset.url);
  455. },
  456. //设置where条件
  457. setWhere: function() {
  458. if (this.price == 0)
  459. this.where.priceOrder = '';
  460. else if (this.price == 1)
  461. this.where.priceOrder = 'desc';
  462. else if (this.price == 2)
  463. this.where.priceOrder = 'asc';
  464. if (this.stock == 0)
  465. this.where.salesOrder = '';
  466. else if (this.stock == 1)
  467. this.where.salesOrder = 'desc';
  468. else if (this.stock == 2)
  469. this.where.salesOrder = 'asc';
  470. },
  471. //查找产品
  472. get_product_list: function(isPage) {
  473. var that = this;
  474. this.setWhere();
  475. console.log(this.where);
  476. if (that.loadend) return;
  477. if (that.loading) return;
  478. if (isPage === true) {
  479. that.where.page =1;
  480. that.goodsList = [];
  481. }
  482. that.where.showLoading = true;
  483. this.$request.post('goods', that.where).then(res => {
  484. if (res.errno == 0) {
  485. that.goodsList = that.goodsList.concat(res.data.data);
  486. that.loadend = that.goodsList.length < that.where.limit;
  487. that.loading = false;
  488. that.where.page = that.where.page + 1
  489. }
  490. })
  491. },
  492. },
  493. /**
  494. * 页面相关事件处理函数--监听用户下拉动作
  495. */
  496. onPullDownRefresh: function() {
  497. this.where.page = 1;
  498. this.loadend = false;
  499. this.goodsList = [];
  500. this.get_product_list();
  501. uni.stopPullDownRefresh();
  502. },
  503. /**
  504. * 页面上拉触底事件的处理函数
  505. */
  506. onReachBottom: function() {
  507. this.get_product_list();
  508. }
  509. };
  510. </script>
  511. <style>
  512. page {
  513. background-color: #f7f7f7;
  514. }
  515. .container {
  516. padding-bottom: env(safe-area-inset-bottom);
  517. }
  518. /* 隐藏scroll-view滚动条*/
  519. ::-webkit-scrollbar {
  520. width: 0;
  521. height: 0;
  522. color: transparent;
  523. }
  524. .tui-header-box {
  525. width: 100%;
  526. background: #fff;
  527. position: fixed;
  528. z-index: 1001;
  529. left: 0;
  530. top: 0;
  531. }
  532. .tui-header {
  533. display: flex;
  534. align-items: flex-start;
  535. }
  536. .tui-back {
  537. margin-left: 8rpx;
  538. height: 32px !important;
  539. width: 32px !important;
  540. }
  541. .tui-searchbox {
  542. width: 100%;
  543. height: 30px;
  544. margin-right: 30rpx;
  545. border-radius: 15px;
  546. font-size: 12px;
  547. background: #f7f7f7;
  548. padding: 3px 10px;
  549. box-sizing: border-box;
  550. color: #999;
  551. display: flex;
  552. align-items: center;
  553. overflow: hidden;
  554. }
  555. /* #ifdef MP */
  556. .tui-search-mr {
  557. margin-right: 20rpx !important;
  558. }
  559. /* #endif */
  560. .tui-search-text {
  561. padding-left: 16rpx;
  562. }
  563. .tui-search-key {
  564. max-width: 80%;
  565. height: 100%;
  566. padding: 0 16rpx;
  567. margin-left: 12rpx;
  568. display: flex;
  569. align-items: center;
  570. border-radius: 15px;
  571. background: rgba(0, 0, 0, 0.5);
  572. color: #fff;
  573. }
  574. .tui-key-text {
  575. box-sizing: border-box;
  576. padding-right: 12rpx;
  577. font-size: 12px;
  578. line-height: 12px;
  579. white-space: nowrap;
  580. overflow: hidden;
  581. text-overflow: ellipsis;
  582. }
  583. /*screen*/
  584. .tui-header-screen {
  585. width: 100%;
  586. box-sizing: border-box;
  587. background: #fff;
  588. position: fixed;
  589. z-index: 1000;
  590. }
  591. .tui-screen-top,
  592. .tui-screen-bottom {
  593. display: flex;
  594. align-items: center;
  595. justify-content: space-between;
  596. font-size: 28rpx;
  597. color: #333;
  598. }
  599. .tui-screen-top {
  600. height: 88rpx;
  601. position: relative;
  602. background: #fff;
  603. }
  604. .tui-top-item {
  605. height: 28rpx;
  606. line-height: 28rpx;
  607. flex: 1;
  608. display: flex;
  609. align-items: center;
  610. justify-content: center;
  611. }
  612. .tui-topitem-active {
  613. color: #e41f19;
  614. }
  615. .tui-screen-bottom {
  616. height: 100rpx;
  617. padding: 0 30rpx;
  618. box-sizing: border-box;
  619. font-size: 24rpx;
  620. align-items: center;
  621. overflow: hidden;
  622. }
  623. .tui-bottom-text {
  624. line-height: 26rpx;
  625. max-width: 82%;
  626. white-space: nowrap;
  627. overflow: hidden;
  628. text-overflow: ellipsis;
  629. }
  630. .tui-bottom-item {
  631. flex: 1;
  632. width: 0;
  633. display: flex;
  634. align-items: center;
  635. justify-content: center;
  636. padding: 0 12rpx;
  637. box-sizing: border-box;
  638. background-color: #f7f7f7;
  639. margin-right: 20rpx;
  640. white-space: nowrap;
  641. height: 60rpx;
  642. border-radius: 40rpx;
  643. }
  644. .tui-bottom-item:last-child {
  645. margin-right: 0;
  646. }
  647. .tui-btmItem-active {
  648. background-color: #fcedea !important;
  649. color: #e41f19;
  650. font-weight: bold;
  651. position: relative;
  652. }
  653. .tui-btmItem-active::after {
  654. content: '';
  655. position: absolute;
  656. border: 1rpx solid #e41f19;
  657. width: 100%;
  658. height: 100%;
  659. border-radius: 40rpx;
  660. left: 0;
  661. top: 0;
  662. }
  663. .tui-btmItem-tap {
  664. position: relative;
  665. border-bottom-left-radius: 0;
  666. border-bottom-right-radius: 0;
  667. }
  668. .tui-btmItem-tap::after {
  669. content: '';
  670. position: absolute;
  671. width: 100%;
  672. height: 22rpx;
  673. background: #f7f7f7;
  674. left: 0;
  675. top: 58rpx;
  676. }
  677. .tui-bold {
  678. font-weight: bold;
  679. }
  680. .tui-active {
  681. color: #e41f19;
  682. }
  683. .tui-addr-left {
  684. padding-left: 6rpx;
  685. }
  686. .tui-seizeaseat-20 {
  687. height: 20rpx;
  688. }
  689. .tui-seizeaseat-30 {
  690. height: 30rpx;
  691. }
  692. /*screen*/
  693. /*顶部下拉选择 属性*/
  694. .tui-scroll-box {
  695. width: 100%;
  696. height: 480rpx;
  697. box-sizing: border-box;
  698. position: relative;
  699. z-index: 99;
  700. color: #fff;
  701. font-size: 30rpx;
  702. word-break: break-all;
  703. }
  704. .tui-drop-item {
  705. color: #333;
  706. height: 80rpx;
  707. font-size: 28rpx;
  708. padding: 20rpx 40rpx 20rpx 40rpx;
  709. box-sizing: border-box;
  710. display: inline-block;
  711. width: 50%;
  712. }
  713. .tui-drop-btnbox {
  714. width: 100%;
  715. height: 100rpx;
  716. position: absolute;
  717. left: 0;
  718. bottom: 0;
  719. box-sizing: border-box;
  720. display: flex;
  721. }
  722. .tui-drop-btn {
  723. width: 50%;
  724. font-size: 32rpx;
  725. text-align: center;
  726. height: 100rpx;
  727. line-height: 100rpx;
  728. border: 0;
  729. }
  730. .tui-btn-red {
  731. background: #e41f19;
  732. color: #fff;
  733. }
  734. .tui-red-hover {
  735. background: #c51a15 !important;
  736. color: #e5e5e5;
  737. }
  738. .tui-btn-white {
  739. background: #fff;
  740. color: #333;
  741. }
  742. .tui-white-hover {
  743. background: #e5e5e5;
  744. color: #2e2e2e;
  745. }
  746. /*顶部下拉选择 属性*/
  747. /*顶部下拉选择 综合*/
  748. .tui-dropdownlist {
  749. width: 100%;
  750. position: absolute;
  751. background-color: #fff;
  752. border-bottom-left-radius: 24rpx;
  753. border-bottom-right-radius: 24rpx;
  754. overflow: hidden;
  755. box-sizing: border-box;
  756. padding-top: 10rpx;
  757. padding-bottom: 26rpx;
  758. left: 0;
  759. top: 88rpx;
  760. visibility: hidden;
  761. transition: all 0.2s ease-in-out;
  762. z-index: 999;
  763. }
  764. .tui-dropdownlist-show {
  765. visibility: visible;
  766. }
  767. .tui-dropdownlist-mask {
  768. position: fixed;
  769. top: 0;
  770. left: 0;
  771. right: 0;
  772. bottom: 0;
  773. background-color: rgba(0, 0, 0, 0.6);
  774. z-index: -1;
  775. transition: all 0.2s ease-in-out;
  776. opacity: 0;
  777. visibility: hidden;
  778. }
  779. .tui-mask-show {
  780. opacity: 1;
  781. visibility: visible;
  782. }
  783. .tui-dropdownlist-item {
  784. color: #333;
  785. height: 70rpx;
  786. font-size: 28rpx;
  787. padding: 0 40rpx;
  788. box-sizing: border-box;
  789. display: flex;
  790. align-items: center;
  791. justify-content: space-between;
  792. }
  793. /*顶部下拉选择 综合*/
  794. .tui-drawer-box {
  795. width: 686rpx;
  796. font-size: 24rpx;
  797. overflow: hidden;
  798. position: relative;
  799. padding-bottom: 100rpx;
  800. }
  801. .tui-drawer-title {
  802. display: flex;
  803. align-items: center;
  804. justify-content: space-between;
  805. padding: 0 30rpx;
  806. box-sizing: border-box;
  807. height: 80rpx;
  808. }
  809. .tui-title-bold {
  810. font-size: 26rpx;
  811. font-weight: bold;
  812. flex-shrink: 0;
  813. }
  814. .tui-location {
  815. margin-right: 6rpx;
  816. }
  817. .tui-attr-right {
  818. width: 70%;
  819. white-space: nowrap;
  820. overflow: hidden;
  821. text-overflow: ellipsis;
  822. text-align: right;
  823. }
  824. .tui-all-box {
  825. width: 90%;
  826. white-space: nowrap;
  827. display: flex;
  828. align-items: center;
  829. justify-content: flex-end;
  830. }
  831. .tui-drawer-content {
  832. padding: 16rpx 30rpx 30rpx 30rpx;
  833. display: flex;
  834. align-items: center;
  835. justify-content: space-between;
  836. box-sizing: border-box;
  837. }
  838. .tui-input {
  839. border: 0;
  840. height: 64rpx;
  841. border-radius: 32rpx;
  842. width: 45%;
  843. background-color: #f7f7f7;
  844. text-align: center;
  845. font-size: 24rpx;
  846. color: #333;
  847. }
  848. .tui-phcolor {
  849. text-align: center;
  850. color: #b2b2b2;
  851. font-size: 24rpx;
  852. }
  853. .tui-flex-attr {
  854. flex-wrap: wrap;
  855. justify-content: flex-start;
  856. }
  857. .tui-attr-item {
  858. width: 30%;
  859. height: 64rpx;
  860. background-color: #f7f7f7;
  861. display: flex;
  862. align-items: center;
  863. justify-content: center;
  864. padding: 0 4rpx;
  865. box-sizing: border-box;
  866. border-radius: 32rpx;
  867. margin-right: 5%;
  868. margin-bottom: 5%;
  869. }
  870. .tui-attr-ellipsis {
  871. white-space: nowrap;
  872. text-overflow: ellipsis;
  873. overflow: hidden;
  874. width: 96%;
  875. text-align: center;
  876. }
  877. .tui-attr-item:nth-of-type(3n) {
  878. margin-right: 0%;
  879. }
  880. .tui-attr-btnbox {
  881. width: 100%;
  882. position: absolute;
  883. left: 0;
  884. bottom: 0;
  885. box-sizing: border-box;
  886. padding: 0 30rpx;
  887. background: #fff;
  888. }
  889. .tui-attr-safearea {
  890. height: 100rpx;
  891. display: flex;
  892. align-items: center;
  893. justify-content: space-between;
  894. padding-bottom: env(safe-area-inset-bottom);
  895. }
  896. .tui-safearea-bottom {
  897. width: 100%;
  898. height: env(safe-area-inset-bottom);
  899. }
  900. .tui-attr-btnbox::before {
  901. content: '';
  902. position: absolute;
  903. top: 0;
  904. right: 0;
  905. left: 0;
  906. border-top: 1px solid #eaeef1;
  907. transform: scaleY(0.5) translateZ(0);
  908. transform-origin: 0 0;
  909. }
  910. .tui-drawer-btn {
  911. width: 47%;
  912. text-align: center;
  913. height: 60rpx;
  914. border-radius: 30rpx;
  915. flex-shrink: 0;
  916. display: flex;
  917. align-items: center;
  918. justify-content: center;
  919. box-sizing: border-box;
  920. }
  921. .tui-drawerbtn-black {
  922. border: 1rpx solid #555;
  923. }
  924. .tui-drawerbtn-primary {
  925. background: #e41f19;
  926. color: #fff;
  927. }
  928. /* 商品列表*/
  929. .tui-product-list {
  930. display: flex;
  931. justify-content: space-between;
  932. flex-direction: row;
  933. flex-wrap: wrap;
  934. box-sizing: border-box;
  935. }
  936. .tui-product-container {
  937. width: 100%;
  938. margin-left: 10rpx;
  939. margin-right: 10rpx;
  940. display: flex;
  941. flex-direction: row;
  942. flex-wrap: wrap;
  943. }
  944. .tui-pro-item {
  945. background: #fff;
  946. box-sizing: border-box;
  947. overflow: hidden;
  948. transition: all 0.15s ease-in-out;
  949. }
  950. .tui-flex-card {
  951. border-radius: 12rpx;
  952. width: 48%;
  953. margin-left: 1%;
  954. margin-right: 1%;
  955. margin-bottom: 2%;
  956. }
  957. .tui-flex-list {
  958. width: 100%;
  959. padding-top: 10rpx;
  960. padding-bottom: 10rpx;
  961. display: flex;
  962. margin-bottom: 1rpx !important;
  963. }
  964. .tui-pro-img {
  965. width: 100%;
  966. display: block;
  967. }
  968. .tui-proimg-list {
  969. width: 260rpx;
  970. height: 260rpx !important;
  971. flex-shrink: 0;
  972. border-radius: 12rpx;
  973. }
  974. .tui-pro-content {
  975. display: flex;
  976. flex-direction: column;
  977. justify-content: space-between;
  978. box-sizing: border-box;
  979. padding: 20rpx;
  980. }
  981. .tui-pro-tit {
  982. color: #2e2e2e;
  983. font-size: 26rpx;
  984. word-break: break-all;
  985. overflow: hidden;
  986. text-overflow: ellipsis;
  987. display: -webkit-box;
  988. -webkit-box-orient: vertical;
  989. -webkit-line-clamp: 2;
  990. }
  991. .tui-pro-price {
  992. padding-top: 18rpx;
  993. }
  994. .tui-sale-price {
  995. font-size: 34rpx;
  996. font-weight: 500;
  997. color: #e41f19;
  998. }
  999. .tui-factory-price {
  1000. font-size: 24rpx;
  1001. color: #a0a0a0;
  1002. text-decoration: line-through;
  1003. padding-left: 12rpx;
  1004. }
  1005. .tui-pro-pay {
  1006. padding-top: 10rpx;
  1007. font-size: 24rpx;
  1008. color: #656565;
  1009. }
  1010. /* 列表*/
  1011. </style>