app-goods-list.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713
  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 :style="{'color': getTheme.color}">价格面议</view>
  32. </template>
  33. <template v-else>
  34. <app-price :theme="getTheme" :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. :style="{'color': getTheme.color}"
  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" :style="{'color': getTheme.color,'background-color': getTheme.background_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;" :style="{'color': getTheme.color,'border-color': getTheme.border}">
  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 :style="{'color': getTheme.color}">价格面议</view>
  82. </template>
  83. <template v-else>
  84. <app-price :theme="getTheme" :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="padding box-grow-0">
  123. <template v-if="goods.is_negotiable == 1">
  124. <view :style="{'color': getTheme.color}">价格面议</view>
  125. </template>
  126. <template v-else>
  127. <app-price :theme="getTheme" :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="getTheme"
  156. >
  157. <view slot="extra" v-if="detail_sign === 'pintuan'">
  158. <app-pt-attr
  159. v-if="pt"
  160. :theme="getTheme"
  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" :style="{'color': getTheme.color,'background-color':getTheme.background_s}" @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" :style="{'background-color':getTheme.background}" @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 appIphoneX from '../../basic-component/app-iphone-x/app-iphone-x.vue';
  188. import allPay from '../../../core/all-pay.js';
  189. export default {
  190. name: "app-goods-list",
  191. components: {
  192. 'app-price': appPrice,
  193. 'app-attr': appAttr,
  194. 'app-pt-attr': appPtAttr,
  195. 'app-iphone-x': appIphoneX,
  196. },
  197. props: {
  198. listStyle: {
  199. type: String,
  200. default() {
  201. return '2';
  202. }
  203. },
  204. list: Array,
  205. previewUrl: String,
  206. submitUrl: String,
  207. theme: Object,
  208. is_show_member: {
  209. type: Boolean,
  210. default() {
  211. return true;
  212. }
  213. },
  214. sign: String,
  215. detail: Object
  216. },
  217. data() {
  218. return {
  219. show: 0,
  220. buyText: '立即购买',
  221. detail_sign: '',
  222. goods_id: '',
  223. cartShow: 1,
  224. plugin: '',
  225. goods_list: [],
  226. buyBool: false,
  227. cur_index: 0,
  228. item: null,
  229. show_pt: false,
  230. pt: true,
  231. loading: false,
  232. selectAttr: {},
  233. appAttr: {},
  234. attrGroup: [],
  235. selectGroupAttrId: -1,
  236. }
  237. },
  238. computed: {
  239. ...mapState({
  240. appImg: state => state.mallConfig.__wxapp_img.mall,
  241. appSetting: state => state.mallConfig.mall.setting,
  242. isShowCart: state => state.mallConfig.mall.setting.is_show_cart,
  243. isShowGoodsName: state => state.mallConfig.mall.setting.is_show_goods_name,
  244. platform: function(state) {
  245. return state.gConfig.systemInfo.platform;
  246. }
  247. }),
  248. themeText:function() {
  249. return this.theme.back[0]
  250. },
  251. ...mapGetters('mallConfig', {
  252. getVideo: 'getVideo',
  253. getTheme: 'getTheme'
  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. }
  271. }
  272. }
  273. },
  274. methods: {
  275. setGroupAttrID(id) {
  276. this.selectGroupAttrId = id;
  277. this.selectAttr = {};
  278. this.request_pt(id);
  279. },
  280. multiplayer() {
  281. let that = this;
  282. if (that.pt) {
  283. if (that.selectAttr && Object.keys(that.selectAttr).length === 0) {
  284. uni.showToast({
  285. title: '请选择规格',
  286. icon: "none"
  287. })
  288. } else if (that.selectAttr && Object.keys(that.selectAttr).length > 0) {
  289. let mch_id = that.item.mch_id;
  290. let mch_list = [];
  291. let goods = {
  292. id: that.item.id,
  293. attr: [],
  294. num: that.appAttr.number,
  295. goods_attr_id: that.selectAttr.id,
  296. cart_id: 0,
  297. };
  298. for (let i = 0; i < that.selectAttr.attr_list.length; i++) {
  299. let attr = {
  300. attr_id: that.selectAttr.attr_list[i].attr_id,
  301. attr_group_id: that.selectAttr.attr_list[i].attr_group_id,
  302. };
  303. goods.attr.push(attr);
  304. }
  305. mch_list.push({
  306. mch_id: mch_id,
  307. pintuan_order_id: 0,
  308. pintuan_group_id: that.selectGroupAttrId,
  309. goods_list: [goods],
  310. });
  311. uni.navigateTo({
  312. 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`
  313. });
  314. }
  315. } else {
  316. that.selectAttr = {};
  317. that.pt = true;
  318. that.request_pt(that.selectGroupAttrId);
  319. const temp = setInterval(() => {
  320. if (that.loading) {
  321. clearInterval(temp);
  322. if(that.item.pintuan_groups.length == 1) {
  323. that.multiplayer();
  324. }
  325. return;
  326. }
  327. }, 500);
  328. }
  329. },
  330. buyClick(data) {
  331. allPay(data, this.detail_sign, this, this.goods_list[this.cur_index]);
  332. },
  333. attr(data) {
  334. this.appAttr = data;
  335. },
  336. specification(goods) {
  337. this.goods_id = goods.id;
  338. this.detail_sign = goods.sign;
  339. if(this.detail_sign != 'pintuan') {
  340. this.item = goods;
  341. this.attrGroup = goods.attr_groups;
  342. this.show = Math.random();
  343. }
  344. switch (this.detail_sign) {
  345. case "advance":
  346. this.cartShow = 0;
  347. this.buyText = '支付定金';
  348. this.buyBool = true;
  349. break;
  350. case "booking":
  351. this.cartShow = 0;
  352. this.buyText = '立即预约';
  353. this.plugin = 'booking';
  354. break;
  355. case "pintuan":
  356. this.$request({
  357. url: this.$api.pt.detail,
  358. data: {
  359. id: this.goods_id,
  360. group_id: 0,
  361. }
  362. }).then((res) => {
  363. this.item = res.data.detail;
  364. this.selectGroupAttrId = this.item.pintuan_groups[0].id;
  365. this.attrGroup = this.item.attr_groups;
  366. this.show = Math.random();
  367. this.show_pt = true;
  368. this.request_pt(this.selectGroupAttrId);
  369. });
  370. break;
  371. case "integral_mall":
  372. this.cartShow = 0;
  373. this.buyText = '立即兑换';
  374. break;
  375. case "step":
  376. this.cartShow = 0;
  377. this.buyText = '立即兑换';
  378. break;
  379. case "gift":
  380. this.cartShow = 0;
  381. this.buyBool = true;
  382. this.buyText = '加入礼包';
  383. break;
  384. default:
  385. break;
  386. }
  387. },
  388. async request_pt(group_id) {
  389. try {
  390. this.loading = false;
  391. uni.showLoading();
  392. const response = await this.$request({
  393. url: this.$api.pt.detail,
  394. data: {
  395. id: this.goods_id,
  396. group_id: group_id,
  397. }
  398. });
  399. if (response.code === 0) {
  400. uni.hideLoading();
  401. this.item = response.data.detail;
  402. this.attrGroup = this.item.attr_groups;
  403. this.loading = true;
  404. }
  405. } catch(e) {
  406. throw new Error(e);
  407. }
  408. },
  409. buy() {
  410. let goods = this.item;
  411. let number = this.appAttr.number;
  412. let select_attr = this.selectAttr;
  413. let goods_attr_id = select_attr.id;
  414. let attr = [];
  415. for (let i in select_attr.attr_list) {
  416. attr.push({
  417. attr_id: select_attr.attr_list[i].attr_id,
  418. attr_group_id: select_attr.attr_list[i].attr_group_id,
  419. });
  420. }
  421. let mch_list = [{
  422. mch_id: goods.mch_id ? goods.mch_id : 0,
  423. goods_list: [{
  424. id: goods.id,
  425. attr: attr,
  426. num: number,
  427. cat_id: 0,
  428. goods_attr_id: goods_attr_id
  429. }]
  430. }];
  431. uni.navigateTo({
  432. url: '/pages/order-submit/order-submit?mch_list=' + JSON.stringify(mch_list),
  433. });
  434. },
  435. individual() {
  436. let that = this;
  437. if (that.pt) {
  438. that.pt = false;
  439. that.selectAttr = {};
  440. that.request_pt(0);
  441. }
  442. const temp = setInterval(() => {
  443. if (that.loading) {
  444. clearInterval(temp);
  445. if (Object.keys(that.selectAttr).length === 0) {
  446. uni.showToast({
  447. title: '请选择规格',
  448. icon: "none"
  449. })
  450. } else {
  451. that.buy();
  452. }
  453. return;
  454. }
  455. }, 500);
  456. },
  457. jump(data) {
  458. // #ifndef MP-BAIDU
  459. if (data.video_url && this.getVideo == 1) {
  460. // #ifdef MP
  461. uni.navigateTo({
  462. url: `/pages/goods/video?goods_id=${data.id}&sign=${data.sign}`
  463. });
  464. // #endif
  465. // #ifdef H5
  466. uni.navigateTo({
  467. url: data.page_url
  468. });
  469. // #endif
  470. } else {
  471. uni.navigateTo({
  472. url: data.page_url
  473. });
  474. }
  475. // #endif
  476. // #ifdef MP-BAIDU
  477. uni.navigateTo({
  478. url: data.page_url
  479. });
  480. // #endif
  481. },
  482. onAttr(data) {
  483. if (data !== null) {
  484. this.selectAttr = data;
  485. } else {
  486. this.selectAttr = {};
  487. }
  488. },
  489. }
  490. }
  491. </script>
  492. <style scoped lang="scss">
  493. .attr {
  494. position: fixed;
  495. bottom: 0;
  496. left: 0;
  497. z-index: 1503;
  498. }
  499. .pintuan {
  500. width: #{750upx};
  501. height: #{110upx};
  502. .single {
  503. text-align: center;
  504. line-height: #{110upx};
  505. }
  506. .tuan {
  507. color: #ffffff;
  508. text-align: center;
  509. line-height: #{110upx};
  510. }
  511. }
  512. .app-goods-list {
  513. font-size: $uni-font-size-general-one;
  514. color: $uni-important-color-black;
  515. .sales {
  516. color: $uni-general-color-two;
  517. }
  518. .goods-item-1 {
  519. padding: #{16rpx} #{24rpx};
  520. background-color: #ffffff;
  521. border-top: #{1rpx} solid #e2e2e2;
  522. .cover-pic {
  523. border-radius: #{16rpx};
  524. margin-right: #{20rpx};
  525. position: relative;
  526. .out-dialog {
  527. width: #{200rpx};
  528. height: #{200rpx};
  529. position: absolute;
  530. top: 0;
  531. left: 0;
  532. z-index: 10;
  533. background-color: rgba(0,0,0,.5);
  534. image {
  535. width: #{200rpx};
  536. height: #{200rpx};
  537. }
  538. }
  539. }
  540. .content {
  541. padding: #{8rpx} 0;
  542. .sales {
  543. font-size: #{20rpx};
  544. }
  545. }
  546. .cart {
  547. width: #{50rpx};
  548. height: #{50rpx};
  549. display: block;
  550. }
  551. .sales-box {
  552. position: relative;
  553. }
  554. .cart-box {
  555. position: absolute;
  556. width:#{56rpx};
  557. height:#{56rpx};
  558. border-radius: 50%;
  559. border: 1px solid;
  560. right: #{10rpx};
  561. bottom:#{5rpx};
  562. }
  563. }
  564. &.list-style-2 {
  565. padding: 0 #{24rpx};
  566. }
  567. .goods-item-2 {
  568. width: #{344rpx};
  569. margin-top: #{14rpx};
  570. background-color: #ffffff;
  571. border-radius: #{16rpx};
  572. overflow: hidden;
  573. position: relative;
  574. .out-dialog {
  575. border-top-left-radius: #{16rpx};
  576. border-top-right-radius: #{16rpx};
  577. width: #{344rpx};
  578. height: #{344rpx};
  579. position: absolute;
  580. top: 0;
  581. left: 0;
  582. z-index: 10;
  583. background-color: rgba(0,0,0,.5);
  584. image {
  585. width: #{344rpx};
  586. height: #{344rpx};
  587. }
  588. }
  589. &.mr-14 {
  590. margin-right: #{14rpx};
  591. }
  592. .goods-name {
  593. padding-top: #{20rpx};
  594. line-height: 1.4;
  595. margin-bottom: #{8rpx};
  596. }
  597. .content {
  598. margin-bottom: #{14rpx};
  599. }
  600. .padding {
  601. padding-left: #{24rpx};
  602. padding-right: #{24rpx};
  603. }
  604. .sales {
  605. font-size: #{20rpx};
  606. }
  607. .sales-box {
  608. margin-left: #{12rpx};
  609. }
  610. }
  611. &.list-style-3 {
  612. padding: 0 #{10rpx};
  613. }
  614. .goods-item-3 {
  615. width: #{238rpx};
  616. margin-top: #{8rpx};
  617. background-color: #ffffff;
  618. border-radius: #{16rpx};
  619. overflow: hidden;
  620. position: relative;
  621. .out-dialog {
  622. border-top-left-radius: #{16rpx};
  623. border-top-right-radius: #{16rpx};
  624. width: #{238rpx};
  625. height: #{238rpx};
  626. position: absolute;
  627. top: 0;
  628. left: 0;
  629. z-index: 10;
  630. background-color: rgba(0,0,0,.5);
  631. image {
  632. width: #{238rpx};
  633. height: #{238rpx};
  634. }
  635. }
  636. &.mr-8 {
  637. margin-right: #{8rpx};
  638. }
  639. .goods-name {
  640. line-height: 1.4;
  641. }
  642. .padding {
  643. padding-left: #{20rpx};
  644. padding-right: #{20rpx};
  645. }
  646. .sales {
  647. font-size: #{20rpx};
  648. padding-top: #{6rpx};
  649. }
  650. & > view:last-child {
  651. padding-bottom: #{20rpx};
  652. }
  653. .sales-box {
  654. padding: 0 #{20rpx};
  655. }
  656. }
  657. .goods-cart {
  658. width: #{36rpx};
  659. height: #{36rpx};
  660. }
  661. .goods-price {
  662. font-size: #{32rpx};
  663. }
  664. }
  665. .dir-tag-def {
  666. padding: 0 #{10rpx};
  667. margin-right: #{8rpx};
  668. font-size: $uni-font-size-weak-two;
  669. border-radius: #{28rpx};
  670. }
  671. .des-price {
  672. display: inline-block;
  673. padding: #{4rpx 4rpx};
  674. border: #{1rpx} solid;
  675. border-radius: #{8rpx};
  676. font-size: #{20rpx};
  677. line-height: 1;
  678. transform: rotateZ(360deg);
  679. }
  680. .pt-btn {
  681. position: relative;
  682. z-index: 1600;
  683. }
  684. </style>