shop - 副本.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961
  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-searchbox tui-search-mr" :style="{ marginTop: inputTop + 'px' }" @tap="search">
  7. <icon type="search" :size="13" color="#999"></icon>
  8. <text class="tui-search-text" v-if="!searchKey">搜索商品</text>
  9. <view class="tui-search-key" v-if="searchKey">
  10. <view class="tui-key-text">{{ searchKey }}</view>
  11. <tui-icon name="shut" :size="12" color="#fff"></tui-icon>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <!--header-->
  17. <!--screen-->
  18. <view class="tui-header-screen" :style="{ top: height + 'px' }">
  19. <view class="tui-screen-top">
  20. <view class="tui-top-item tui-icon-ml" :class="[tabIndex == 0 ? 'tui-active tui-bold' : '']" data-index="0" @tap="screen">
  21. <view>{{ selectedName }}</view>
  22. <tui-icon :name="selectH > 0 ? 'arrowup' : 'arrowdown'" :size="14" :color="tabIndex == 0 ? '#e41f19' : '#444'"></tui-icon>
  23. </view>
  24. <view class="tui-top-item tui-icon-ml" :class="[tabIndex == 1 ? 'tui-active tui-bold' : '']" data-index="1" @tap="screen">
  25. <view>{{ sortName }}</view>
  26. <tui-icon :name="selectH > 1 ? 'arrowup' : 'arrowdown'" :size="14" :color="tabIndex == 1 ? '#e41f19' : '#444'"></tui-icon>
  27. </view>
  28. <view class="tui-top-item tui-icon-ml" :class="[tabIndex == 2 ? 'tui-active tui-bold' : '']" data-index="2" @tap="screen1">
  29. <view>{{ screenName }}</view>
  30. <tui-icon :name="selectH > 2 ? 'arrowup' : 'arrowdown'" :size="14" :color="tabIndex == 2 ? '#e41f19' : '#444'"></tui-icon>
  31. </view>
  32. <!--下拉选择列表--综合-->
  33. <view class="tui-dropdownlist" :class="[selectH > 1 ? 'tui-dropdownlist-show' : '']" :style="{ height: selectH + 'rpx' }">
  34. <view
  35. class="tui-dropdownlist-item tui-icon-middle"
  36. :class="[item.selected ? 'tui-bold' : '']"
  37. v-for="(item, index) in dropdownList"
  38. :key="index"
  39. @tap.stop="dropdownItem"
  40. :data-index="index"
  41. >
  42. <text class="tui-ml tui-middle">{{ item.name }}</text>
  43. <tui-icon name="check" :size="16" color="#e41f19" :bold="true" v-if="item.selected"></tui-icon>
  44. </view>
  45. </view>
  46. <view class="tui-dropdownlist-mask" :class="[selectH > 1 ? 'tui-mask-show' : '']" @tap.stop="hideDropdownList"></view>
  47. <!--下拉选择列表--综合-->
  48. </view>
  49. </view>
  50. <!--screen-->
  51. <!--list-->
  52. <view class="tui-product-list" :style="{ marginTop: px(dropScreenH + 18) }">
  53. <view class="tui-product-container">
  54. <block v-for="(item, index) in productList" :key="index" v-if="(index + 1) % 2 != 0 || isList">
  55. <!-- <template is="productItem" data="{{item,index:index,isList:isList}}" /> -->
  56. <!--商品列表-->
  57. <view class="tui-pro-item" :class="[isList ? 'tui-flex-list' : '']" hover-class="tui-opcity" :hover-start-time="150" @tap="detail">
  58. <image :src="'/static/img/shop/' + item.img + '.jpg'" class="tui-pro-img" :class="[isList ? 'tui-proimg-list' : '']" mode="widthFix" />
  59. <view class="tui-pro-content">
  60. <view class="tui-pro-tit">{{ item.name }}</view>
  61. <view>
  62. <view class="tui-pro-price">
  63. <text class="tui-sale-price">¥{{ item.sale }}</text>
  64. <text class="tui-factory-price">¥{{ item.factory }}</text>
  65. </view>
  66. <view class="tui-pro-pay">{{ item.payNum }}人付款</view>
  67. </view>
  68. </view>
  69. </view>
  70. <!--商品列表-->
  71. </block>
  72. </view>
  73. <view class="tui-product-container" v-if="!isList">
  74. <block v-for="(item, index) in productList" :key="index" v-if="(index + 1) % 2 == 0">
  75. <!-- <template is="productItem" data="{{item,index:index}}" /> -->
  76. <!--商品列表-->
  77. <view class="tui-pro-item" :class="[isList ? 'tui-flex-list' : '']" hover-class="tui-opcity" :hover-start-time="150" @tap="detail">
  78. <image :src="'/static/img/shop/' + item.img + '.jpg'" class="tui-pro-img" :class="[isList ? 'tui-proimg-list' : '']" mode="widthFix" />
  79. <view class="tui-pro-content">
  80. <view class="tui-pro-tit">{{ item.name }}</view>
  81. <view>
  82. <view class="tui-pro-price">
  83. <text class="tui-sale-price">¥{{ item.sale }}</text>
  84. <text class="tui-factory-price">¥{{ item.factory }}</text>
  85. </view>
  86. <view class="tui-pro-pay">{{ item.payNum }}人付款</view>
  87. </view>
  88. </view>
  89. </view>
  90. <!--商品列表-->
  91. </block>
  92. </view>
  93. </view>
  94. <!--list-->
  95. <!--加载loadding-->
  96. <tui-loadmore v-if="loadding" :index="3" type="red"></tui-loadmore>
  97. <tui-nomore v-if="!pullUpOn && isList" backgroundColor="#f7f7f7"></tui-nomore>
  98. <!--加载loadding-->
  99. </view>
  100. </template>
  101. <script>
  102. import tuiButton from "@/components/thorui/tui-button/tui-button"
  103. import tuiIcon from "@/components/thorui/tui-icon/tui-icon"
  104. import tuiBadge from "@/components/thorui/tui-badge/tui-badge"
  105. import tuiTag from "@/components/thorui/tui-tag/tui-tag"
  106. import tuiNomore from "@/components/thorui/tui-nomore/tui-nomore"
  107. import tuiTopDropdown from "@/components/thorui/tui-top-dropdown/tui-top-dropdown"
  108. import tuiBottomPopup from "@/components/thorui/tui-bottom-popup/tui-bottom-popup"
  109. import tuiNumberbox from "@/components/thorui/tui-numberbox/tui-numberbox"
  110. import tuiDrawer from "@/components/thorui/tui-drawer/tui-drawer"
  111. export default {
  112. components:{
  113. tuiButton,
  114. tuiIcon,
  115. tuiBadge,
  116. tuiTag,
  117. tuiNomore,
  118. tuiTopDropdown,
  119. tuiBottomPopup,
  120. tuiNumberbox,
  121. tuiDrawer
  122. },
  123. data() {
  124. return {
  125. searchKey: '', //搜索关键词
  126. width: 200, //header宽度
  127. height: 64, //header高度
  128. inputTop: 0, //搜索框距离顶部距离
  129. arrowTop: 0, //箭头距离顶部距离
  130. dropScreenH: 0, //下拉筛选框距顶部距离
  131. attrData: [],
  132. attrIndex: -1,
  133. dropScreenShow: false,
  134. scrollTop: 0,
  135. tabIndex: 0, //顶部筛选索引
  136. isList: false, //是否以列表展示 | 列表或大图
  137. drawer: false,
  138. drawerH: 0, //抽屉内部scrollview高度
  139. selectedName: '全部分类',
  140. sortName: '综合排序',
  141. screenName:'筛选',
  142. selectH: 0,
  143. dropdownList: [
  144. {
  145. name: '综合',
  146. selected: true
  147. },
  148. {
  149. name: '价格升序',
  150. selected: false
  151. },
  152. {
  153. name: '价格降序',
  154. selected: false
  155. }
  156. ],
  157. productList: [
  158. {
  159. img: 1,
  160. name: '龙飞凤舞家族园地背景个性定制皮肤',
  161. sale: 599,
  162. factory: 899,
  163. payNum: 2342
  164. },{
  165. img: 1,
  166. name: '龙飞凤舞家族园地背景个性定制皮肤',
  167. sale: 599,
  168. factory: 899,
  169. payNum: 2342
  170. },{
  171. img: 1,
  172. name: '龙飞凤舞家族园地背景个性定制皮肤',
  173. sale: 599,
  174. factory: 899,
  175. payNum: 2342
  176. },{
  177. img: 1,
  178. name: '龙飞凤舞家族园地背景个性定制皮肤',
  179. sale: 599,
  180. factory: 899,
  181. payNum: 2342
  182. },{
  183. img: 1,
  184. name: '龙飞凤舞家族园地背景个性定制皮肤',
  185. sale: 599,
  186. factory: 899,
  187. payNum: 2342
  188. },{
  189. img: 1,
  190. name: '龙飞凤舞家族园地背景个性定制皮肤',
  191. sale: 599,
  192. factory: 899,
  193. payNum: 2342
  194. },{
  195. img: 1,
  196. name: '龙飞凤舞家族园地背景个性定制皮肤',
  197. sale: 599,
  198. factory: 899,
  199. payNum: 2342
  200. },{
  201. img: 1,
  202. name: '龙飞凤舞家族园地背景个性定制皮肤',
  203. sale: 599,
  204. factory: 899,
  205. payNum: 2342
  206. }
  207. ],
  208. pageIndex: 1,
  209. loadding: false,
  210. pullUpOn: true
  211. };
  212. },
  213. onLoad: function(options) {
  214. let obj = {};
  215. // #ifdef MP-WEIXIN
  216. obj = wx.getMenuButtonBoundingClientRect();
  217. // #endif
  218. // #ifdef MP-BAIDU
  219. obj = swan.getMenuButtonBoundingClientRect();
  220. // #endif
  221. // #ifdef MP-ALIPAY
  222. my.hideAddToDesktopMenu();
  223. // #endif
  224. uni.getSystemInfo({
  225. success: res => {
  226. this.width = obj.left || res.windowWidth;
  227. this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44;
  228. this.inputTop = obj.top ? obj.top + (obj.height - 30) / 2 : res.statusBarHeight + 7;
  229. this.arrowTop = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6;
  230. this.searchKey = options.searchKey || '';
  231. //略小,避免误差带来的影响
  232. this.dropScreenH = (this.height * 120 ) / res.windowWidth + 186;
  233. this.drawerH = res.windowHeight - uni.upx2px(100) - this.height;
  234. }
  235. });
  236. },
  237. methods: {
  238. px(num) {
  239. return uni.upx2px(num) + 'px';
  240. },
  241. btnDropChange: function(e) {
  242. let index = e.currentTarget.dataset.index;
  243. let arr = JSON.parse(JSON.stringify(this.attrArr[index].list));
  244. if (arr.length === 0) {
  245. this.btnCloseDrop();
  246. this.$set(this.attrArr[index], 'isActive', !this.attrArr[index].isActive);
  247. } else {
  248. this.attrData = arr;
  249. this.attrIndex = index;
  250. this.dropScreenShow = true;
  251. this.$set(this.attrArr[index], 'isActive', false);
  252. this.scrollTop = 1;
  253. this.$nextTick(() => {
  254. this.scrollTop = 0;
  255. });
  256. }
  257. },
  258. btnSelected: function(e) {
  259. let index = e.currentTarget.dataset.index;
  260. this.$set(this.attrData[index], 'selected', !this.attrData[index].selected);
  261. },
  262. reset() {
  263. let arr = this.attrData;
  264. for (let item of arr) {
  265. item.selected = false;
  266. }
  267. this.attrData = arr;
  268. },
  269. btnCloseDrop() {
  270. this.scrollTop = 1;
  271. this.$nextTick(() => {
  272. this.scrollTop = 0;
  273. });
  274. this.dropScreenShow = false;
  275. this.attrIndex = -1;
  276. },
  277. btnSure: function() {
  278. let index = this.attrIndex;
  279. let arr = this.attrData;
  280. let active = false;
  281. let attrName = '';
  282. //这里只是为了展示选中效果,并非实际场景
  283. for (let item of arr) {
  284. if (item.selected) {
  285. active = true;
  286. attrName += attrName ? ';' + item.name : item.name;
  287. }
  288. }
  289. let obj = this.attrArr[index];
  290. this.btnCloseDrop();
  291. this.$set(obj, 'isActive', active);
  292. this.$set(obj, 'selectedName', attrName);
  293. },
  294. showDropdownList: function() {
  295. this.selectH = 246;
  296. this.tabIndex = 0;
  297. },
  298. hideDropdownList: function() {
  299. this.selectH = 0;
  300. },
  301. showScreenList: function() {
  302. this.selectH = 246;
  303. this.tabIndex = 0;
  304. },
  305. hideScreenList: function() {
  306. this.selectH = 0;
  307. },
  308. dropdownItem: function(e) {
  309. let index = e.currentTarget.dataset.index;
  310. let arr = this.dropdownList;
  311. for (let i = 0; i < arr.length; i++) {
  312. if (i === index) {
  313. arr[i].selected = true;
  314. } else {
  315. arr[i].selected = false;
  316. }
  317. }
  318. this.dropdownList = arr;
  319. this.selectedName = index == 0 ? '综合' : '价格';
  320. this.selectH = 0;
  321. },
  322. screen: function(e) {
  323. let index = 0;
  324. this.hideDropdownList();
  325. this.btnCloseDrop();
  326. if (index == 0) {
  327. this.showDropdownList();
  328. }
  329. },
  330. screen1: function(e) {
  331. let index = 1;
  332. this.hideScreenList();
  333. this.btnCloseDrop();
  334. if (index == 1) {
  335. this.showScreenList();
  336. }
  337. },
  338. closeDrawer: function() {
  339. this.drawer = false;
  340. },
  341. back: function() {
  342. if (this.drawer) {
  343. this.closeDrawer();
  344. } else {
  345. uni.navigateBack();
  346. }
  347. },
  348. search: function() {
  349. uni.navigateTo({
  350. url: '/pages/shop/search/search'
  351. });
  352. },
  353. detail: function() {
  354. uni.navigateTo({
  355. url: '/pages/shop/details/details'
  356. });
  357. }
  358. },
  359. onReachBottom: function() {
  360. if (!this.pullUpOn) return;
  361. this.loadding = true;
  362. if (this.pageIndex == 4) {
  363. this.loadding = false;
  364. this.pullUpOn = false;
  365. } else {
  366. let loadData = JSON.parse(JSON.stringify(this.productList));
  367. loadData = loadData.splice(0, 10);
  368. if (this.pageIndex == 1) {
  369. loadData = loadData.reverse();
  370. }
  371. this.productList = this.productList.concat(loadData);
  372. this.pageIndex = this.pageIndex + 1;
  373. this.loadding = false;
  374. }
  375. }
  376. };
  377. </script>
  378. <style>
  379. page {
  380. background-color: #f7f7f7;
  381. }
  382. .container {
  383. padding-bottom: env(safe-area-inset-bottom);
  384. width: 100%;
  385. }
  386. /* 隐藏scroll-view滚动条*/
  387. ::-webkit-scrollbar {
  388. width: 0;
  389. height: 0;
  390. color: transparent;
  391. }
  392. .tui-header-box {
  393. width: 100%;
  394. background: #C74547;
  395. position: fixed;
  396. z-index: 99998;
  397. left: 0;
  398. top: 0;
  399. }
  400. .tui-header {
  401. display: flex;
  402. align-items: flex-start;
  403. }
  404. .tui-back {
  405. margin-left: 8rpx;
  406. height: 32px !important;
  407. width: 32px !important;
  408. }
  409. .tui-searchbox {
  410. width: 100%;
  411. height: 30px;
  412. margin-right: 30rpx;
  413. margin-left: 30rpx;
  414. border-radius: 15px;
  415. font-size: 12px;
  416. background: #f7f7f7;
  417. padding: 3px 10px;
  418. box-sizing: border-box;
  419. color: #999;
  420. display: flex;
  421. align-items: center;
  422. overflow: hidden;
  423. }
  424. /* #ifdef MP */
  425. .tui-search-mr {
  426. margin-right: 20rpx !important;
  427. }
  428. /* #endif */
  429. .tui-search-text {
  430. padding-left: 16rpx;
  431. }
  432. .tui-search-key {
  433. max-width: 80%;
  434. height: 100%;
  435. padding: 0 16rpx;
  436. margin-left: 12rpx;
  437. display: flex;
  438. align-items: center;
  439. border-radius: 15px;
  440. background: rgba(0, 0, 0, 0.5);
  441. color: #fff;
  442. }
  443. .tui-key-text {
  444. box-sizing: border-box;
  445. padding-right: 12rpx;
  446. font-size: 12px;
  447. line-height: 12px;
  448. white-space: nowrap;
  449. overflow: hidden;
  450. text-overflow: ellipsis;
  451. }
  452. /*screen*/
  453. .tui-header-screen {
  454. width: 100%;
  455. box-sizing: border-box;
  456. background: #fff;
  457. position: fixed;
  458. z-index: 1000;
  459. }
  460. .tui-screen-top,
  461. .tui-screen-bottom {
  462. display: flex;
  463. align-items: center;
  464. justify-content: space-between;
  465. font-size: 28rpx;
  466. color: #333;
  467. }
  468. .tui-screen-top {
  469. height: 88rpx;
  470. position: relative;
  471. background: #fff;
  472. }
  473. .tui-top-item {
  474. height: 28rpx;
  475. line-height: 28rpx;
  476. flex: 1;
  477. display: flex;
  478. align-items: center;
  479. justify-content: center;
  480. }
  481. .tui-topitem-active {
  482. color: #e41f19;
  483. }
  484. .tui-screen-bottom {
  485. height: 100rpx;
  486. padding: 0 30rpx;
  487. box-sizing: border-box;
  488. font-size: 24rpx;
  489. align-items: center;
  490. overflow: hidden;
  491. }
  492. .tui-bottom-text {
  493. line-height: 26rpx;
  494. max-width: 82%;
  495. white-space: nowrap;
  496. overflow: hidden;
  497. text-overflow: ellipsis;
  498. }
  499. .tui-bottom-item {
  500. flex: 1;
  501. width: 0;
  502. display: flex;
  503. align-items: center;
  504. justify-content: center;
  505. padding: 0 12rpx;
  506. box-sizing: border-box;
  507. background-color: #f7f7f7;
  508. margin-right: 20rpx;
  509. white-space: nowrap;
  510. height: 60rpx;
  511. border-radius: 40rpx;
  512. }
  513. .tui-bottom-item:last-child {
  514. margin-right: 0;
  515. }
  516. .tui-btmItem-active {
  517. background-color: #fcedea !important;
  518. color: #e41f19;
  519. font-weight: bold;
  520. position: relative;
  521. }
  522. .tui-btmItem-active::after {
  523. content: '';
  524. position: absolute;
  525. border: 1rpx solid #e41f19;
  526. width: 100%;
  527. height: 100%;
  528. border-radius: 40rpx;
  529. left: 0;
  530. top: 0;
  531. }
  532. .tui-btmItem-tap {
  533. position: relative;
  534. border-bottom-left-radius: 0;
  535. border-bottom-right-radius: 0;
  536. }
  537. .tui-btmItem-tap::after {
  538. content: '';
  539. position: absolute;
  540. width: 100%;
  541. height: 22rpx;
  542. background: #f7f7f7;
  543. left: 0;
  544. top: 58rpx;
  545. }
  546. .tui-bold {
  547. font-weight: bold;
  548. }
  549. .tui-active {
  550. color: #e41f19;
  551. }
  552. .tui-addr-left {
  553. padding-left: 6rpx;
  554. }
  555. .tui-seizeaseat-20 {
  556. height: 20rpx;
  557. }
  558. .tui-seizeaseat-30 {
  559. height: 30rpx;
  560. }
  561. /*screen*/
  562. /*顶部下拉选择 属性*/
  563. .tui-scroll-box {
  564. width: 100%;
  565. height: 480rpx;
  566. box-sizing: border-box;
  567. position: relative;
  568. z-index: 99;
  569. color: #fff;
  570. font-size: 30rpx;
  571. word-break: break-all;
  572. }
  573. .tui-drop-item {
  574. color: #333;
  575. height: 80rpx;
  576. font-size: 28rpx;
  577. padding: 20rpx 40rpx 20rpx 40rpx;
  578. box-sizing: border-box;
  579. display: inline-block;
  580. width: 50%;
  581. }
  582. .tui-drop-btnbox {
  583. width: 100%;
  584. height: 100rpx;
  585. position: absolute;
  586. left: 0;
  587. bottom: 0;
  588. box-sizing: border-box;
  589. display: flex;
  590. }
  591. .tui-drop-btn {
  592. width: 50%;
  593. font-size: 32rpx;
  594. text-align: center;
  595. height: 100rpx;
  596. line-height: 100rpx;
  597. border: 0;
  598. }
  599. .tui-btn-red {
  600. background: #e41f19;
  601. color: #fff;
  602. }
  603. .tui-red-hover {
  604. background: #c51a15 !important;
  605. color: #e5e5e5;
  606. }
  607. .tui-btn-white {
  608. background: #fff;
  609. color: #333;
  610. }
  611. .tui-white-hover {
  612. background: #e5e5e5;
  613. color: #2e2e2e;
  614. }
  615. /*顶部下拉选择 属性*/
  616. /*顶部下拉选择 综合*/
  617. .tui-dropdownlist {
  618. width: 100%;
  619. position: absolute;
  620. background-color: #fff;
  621. border-bottom-left-radius: 24rpx;
  622. border-bottom-right-radius: 24rpx;
  623. overflow: hidden;
  624. box-sizing: border-box;
  625. padding-top: 10rpx;
  626. padding-bottom: 26rpx;
  627. left: 0;
  628. top: 88rpx;
  629. visibility: hidden;
  630. transition: all 0.2s ease-in-out;
  631. z-index: 999;
  632. }
  633. .tui-dropdownlist-show {
  634. visibility: visible;
  635. }
  636. .tui-dropdownlist-mask {
  637. position: fixed;
  638. top: 0;
  639. left: 0;
  640. right: 0;
  641. bottom: 0;
  642. background-color: rgba(0, 0, 0, 0.6);
  643. z-index: -1;
  644. transition: all 0.2s ease-in-out;
  645. opacity: 0;
  646. visibility: hidden;
  647. }
  648. .tui-mask-show {
  649. opacity: 1;
  650. visibility: visible;
  651. }
  652. .tui-dropdownlist-item {
  653. color: #333;
  654. height: 70rpx;
  655. font-size: 28rpx;
  656. padding: 0 40rpx;
  657. box-sizing: border-box;
  658. display: flex;
  659. align-items: center;
  660. justify-content: space-between;
  661. }
  662. /*顶部下拉选择 综合*/
  663. .tui-drawer-box {
  664. width: 686rpx;
  665. font-size: 24rpx;
  666. overflow: hidden;
  667. position: relative;
  668. padding-bottom: 100rpx;
  669. }
  670. .tui-drawer-title {
  671. display: flex;
  672. align-items: center;
  673. justify-content: space-between;
  674. padding: 0 30rpx;
  675. box-sizing: border-box;
  676. height: 80rpx;
  677. }
  678. .tui-title-bold {
  679. font-size: 26rpx;
  680. font-weight: bold;
  681. flex-shrink: 0;
  682. }
  683. .tui-location {
  684. margin-right: 6rpx;
  685. }
  686. .tui-attr-right {
  687. width: 70%;
  688. white-space: nowrap;
  689. overflow: hidden;
  690. text-overflow: ellipsis;
  691. text-align: right;
  692. }
  693. .tui-all-box {
  694. width: 90%;
  695. white-space: nowrap;
  696. display: flex;
  697. align-items: center;
  698. justify-content: flex-end;
  699. }
  700. .tui-drawer-content {
  701. padding: 16rpx 30rpx 30rpx 30rpx;
  702. display: flex;
  703. align-items: center;
  704. justify-content: space-between;
  705. box-sizing: border-box;
  706. }
  707. .tui-input {
  708. border: 0;
  709. height: 64rpx;
  710. border-radius: 32rpx;
  711. width: 45%;
  712. background-color: #f7f7f7;
  713. text-align: center;
  714. font-size: 24rpx;
  715. color: #333;
  716. }
  717. .tui-phcolor {
  718. text-align: center;
  719. color: #b2b2b2;
  720. font-size: 24rpx;
  721. }
  722. .tui-flex-attr {
  723. flex-wrap: wrap;
  724. justify-content: flex-start;
  725. }
  726. .tui-attr-item {
  727. width: 30%;
  728. height: 64rpx;
  729. background-color: #f7f7f7;
  730. display: flex;
  731. align-items: center;
  732. justify-content: center;
  733. padding: 0 4rpx;
  734. box-sizing: border-box;
  735. border-radius: 32rpx;
  736. margin-right: 5%;
  737. margin-bottom: 5%;
  738. }
  739. .tui-attr-ellipsis {
  740. white-space: nowrap;
  741. text-overflow: ellipsis;
  742. overflow: hidden;
  743. width: 96%;
  744. text-align: center;
  745. }
  746. .tui-attr-item:nth-of-type(3n) {
  747. margin-right: 0%;
  748. }
  749. .tui-attr-btnbox {
  750. width: 100%;
  751. position: absolute;
  752. left: 0;
  753. bottom: 0;
  754. box-sizing: border-box;
  755. padding: 0 30rpx;
  756. background: #fff;
  757. }
  758. .tui-attr-safearea {
  759. height: 100rpx;
  760. display: flex;
  761. align-items: center;
  762. justify-content: space-between;
  763. padding-bottom: env(safe-area-inset-bottom);
  764. }
  765. .tui-safearea-bottom {
  766. width: 100%;
  767. height: env(safe-area-inset-bottom);
  768. }
  769. .tui-attr-btnbox::before {
  770. content: '';
  771. position: absolute;
  772. top: 0;
  773. right: 0;
  774. left: 0;
  775. border-top: 1px solid #eaeef1;
  776. transform: scaleY(0.5) translateZ(0);
  777. transform-origin: 0 0;
  778. }
  779. .tui-drawer-btn {
  780. width: 47%;
  781. text-align: center;
  782. height: 60rpx;
  783. border-radius: 30rpx;
  784. flex-shrink: 0;
  785. display: flex;
  786. align-items: center;
  787. justify-content: center;
  788. box-sizing: border-box;
  789. }
  790. .tui-drawerbtn-black {
  791. border: 1rpx solid #555;
  792. }
  793. .tui-drawerbtn-primary {
  794. background: #e41f19;
  795. color: #fff;
  796. }
  797. /* 商品列表*/
  798. .tui-product-list {
  799. display: flex;
  800. justify-content: space-between;
  801. flex-direction: row;
  802. flex-wrap: wrap;
  803. box-sizing: border-box;
  804. }
  805. .tui-product-container {
  806. flex: 1;
  807. margin-right: 10rpx;
  808. }
  809. .tui-product-container:last-child {
  810. margin-right: 0;
  811. }
  812. .tui-pro-item {
  813. width: 100%;
  814. margin-bottom: 10rpx;
  815. background: #fff;
  816. box-sizing: border-box;
  817. border-radius: 12rpx;
  818. overflow: hidden;
  819. transition: all 0.15s ease-in-out;
  820. }
  821. .tui-flex-list {
  822. display: flex;
  823. margin-bottom: 1rpx !important;
  824. }
  825. .tui-pro-img {
  826. width: 100%;
  827. display: block;
  828. }
  829. .tui-proimg-list {
  830. width: 260rpx;
  831. height: 260rpx !important;
  832. flex-shrink: 0;
  833. border-radius: 12rpx;
  834. }
  835. .tui-pro-content {
  836. display: flex;
  837. flex-direction: column;
  838. justify-content: space-between;
  839. box-sizing: border-box;
  840. padding: 20rpx;
  841. }
  842. .tui-pro-tit {
  843. color: #2e2e2e;
  844. font-size: 26rpx;
  845. word-break: break-all;
  846. overflow: hidden;
  847. text-overflow: ellipsis;
  848. display: -webkit-box;
  849. -webkit-box-orient: vertical;
  850. -webkit-line-clamp: 2;
  851. }
  852. .tui-pro-price {
  853. padding-top: 18rpx;
  854. }
  855. .tui-sale-price {
  856. font-size: 34rpx;
  857. font-weight: 500;
  858. color: #e41f19;
  859. }
  860. .tui-factory-price {
  861. font-size: 24rpx;
  862. color: #a0a0a0;
  863. text-decoration: line-through;
  864. padding-left: 12rpx;
  865. }
  866. .tui-pro-pay {
  867. padding-top: 10rpx;
  868. font-size: 24rpx;
  869. color: #656565;
  870. }
  871. /* 商品列表*/
  872. </style>