app-goods-list.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751
  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. if (this.$user.isLogin() && this.$store.state.user.info) {
  283. let member_level =this.$store.state.user.info.identity.member_level;
  284. if(member_level<this.detail.member_level){
  285. uni.showModal({
  286. title:"提示",
  287. content:"需达到"+this.detail.member_name+"会员才可购买",
  288. showCancel:true,
  289. confirmText: '升级',
  290. success:(res)=>{
  291. if (res.confirm) {
  292. uni.navigateTo({
  293. url:"/pages/member/index/index"
  294. })
  295. } else if (res.cancel) {
  296. console.log('用户点击取消');
  297. }
  298. }
  299. })
  300. return;
  301. }
  302. }
  303. let that = this;
  304. if (that.pt) {
  305. if (that.selectAttr && Object.keys(that.selectAttr).length === 0) {
  306. uni.showToast({
  307. title: '请选择规格',
  308. icon: "none"
  309. })
  310. } else if (that.selectAttr && Object.keys(that.selectAttr).length > 0) {
  311. let mch_id = that.item.mch_id;
  312. let mch_list = [];
  313. let goods = {
  314. id: that.item.id,
  315. attr: [],
  316. num: that.appAttr.number,
  317. goods_attr_id: that.selectAttr.id,
  318. cart_id: 0,
  319. };
  320. for (let i = 0; i < that.selectAttr.attr_list.length; i++) {
  321. let attr = {
  322. attr_id: that.selectAttr.attr_list[i].attr_id,
  323. attr_group_id: that.selectAttr.attr_list[i].attr_group_id,
  324. };
  325. goods.attr.push(attr);
  326. }
  327. mch_list.push({
  328. mch_id: mch_id,
  329. pintuan_order_id: 0,
  330. pintuan_group_id: that.selectGroupAttrId,
  331. goods_list: [goods],
  332. });
  333. uni.navigateTo({
  334. 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`
  335. });
  336. }
  337. } else {
  338. that.selectAttr = {};
  339. that.pt = true;
  340. that.request_pt(that.selectGroupAttrId);
  341. const temp = setInterval(() => {
  342. if (that.loading) {
  343. clearInterval(temp);
  344. if(that.item.pintuan_groups.length == 1) {
  345. that.multiplayer();
  346. }
  347. return;
  348. }
  349. }, 500);
  350. }
  351. },
  352. buyClick(data) {
  353. allPay(data, this.detail_sign, this, this.goods_list[this.cur_index]);
  354. },
  355. attr(data) {
  356. this.appAttr = data;
  357. },
  358. specification(goods) {
  359. this.goods_id = goods.id;
  360. this.detail_sign = goods.sign;
  361. if(this.detail_sign != 'pintuan') {
  362. this.item = goods;
  363. this.attrGroup = goods.attr_groups;
  364. this.show = Math.random();
  365. }
  366. switch (this.detail_sign) {
  367. case "advance":
  368. this.cartShow = 0;
  369. this.buyText = '支付定金';
  370. this.buyBool = true;
  371. break;
  372. case "booking":
  373. this.cartShow = 0;
  374. this.buyText = '立即预约';
  375. this.plugin = 'booking';
  376. break;
  377. case "pintuan":
  378. this.$request({
  379. url: this.$api.pt.detail,
  380. data: {
  381. id: this.goods_id,
  382. group_id: 0,
  383. }
  384. }).then((res) => {
  385. this.item = res.data.detail;
  386. this.selectGroupAttrId = this.item.pintuan_groups[0].id;
  387. this.attrGroup = this.item.attr_groups;
  388. this.show = Math.random();
  389. this.show_pt = true;
  390. this.request_pt(this.selectGroupAttrId);
  391. });
  392. break;
  393. case "integral_mall":
  394. this.cartShow = 0;
  395. this.buyText = '立即兑换';
  396. break;
  397. case "step":
  398. this.cartShow = 0;
  399. this.buyText = '立即兑换';
  400. break;
  401. case "gift":
  402. this.cartShow = 0;
  403. this.buyBool = true;
  404. this.buyText = '加入礼包';
  405. break;
  406. default:
  407. break;
  408. }
  409. },
  410. async request_pt(group_id) {
  411. try {
  412. this.loading = false;
  413. uni.showLoading();
  414. const response = await this.$request({
  415. url: this.$api.pt.detail,
  416. data: {
  417. id: this.goods_id,
  418. group_id: group_id,
  419. }
  420. });
  421. if (response.code === 0) {
  422. uni.hideLoading();
  423. this.item = response.data.detail;
  424. this.attrGroup = this.item.attr_groups;
  425. this.loading = true;
  426. }
  427. } catch(e) {
  428. throw new Error(e);
  429. }
  430. },
  431. buy() {
  432. let goods = this.item;
  433. let number = this.appAttr.number;
  434. let select_attr = this.selectAttr;
  435. let goods_attr_id = select_attr.id;
  436. let attr = [];
  437. for (let i in select_attr.attr_list) {
  438. attr.push({
  439. attr_id: select_attr.attr_list[i].attr_id,
  440. attr_group_id: select_attr.attr_list[i].attr_group_id,
  441. });
  442. }
  443. let mch_list = [];
  444. let mch = {
  445. mch_id: goods.mch_id ? goods.mch_id : 0,
  446. goods_list: []
  447. };
  448. mch.goods_list.push({
  449. id: goods.id,
  450. attr: attr,
  451. num: number,
  452. cat_id: 0,
  453. goods_attr_id: goods_attr_id
  454. });
  455. mch_list.push(mch);
  456. uni.navigateTo({
  457. url: '/pages/order-submit/order-submit?mch_list=' + JSON.stringify(mch_list),
  458. })
  459. },
  460. individual() {
  461. if (this.$user.isLogin() && this.$store.state.user.info) {
  462. let member_level =this.$store.state.user.info.identity.member_level;
  463. if(member_level<this.detail.member_level){
  464. uni.showToast({
  465. title: '您的会员等级未达到'+this.detail.member_name+',继续加油哟。。。',
  466. icon: 'none'
  467. });
  468. return;
  469. }
  470. }
  471. let that = this;
  472. if (that.pt) {
  473. that.pt = false;
  474. that.selectAttr = {};
  475. that.request_pt(0);
  476. }
  477. const temp = setInterval(() => {
  478. if (that.loading) {
  479. clearInterval(temp);
  480. if (Object.keys(that.selectAttr).length === 0) {
  481. uni.showToast({
  482. title: '请选择规格',
  483. icon: "none"
  484. })
  485. } else {
  486. that.buy();
  487. }
  488. return;
  489. }
  490. }, 500);
  491. },
  492. jump(data) {
  493. // #ifndef MP-BAIDU
  494. if (data.video_url && this.getVideo == 1) {
  495. uni.navigateTo({
  496. url: `/pages/goods/video?goods_id=${data.id}&sign=${data.sign}`
  497. });
  498. } else {
  499. uni.navigateTo({
  500. url: data.page_url
  501. });
  502. }
  503. // #endif
  504. // #ifdef MP-BAIDU
  505. uni.navigateTo({
  506. url: data.page_url
  507. });
  508. // #endif
  509. },
  510. onAttr(data) {
  511. if (data !== null) {
  512. this.selectAttr = data;
  513. } else {
  514. this.selectAttr = {};
  515. }
  516. },
  517. },
  518. created() {
  519. }
  520. }
  521. </script>
  522. <style scoped lang="scss">
  523. .attr {
  524. position: fixed;
  525. bottom: 0;
  526. left: 0;
  527. z-index: 1503;
  528. }
  529. .pintuan {
  530. width: #{750upx};
  531. height: #{110upx};
  532. .single {
  533. text-align: center;
  534. line-height: #{110upx};
  535. }
  536. .tuan {
  537. color: #ffffff;
  538. text-align: center;
  539. line-height: #{110upx};
  540. }
  541. }
  542. .app-goods-list {
  543. font-size: $uni-font-size-general-one;
  544. color: $uni-important-color-black;
  545. .sales {
  546. color: $uni-general-color-two;
  547. }
  548. .goods-item-1 {
  549. padding: #{16rpx} #{24rpx};
  550. background-color: #ffffff;
  551. border-top: #{1rpx} solid #e2e2e2;
  552. .cover-pic {
  553. border-radius: #{16rpx};
  554. margin-right: #{20rpx};
  555. position: relative;
  556. .out-dialog {
  557. width: #{200rpx};
  558. height: #{200rpx};
  559. position: absolute;
  560. top: 0;
  561. left: 0;
  562. z-index: 10;
  563. background-color: rgba(0,0,0,.5);
  564. image {
  565. width: #{200rpx};
  566. height: #{200rpx};
  567. }
  568. }
  569. }
  570. .content {
  571. padding: #{8rpx} 0;
  572. .sales {
  573. font-size: #{20rpx};
  574. }
  575. }
  576. .cart {
  577. width: #{50rpx};
  578. height: #{50rpx};
  579. display: block;
  580. }
  581. .sales-box {
  582. position: relative;
  583. }
  584. .cart-box {
  585. position: absolute;
  586. width:#{56rpx};
  587. height:#{56rpx};
  588. border-radius: 50%;
  589. border: 1px solid;
  590. right: #{10rpx};
  591. bottom:#{5rpx};
  592. }
  593. }
  594. &.list-style-2 {
  595. padding: 0 #{24rpx};
  596. }
  597. .goods-item-2 {
  598. width: #{344rpx};
  599. margin-top: #{14rpx};
  600. background-color: #ffffff;
  601. border-radius: #{16rpx};
  602. overflow: hidden;
  603. position: relative;
  604. .out-dialog {
  605. border-top-left-radius: #{16rpx};
  606. border-top-right-radius: #{16rpx};
  607. width: #{344rpx};
  608. height: #{344rpx};
  609. position: absolute;
  610. top: 0;
  611. left: 0;
  612. z-index: 10;
  613. background-color: rgba(0,0,0,.5);
  614. image {
  615. width: #{344rpx};
  616. height: #{344rpx};
  617. }
  618. }
  619. &.mr-14 {
  620. margin-right: #{14rpx};
  621. }
  622. .goods-name {
  623. padding-top: #{20rpx};
  624. line-height: 1.4;
  625. margin-bottom: #{8rpx};
  626. }
  627. .content {
  628. margin-bottom: #{14rpx};
  629. }
  630. .padding {
  631. padding-left: #{24rpx};
  632. padding-right: #{24rpx};
  633. }
  634. .sales {
  635. font-size: #{20rpx};
  636. }
  637. .sales-box {
  638. margin-left: #{12rpx};
  639. }
  640. }
  641. &.list-style-3 {
  642. padding: 0 #{10rpx};
  643. }
  644. .goods-item-3 {
  645. width: #{238rpx};
  646. margin-top: #{8rpx};
  647. background-color: #ffffff;
  648. border-radius: #{16rpx};
  649. overflow: hidden;
  650. position: relative;
  651. .out-dialog {
  652. border-top-left-radius: #{16rpx};
  653. border-top-right-radius: #{16rpx};
  654. width: #{238rpx};
  655. height: #{238rpx};
  656. position: absolute;
  657. top: 0;
  658. left: 0;
  659. z-index: 10;
  660. background-color: rgba(0,0,0,.5);
  661. image {
  662. width: #{238rpx};
  663. height: #{238rpx};
  664. }
  665. }
  666. &.mr-8 {
  667. margin-right: #{8rpx};
  668. }
  669. .goods-name {
  670. line-height: 1.4;
  671. }
  672. .padding {
  673. padding-left: #{20rpx};
  674. padding-right: #{20rpx};
  675. }
  676. .sales {
  677. font-size: #{20rpx};
  678. padding-top: #{6rpx};
  679. }
  680. & > view:last-child {
  681. padding-bottom: #{20rpx};
  682. }
  683. .sales-box {
  684. padding: 0 #{20rpx};
  685. }
  686. }
  687. .goods-cart {
  688. width: #{36rpx};
  689. height: #{36rpx};
  690. }
  691. .goods-price {
  692. font-size: #{32rpx};
  693. }
  694. .sales-box {
  695. /*position: relative;*/
  696. }
  697. }
  698. .dir-tag-def {
  699. padding: 0 #{10rpx};
  700. margin-right: #{8rpx};
  701. font-size: $uni-font-size-weak-two;
  702. border-radius: #{28rpx};
  703. }
  704. .des-price {
  705. display: inline-block;
  706. padding: #{4rpx 4rpx};
  707. border: #{1rpx} solid;
  708. border-radius: #{8rpx};
  709. font-size: #{20rpx};
  710. line-height: 1;
  711. transform: rotateZ(360deg);
  712. }
  713. .pt-btn {
  714. position: relative;
  715. z-index: 1600;
  716. }
  717. </style>