app-goods-list.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. <template>
  2. <view class="app-goods-list" :class="listClass">
  3. <block v-for="(goods, index) in list" :key="index">
  4. <!-- 列表模式 -->
  5. <template v-if="listStyle == 1">
  6. <view class="dir-left-nowrap goods-item-1" @click="jump(goods)">
  7. <view class="box-grow-0 cover-pic">
  8. <view class="out-dialog" v-if="goods.goods_stock == 0 && appSetting.is_show_stock == '1'">
  9. <image :src="appSetting.is_use_stock == '1' ? appImg.plugins_out : appSetting.sell_out_pic"></image>
  10. </view>
  11. <app-image :img-src="goods.cover_pic" borderRadius="16rpx" width="200rpx"
  12. height="200rpx"></app-image>
  13. </view>
  14. <view class="box-grow-1 dir-top-nowrap content main-between" style="padding: 28rpx 24rpx 24rpx 0">
  15. <view class="box-grow-0 goods-name"
  16. :class="(goods.is_level == 1 && goods.is_negotiable != 1 && is_show_member) || goods.vip_card_appoint.discount ? 't-omit' : 't-omit-two'"
  17. v-if="isShowGoodsName == 1">{{goods.name}}</view>
  18. <view class="dir-top-nowrap" :class="isShowGoodsName == 1 ? 'box-grow-0' : 'box-grow-1'">
  19. <view class="box-grow-0 cross-bottom"
  20. v-if="goods.is_level == 1 && goods.is_negotiable != 1 && is_show_member">
  21. <app-member-price :theme="theme" :price="goods.level_price"></app-member-price>
  22. </view>
  23. <app-sup-vip :is_vip_card_user="goods.vip_card_appoint.is_vip_card_user"
  24. v-if="goods.vip_card_appoint.discount"
  25. :discount="goods.vip_card_appoint.discount">
  26. </app-sup-vip>
  27. <view :class="isShowCart == 0 || goods.is_negotiable == 1 ? 'dir-left-nowrap' : 'dir-top-nowrap'"
  28. class="box-grow-1">
  29. <view class="box-grow-1 " :class="(goods.is_level == 1 && goods.is_negotiable != 1 && is_show_member) || goods.vip_card_appoint.discount ? 'dir-left-nowrap cross-center '+ themeText : 'dir-top-nowrap ' + themeText">
  30. <template v-if="goods.is_negotiable == 1">
  31. <view :class="themeText+ '-m-text ' + themeText">价格面议</view>
  32. </template>
  33. <template v-else>
  34. <app-price :theme="themeText" :price="`${goods.price}`" type="text-price-all"></app-price>
  35. </template>
  36. <view v-if="goods.sales && goods.is_negotiable != 1" :style="{marginLeft: (goods.is_level == 1 && goods.is_negotiable != 1 && is_show_member) || goods.vip_card_appoint.discount ? '14rpx' : '0rpx'}" class="box-grow-1 sales">{{goods.sales}}</view>
  37. </view>
  38. <view class="dir-left-nowrap cross-center sales-box">
  39. <view @click.stop="specification(goods)" class="box-grow-0 cross-center main-center cart-box"
  40. :class="themeText+ '-m-text ' + themeText"
  41. v-if="goods.is_negotiable != 1 && isShowCart == 1 && goods.goods_stock > 0">
  42. <app-cart-image class="goods-cart"></app-cart-image>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <!-- 一行两个 -->
  51. <template v-if="listStyle == 2">
  52. <view class="box-grow-0 goods-item-2 dir-top-nowrap" @click="jump(goods)"
  53. :class="index%2 === 0 ? 'mr-14' : ''">
  54. <view class="box-grow-0">
  55. <view class="out-dialog" v-if="goods.goods_stock == 0 && appSetting.is_show_stock == '1'">
  56. <image :src="appSetting.is_use_stock == '1' ? appImg.plugins_out : appSetting.sell_out_pic"></image>
  57. </view>
  58. <app-image :img-src="goods.cover_pic" width="344rpx" height="344rpx"
  59. :border-radius="`16rpx 16rpx 0 0`"></app-image>
  60. </view>
  61. <view class="box-grow-0 goods-name t-omit-two padding" v-if="isShowGoodsName == 1">
  62. <span v-if="sign === 'pick'" class="dir-tag-def" :class="themeText + '-m-text ' + themeText + ' ' + themeText + '-m-back-o '">N元任选</span>
  63. {{goods.name}}
  64. </view>
  65. <view v-if="sign === 'pick'">
  66. <text class="des-price" style="margin-left: 24rpx;margin-top: 15rpx;" :class="themeText + '-m-text ' + themeText + '-m-border ' + themeText">
  67. {{detail.rule_price}}元选{{detail.rule_num}}件
  68. </text>
  69. </view>
  70. <view class="box-grow-1 dir-top-nowrap main-right">
  71. <view class="box-grow-0 cross-bottom padding"
  72. v-if="goods.is_level == 1 && goods.is_negotiable != 1 && is_show_member">
  73. <app-member-price :theme="theme" :price="goods.level_price"></app-member-price>
  74. </view>
  75. <app-sup-vip :is_vip_card_user="goods.vip_card_appoint.is_vip_card_user" margin="4rpx 24rpx 0"
  76. v-if="goods.vip_card_appoint.discount"
  77. :discount="goods.vip_card_appoint.discount"></app-sup-vip>
  78. <view class="box-grow-0 dir-left-nowrap content padding">
  79. <view class="box-grow-0">
  80. <template v-if="goods.is_negotiable == 1">
  81. <view :class="themeText + '-m-text ' + themeText">价格面议</view>
  82. </template>
  83. <template v-else>
  84. <app-price :theme="themeText" :price="`${goods.price}`" type="text-price-all"></app-price>
  85. </template>
  86. </view>
  87. <template v-if="goods.is_negotiable != 1 && sign != 'pick'">
  88. <view class="dir-left-nowrap cross-center sales-box box-grow-1"
  89. :class="[isShowCart == 1 ? '' : 'main-right']"
  90. v-if="goods.sales">
  91. <view class="sales">{{goods.sales}}</view>
  92. </view>
  93. <view v-if="isShowCart == 1 && goods.goods_stock > 0" :class="[goods.sales ? 'box-grow-0' : 'box-grow-1 main-right']">
  94. <app-cart-image @click.stop.native="specification(goods)"></app-cart-image>
  95. </view>
  96. </template>
  97. </view>
  98. </view>
  99. </view>
  100. </template>
  101. <!-- 一行三个 -->
  102. <template v-if="listStyle == 3">
  103. <view class="box-grow-0 goods-item-3 dir-top-nowrap" @click="jump(goods)"
  104. :class="index%3 === 2 ? '' : 'mr-8'">
  105. <view class="box-grow-0">
  106. <view class="out-dialog" v-if="goods.goods_stock == 0 && appSetting.is_show_stock == '1'">
  107. <image :src="appSetting.is_use_stock == '1' ? appImg.plugins_out : appSetting.sell_out_pic"></image>
  108. </view>
  109. <app-image :img-src="goods.cover_pic" width="238rpx" height="238rpx"
  110. :border-radius="`16rpx 16rpx 0 0`"></app-image>
  111. </view>
  112. <view class="box-grow-0 goods-name t-omit-two padding" v-if="isShowGoodsName == 1">{{goods.name}}</view>
  113. <view class="box-grow-1 dir-top-nowrap main-right">
  114. <view class="box-grow-0 cross-bottom padding"
  115. v-if="goods.is_level == 1 && goods.is_negotiable != 1 && is_show_member">
  116. <app-member-price :theme="theme" :price="goods.level_price"></app-member-price>
  117. </view>
  118. <app-sup-vip :is_vip_card_user="goods.vip_card_appoint.is_vip_card_user" margin="4rpx 20rpx 0"
  119. v-if="goods.vip_card_appoint.discount"
  120. :discount="goods.vip_card_appoint.discount"
  121. ></app-sup-vip>
  122. <view :class="theme" class="padding box-grow-0">
  123. <template v-if="goods.is_negotiable == 1">
  124. <view :class="themeText + '-m-text ' + themeText">价格面议</view>
  125. </template>
  126. <template v-else>
  127. <app-price :theme="themeText" :price="`${goods.price}`" type="text-price-all"></app-price>
  128. </template>
  129. </view>
  130. <view class="sales-box cross-bottom box-grow-1">
  131. <view v-if="goods.sales && goods.is_negotiable != 1" class="box-grow-1 sales">{{goods.sales}}</view>
  132. <view v-if="goods.is_negotiable != 1 && isShowCart == 1 && goods.goods_stock > 0" class="box-grow-0 goods-cart">
  133. <app-cart-image @click.stop.native="specification(goods)"></app-cart-image>
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. </template>
  139. </block>
  140. <view class="attr">
  141. <app-attr ref="attr"
  142. :goods="item"
  143. :select-attr="selectAttr"
  144. :attr-group-list="attrGroup"
  145. :show="show"
  146. :cartShow="cartShow"
  147. :buyText="buyText"
  148. :buyClick="buyBool"
  149. :plugin="plugin"
  150. :previewUrl="previewUrl"
  151. :submitUrl="submitUrl"
  152. @buyClick="buyClick"
  153. @attrtap="onAttr"
  154. @attr="attr"
  155. :theme="themeText"
  156. >
  157. <view slot="extra" v-if="detail_sign === 'pintuan'">
  158. <app-pt-attr
  159. v-if="pt"
  160. :theme="themeText"
  161. :pintuan_groups="item.pintuan_groups"
  162. :selectGroupAttrId="selectGroupAttrId"
  163. @click="setGroupAttrID"
  164. ></app-pt-attr>
  165. </view>
  166. </app-attr>
  167. </view>
  168. <view class="pt-btn" v-if="detail_sign === 'pintuan' && show_pt">
  169. <app-iphone-x>
  170. <view class="pintuan dir-left-nowrap" slot="empty-area">
  171. <view class="single box-grow-1 dir-top-nowrap" :class="themeText + '-s-back ' + themeText + ' ' + themeText + '-m-text '" @click="individual" v-if="item.pintuanGoods.is_alone_buy">
  172. <text class="app-text">单独购买</text>
  173. </view>
  174. <view class="tuan box-grow-1 dir-top-nowrap" :class="themeText+ '-m-back ' + themeText" @click="multiplayer">
  175. <text class="app-text">拼团</text>
  176. </view>
  177. </view>
  178. </app-iphone-x>
  179. </view>
  180. </view>
  181. </template>
  182. <script>
  183. import {mapState, mapGetters} from "vuex";
  184. import appPrice from '../../page-component/goods/app-price.vue';
  185. import appAttr from '../app-attr/app-attr.vue';
  186. import appPtAttr from '../app-pt-attr/app-pt-attr.vue';
  187. import appMemberPrice from "../app-member-mark/app-member-price.vue";
  188. import appSupVip from '../app-sup-vip/app-sup-vip.vue';
  189. import appIphoneX from '../../basic-component/app-iphone-x/app-iphone-x.vue';
  190. import allPay from '../../../core/all-pay.js';
  191. export default {
  192. name: "app-goods-list",
  193. components: {
  194. 'app-price': appPrice,
  195. 'app-attr': appAttr,
  196. 'app-pt-attr': appPtAttr,
  197. 'app-member-price': appMemberPrice,
  198. 'app-sup-vip': appSupVip,
  199. 'app-iphone-x': appIphoneX,
  200. },
  201. props: {
  202. listStyle: {
  203. type: String,
  204. default() {
  205. return '2';
  206. }
  207. },
  208. list: Array,
  209. previewUrl: String,
  210. submitUrl: String,
  211. theme: Object,
  212. is_show_member: {
  213. type: Boolean,
  214. default() {
  215. return true;
  216. }
  217. },
  218. sign: String,
  219. detail: Object
  220. },
  221. data() {
  222. return {
  223. show: 0,
  224. buyText: '立即购买',
  225. detail_sign: '',
  226. goods_id: '',
  227. cartShow: 1,
  228. plugin: '',
  229. goods_list: [],
  230. buyBool: false,
  231. cur_index: 0,
  232. item: null,
  233. show_pt: false,
  234. pt: true,
  235. loading: false,
  236. selectAttr: {},
  237. appAttr: {},
  238. attrGroup: [],
  239. selectGroupAttrId: -1,
  240. }
  241. },
  242. computed: {
  243. ...mapState({
  244. appImg: state => state.mallConfig.__wxapp_img.mall,
  245. appSetting: state => state.mallConfig.mall.setting,
  246. isShowCart: state => state.mallConfig.mall.setting.is_show_cart,
  247. isShowGoodsName: state => state.mallConfig.mall.setting.is_show_goods_name,
  248. }),
  249. themeText:function() {
  250. return this.theme.back[0]
  251. },
  252. ...mapGetters('mallConfig', {
  253. getVideo: 'getVideo'
  254. }),
  255. listClass() {
  256. if (this.listStyle == 3) {
  257. return `list-style-3 dir-left-wrap`;
  258. } else if (this.listStyle == 2) {
  259. return `list-style-2 dir-left-wrap`;
  260. } else {
  261. return ``;
  262. }
  263. }
  264. },
  265. watch: {
  266. appAttr: {
  267. handler(data) {
  268. if (data.display === 'none') {
  269. this.show_pt = false;
  270. // this.selectAttr = {};
  271. }
  272. }
  273. }
  274. },
  275. methods: {
  276. setGroupAttrID(id) {
  277. this.selectGroupAttrId = id;
  278. this.selectAttr = {};
  279. this.request_pt(id);
  280. },
  281. multiplayer() {
  282. let that = this;
  283. if (that.pt) {
  284. if (that.selectAttr && Object.keys(that.selectAttr).length === 0) {
  285. uni.showToast({
  286. title: '请选择规格',
  287. icon: "none"
  288. })
  289. } else if (that.selectAttr && Object.keys(that.selectAttr).length > 0) {
  290. let mch_id = that.item.mch_id;
  291. let mch_list = [];
  292. let goods = {
  293. id: that.item.id,
  294. attr: [],
  295. num: that.appAttr.number,
  296. goods_attr_id: that.selectAttr.id,
  297. cart_id: 0,
  298. };
  299. for (let i = 0; i < that.selectAttr.attr_list.length; i++) {
  300. let attr = {
  301. attr_id: that.selectAttr.attr_list[i].attr_id,
  302. attr_group_id: that.selectAttr.attr_list[i].attr_group_id,
  303. };
  304. goods.attr.push(attr);
  305. }
  306. mch_list.push({
  307. mch_id: mch_id,
  308. pintuan_order_id: 0,
  309. pintuan_group_id: that.selectGroupAttrId,
  310. goods_list: [goods],
  311. });
  312. uni.navigateTo({
  313. url: `/pages/order-submit/order-submit?mch_list=${JSON.stringify(mch_list)}&preview_url=${encodeURIComponent(that.$api.pt.order_preview)}&submit_url=${encodeURIComponent(that.$api.pt.order_submit)}&order_page_url=/plugins/pt/order/order&plugin=pt`
  314. });
  315. }
  316. } else {
  317. that.selectAttr = {};
  318. that.pt = true;
  319. that.request_pt(that.selectGroupAttrId);
  320. const temp = setInterval(() => {
  321. if (that.loading) {
  322. clearInterval(temp);
  323. if(that.item.pintuan_groups.length == 1) {
  324. that.multiplayer();
  325. }
  326. return;
  327. }
  328. }, 500);
  329. }
  330. },
  331. buyClick(data) {
  332. allPay(data, this.detail_sign, this, this.goods_list[this.cur_index]);
  333. },
  334. attr(data) {
  335. this.appAttr = data;
  336. },
  337. specification(goods) {
  338. this.goods_id = goods.id;
  339. this.detail_sign = goods.sign;
  340. if(this.detail_sign != 'pintuan') {
  341. this.item = goods;
  342. this.attrGroup = goods.attr_groups;
  343. this.show = Math.random();
  344. }
  345. switch (this.detail_sign) {
  346. case "advance":
  347. this.cartShow = 0;
  348. this.buyText = '支付定金';
  349. this.buyBool = true;
  350. break;
  351. case "booking":
  352. this.cartShow = 0;
  353. this.buyText = '立即预约';
  354. this.plugin = 'booking';
  355. break;
  356. case "pintuan":
  357. this.$request({
  358. url: this.$api.pt.detail,
  359. data: {
  360. id: this.goods_id,
  361. group_id: 0,
  362. }
  363. }).then((res) => {
  364. this.item = res.data.detail;
  365. this.selectGroupAttrId = this.item.pintuan_groups[0].id;
  366. this.attrGroup = this.item.attr_groups;
  367. this.show = Math.random();
  368. this.show_pt = true;
  369. this.request_pt(this.selectGroupAttrId);
  370. });
  371. break;
  372. case "integral_mall":
  373. this.cartShow = 0;
  374. this.buyText = '立即兑换';
  375. break;
  376. case "step":
  377. this.cartShow = 0;
  378. this.buyText = '立即兑换';
  379. break;
  380. case "gift":
  381. this.cartShow = 0;
  382. this.buyBool = true;
  383. this.buyText = '加入礼包';
  384. break;
  385. default:
  386. break;
  387. }
  388. },
  389. async request_pt(group_id) {
  390. try {
  391. this.loading = false;
  392. uni.showLoading();
  393. const response = await this.$request({
  394. url: this.$api.pt.detail,
  395. data: {
  396. id: this.goods_id,
  397. group_id: group_id,
  398. }
  399. });
  400. if (response.code === 0) {
  401. uni.hideLoading();
  402. this.item = response.data.detail;
  403. this.attrGroup = this.item.attr_groups;
  404. this.loading = true;
  405. }
  406. } catch(e) {
  407. throw new Error(e);
  408. }
  409. },
  410. buy() {
  411. let goods = this.item;
  412. let number = this.appAttr.number;
  413. let select_attr = this.selectAttr;
  414. let goods_attr_id = select_attr.id;
  415. let attr = [];
  416. for (let i in select_attr.attr_list) {
  417. attr.push({
  418. attr_id: select_attr.attr_list[i].attr_id,
  419. attr_group_id: select_attr.attr_list[i].attr_group_id,
  420. });
  421. }
  422. let mch_list = [];
  423. let mch = {
  424. mch_id: goods.mch_id ? goods.mch_id : 0,
  425. goods_list: []
  426. };
  427. mch.goods_list.push({
  428. id: goods.id,
  429. attr: attr,
  430. num: number,
  431. cat_id: 0,
  432. goods_attr_id: goods_attr_id
  433. });
  434. mch_list.push(mch);
  435. uni.navigateTo({
  436. url: '/pages/order-submit/order-submit?mch_list=' + JSON.stringify(mch_list),
  437. })
  438. },
  439. individual() {
  440. let that = this;
  441. if (that.pt) {
  442. that.pt = false;
  443. that.selectAttr = {};
  444. that.request_pt(0);
  445. }
  446. const temp = setInterval(() => {
  447. if (that.loading) {
  448. clearInterval(temp);
  449. if (Object.keys(that.selectAttr).length === 0) {
  450. uni.showToast({
  451. title: '请选择规格',
  452. icon: "none"
  453. })
  454. } else {
  455. that.buy();
  456. }
  457. return;
  458. }
  459. }, 500);
  460. },
  461. jump(data) {
  462. // #ifndef MP-BAIDU
  463. if (data.video_url && this.getVideo == 1) {
  464. uni.navigateTo({
  465. url: `/pages/goods/video?goods_id=${data.id}&sign=${data.sign}`
  466. });
  467. } else {
  468. uni.navigateTo({
  469. url: data.page_url
  470. });
  471. }
  472. // #endif
  473. // #ifdef MP-BAIDU
  474. uni.navigateTo({
  475. url: data.page_url
  476. });
  477. // #endif
  478. },
  479. onAttr(data) {
  480. if (data !== null) {
  481. this.selectAttr = data;
  482. } else {
  483. this.selectAttr = {};
  484. }
  485. },
  486. },
  487. created() {
  488. }
  489. }
  490. </script>
  491. <style scoped lang="scss">
  492. .attr {
  493. position: fixed;
  494. bottom: 0;
  495. left: 0;
  496. z-index: 1503;
  497. }
  498. .pintuan {
  499. width: #{750upx};
  500. height: #{110upx};
  501. .single {
  502. text-align: center;
  503. line-height: #{110upx};
  504. }
  505. .tuan {
  506. color: #ffffff;
  507. text-align: center;
  508. line-height: #{110upx};
  509. }
  510. }
  511. .app-goods-list {
  512. font-size: $uni-font-size-general-one;
  513. color: $uni-important-color-black;
  514. .sales {
  515. color: $uni-general-color-two;
  516. }
  517. .goods-item-1 {
  518. padding: #{16rpx} #{24rpx};
  519. background-color: #ffffff;
  520. border-top: #{1rpx} solid #e2e2e2;
  521. .cover-pic {
  522. border-radius: #{16rpx};
  523. margin-right: #{20rpx};
  524. position: relative;
  525. .out-dialog {
  526. width: #{200rpx};
  527. height: #{200rpx};
  528. position: absolute;
  529. top: 0;
  530. left: 0;
  531. z-index: 10;
  532. background-color: rgba(0,0,0,.5);
  533. image {
  534. width: #{200rpx};
  535. height: #{200rpx};
  536. }
  537. }
  538. }
  539. .content {
  540. padding: #{8rpx} 0;
  541. .sales {
  542. font-size: #{20rpx};
  543. }
  544. }
  545. .cart {
  546. width: #{50rpx};
  547. height: #{50rpx};
  548. display: block;
  549. }
  550. .sales-box {
  551. position: relative;
  552. }
  553. .cart-box {
  554. position: absolute;
  555. width:#{56rpx};
  556. height:#{56rpx};
  557. border-radius: 50%;
  558. border: 1px solid;
  559. right: #{10rpx};
  560. bottom:#{5rpx};
  561. }
  562. }
  563. &.list-style-2 {
  564. padding: 0 #{24rpx};
  565. }
  566. .goods-item-2 {
  567. width: #{344rpx};
  568. margin-top: #{14rpx};
  569. background-color: #ffffff;
  570. border-radius: #{16rpx};
  571. overflow: hidden;
  572. position: relative;
  573. .out-dialog {
  574. border-top-left-radius: #{16rpx};
  575. border-top-right-radius: #{16rpx};
  576. width: #{344rpx};
  577. height: #{344rpx};
  578. position: absolute;
  579. top: 0;
  580. left: 0;
  581. z-index: 10;
  582. background-color: rgba(0,0,0,.5);
  583. image {
  584. width: #{344rpx};
  585. height: #{344rpx};
  586. }
  587. }
  588. &.mr-14 {
  589. margin-right: #{14rpx};
  590. }
  591. .goods-name {
  592. padding-top: #{20rpx};
  593. line-height: 1.4;
  594. margin-bottom: #{8rpx};
  595. }
  596. .content {
  597. margin-bottom: #{14rpx};
  598. }
  599. .padding {
  600. padding-left: #{24rpx};
  601. padding-right: #{24rpx};
  602. }
  603. .sales {
  604. font-size: #{20rpx};
  605. }
  606. .sales-box {
  607. margin-left: #{12rpx};
  608. }
  609. }
  610. &.list-style-3 {
  611. padding: 0 #{10rpx};
  612. }
  613. .goods-item-3 {
  614. width: #{238rpx};
  615. margin-top: #{8rpx};
  616. background-color: #ffffff;
  617. border-radius: #{16rpx};
  618. overflow: hidden;
  619. position: relative;
  620. .out-dialog {
  621. border-top-left-radius: #{16rpx};
  622. border-top-right-radius: #{16rpx};
  623. width: #{238rpx};
  624. height: #{238rpx};
  625. position: absolute;
  626. top: 0;
  627. left: 0;
  628. z-index: 10;
  629. background-color: rgba(0,0,0,.5);
  630. image {
  631. width: #{238rpx};
  632. height: #{238rpx};
  633. }
  634. }
  635. &.mr-8 {
  636. margin-right: #{8rpx};
  637. }
  638. .goods-name {
  639. line-height: 1.4;
  640. }
  641. .padding {
  642. padding-left: #{20rpx};
  643. padding-right: #{20rpx};
  644. }
  645. .sales {
  646. font-size: #{20rpx};
  647. padding-top: #{6rpx};
  648. }
  649. & > view:last-child {
  650. padding-bottom: #{20rpx};
  651. }
  652. .sales-box {
  653. padding: 0 #{20rpx};
  654. }
  655. }
  656. .goods-cart {
  657. width: #{36rpx};
  658. height: #{36rpx};
  659. }
  660. .goods-price {
  661. font-size: #{32rpx};
  662. }
  663. .sales-box {
  664. /*position: relative;*/
  665. }
  666. }
  667. .dir-tag-def {
  668. padding: 0 #{10rpx};
  669. margin-right: #{8rpx};
  670. font-size: $uni-font-size-weak-two;
  671. border-radius: #{28rpx};
  672. }
  673. .des-price {
  674. display: inline-block;
  675. padding: #{4rpx 4rpx};
  676. border: #{1rpx} solid;
  677. border-radius: #{8rpx};
  678. font-size: #{20rpx};
  679. line-height: 1;
  680. transform: rotateZ(360deg);
  681. }
  682. .pt-btn {
  683. position: relative;
  684. z-index: 1600;
  685. }
  686. </style>