detail.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596
  1. <template>
  2. <mobile-frame>
  3. <view class="main">
  4. <view class="one">
  5. <scroll-view scroll-y="true" class="scroll-view">
  6. <view class="list-scroll-view">
  7. <view class="one_1">
  8. <swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff" indicator-active-color="#FB1438" :interval="3000" :duration="1000">
  9. <swiper-item class="list" v-for="(item,index) in info.goods.file" :key="index">
  10. <image class="image" :src="item.url" mode="aspectFit">
  11. </image>
  12. </swiper-item>
  13. </swiper>
  14. <!-- 是否关注商品 -->
  15. <view class="goodsColect">
  16. <text @tap="toGoodscolect" :class="['iconfont',goodsColect?'icon-yduishoucangshixin-copy':'icon-yduishoucangkongxin']"></text>
  17. </view>
  18. <view class="acttags" v-if="info.goods.act_tags&&info.goods.act_tags.length>0">
  19. <text v-for="i in info.goods.act_tags" :key="i">{{i.label}}</text>
  20. </view>
  21. </view>
  22. <view class="one_2">
  23. <text class="money_1" v-if="infospecs.leader_price"><text>团长价¥</text>{{infospecs.leader_price||0}}</text>
  24. <text class="money" v-if="infospecs.price"><text>特价¥</text>{{infospecs.price||0}}</text>
  25. <text class="money" v-if="!infospecs.price&&!infospecs.leader_price"><text>¥</text>{{infospecs.sell_money||0}}</text>
  26. <text class="money"><text>¥</text>{{infospecs.flow_money||0}}</text>
  27. </view>
  28. <view class="one_3" v-if="discount">
  29. <text v-if="discount.full_decrement" class="act" v-for="(item,index) in discount.full_decrement" :key="index">{{item}}</text>
  30. <text v-if="discount.full_fold" class="act" v-for="(item,index) in discount.full_fold" :key="index">{{item}}</text>
  31. </view>
  32. <view class="one_3">
  33. <text class="num">已售{{info.goods.sell_num||0}}件</text>
  34. </view>
  35. <view class="one_4">
  36. <view class="name">
  37. {{info.goods.name}}
  38. </view>
  39. <view class="brief">
  40. {{info.goods.shot_brief||''}}
  41. </view>
  42. <view class="money">
  43. <!-- <text>运费{{infospecs.freight||'包邮'}}元</text> -->
  44. <text>{{info.goods.send_time}}内发货</text>
  45. </view>
  46. </view>
  47. <view class="one_5" @tap="toActivity">
  48. <view class="l">
  49. <text>{{info.act.length>0?`活动`:`暂无活动`}}</text>
  50. </view>
  51. <view class="r">
  52. <text class="iconfont icon-jiantouyou"></text>
  53. </view>
  54. </view>
  55. <view class="one_5" @tap="toSpec">
  56. <view class="l">
  57. 选择规格
  58. </view>
  59. <view class="r">
  60. <text class="iconfont icon-jiantouyou"></text>
  61. </view>
  62. </view>
  63. <view class="one_6" @tap="toEvaluate">
  64. <view class="l">
  65. <text>{{evaluate_num>0?`商品评价(${evaluate_num})`:`暂无评价`}}</text>
  66. </view>
  67. <view class="r">
  68. <text class="iconfont icon-jiantouyou"></text>
  69. </view>
  70. </view>
  71. <view class="one_7" v-if="info.sets.length>0" @tap="toSets">
  72. <view class="one_7_1">
  73. 优惠套装<text>({{info.sets.length||0}})</text>
  74. </view>
  75. <view class="one_7_2">
  76. <view class="image" v-for="(set,index) in info.sets[0].set" :key="index">
  77. <image class="image" :src="set.file&&set.file.length>0?set.file[0].url:''" mode="aspectFit">
  78. </image>
  79. </view>
  80. <view class="money">
  81. <view class="money_1">共{{info.sets[0].goods_total}}件</view>
  82. <view class="money_2">¥{{info.sets[0].sell_money}}</view>
  83. </view>
  84. </view>
  85. </view>
  86. <view class="one_8">
  87. <view class="one_8_1">
  88. <view class="shop_1">
  89. <image class="image" :src="info.shop.logo&&info.shop.logo.length>0?info.shop.logo[0].url:''" mode="aspectFit"></image>
  90. </view>
  91. <view class="shop_2">
  92. <view class="name">{{info.shop.name}}</view>
  93. <view class="num"><text>宝贝数:</text>{{info.shop.goods_num||0}}</view>
  94. </view>
  95. </view>
  96. <view class="one_8_2">
  97. <view class="score_1">
  98. <text>商品:</text>
  99. <text>{{info.shop.goods_score||5}}</text>
  100. <text>|</text>
  101. </view>
  102. <view class="score_1">
  103. <text>发货:</text>
  104. <text>{{info.shop.send_score||5}}</text>
  105. <text>|</text>
  106. </view>
  107. <view class="score_1">
  108. <text>服务:</text>
  109. <text>{{info.shop.service_score||5}}</text>
  110. </view>
  111. </view>
  112. <view class="one_8_3">
  113. <view class="btn">
  114. <button size="mini" @tap="toShop">进入店铺</button>
  115. </view>
  116. <view class="btn">
  117. <button size="mini" @tap="toShopcolect">{{shopColect==true?'已关注':'关注'}}</button>
  118. </view>
  119. </view>
  120. </view>
  121. <view class="one_9">
  122. <rich-text :nodes="info.goods.brief"></rich-text>
  123. </view>
  124. </view>
  125. </scroll-view>
  126. </view>
  127. <view class="two">
  128. <uni-goods-nav :options="options" :button-group="buttonGroup" @click="toNavleft" @buttonClick="toNavright" />
  129. </view>
  130. </view>
  131. <!-- 跳转菜单 -->
  132. <view class="bar_1">
  133. <text @tap="toMenubar" class="iconfont icon-gengduo"></text>
  134. </view>
  135. <view class="bar_2" v-if="is_menu">
  136. <view class="list" v-for="(item,index) in barList" :key="index" v-if="item.is_use=='0'" @click="toPath(item)">
  137. <image class="image" :src="item.normal&&item.normal.length>0?item.normal[0].url:''"></image>
  138. <text class="name"> {{item.name}}</text>
  139. </view>
  140. </view>
  141. <!-- 规格 -->
  142. <uni-popup ref="specShow" background-color="#fff" type="bottom" :is-mask-click="false">
  143. <view class="popup">
  144. <view class="close">
  145. <text @click="toClose" class="iconfont icon-shanchu"></text>
  146. </view>
  147. <view class="info_1" v-if="popupShow=='1'">
  148. <view class="info_1">
  149. <scroll-view scroll-y="true" class="scroll-view">
  150. <view class="list-scroll-view">
  151. <view class="one">
  152. <view class="one_1">
  153. <view class="l">
  154. <image class="image" :src="specsInfo.file.length>0?specsInfo.file[0].url:info.goods.file[0].url" mode="aspectFill" @tap="diaView"></image>
  155. </view>
  156. <view class="r">
  157. <view class="money">
  158. <text v-if="specsInfo.leader_price" class="money_2"><text>团长价¥</text>{{specsInfo.leader_price}}</text>
  159. <text v-if="specsInfo.price" class="money_1"><text>特价¥</text>{{specsInfo.price}}</text>
  160. <text v-if="!specsInfo.price&&!specsInfo.leader_price" class="money_1"><text>¥</text>{{specsInfo.sell_money}}</text>
  161. <text class="money_1"><text>¥</text>{{specsInfo.flow_money}}</text>
  162. </view>
  163. <view class="other_1">
  164. <text>已选:</text>
  165. <text>{{specsInfo.name}}</text>
  166. </view>
  167. <view class="other_1">
  168. <text>运费:</text>
  169. <text>{{specsInfo.freight===0?'包邮':specsInfo.freight+'元'}}</text>
  170. </view>
  171. </view>
  172. </view>
  173. <view class="one_2">
  174. <view class="one_2_1">
  175. 规格
  176. </view>
  177. <view class="one_2_2">
  178. <view :class="['list',is_specs!=index&&item.num>0?'list':is_specs!=index&&item.num<=0?'huilist':is_specs==index&&item.num>0?'redlist':is_specs==index&&item.num<=0?'huiilist':'list']" v-for="(item,index) in info.specs" :key="index" @tap="toSpecs(item)">
  179. <text>{{item.name}}</text>
  180. </view>
  181. </view>
  182. </view>
  183. <view class="one_3">
  184. <view class="one_3_1">
  185. <text>数量</text>
  186. </view>
  187. <view class="one_3_1">
  188. <uni-number-box v-model="buy_num" @change="toCount" :min="1" :max="specsInfo.num">
  189. </uni-number-box>
  190. </view>
  191. <view class="one_3_1">
  192. <text>库存{{specsInfo.num||0}}</text><text class="limit" v-if="specsInfo.limit_num">({{specsInfo.buy_name||'暂无'}}{{specsInfo.limit_num||0}}个)</text>
  193. </view>
  194. </view>
  195. </view>
  196. </view>
  197. </scroll-view>
  198. </view>
  199. <view class="info_2">
  200. <view :class="[specsInfo.can_group=='0'?'btns':'btn']" v-if="btn_type=='0'">
  201. <button :disabled="is_zero" :class="[is_zero?'btncolor':'']" @tap="toMarket">加入购物车</button>
  202. </view>
  203. <view :class="[specsInfo.can_group=='0'?'btns':'btn']" v-if="btn_type=='1'">
  204. <button :disabled="is_zero" :class="[is_zero?'btncolor':'']" @tap="toBuy">立即购买</button>
  205. </view>
  206. <view :class="[specsInfo.can_group=='0'?'btns':'btn']" v-if="specsInfo.can_group=='0'">
  207. <button :disabled="is_zero" :class="[is_zero?'btncolor':'']" @tap="toGroup">我要开团</button>
  208. </view>
  209. </view>
  210. </view>
  211. <view class="info_3" v-else-if="popupShow=='2'">
  212. <scroll-view scroll-y="true" class="scroll-view">
  213. <view class="list" v-for="(item,index) in info.act" :key="index">
  214. <view class="list_1" @tap="toAct(item)">
  215. <view class="title_1">
  216. <view class="l">
  217. <text>{{item.tag||'暂无'}}</text>{{item.act_time.title}}
  218. </view>
  219. <view class="r">
  220. <text class="iconfont icon-jiantouyou"></text>
  221. </view>
  222. </view>
  223. <view class="title_2">
  224. <view class="text" v-if="item.type=='5'||item.type=='6'">{{item.text}}</view>
  225. <view class="time">{{item.config.time_start}}-{{item.config.time_end}}</view>
  226. </view>
  227. <view class="title_2" v-if="item.type=='2'">
  228. <view class="specList" v-for="(tag,indexx) in item.list" :key="indexx">
  229. <view class="name">规格:{{tag.spec_name}}</view>
  230. <view class="giftList" v-for="(tags,indexs) in tag.gift" :key="indexs" @tap.stop="tags.type=='0' && getDetail(tags)">
  231. <view class="left">
  232. <view class="goods">{{tags.goods_name}}{{tags.spec_name}}</view>
  233. <view class="goods">{{tags.desc}}</view>
  234. <view class="num">×{{tags.num}}</view>
  235. </view>
  236. <view class="right"><text class="iconfont icon-jiantouyou"></text>
  237. </view>
  238. </view>
  239. </view>
  240. </view>
  241. </view>
  242. </view>
  243. </scroll-view>
  244. </view>
  245. <view class="info_4" v-else>
  246. <view class="info_4">
  247. <scroll-view scroll-y="true" class="scroll-view">
  248. <view class="list-scroll-view">
  249. <view class="list" v-for="(item,index) in info.sets" :key="index">
  250. <view class="name"><text class="set">套装</text>{{item.name}}</view>
  251. <view class="set">
  252. <view class="set_1" v-for="(tag,indexx) in item.set" :key="indexx" @tap="toDeatil(tag)">
  253. <image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''" mode="aspectFit">
  254. </image>
  255. <view class="goods textOver">{{tag.goods_name}}</view>
  256. <view class="spec textOver">{{tag.spec_name}}</view>
  257. </view>
  258. </view>
  259. <view class="bottom">
  260. <view class="money">
  261. 共{{item.goods_total||0}}件,套装价:<text>¥{{item.sell_money||0}}</text>
  262. </view>
  263. <view class="add">
  264. <button size="mini" @tap="toSetMarket(item)">加入购物车</button>
  265. </view>
  266. </view>
  267. </view>
  268. </view>
  269. </scroll-view>
  270. </view>
  271. </view>
  272. </view>
  273. </uni-popup>
  274. <view class="dialog" v-if="dialog.show==true" @tap="dialogClose">
  275. <view class="dialog_1" v-if="dialog.type=='1'">
  276. <swiper class="swiper" circular @change="diaSpecs" :current="is_specs">
  277. <swiper-item class="list" v-for="(item,index) in info.specs" :key="index">
  278. <view class="list_1">
  279. <image class="image" :src="item.file.length>0?item.file[0].url:info.goods.file[0].url" mode="aspectFit"></image>
  280. </view>
  281. <view class="name">
  282. <text>{{item.name}}</text>
  283. </view>
  284. </swiper-item>
  285. </swiper>
  286. </view>
  287. </view>
  288. </mobile-frame>
  289. </template>
  290. <script>
  291. export default {
  292. data() {
  293. return {
  294. // 系统设置
  295. config: {},
  296. // 商品id
  297. id: '',
  298. // 分享人id
  299. inviter: '',
  300. // 当前用户信息
  301. user: {},
  302. // 是否关注商品
  303. goodsColect: false,
  304. // 是否关注店铺
  305. shopColect: false,
  306. // 评价数
  307. evaluate_num: 2,
  308. // 商品详情
  309. info: {},
  310. infospecs: {},
  311. // 优惠
  312. discount: {},
  313. // 底部菜单
  314. options: [{
  315. icon: 'shop',
  316. text: '店铺',
  317. type: 'shop',
  318. route: 'pagesHome/shop/index',
  319. },
  320. {
  321. icon: 'cart',
  322. text: '购物车',
  323. type: 'market',
  324. route: 'pages/market/index',
  325. },
  326. ],
  327. buttonGroup: [{
  328. text: '加入购物车',
  329. backgroundColor: 'linear-gradient(90deg, #FFCD1E, #FF8A18)',
  330. color: '#fff',
  331. type: '0'
  332. },
  333. {
  334. text: '立即购买',
  335. backgroundColor: 'linear-gradient(90deg, #FE6035, #EF1224)',
  336. color: '#fff',
  337. type: '1'
  338. }
  339. ],
  340. // 系统菜单
  341. barList: [],
  342. is_menu: false,
  343. // 规格弹框
  344. popupShow: '1',
  345. // 规格信息
  346. is_specs: 0,
  347. btn_type: '1',
  348. specsInfo: {},
  349. // 是否零库存
  350. is_zero: false,
  351. // 商品设置
  352. group_config: [],
  353. // 限制说明
  354. buyList: [],
  355. // 购买数量
  356. buy_num: 1,
  357. // 规格弹出框
  358. dialog: {
  359. show: false,
  360. type: '1'
  361. },
  362. };
  363. },
  364. onLoad: async function(e) {
  365. const that = this;
  366. that.$set(that, `id`, e.id || '');
  367. that.$set(that, `inviter`, e.inviter || '');
  368. await that.searchConfig();
  369. await that.search();
  370. await that.configShare();
  371. },
  372. onShow: async function() {
  373. const that = this;
  374. await that.watchLogin();
  375. },
  376. onUnload: function() {
  377. // 页面卸载,重新部署分享内容
  378. const that = this;
  379. if (that.config) {
  380. // 赋值默认值
  381. that.$config.share = {
  382. title: that.config.title,
  383. path: '/pages/index/index',
  384. imageUrl: that.config.config.share[0].url
  385. }
  386. }
  387. },
  388. methods: {
  389. // 查询系统设置
  390. searchConfig() {
  391. const that = this;
  392. uni.getStorage({
  393. key: 'config',
  394. success: function(res) {
  395. let data = res.data;
  396. that.$set(that, `config`, data);
  397. if (data.bottom_menu && data.bottom_menu.list.length > 0) {
  398. let list = data.bottom_menu.list.sort((a, b) => {
  399. return a.sort - b.sort
  400. });
  401. that.$set(that, `barList`, list)
  402. }
  403. }
  404. })
  405. },
  406. // 查询用户信息
  407. watchLogin() {
  408. const that = this;
  409. uni.getStorage({
  410. key: 'token',
  411. success: async function(res) {
  412. let user = that.$jwt(res.data);
  413. if (user) that.$set(that, `user`, user);
  414. },
  415. fail: function(err) {
  416. console.log('暂无用户信息');
  417. }
  418. })
  419. },
  420. // 查询其他信息
  421. async searchOther() {
  422. const that = this;
  423. let user = that.user;
  424. let res;
  425. // 是否关注商品
  426. res = await that.$api(`/storeGoods/check`, `GET`, {
  427. customer: user._id,
  428. goods: that.id
  429. });
  430. if (res.errcode == '0') that.$set(that, `goodsColect`, res.data);
  431. // 是否关注店铺
  432. res = await that.$api(`/storeShop/check`, `GET`, {
  433. customer: user._id,
  434. shop: that.info?.shop?._id
  435. });
  436. if (res.errcode == '0') that.$set(that, `shopColect`, res.data);
  437. // 商品设置
  438. res = await that.$api(`/goodsConfig`, `GET`, {
  439. goods: that.id,
  440. shop: that.info?.shop?._id
  441. }, 'group');
  442. if (res.errcode == '0' && res.total > 0) that.$set(that, `group_config`, res.data);
  443. // 限制说明
  444. res = await that.$api(`/dictData`, 'GET', {
  445. code: "buy_limit"
  446. });
  447. if (res.errcode == '0') that.$set(that, `buyList`, res.data)
  448. },
  449. // 查询商品信息
  450. async search() {
  451. const that = this;
  452. let id = that.id;
  453. if (id) {
  454. let res;
  455. res = await that.$api(`/viewGoods/goodsDetail`, `POST`, {
  456. id: id
  457. });
  458. if (res.errcode == '0') {
  459. let data = res.data;
  460. if (data.goods.brief) data.goods.brief = data.goods.brief.replace(/\<img/gi,
  461. '<img class="rich-img"');
  462. // 特价
  463. let act;
  464. act = data.act.find(i => i.type == '3')
  465. if (act) {
  466. for (let val of act.list) {
  467. for (let [index, arr] of data.specs.entries()) {
  468. if (val.spec == arr._id) arr.price = val.price
  469. }
  470. }
  471. }
  472. // 显示最低价格的规格信息,不考虑库存问题
  473. if (data.specs && data.specs.length > 0) {
  474. // 规格排序
  475. let indexSpecs = data.specs.sort(function(a, b) {
  476. let i, j;
  477. if (a.price) i = 'price'
  478. else i = 'sell_money'
  479. if (b.price) j = 'price'
  480. else j = 'sell_money'
  481. return a[i] - b[j];
  482. })
  483. that.$set(that, `infospecs`, indexSpecs[0])
  484. }
  485. that.$set(that, `info`, data);
  486. // 优惠
  487. act = data.act.find(i => i.type == '5')
  488. if (act) that.$set(that.discount, `full_decrement`, act.text.split(';'));
  489. act = data.act.find(i => i.type == '6')
  490. if (act) that.$set(that.discount, `full_fold`, act.text.split(';'));
  491. await that.searchOther();
  492. // 查询规格
  493. await that.searchSpecs(data.specs);
  494. // 查询评价数
  495. await that.searchRate(data);
  496. }
  497. } else {
  498. uni.showToast({
  499. title: '暂无商品信息',
  500. icon: 'none'
  501. })
  502. }
  503. },
  504. // 查询规格
  505. searchSpecs(e) {
  506. const that = this;
  507. if (e.length > 0) {
  508. let data = e.find(i => i.num > 0);
  509. let dataIndex = e.findIndex(i => i._id == data._id);
  510. if (data) {
  511. let specsInfo = that.group_config.find(i => i.spec._id == data._id)
  512. if (specsInfo?._id && that.user.is_leader == '0') data.can_group = '0'
  513. else data.can_group = '1'
  514. let limit = that.buyList.find((i) => i.value == data.buy_limit);
  515. if (limit) data.buy_name = limit.label
  516. that.$set(that, `specsInfo`, data);
  517. that.$set(that, `is_specs`, dataIndex);
  518. }
  519. }
  520. },
  521. // 活动说明
  522. toActivity() {
  523. const that = this;
  524. if (that.info.act.length > 0) {
  525. that.$set(that, `popupShow`, '2')
  526. that.$refs.specShow.open();
  527. }
  528. },
  529. // 查看套装
  530. toSets() {
  531. const that = this;
  532. if (that.info.sets.length > 0) {
  533. that.$set(that, `popupShow`, '3')
  534. that.$refs.specShow.open();
  535. }
  536. },
  537. // 套装详情
  538. toDeatil(e) {
  539. const that = this;
  540. uni.navigateTo({
  541. url: `/pagesHome/order/detail?id=${e.goods}`
  542. })
  543. },
  544. // 套装加入购物车
  545. async toSetMarket(e) {
  546. const that = this;
  547. let user = that.user;
  548. if (user && user._id) {
  549. let obj = {
  550. customer: user._id,
  551. set_id: e._id,
  552. is_set: '0',
  553. num: 1,
  554. }
  555. let res = await that.$api(`/cart`, 'POST', obj)
  556. if (res.errcode == '0') {
  557. uni.showToast({
  558. title: `加入购物车成功`,
  559. icon: 'none'
  560. })
  561. that.toClose();
  562. } else {
  563. uni.showToast({
  564. title: res.errmsg,
  565. icon: 'none'
  566. })
  567. }
  568. } else {
  569. uni.navigateTo({
  570. url: `/pages/login/index`
  571. })
  572. }
  573. },
  574. // 查看正品详情
  575. getDetail(e) {
  576. const that = this;
  577. uni.navigateTo({
  578. url: `/pagesHome/order/detail?id=${e.goods}`
  579. })
  580. },
  581. // 选择规格
  582. toSpecs(e) {
  583. const that = this;
  584. let specs = that.info.specs;
  585. let dataIndex = specs.findIndex(i => i._id == e._id);
  586. that.$set(that, `is_specs`, dataIndex);
  587. let specsInfo = that.group_config.find(i => i.spec._id == e._id)
  588. if (specsInfo?._id && that.user.is_leader == '0') e.can_group = '0'
  589. else e.can_group = '1'
  590. let limit = that.buyList.find((i) => i.value == e.buy_limit);
  591. if (limit) e.buy_name = limit.label
  592. that.$set(that, `specsInfo`, e)
  593. that.$set(that, `buy_num`, 1);
  594. if (e.num <= 0) that.$set(that, `is_zero`, true)
  595. else that.$set(that, `is_zero`, false)
  596. },
  597. // 计数器
  598. toCount(e) {
  599. const that = this;
  600. that.$set(that, `buy_num`, e)
  601. },
  602. // 查询评价数
  603. async searchRate(e) {
  604. const that = this;
  605. let res = await that.$api(`/goodsRate`, `GET`, {
  606. limit: 1,
  607. goods: e.goods._id
  608. })
  609. if (res.errcode == '0') that.$set(that, `evaluate_num`, res.total);
  610. },
  611. // 关注商品
  612. async toGoodscolect() {
  613. const that = this;
  614. let user = that.user;
  615. if (user && user._id) {
  616. let res = await that.$api(`/storeGoods`, `POST`, {
  617. customer: user._id,
  618. goods: that.id
  619. });
  620. if (res.errcode == '0') {
  621. uni.showToast({
  622. title: res.data.msg,
  623. icon: 'none'
  624. })
  625. that.$set(that, `goodsColect`, res.data.result)
  626. }
  627. } else {
  628. uni.showToast({
  629. title: '暂无账号,无法收藏商品',
  630. icon: 'none'
  631. })
  632. }
  633. },
  634. // 选择规格
  635. toSpec() {
  636. const that = this;
  637. this.$set(that, `popupShow`, '1')
  638. that.$refs.specShow.open();
  639. },
  640. // 加入购物车
  641. async toMarket() {
  642. const that = this;
  643. let user = that.user;
  644. let info = that.info;
  645. let specsInfo = that.specsInfo;
  646. if (user && user._id) {
  647. let obj = {
  648. customer: user._id,
  649. shop: info.shop._id,
  650. goods: info.goods._id,
  651. goodsSpec: specsInfo._id,
  652. num: that.buy_num,
  653. inviter: that.inviter
  654. }
  655. let res = await that.$api(`/cart`, 'POST', obj)
  656. if (res.errcode == '0') {
  657. uni.showToast({
  658. title: `加入购物车成功`,
  659. icon: 'none'
  660. })
  661. that.toClose();
  662. } else {
  663. uni.showToast({
  664. title: res.errmsg,
  665. icon: 'none'
  666. })
  667. }
  668. } else {
  669. uni.navigateTo({
  670. url: `/pages/login/index`
  671. })
  672. }
  673. },
  674. // 立即购买
  675. async toBuy() {
  676. const that = this;
  677. let user = that.user;
  678. let info = that.info;
  679. let specsInfo = that.specsInfo;
  680. let act = that.info.act.map(item => {
  681. return item._id
  682. })
  683. if (user && user._id) {
  684. let obj = [{
  685. customer: user._id,
  686. shop: info.shop._id,
  687. goods: info.goods._id,
  688. goodsSpec: specsInfo._id,
  689. num: that.buy_num,
  690. inviter: that.inviter,
  691. act
  692. }]
  693. let res = await that.$api(`/util/checkCanBuy`, 'POST', obj)
  694. if (res.errcode == '0') {
  695. if (res.data.result == true) {
  696. uni.navigateTo({
  697. url: `/pagesHome/order/order?key=${res.data.key}`
  698. })
  699. } else {
  700. uni.showToast({
  701. title: res.data.msg,
  702. icon: 'none',
  703. duration: 5000
  704. })
  705. }
  706. } else {
  707. uni.showToast({
  708. title: res.errmsg,
  709. icon: 'none'
  710. })
  711. }
  712. } else {
  713. uni.navigateTo({
  714. url: `/pages/login/index`
  715. })
  716. }
  717. },
  718. // 开团
  719. toGroup() {
  720. const that = this;
  721. uni.navigateTo({
  722. url: `/pagesHome/group/index?shop=${that.info?.shop?._id}&goods=${that.id}`
  723. })
  724. },
  725. // 关闭弹框
  726. toClose() {
  727. const that = this;
  728. that.$set(that, `btn_type`, '1');
  729. that.$refs.specShow.close();
  730. },
  731. // 评价
  732. toEvaluate() {
  733. const that = this;
  734. uni.navigateTo({
  735. url: `/pagesHome/order/appraise?id=${that.info.goods._id}`
  736. })
  737. },
  738. // 进入店铺
  739. toShop() {
  740. const that = this;
  741. let info = that.info;
  742. uni.navigateTo({
  743. url: `/pagesHome/shop/index?id=${info.shop._id}`
  744. })
  745. },
  746. // 关注店铺
  747. async toShopcolect() {
  748. const that = this;
  749. let user = that.user;
  750. if (user && user._id) {
  751. let res = await that.$api(`/storeShop`, `POST`, {
  752. customer: user._id,
  753. shop: that.info.shop._id
  754. });
  755. if (res.errcode == '0') {
  756. uni.showToast({
  757. title: res.data.msg,
  758. icon: 'none'
  759. })
  760. that.$set(that, `shopColect`, res.data.result)
  761. }
  762. } else {
  763. uni.showToast({
  764. title: '暂无账号,无法关注商铺',
  765. icon: 'none'
  766. })
  767. }
  768. },
  769. // 店铺,购物车
  770. toNavleft(e) {
  771. const that = this;
  772. if (e.content.type == 'shop') {
  773. that.toShop();
  774. } else if (e.content.type == 'market') {
  775. let obj = {
  776. route: e.content.route
  777. }
  778. that.toPath(obj)
  779. }
  780. },
  781. // 加入购物车,立即购买
  782. toNavright(e) {
  783. const that = this;
  784. that.$set(that, `popupShow`, '1');
  785. that.$set(that, `btn_type`, e.content.type);
  786. that.$refs.specShow.open();
  787. },
  788. // 右侧菜单
  789. toMenubar() {
  790. const that = this;
  791. that.$set(that, `is_menu`, that.is_menu ? false : true)
  792. },
  793. toPath(e) {
  794. let url = `/${e.route}`;
  795. uni.reLaunch({
  796. url
  797. })
  798. },
  799. // 配置分享内容
  800. configShare() {
  801. const that = this;
  802. let id = that.id;
  803. let inviter = that.user && that.user._id ? that.user._id : '';
  804. let title = that.info && that.info.goods ? that.info.goods.name : '';
  805. let imageUrl = that.info && that.info.goods ? that.info.goods.file[0].url : '';
  806. that.$config.share = {
  807. title: title,
  808. path: `/pagesHome/order/detail?id=${id}&inviter=${inviter}`,
  809. imageUrl: imageUrl
  810. }
  811. },
  812. // 规格预览
  813. diaView() {
  814. const that = this;
  815. that.$set(that, `dialog`, {
  816. show: true,
  817. type: '1'
  818. })
  819. },
  820. // 查看活动
  821. toAct(item) {
  822. uni.navigateTo({
  823. url: `/pagesRest/activity/info?id=${item._id}`
  824. })
  825. },
  826. // 弹框选择规格
  827. diaSpecs(e) {
  828. const that = this;
  829. let specs = that.info.specs;
  830. let index = e.detail.current;
  831. let data = specs[index];
  832. that.$set(that, `is_specs`, index);
  833. that.$set(that, `specsInfo`, data);
  834. that.$set(that, `buy_num`, 1);
  835. if (data.num <= 0) that.$set(that, `is_zero`, true)
  836. else that.$set(that, `is_zero`, false)
  837. },
  838. // 关闭弹框
  839. dialogClose() {
  840. const that = this;
  841. that.$set(that, `dialog`, {
  842. show: false,
  843. type: '1'
  844. })
  845. }
  846. }
  847. }
  848. </script>
  849. <style lang="scss">
  850. .main {
  851. display: flex;
  852. flex-direction: column;
  853. width: 100vw;
  854. height: 100vh;
  855. .one {
  856. position: relative;
  857. flex-grow: 1;
  858. .one_1 {
  859. border-bottom: 0.5vw solid var(--f9Color);
  860. swiper {
  861. height: 44vh !important;
  862. }
  863. .list {
  864. border-radius: 5px;
  865. .image {
  866. width: 100%;
  867. height: 100%;
  868. border-radius: 5px;
  869. background-color: #fff;
  870. }
  871. }
  872. .goodsColect {
  873. position: fixed;
  874. top: 2vw;
  875. right: 3vw;
  876. z-index: 99;
  877. background-color: #858585;
  878. border-radius: 90px;
  879. text {
  880. font-size: 30px;
  881. }
  882. }
  883. .acttags {
  884. position: absolute;
  885. top: 1vw;
  886. left: 1vw;
  887. width: 97%;
  888. text {
  889. display: inline-block;
  890. background-color: #ff0000;
  891. color: #fff;
  892. border-radius: 1vw;
  893. padding: 0.5vw;
  894. font-size: 12px;
  895. margin: 0 1vw 0 0;
  896. }
  897. }
  898. }
  899. .one_2 {
  900. border-bottom: 0.5vw solid var(--f9Color);
  901. padding: 2vw;
  902. .money_1 {
  903. color: #23B67A;
  904. font-size: 20px;
  905. padding: 0 1vw 0 0;
  906. font-weight: bold;
  907. text {
  908. font-size: 14px;
  909. }
  910. }
  911. .money {
  912. font-size: 20px;
  913. padding: 0 1vw 0 0;
  914. color: #ff0000;
  915. font-weight: bold;
  916. text {
  917. font-size: 14px;
  918. }
  919. }
  920. .money:last-child {
  921. font-size: 16px;
  922. color: #858585;
  923. text-decoration: line-through;
  924. }
  925. }
  926. .one_3 {
  927. display: flex;
  928. flex-wrap: wrap;
  929. padding: 1vw;
  930. border-bottom: 0.5vw solid var(--f9Color);
  931. .act {
  932. font-size: 12px;
  933. border: 1px solid var(--fFB1Color);
  934. margin: 0 1vw 1vw 0;
  935. color: var(--fFB1Color);
  936. border-radius: 6px;
  937. padding: 0 1vw;
  938. }
  939. .num {
  940. font-size: 12px;
  941. color: #858585;
  942. }
  943. }
  944. .one_4 {
  945. border-bottom: 0.5vw solid var(--f9Color);
  946. padding: 2vw;
  947. .name {
  948. font-size: 17px;
  949. font-weight: bold;
  950. margin: 0 0 2vw 0;
  951. }
  952. .brief {
  953. font-size: 14px;
  954. color: #858585;
  955. margin: 0 0 1vw 0;
  956. }
  957. .money {
  958. font-size: 13px;
  959. color: #858585;
  960. text {
  961. padding: 0 2vw 0 0;
  962. }
  963. }
  964. }
  965. .one_5 {
  966. display: flex;
  967. justify-content: space-between;
  968. padding: 2vw;
  969. border-bottom: 0.5vw solid var(--f9Color);
  970. font-size: 14px;
  971. }
  972. .one_6 {
  973. display: flex;
  974. justify-content: space-between;
  975. padding: 2vw;
  976. border-bottom: 0.5vw solid var(--f9Color);
  977. font-size: 14px;
  978. }
  979. .one_7 {
  980. padding: 2vw;
  981. border-bottom: 2vw solid var(--f9Color);
  982. border-top: 1vw solid var(--f9Color);
  983. .one_7_1 {
  984. padding: 2vw 0;
  985. font-size: 14px;
  986. text {
  987. padding: 0 0 0 1vw;
  988. font-size: 12px;
  989. color: #858585;
  990. }
  991. }
  992. .one_7_2 {
  993. display: flex;
  994. justify-content: space-between;
  995. align-items: center;
  996. padding: 2vw;
  997. border-radius: 5px;
  998. background-color: var(--f9Color);
  999. .image {
  1000. width: 20vw;
  1001. height: 20vw;
  1002. .image {
  1003. width: 100%;
  1004. height: 100%;
  1005. border-radius: 5px;
  1006. background-color: #fff;
  1007. }
  1008. }
  1009. .money {
  1010. text-align: center;
  1011. .money_1 {
  1012. font-size: 12px;
  1013. color: #858585;
  1014. }
  1015. .money_2 {
  1016. font-size: 12px;
  1017. color: #ff0000;
  1018. }
  1019. }
  1020. }
  1021. }
  1022. .one_8 {
  1023. padding: 2vw;
  1024. border-bottom: 0.5vw solid var(--f9Color);
  1025. .one_8_1 {
  1026. margin: 0 0 1vw 0;
  1027. display: flex;
  1028. .shop_1 {
  1029. width: 15vw;
  1030. height: 15vw;
  1031. border: 1px solid #f1f1f1;
  1032. .image {
  1033. width: 100%;
  1034. height: 100%;
  1035. }
  1036. }
  1037. .shop_2 {
  1038. width: 78vw;
  1039. padding: 0 0 0 2vw;
  1040. .name {
  1041. font-size: 14px;
  1042. margin: 0 0 1vw 0;
  1043. }
  1044. .num {
  1045. font-size: 12px;
  1046. color: #858585;
  1047. text:last-child {
  1048. color: #000;
  1049. }
  1050. }
  1051. }
  1052. }
  1053. .one_8_2 {
  1054. margin: 0 0 2vw 0;
  1055. display: flex;
  1056. justify-content: space-between;
  1057. padding: 2vw 0;
  1058. .score_1 {
  1059. width: 33vw;
  1060. text-align: center;
  1061. font-size: 14px;
  1062. color: #858585;
  1063. text:nth-child(2) {
  1064. color: #ff0000;
  1065. }
  1066. text:nth-child(3) {
  1067. float: right;
  1068. }
  1069. }
  1070. }
  1071. .one_8_3 {
  1072. display: flex;
  1073. justify-content: space-around;
  1074. .btn {
  1075. width: 40vw;
  1076. button {
  1077. width: 100%;
  1078. font-size: 15px;
  1079. }
  1080. }
  1081. }
  1082. }
  1083. .one_9 {
  1084. padding: 2vw;
  1085. .rich-img {
  1086. width: 100% !important;
  1087. display: block;
  1088. }
  1089. }
  1090. }
  1091. .two {
  1092. width: 100vw;
  1093. height: 8vh;
  1094. overflow: hidden;
  1095. }
  1096. }
  1097. .scroll-view {
  1098. position: absolute;
  1099. top: 0;
  1100. left: 0;
  1101. right: 0;
  1102. bottom: 0;
  1103. .list-scroll-view {
  1104. display: flex;
  1105. flex-direction: column;
  1106. }
  1107. }
  1108. .bar_1 {
  1109. position: fixed;
  1110. right: 2vw;
  1111. bottom: 20vw;
  1112. text {
  1113. background-color: #858585;
  1114. border-radius: 90px;
  1115. font-size: 30px;
  1116. }
  1117. }
  1118. .bar_2 {
  1119. position: fixed;
  1120. right: 2vw;
  1121. bottom: 28vw;
  1122. width: 27vw;
  1123. background: #ffffff;
  1124. padding: 0 2vw;
  1125. box-shadow: 0 0 5px #858585;
  1126. .list {
  1127. display: flex;
  1128. border-bottom: 1px solid #f1f1f1;
  1129. padding: 1vw 0;
  1130. .image {
  1131. width: 8vw;
  1132. height: 8vw;
  1133. }
  1134. .name {
  1135. font-size: 14px;
  1136. position: relative;
  1137. top: 2vw;
  1138. left: 2vw;
  1139. }
  1140. }
  1141. .list:last-child {
  1142. border-bottom: none;
  1143. }
  1144. }
  1145. .uni-popup {
  1146. z-index: 9999 !important;
  1147. }
  1148. .popup {
  1149. display: flex;
  1150. flex-direction: column;
  1151. width: 100vw;
  1152. height: 60vh;
  1153. .close {
  1154. text-align: right;
  1155. padding: 2vw;
  1156. }
  1157. .info_1 {
  1158. position: relative;
  1159. display: flex;
  1160. flex-direction: column;
  1161. height: 54vh;
  1162. .info_1 {
  1163. position: relative;
  1164. flex-grow: 1;
  1165. .one {
  1166. padding: 2vw;
  1167. .one_1 {
  1168. display: flex;
  1169. margin: 0 0 2vw 0;
  1170. padding: 0 0 2vw 0;
  1171. border-bottom: 0.5vw solid var(--f9Color);
  1172. .l {
  1173. width: 25vw;
  1174. height: 25vw;
  1175. .image {
  1176. width: 100%;
  1177. height: 100%;
  1178. border-radius: 5px;
  1179. }
  1180. }
  1181. .r {
  1182. width: 70vw;
  1183. padding: 0 0 0 2vw;
  1184. .money {
  1185. margin: 0 0 2vw 0;
  1186. .money_2 {
  1187. color: #23B67A;
  1188. font-size: 20px;
  1189. padding: 0 1vw 0 0;
  1190. font-weight: bold;
  1191. text {
  1192. font-size: 14px;
  1193. }
  1194. }
  1195. .money_1 {
  1196. font-size: 20px;
  1197. color: #ff0000;
  1198. padding: 0 2vw 0 0;
  1199. text {
  1200. font-size: 14px;
  1201. }
  1202. }
  1203. .money_1:last-child {
  1204. font-size: 16px;
  1205. color: #858585;
  1206. text-decoration: line-through;
  1207. }
  1208. }
  1209. .other_1 {
  1210. font-size: 15px;
  1211. color: #858585;
  1212. text:last-child {
  1213. color: #000000;
  1214. }
  1215. }
  1216. }
  1217. }
  1218. .one_2 {
  1219. margin: 0 0 2vw 0;
  1220. border-bottom: 0.5vw solid var(--f9Color);
  1221. .one_2_1 {
  1222. font-size: 14px;
  1223. margin: 0 0 2vw 0;
  1224. }
  1225. .one_2_2 {
  1226. display: flex;
  1227. flex-wrap: wrap;
  1228. .list {
  1229. background-color: #F5F5F5;
  1230. margin: 0 2vw 2vw 0;
  1231. padding: 0.5vw 1vw;
  1232. border-radius: 5px;
  1233. text {
  1234. font-size: 14px;
  1235. color: #000;
  1236. }
  1237. }
  1238. .huilist {
  1239. background-color: #DCDCDC;
  1240. text {
  1241. color: #858585;
  1242. }
  1243. }
  1244. .redlist {
  1245. background-color: #ff0000;
  1246. text {
  1247. color: #ffffff;
  1248. }
  1249. }
  1250. .huiilist {
  1251. background-color: #808080;
  1252. text {
  1253. color: #cccccc;
  1254. }
  1255. }
  1256. }
  1257. }
  1258. .one_3 {
  1259. display: flex;
  1260. .one_3_1 {
  1261. margin: 0 2vw 0 0;
  1262. text {
  1263. font-size: 14px;
  1264. color: #858585;
  1265. }
  1266. .limit {
  1267. color: #ff0000;
  1268. padding: 0 0 0 2vw;
  1269. }
  1270. }
  1271. }
  1272. }
  1273. }
  1274. .info_2 {
  1275. display: flex;
  1276. text-align: center;
  1277. justify-content: space-between;
  1278. .btns {
  1279. width: 50vw;
  1280. }
  1281. .btn {
  1282. width: 100vw;
  1283. }
  1284. button {
  1285. width: 100%;
  1286. border-radius: 0;
  1287. background-color: var(--fFB1Color);
  1288. color: #fff;
  1289. border: 1px solid #f1f1f1;
  1290. }
  1291. .btncolor {
  1292. background: #f1f1f1;
  1293. color: #858585;
  1294. }
  1295. }
  1296. }
  1297. .info_3 {
  1298. position: relative;
  1299. flex-grow: 1;
  1300. .list {
  1301. margin: 0 2vw 2vw 2vw;
  1302. border-radius: 10px;
  1303. background-color: #FFF8DC;
  1304. .list_1 {
  1305. padding: 2vw;
  1306. font-size: 14px;
  1307. .title_1 {
  1308. display: flex;
  1309. justify-content: space-between;
  1310. margin: 1vw 0;
  1311. .l {
  1312. text {
  1313. margin: 0 1vw 0 0;
  1314. font-size: 12px;
  1315. border-radius: 5px;
  1316. border: 0.5px solid var(--fFB1Color);
  1317. color: var(--fFB1Color);
  1318. }
  1319. }
  1320. }
  1321. .title_2 {
  1322. .specList {
  1323. .name {
  1324. margin: 0 0 1vw 0;
  1325. }
  1326. .giftList {
  1327. display: flex;
  1328. justify-content: space-between;
  1329. align-items: center;
  1330. margin: 0 0 1vw 0;
  1331. border: 0.5px solid var(--f9Color);
  1332. border-radius: 10px;
  1333. .left {
  1334. width: 85vw;
  1335. }
  1336. }
  1337. }
  1338. .text {
  1339. color: var(--fFB1Color);
  1340. }
  1341. }
  1342. }
  1343. }
  1344. }
  1345. .info_4 {
  1346. position: relative;
  1347. display: flex;
  1348. flex-direction: column;
  1349. height: 54vh;
  1350. .info_4 {
  1351. position: relative;
  1352. flex-grow: 1;
  1353. .list {
  1354. margin: 0 2vw 2vw 2vw;
  1355. border-radius: 10px;
  1356. background-color: var(--f9Color);
  1357. .name {
  1358. display: flex;
  1359. padding: 2vw;
  1360. font-size: 14px;
  1361. .set {
  1362. margin: 0 1vw 0 0;
  1363. font-size: 12px;
  1364. border-radius: 5px;
  1365. padding: 0 1vw;
  1366. color: #ffffff;
  1367. background-color: #FF6347;
  1368. border: 1px solid #FFA500;
  1369. }
  1370. }
  1371. .set {
  1372. display: flex;
  1373. justify-content: space-around;
  1374. flex-wrap: wrap;
  1375. margin: 0 2vw;
  1376. padding: 2vw;
  1377. background-color: #fff;
  1378. border-radius: 5px;
  1379. .set_1 {
  1380. width: 25vw;
  1381. text-align: center;
  1382. font-size: 14px;
  1383. .spec {
  1384. font-size: 12px;
  1385. color: #858585;
  1386. }
  1387. .image {
  1388. width: 20vw;
  1389. height: 20vw;
  1390. border-radius: 5px;
  1391. background-color: #fff;
  1392. }
  1393. }
  1394. }
  1395. .bottom {
  1396. display: flex;
  1397. justify-content: space-between;
  1398. align-items: center;
  1399. padding: 2vw;
  1400. .money {
  1401. font-size: 12px;
  1402. text {
  1403. color: #ff0000;
  1404. }
  1405. }
  1406. .add {
  1407. button {
  1408. background-color: #ff0000;
  1409. color: #ffffff;
  1410. border-radius: 5vw;
  1411. }
  1412. }
  1413. }
  1414. }
  1415. }
  1416. }
  1417. }
  1418. .dialog {
  1419. position: fixed;
  1420. width: 100vw;
  1421. height: 100vh;
  1422. background-color: #000000;
  1423. z-index: 99999;
  1424. display: flex;
  1425. flex-direction: column;
  1426. justify-content: center;
  1427. swiper {
  1428. height: 60vh;
  1429. }
  1430. .list {
  1431. .list_1 {
  1432. padding: 2vw;
  1433. margin: 0 0 5vw 0;
  1434. .image {
  1435. width: 100%;
  1436. height: 40vh;
  1437. }
  1438. }
  1439. .name {
  1440. text-align: center;
  1441. margin: 0 10vw;
  1442. background-color: #6666669f;
  1443. border-radius: 25px;
  1444. padding: 2vw;
  1445. text {
  1446. color: #fff;
  1447. font-size: 15px;
  1448. overflow: hidden;
  1449. text-overflow: ellipsis;
  1450. -webkit-line-clamp: 2;
  1451. word-break: break-all;
  1452. display: -webkit-box;
  1453. -webkit-box-orient: vertical;
  1454. }
  1455. }
  1456. }
  1457. }
  1458. </style>