detail.vue 36 KB

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