app-goods-list.vue 29 KB

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