productdetails.vue 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458
  1. <template>
  2. <view>
  3. <scroll-view ref="scrollView" scroll-y="true" scroll-with-animation="true" style="min-height: 100vh;"
  4. :scroll-into-view="toView">
  5. <!-- 页面内容 -->
  6. <!-- 自定义导航栏 -->
  7. <u-navbar :safeAreaInsetTop="true" :placeholder="true">
  8. <view class="u-nav-slot u-flex" slot="left" style="display: flex">
  9. <view class="u-flex">
  10. <u-icon name="arrow-left" size="19" @click="returnindex"></u-icon>
  11. <u-tabs :duration="duration" @click="scrollToPosition" :list="list1" lineColor="#fff"
  12. :activeStyle="{ color: '#FF1515' }" :inactiveStyle="{
  13. color: ' #666666',
  14. }"></u-tabs>
  15. </view>
  16. <!-- <view class="" style="margin-left: 184rpx;" @click="share = true">
  17. <image src="static/images/share.png" style="width: 38rpx;height: 38rpx;" mode=""></image>
  18. </view> -->
  19. </view>
  20. <view class="u-nav-slot u-flex" slot="right" style="display: flex">
  21. <view class="" style="margin-left: 184rpx" @click="sharea">
  22. <image src="static/images/share.png" style="width: 38rpx; height: 38rpx" mode=""></image>
  23. </view>
  24. <view class="" style="width: 180rpx"></view>
  25. </view>
  26. </u-navbar>
  27. <!-- 商品图片 -->
  28. <view class="uni-margin-wrap" id="scroll0">
  29. <swiper class="swiper" circular :indicator-dots="false" :autoplay="true">
  30. <swiper-item v-if="goodinfo.video">
  31. <video style="width: 750rpx; height: 750rpx" :src="goodinfo.video"></video>
  32. </swiper-item>
  33. <template v-if="goodinfo.images">
  34. <swiper-item v-for="(item, idx) in goodinfo.images.split(',')" :key="idx">
  35. <image :src="goodinfo.image" style="width: 750rpx; height: 750rpx" mode=""></image>
  36. </swiper-item>
  37. </template>
  38. </swiper>
  39. </view>
  40. <view class="back">
  41. <!-- 折扣 -->
  42. <view class="discount">
  43. <view class="top">
  44. <text class="count" v-if="goodinfo.is_discount == 0">{{
  45. i18n.Discounted
  46. }}</text>
  47. <text class="money">¥</text>
  48. <text class="money" style="font-size: 48rpx">{{
  49. goodinfo.is_discount == 0
  50. ? goodinfo.discount_price.slice(0, -3)
  51. : goodinfo.price.slice(0, -3)
  52. }}</text>
  53. <text class="money">{{
  54. goodinfo.is_discount == 0
  55. ? goodinfo.discount_price.slice(-3)
  56. : goodinfo.price.slice(-3)
  57. }}</text>
  58. <text class="right" v-if="goodinfo.is_discount == 0">¥{{ goodinfo.price }}</text>
  59. </view>
  60. <view class="bottom">
  61. <view class="u-flex" style="column-gap:16rpx">
  62. <div v-for="(tab,idx) in goodinfo.label_arr" :key="idx">
  63. <text v-if="language == 'zh-CN'" class="tabs">{{ tab.name_cn }}</text>
  64. <text v-if="language == 'en-US'" class="tabs">{{ tab.name_en }}</text>
  65. <text v-if="language == 'es-ES'" class="tabs">{{ tab.name_es }}</text>
  66. <text v-if="language == 'it-IT'" class="tabs">{{ tab.name_ita }}</text>
  67. </div>
  68. </view>
  69. <view class="">
  70. <text class="title" v-if="language == 'zh-CN'">
  71. {{ goodinfo.name_cn }}
  72. </text>
  73. <text class="title" selectable @longpress="onLongPress" v-if="language == 'en-US'">
  74. {{ goodinfo.name_en }}
  75. </text>
  76. <text class="title" selectable @longpress="onLongPress" v-if="language == 'es-ES'">
  77. {{ goodinfo.name_es }}
  78. </text>
  79. <text class="title" selectable @longpress="onLongPress" v-if="language == 'it-IT'">
  80. {{ goodinfo.name_ita }}
  81. </text>
  82. </view>
  83. </view>
  84. </view>
  85. <!-- 服务 -->
  86. <view class="serve" style="margin-top: 20rpx">
  87. <view class="top u-flex u-row-between" @click="sele">
  88. <view class="u-flex">
  89. <view class="change">{{ i18n.Sele }}</view>
  90. <view class="" style="margin-left: 20rpx">
  91. {{ selectArr.length > 0 ? selectArr.join(",") : i18n.Sele }}
  92. </view>
  93. </view>
  94. <view class="">
  95. <u-icon name="arrow-right" size="16"></u-icon>
  96. </view>
  97. </view>
  98. <view class="top u-flex u-row-between" style="margin-top: 36rpx" @click="openfu">
  99. <view class="u-flex">
  100. <view class="change">{{ i18n.service }}</view>
  101. <view v-if="language == 'zh-CN'" class="" style="margin-left: 20rpx">{{content.name_cn}}
  102. </view>
  103. <view v-if="language == 'en-US'" class="" style="margin-left: 20rpx">{{content.name_en}}
  104. </view>
  105. <view v-if="language == 'es-ES'" class="" style="margin-left: 20rpx">{{content.name_es}}
  106. </view>
  107. <view v-if="language == 'it-IT'" class="" style="margin-left: 20rpx">{{content.name_ita}}
  108. </view>
  109. </view>
  110. <view class="">
  111. <u-icon name="arrow-right" size="16"></u-icon>
  112. </view>
  113. </view>
  114. </view>
  115. <!-- 评论 -->
  116. <view class="comment" ref="targetPosition" id="scroll1">
  117. <view class="u-flex u-row-between">
  118. <text class="ping">{{ i18n.review }}</text>
  119. <view class="u-flex" @click="tocomment">
  120. <text class="strip">{{ total }}{{ i18n.article + i18n.review }}</text>
  121. <u-icon name="arrow-right" size="16"></u-icon>
  122. </view>
  123. </view>
  124. <view class="" v-for="(item, idx) in commentlist" :key="idx">
  125. <view class="uesr u-flex u-row-between" style="margin-top: 36rpx">
  126. <view class="u-flex">
  127. <image src="../static/images/logo.png" style="width: 52rpx; height: 52rpx" mode="">
  128. </image>
  129. <text class="name">{{ item.member.nickname }}</text>
  130. </view>
  131. <text class="strip">{{ item.created_at }}</text>
  132. </view>
  133. <view class="content">
  134. {{ item.content }}
  135. </view>
  136. <view class="sku" style="margin-top: 16rpx">{{
  137. item.sku_item.item
  138. }}</view>
  139. </view>
  140. </view>
  141. <!-- 店铺 -->
  142. <view class="store u-flex u-row-between">
  143. <view class="u-flex">
  144. <image :src="goodinfo.merchant.image" style="width: 112rpx; height: 112rpx" mode=""></image>
  145. <view class="" style="margin-left: 20rpx">
  146. <view class="title" style="width: 600;">{{ goodinfo.merchant.merchant_name }}</view>
  147. <view class="redback u-flex">
  148. <uni-rate network allow-half :readonly="true" active-color="red"
  149. color="rgba(255, 27, 0, 0.5)" :size="8" :value="5" v-model="rate" />
  150. <text style="margin-left: 8rpx">{{ rate }}</text>
  151. </view>
  152. <view class="" style="margin-top: 20rpx"></view>
  153. <view class="u-flex" style="margin-top: 20rpx">
  154. <text class="num">{{ i18n.Salesvolume }} {{goodinfo.merchant.sale_num}}</text>
  155. <view class="line"></view>
  156. <!-- 评价总数 -->
  157. <text class="num">{{ i18n.review }} {{goodinfo.merchant.comment_num}}</text>
  158. </view>
  159. </view>
  160. </view>
  161. <view class="goshop" @click="goshop">{{ i18n.stroll }}</view>
  162. </view>
  163. <!-- 推荐 -->
  164. <view class="recommend">
  165. <view class="title">
  166. {{ i18n.Recommended }}
  167. </view>
  168. <view class="" style="margin-top: 10rpx;">
  169. <swiper style="height: 400rpx" class="swiper" circular :indicator-dots="true" :autoplay="true">
  170. <swiper-item v-for="(parent, index) in swiptlist" :key="index">
  171. <view class="u-flex swiper-item u-row-between">
  172. <view class="" v-for="(child, idx) in parent" @click="detail(child.id)" :key="idx">
  173. <image :src="child.image"
  174. style="width: 214rpx; height: 214rpx;border-radius: 10rpx;" mode="">
  175. </image>
  176. <view class="over" style="
  177. width: 214rpx;
  178. margin-top: 14rpx;
  179. font-style: normal;
  180. font-size: 26rpx;
  181. " v-if="language == 'zh-CN'">
  182. {{ child.name_cn }}
  183. </view>
  184. <view class="over" style="
  185. width: 214rpx;
  186. margin-top: 14rpx;
  187. font-style: normal;
  188. font-size: 26rpx;
  189. " v-if="language == 'en-US'">
  190. {{ child.name_en }}
  191. </view>
  192. <view class="over" style="
  193. width: 214rpx;
  194. margin-top: 14rpx;
  195. font-style: normal;
  196. font-size: 26rpx;
  197. " v-if="language == 'es-ES'">
  198. {{ child.name_es }}
  199. </view>
  200. <view class="over" style="
  201. width: 214rpx;
  202. margin-top: 14rpx;
  203. font-style: normal;
  204. font-size: 26rpx;
  205. " v-if="language == 'it-IT'">
  206. {{ child.name_ita }}
  207. </view>
  208. <view class="" style="margin-top: 12rpx">
  209. <span
  210. style="color: rgba(204, 51, 0, 1); font-size: 26rpx">¥{{ child.price }}</span>
  211. </view>
  212. </view>
  213. </view>
  214. </swiper-item>
  215. </swiper>
  216. </view>
  217. </view>
  218. <view class="recommend" id="scroll2">
  219. <view class="title">{{ i18n.Productdetails }}</view>
  220. <view class="" style="margin-top: 32rpx; margin-bottom: 28rpx;font-size: 26rpx;">{{
  221. i18n.Specification
  222. }}</view>
  223. <view class="specification">
  224. <view class="item u-flex" style="margin-bottom: 28rpx" v-for="(item, idx) in goodinfo.parameter"
  225. :key="idx">
  226. <view style="width: 150rpx">{{ item.name }}</view>
  227. <text style="margin-left: 58rpx">{{ item.value }}</text>
  228. </view>
  229. </view>
  230. <view class="" style="margin-top: 28rpx;">
  231. <u-parse :content="goodinfo.detail_cn"></u-parse>
  232. <!-- <image :src="goodinfo.image" style="width: 100%; height: 580rpx" mode=""></image> -->
  233. </view>
  234. </view>
  235. <view class="" style="height: 158rpx"></view>
  236. <view class="fix u-flex u-row-between">
  237. <view class="u-flex" style="column-gap: 35rpx">
  238. <view class="u-flex" style="justify-content: center; flex-direction: column" @click="chat">
  239. <image src="../static/images/index/service.png" style="width: 40rpx; height: 40rpx" mode="">
  240. </image>
  241. <view class="ke">{{ i18n.Customer }}</view>
  242. </view>
  243. <view class="u-flex" style="justify-content: center; flex-direction: column" @click="shopping">
  244. <image src="../static/cart1.png" style="width: 40rpx; height: 40rpx" mode="">
  245. </image>
  246. <view class="ke">{{ i18n.Shopping }}</view>
  247. </view>
  248. <view class="u-flex" style="
  249. justify-content: center;
  250. flex-direction: column;
  251. width: 70rpx;
  252. " @click="fllow">
  253. <image v-if="goodinfo.is_interest == 1" src="../static/images/index/attention.png"
  254. style="width: 40rpx; height: 40rpx" mode=""></image>
  255. <image v-if="goodinfo.is_interest == 0" src="../static/images/index/bottom1.png"
  256. style="width: 40rpx; height: 40rpx" mode="">
  257. </image>
  258. <view v-if="goodinfo.is_interest == 1" class="ke">{{
  259. i18n.follow
  260. }}</view>
  261. <view v-if="goodinfo.is_interest == 0" class="ke" style="color: rgba(248, 50, 36, 1)">已关注
  262. </view>
  263. </view>
  264. </view>
  265. <view v-if="sku_info.stock_total == 0" class="tongzhi" @click="inform">
  266. {{ i18n.notification }}
  267. </view>
  268. <view v-if="sku_info.stock_total != 0" class="join" @click="join(0)">加入购物车</view>
  269. <view v-if="sku_info.stock_total != 0" class="pin" @click="join(1)">立即拼团</view>
  270. </view>
  271. </view>
  272. </scroll-view>
  273. <!-- 加入购物车 -->
  274. <u-popup :round="10" :show="show">
  275. <view style="padding: 48rpx 28rpx; box-sizing: border-box; position: relative">
  276. <view class="u-flex">
  277. <image :src="JSON.stringify(sku_info)=='{}'?goodinfo.image:sku_info.image"
  278. style="width: 192rpx; height: 192rpx" mode="">
  279. </image>
  280. <view class="" style="margin-left: 20rpx">
  281. <view class="">
  282. <text class="read">¥</text>
  283. <text class="read" style="font-size: 40rpx;font-weight: 600;"
  284. v-if="goodinfo.is_discount == 0">{{
  285. (Number(sku_info.discount_price * 100) *
  286. Number(value * 100)) /
  287. 10000 ||
  288. (Number(goodinfo.discount_price * 100) *
  289. Number(value * 100)) /
  290. 10000
  291. }}</text>
  292. <!-- <text class="read" v-if="goodinfo.is_discount==0">{{(goodinfo.discount_price * value).slice(-3)}}</text> -->
  293. <text class="read" style="font-size: 40rpx;font-weight: 600;"
  294. v-if="goodinfo.is_discount == 1">{{
  295. (Number(sku_info.price * 100) * Number(value * 100)) /
  296. 10000 ||
  297. (Number(goodinfo.price * 100) * Number(value * 100)) / 10000
  298. }}</text>
  299. <!-- <text class="read" v-if="goodinfo.is_discount==1">{{(goodinfo.price * value).slice(-3)}}</text> -->
  300. <!-- <text class="read" style="font-size: 40rpx;" >{{(Number(goodinfo.price) * Number(value)).toString()}}</text> -->
  301. </view>
  302. <text class="guige">已选:{{ selectArr.join(",") || i18n.selection }}</text>
  303. </view>
  304. </view>
  305. <view class="" style="position: absolute; top: 48rpx; right: 28rpx" @click="close">
  306. <u-icon name="close" color="#000" size="28"></u-icon>
  307. </view>
  308. <view class="" v-for="(item, index) in goodinfo.sku">
  309. <view class="title1" style="margin-top: 40rpx; margin-bottom: 32rpx">
  310. {{ item.name }}
  311. </view>
  312. <view class="u-flex" style="column-gap: 18rpx; flex-wrap: wrap">
  313. <view class="" :class="selectArr[index] == child ? 'acttab' : 'tabs'"
  314. v-for="(child, idx) in item.values" :key="idx" @click="actabs(index, child, item)">
  315. {{ child }}
  316. </view>
  317. </view>
  318. </view>
  319. <view class="u-flex u-row-between" style="margin-top: 30rpx">
  320. <text class="title1">数量</text>
  321. <u-number-box v-model="value" @change="valChange"></u-number-box>
  322. </view>
  323. <view class="" style="height: 200rpx"></view>
  324. <view class="bottoma">
  325. <view v-if="shopcar == 0" class="btn" @click="joincart">
  326. 加入购物车
  327. </view>
  328. <view v-if="shopcar == 1" class="btn" @click="order"> 立即购买 </view>
  329. <view v-if="shopcar == 2" class="btn" @click="close">
  330. 确定
  331. </view>
  332. </view>
  333. </view>
  334. </u-popup>
  335. <u-popup :show="serve" :round="20">
  336. <view style="
  337. padding: 48rpx 24rpx;
  338. box-sizing: border-box;
  339. background-color: #fff3e7;
  340. position: relative;
  341. border-radius: 20rpx 20rpx 0 0;
  342. ">
  343. <view class="u-flex" style="flex-direction: column; justify-content: center">
  344. <image src="../static/images/index/serve.png" style="width: 138rpx; height: 34rpx" mode=""></image>
  345. <text class="info"> 售前售后 安心无忧购物 </text>
  346. </view>
  347. <view class="" style="position: absolute; top: 48rpx; right: 24rpx" @click="close()">
  348. <u-icon name="close" style="width: 22rpx; height: 22rpx"></u-icon>
  349. </view>
  350. <view class="contenta">
  351. <view class="" v-if="language=='zh-CN'">
  352. <u-parse :content="content.content_cn"></u-parse>
  353. </view>
  354. <view class="" v-if="language=='en-US'">
  355. <u-parse :content="content.content_en"></u-parse>
  356. </view>
  357. <view class="" v-if="language=='es-ES'">
  358. <u-parse :content="content.content_es"></u-parse>
  359. </view>
  360. <view class="" v-if="language=='it-IT'">
  361. <u-parse :content="content.content_ita"></u-parse>
  362. </view>
  363. </view>
  364. <view class="button" @click="close()">
  365. {{ i18n.know }}
  366. </view>
  367. </view>
  368. </u-popup>
  369. <u-popup :round="10" :show="share" bgColor=" rgba(244, 244, 244, 1);">
  370. <view style="
  371. padding: 48rpx 24rpx;
  372. box-sizing: border-box;
  373. background-color: rgba(244, 244, 244, 1);
  374. border-radius: 10px 10px 0 0;
  375. ">
  376. <view class="u-flex u-row-between" style="">
  377. <view class="" style="width: 28px; height: 28px"></view>
  378. <text class="info" style="font-size: 32rpx">
  379. {{ i18n.shar }}
  380. </text>
  381. <image src="../static/images/index/bottom2.png" style="width: 40rpx; height: 40rpx">
  382. </image>
  383. </view>
  384. <!-- <view class="" style="position: absolute;top: 48rpx;right:24rpx;">
  385. </view> -->
  386. <view class="u-flex u-row-between" style="margin-top: 82rpx; padding: 0 140rpx">
  387. <view class="" @click="copylink">
  388. <image src="../static/images/index/link.png" style="width: 108rpx; height: 108rpx" mode="">
  389. </image>
  390. <view class="link">{{ i18n.Copylink }}</view>
  391. </view>
  392. <view class="" @click="builder">
  393. <image src="../static/images/index/image.png" style="width: 108rpx; height: 108rpx" mode="">
  394. </image>
  395. <view class="link">{{ i18n.Generatepicture }}</view>
  396. </view>
  397. </view>
  398. <view class="button" @click="close" style="background: #fff; color: #555555; margin-top: 58rpx">
  399. {{ i18n.Cancel }}
  400. </view>
  401. </view>
  402. </u-popup>
  403. <u-popup :show="imagea" bgColor=" rgba(244, 244, 244, 0);" mode="center"
  404. :customStyle="{ alignItems: 'center' }">
  405. <view class="u-fle" style="display: flex; justify-content: flex-end; width: 100%">
  406. <u-icon name="close" @click="imagea = false" color="#fff" size="28"></u-icon>
  407. </view>
  408. <image :src="picture2" mode="widthFix"></image>
  409. <view class="button" style="width: 658rpx" @click="saveImage">保存到相册</view>
  410. </u-popup>
  411. <l-painter custom-style="position: fixed; left: 200%" ref="poster"
  412. css="width: 538rpx; height:900rpx; background: #fff;padding:24rpx">
  413. <l-painter-image
  414. src="https://m.360buyimg.com/babel/jfs/t1/196317/32/13733/288158/60f4ea39E6fb378ed/d69205b1a8ed3c97.jpg"
  415. css="width: 490rpx; height: 490rpx" />
  416. <l-painter-text text="¥" css=" padding-top: 20rpx;color:#F83224;" />
  417. <l-painter-text :text="goodinfoyuan"
  418. css="text-align:center; padding-top: 20rpx;color:#F83224; font-size: 26rpx" />
  419. <l-painter-text :text="goodinfoname" css=" padding-top: 20rpx;" />
  420. <l-painter-qrcode text="limeui.qcoon.cn"
  421. css="width: 132rpx; height: 132rpx;margin-top:44rpx;margin-left:174rpx" />
  422. <l-painter-text text="长按识别查看" css=" padding-top: 20rpx;text-align:center;display:block;color:#777777" />
  423. </l-painter>
  424. </view>
  425. </template>
  426. <script>
  427. export default {
  428. data() {
  429. return {
  430. elementList: {
  431. // images: [ //图片对象
  432. // {
  433. // path: "https://img2.baidu.com/it/u=1028011339,1319212411&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=313", //图片路径[必填]
  434. // dx: 15, //左上角x轴[必填]
  435. // dy: 15, //左上角y轴[必填]
  436. // dWidth: 270, //宽度[必填]
  437. // dHeight: 270, //高度[必填]
  438. // sx: 0, //绘画的宽度[选填]
  439. // sy: 0, //绘画的高度[选填]
  440. // }
  441. // ],
  442. images: [ //图片对象
  443. {
  444. path: "https://wxls-cms.oss-cn-hangzhou.aliyuncs.com/online/2024-04-18/218da022-f4bf-456a-99af-5cb8e157f7b8.jpg", //图片路径[必填]
  445. dx: 15, //左上角x轴[必填]
  446. dy: 15, //左上角y轴[必填]
  447. dWidth: 270, //宽度[必填]
  448. dHeight: 270, //高度[必填]
  449. sx: 0, //绘画的宽度[选填]
  450. sy: 0, //绘画的高度[选填]
  451. }
  452. ],
  453. text: [ //渲染文字
  454. {
  455. value: "邀请码:", //渲染的文字
  456. color: "#333333", //文字颜色[选填]
  457. size: "18", //大小[选填]
  458. font: "PingFang SC-Regular, PingFang SC;", //字体[选填]
  459. x: 13, //左上角x轴[必填]
  460. y: 330, //左上角y轴[必填]
  461. // backgroundColor: "#ffffff", //背景色
  462. maxWidth: "270", //字体最大宽度
  463. maxHeight: "", //字体最大高度
  464. }, {
  465. value: "邀请码:", //渲染的文字
  466. color: "#F83224", //文字颜色[选填]
  467. size: "18", //大小[选填]
  468. font: "PingFang SC-Regular, PingFang SC;", //字体[选填]
  469. x: 13, //左上角x轴[必填]
  470. y: 310, //左上角y轴[必填]
  471. // backgroundColor: "#ffffff", //背景色
  472. maxWidth: "", //字体最大宽度
  473. maxHeight: "", //字体最大高度
  474. }, {
  475. value: "长按识别查看", //渲染的文字
  476. color: "#777777", //文字颜色[选填]
  477. size: "10", //大小[选填]
  478. font: "PingFang SC-Regular, PingFang SC;", //字体[选填]
  479. x: 13, //左上角x轴[必填]
  480. y: 480, //左上角y轴[必填]
  481. // backgroundColor: "#ffffff", //背景色
  482. maxWidth: "", //字体最大宽度
  483. maxHeight: "", //字体最大高度
  484. }
  485. ],
  486. qr: [ //渲染的二维码
  487. {
  488. url: "limeui.qcoon.cn", //二维码文字[必填]
  489. dx: 100, //左上角x轴[必填]
  490. dy: 380, //左上角y轴[必填]
  491. size: 71, //二维码大小
  492. color: "#333333", //二维码前景色
  493. backgroundColor: "#ffffff" //二维码背景色
  494. }
  495. ]
  496. },
  497. toView: "",
  498. imagea: false,
  499. list1: [{
  500. name: "商品",
  501. },
  502. {
  503. name: "评价",
  504. },
  505. {
  506. name: "详情",
  507. },
  508. ],
  509. goodinfoname: '',
  510. goodinfoyuan: '',
  511. current: 0,
  512. // 购物车
  513. show: false,
  514. //服务
  515. serve: false,
  516. //分享
  517. share: false,
  518. value: 1, //步进器的值
  519. swiptlist: [], //推荐列表
  520. actab: 0,
  521. id: "", //商品id
  522. language: "zh-CN",
  523. goodinfo: {}, //商品详情
  524. duration: 0, //tabs选项
  525. actidx: 0,
  526. subIndex: [],
  527. selectArr: [],
  528. shopcar: "",
  529. sku_info: {},
  530. commentlist: [],
  531. total: "",
  532. rate: 5,
  533. content: {},
  534. bao: '',
  535. picture2: ''
  536. };
  537. },
  538. computed: {
  539. i18n() {
  540. return this.$t("index");
  541. },
  542. },
  543. onLoad(options) {
  544. this.id = options.id;
  545. this.comment();
  546. },
  547. onShow() {
  548. if (uni.getStorageSync("language") != "") {
  549. this.language = uni.getStorageSync("language");
  550. }
  551. this.detail(this.id);
  552. this.recommend();
  553. this.guarantee()
  554. },
  555. mounted() {
  556. this.$refs.poster.canvasToTempFilePathSync({
  557. fileType: 'jpg',
  558. quality: 1,
  559. success: (res) => {
  560. console.log(`mounted`, res.tempFilePath)
  561. this.picture2 = res.tempFilePath
  562. console.log('picture2', this.picture2);
  563. }
  564. })
  565. },
  566. methods: {
  567. //保存到手机相册
  568. saveImage() {
  569. var that = this
  570. console.log('this.picture2.slice,-1)',this.picture2.slice(23));
  571. var fileManager = uni.getFileSystemManager();
  572. fileManager.writeFile({
  573. filePath: wx.env.USER_DATA_PATH + '/img.jpg', // 指定图片的临时路径
  574. data:this.picture2.slice(23), // 要写入的文本或二进制数据
  575. encoding: 'base64', // 指定写入文件的字符编码
  576. success: res => {
  577. console.log('写入文件成功', res)
  578. console.log(wx.env.USER_DATA_PATH + '/img.jpg')
  579. uni.saveImageToPhotosAlbum({ // 保存图片到相册
  580. filePath: wx.env.USER_DATA_PATH + '/img.jpg',
  581. success: function(res) {
  582. uni.showToast({
  583. title: '保存成功'
  584. })
  585. that.imagea = false
  586. },
  587. fail: function(err) {
  588. console.log('保存失败', err)
  589. that.imagea = false
  590. },
  591. })
  592. },
  593. file: err => {
  594. console.log('写入文件失败', err)
  595. }
  596. })
  597. },
  598. // 将页面转换成图片的方法
  599. copylink() {
  600. this.$u.toast(this.i18n.window)
  601. },
  602. openfu() {
  603. this.serve = true
  604. },
  605. returnindex() {
  606. uni.switchTab({
  607. url: '/pages/index/index'
  608. })
  609. },
  610. chat() {
  611. uni.navigateTo({
  612. url: '/pageA/chat/chat?user_other=' + encodeURIComponent(JSON.stringify(this.goodinfo
  613. .merchant)) + '&user_other_no=' + this.goodinfo.merchant.member
  614. .easemob_username
  615. })
  616. },
  617. sharea() {
  618. this.share = true
  619. },
  620. close() {
  621. this.show = false
  622. this.share = false
  623. this.serve = false
  624. },
  625. //评论页面
  626. tocomment() {
  627. uni.navigateTo({
  628. url: "/pageA/comment?id=" + this.goodinfo.merchant_goods_id,
  629. });
  630. },
  631. //关注
  632. fllow() {
  633. uni.$u.http
  634. .post("/api/interest/follow", {
  635. interest_type: 0,
  636. interest_id: this.goodinfo.merchant_goods_id,
  637. })
  638. .then((res) => {
  639. if (res == "ok1") {
  640. this.$u.toast("取关成功");
  641. this.detail(this.id);
  642. } else {
  643. this.$u.toast("关注成功");
  644. this.detail(this.id);
  645. }
  646. })
  647. .catch(() => {});
  648. },
  649. sele() {
  650. this.shopcar = 2;
  651. this.show = true;
  652. },
  653. //跳转到购物车
  654. shopping() {
  655. uni.switchTab({
  656. url: "/pages/cart/cart",
  657. });
  658. },
  659. //评论接口
  660. comment() {
  661. uni.$u.http
  662. .post("/api/goods/goods_comment", {
  663. merchant_goods_id: this.goodinfo.merchant_goods_id,
  664. page: 1,
  665. limit: 2,
  666. })
  667. .then((res) => {
  668. this.commentlist = res.data;
  669. this.total = res.total;
  670. })
  671. .catch(() => {});
  672. },
  673. //商品推荐
  674. recommend() {
  675. uni.$u.http
  676. .post("/api/goods/recommend", {
  677. keyword: "",
  678. })
  679. .then((res) => {
  680. this.swiptlist = res.reduce(
  681. (a, b) => {
  682. let lastIndex = a.length - 1;
  683. if (a[lastIndex].length < 3) {
  684. a[lastIndex].push(b);
  685. } else {
  686. a.push([b]);
  687. }
  688. return a;
  689. },
  690. [
  691. []
  692. ]
  693. );
  694. })
  695. .catch(() => {});
  696. },
  697. scrollToPosition(e) {
  698. var that = this
  699. this.current = e.index;
  700. console.log(this.current);
  701. this.$nextTick(() => {
  702. that.toView = "scroll" + e.index;
  703. console.log('view', that.toView);
  704. })
  705. },
  706. //逛逛
  707. goshop() {
  708. uni.navigateTo({
  709. url: "/pageD/homepage/homepage",
  710. });
  711. },
  712. detail(id) {
  713. uni.$u.http
  714. .get("/api/goods/detail/" + id)
  715. .then((res) => {
  716. console.log(res);
  717. this.goodinfo = res;
  718. this.goodinfoname = this.goodinfo.name_cn
  719. this.goodinfoyuan = this.goodinfo.is_discount == 0 ?
  720. this.goodinfo.discount_price :
  721. this.goodinfo.price
  722. console.log('goodinfo.discount_price', this.goodinfo.discount_price);
  723. this.comment();
  724. this.rate = res.merchant.score;
  725. })
  726. .catch(() => {});
  727. },
  728. //保障服务
  729. guarantee() {
  730. uni.$u.http
  731. .get("/api/agreement?code=guarantee_service")
  732. .then((res) => {
  733. console.log(res);
  734. this.content = res
  735. })
  736. .catch(() => {});
  737. },
  738. // scrollToPosition() {
  739. // console.log(111);
  740. // // 使用$refs获取目标位置的DOM元素
  741. // const targetElement = this.$refs.targetPosition;
  742. // // 调用scrollToView方法滚动到目标位置
  743. // this.$refs.scrollView.scrollToView('targetPosition');
  744. // },
  745. actabs(index, child, idx) {
  746. // this.actidx = index
  747. // this.actab = child
  748. console.log(this.selectArr);
  749. if (this.selectArr[index] != child) {
  750. this.$set(this.selectArr, index, child);
  751. this.$set(this.subIndex, index, idx);
  752. } else {
  753. this.$set(this.selectArr, index, "");
  754. this.$set(this.subIndex, index, -1); //去掉选中颜色
  755. }
  756. this.goodinfo.sku_item.forEach((ite) => {
  757. console.log(ite.item);
  758. console.log(this.selectArr.join(","));
  759. if (ite.item == this.selectArr.join(",")) {
  760. this.sku_info = ite;
  761. }
  762. });
  763. console.log(this.sku_info);
  764. },
  765. order() {
  766. if (this.sku_info.stock_total != 0) {
  767. uni.navigateTo({
  768. url: "/pageA/order?sku=" +
  769. encodeURIComponent(JSON.stringify(this.sku_info)) +
  770. "&value=" +
  771. this.value +
  772. "&goodinfo=" +
  773. encodeURIComponent(JSON.stringify(this.goodinfo)),
  774. });
  775. } else {
  776. this.$u.toast("库存为0");
  777. this.show = false;
  778. }
  779. // console.log(JSON.stringify(this.sku_info));
  780. },
  781. //生成图片弹窗
  782. builder() {
  783. this.imagea = true;
  784. this.share = false;
  785. },
  786. //加入购物车
  787. joincart() {
  788. this.show = false;
  789. if (this.sku_info.stock_total == 0) {
  790. this.$u.toast("添加失败,库存为0");
  791. } else {
  792. uni.$u.http
  793. .post("/api/cart/save", {
  794. goods_id: this.id, //63 是 String 商品id
  795. goods_num: this.value, //1 是 String 商品数量
  796. sku_item_id: this.sku_info.id, //38 是 String 规格详情id
  797. merchant_goods_id: this.goodinfo.merchant_goods_id, //38 是 String 团长商品id
  798. belong: this.goodinfo.source, //是 String 商品归属 0 团长 1 平台自营 2 团长发布或者分享的平台自营商品、 供应链商品
  799. share_merchant_id: "", //是 String 分享团长id
  800. })
  801. .then((res) => {
  802. this.$u.toast("添加成功");
  803. })
  804. .catch(() => {});
  805. }
  806. },
  807. valChange(e) {
  808. return e.value;
  809. },
  810. navigateBack() {
  811. uni.navigateBack();
  812. },
  813. join(index) {
  814. this.show = true;
  815. this.shopcar = index;
  816. },
  817. //通知
  818. inform() {
  819. uni.showToast({
  820. title: this.i18n.shelves,
  821. icon: "none",
  822. duration: 2000,
  823. });
  824. },
  825. //复制
  826. onLongPress(e) {
  827. // 获取长按的文本内容
  828. let text = e.target.innerText;
  829. console.log(e);
  830. // 执行复制操作
  831. uni.setClipboardData({
  832. data: text,
  833. success: () => {
  834. uni.showToast({
  835. title: this.i18n.Copiedpaste,
  836. duration: 2000,
  837. });
  838. },
  839. fail: () => {
  840. uni.showToast({
  841. title: this.i18n.Replicationfailure,
  842. icon: "none",
  843. duration: 2000,
  844. });
  845. },
  846. });
  847. },
  848. },
  849. };
  850. </script>
  851. <style lang="scss" scoped>
  852. .over {
  853. font-family: PingFangSC, PingFang SC;
  854. font-weight: 400;
  855. font-size: 26rpx;
  856. color: #222222;
  857. line-height: 36rpx;
  858. text-align: left;
  859. font-style: normal;
  860. text-overflow: ellipsis;
  861. overflow: hidden;
  862. -webkit-line-clamp: 2;
  863. height: 70rpx;
  864. display: -webkit-box;
  865. -webkit-box-orient: vertical;
  866. word-break: break-all;
  867. }
  868. .redback {
  869. background: rgba(255, 27, 0, 0.07);
  870. border-radius: 12rpx;
  871. padding: 6rpx 12rpx;
  872. box-sizing: border-box;
  873. font-family: HarmonyOS_Sans_Medium;
  874. font-size: 16rpx;
  875. color: #ff1515;
  876. line-height: 22rpx;
  877. text-align: left;
  878. font-style: normal;
  879. width: 150rpx;
  880. }
  881. .sku {
  882. font-family: PingFangSC, PingFang SC;
  883. font-weight: 400;
  884. font-size: 20rpx;
  885. color: #888888;
  886. line-height: 28rpx;
  887. text-align: left;
  888. font-style: normal;
  889. }
  890. .acttab {
  891. height: 68rpx;
  892. padding: 14rpx 30rpx;
  893. text-align: center;
  894. box-sizing: border-box;
  895. display: inline;
  896. background: rgba(248, 50, 36, 0.06);
  897. border-radius: 6rpx;
  898. border: 2rpx solid #f83224;
  899. font-family: PingFangSC, PingFang SC;
  900. font-weight: 400;
  901. font-size: 28rpx;
  902. color: #f83224;
  903. line-height: 40rpx;
  904. }
  905. .read {
  906. font-family: HarmonyOS_Sans_Medium;
  907. font-size: 26rpx;
  908. color: #f83224;
  909. line-height: 36rpx;
  910. text-align: left;
  911. font-style: normal;
  912. }
  913. // ::v-deep .u-popup__content{
  914. // background-color: rgba(0,0,0,0) !important;
  915. // }
  916. .money {
  917. font-family: HarmonyOS_Sans_Medium;
  918. font-size: 20rpx;
  919. color: #f83224;
  920. line-height: 26rpx;
  921. text-align: left;
  922. font-style: normal;
  923. }
  924. .title {
  925. font-family: PingFangSC, PingFang SC;
  926. font-weight: 400;
  927. font-size: 28rpx;
  928. color: #222222;
  929. line-height: 40rpx;
  930. text-align: left;
  931. font-style: normal;
  932. margin-top: 16rpx;
  933. width: 100%;
  934. overflow: hidden;
  935. text-overflow: ellipsis;
  936. word-break: break-all;
  937. -webkit-line-clamp: 2;
  938. display: -webkit-box;
  939. -webkit-box-orient: vertical;
  940. }
  941. .view {
  942. font-family: PingFangSC, PingFang SC;
  943. font-weight: 400;
  944. font-size: 20rpx;
  945. color: #777777;
  946. line-height: 28rpx;
  947. text-align: left;
  948. font-style: normal;
  949. margin-top: 12rpx;
  950. }
  951. .actabs {
  952. width: 116rpx;
  953. height: 68rpx;
  954. background: rgba(248, 50, 36, 0.06);
  955. border-radius: 6rpx;
  956. border: 2rpx solid #f83224;
  957. }
  958. .bottoma {
  959. width: 750rpx;
  960. height: 166rpx;
  961. background: #ffffff;
  962. padding: 16rpx 44rpx 0;
  963. position: fixed;
  964. bottom: 0;
  965. left: 0;
  966. .btn {
  967. width: 662rpx;
  968. height: 84rpx;
  969. background: #f83224;
  970. border-radius: 44rpx;
  971. font-family: PingFangSC, PingFang SC;
  972. font-weight: 500;
  973. font-size: 32rpx;
  974. color: #ffffff;
  975. line-height: 84rpx;
  976. text-align: center;
  977. font-style: normal;
  978. }
  979. }
  980. .title1 {
  981. font-family: PingFangSC, PingFang SC;
  982. font-weight: 550;
  983. font-size: 32rpx;
  984. color: #222222;
  985. line-height: 44rpx;
  986. text-align: left;
  987. font-style: normal;
  988. }
  989. .tabs {
  990. // width: 276rpx;
  991. height: 68rpx;
  992. padding: 14rpx 30rpx;
  993. text-align: center;
  994. background: #f4f4f4;
  995. border-radius: 6rpx;
  996. box-sizing: border-box;
  997. display: inline;
  998. font-size: 28rpx;
  999. border: 2rpx solid rgba(151, 151, 151, 0);
  1000. line-height: 40rpx;
  1001. // line-height: 68rpx;
  1002. }
  1003. .link {
  1004. font-family: PingFangSC, PingFang SC;
  1005. font-weight: 400;
  1006. font-size: 28rpx;
  1007. color: #555555;
  1008. line-height: 40rpx;
  1009. text-align: left;
  1010. font-style: normal;
  1011. margin-top: 16rpx;
  1012. }
  1013. .tongzhi {
  1014. width: 422rpx;
  1015. height: 76rpx;
  1016. background: #ffb515;
  1017. border-radius: 40rpx;
  1018. font-family: PingFangSC, PingFang SC;
  1019. font-weight: 500;
  1020. font-size: 28rpx;
  1021. color: #ffffff;
  1022. line-height: 76rpx;
  1023. text-align: center;
  1024. font-style: normal;
  1025. }
  1026. .info {
  1027. font-family: PingFangSC, PingFang SC;
  1028. font-weight: 400;
  1029. font-size: 20rpx;
  1030. color: #222222;
  1031. line-height: 28rpx;
  1032. text-align: left;
  1033. font-style: normal;
  1034. margin-top: 18rpx;
  1035. }
  1036. .button {
  1037. // width: 662rpx;
  1038. height: 88rpx;
  1039. background: #f83224;
  1040. border-radius: 44rpx;
  1041. margin-top: 24rpx;
  1042. font-family: PingFangSC, PingFang SC;
  1043. font-weight: 500;
  1044. font-size: 32rpx;
  1045. color: #ffffff;
  1046. line-height: 88rpx;
  1047. text-align: center;
  1048. font-style: normal;
  1049. }
  1050. .contenta {
  1051. width: 702rpx;
  1052. // height: 590rpx;
  1053. background: #ffffff;
  1054. border-radius: 20rpx;
  1055. margin-top: 26rpx;
  1056. padding: 28rpx 24rpx;
  1057. box-sizing: border-box;
  1058. .title {
  1059. font-family: PingFangSC, PingFang SC;
  1060. font-weight: 500;
  1061. font-size: 30rpx;
  1062. color: #222222;
  1063. line-height: 42rpx;
  1064. text-align: left;
  1065. font-style: normal;
  1066. }
  1067. .content {
  1068. font-family: PingFangSC, PingFang SC;
  1069. font-weight: 400;
  1070. font-size: 26rpx;
  1071. color: rgba(34, 34, 34, 0.5);
  1072. line-height: 36rpx;
  1073. text-align: left;
  1074. font-style: normal;
  1075. margin-top: 20rpx;
  1076. }
  1077. }
  1078. .back {
  1079. background-color: #f4f4f4;
  1080. padding: 20rpx;
  1081. box-sizing: border-box;
  1082. .guige {}
  1083. .fix {
  1084. width: 750rpx;
  1085. height: 158rpx;
  1086. background: #ffffff;
  1087. padding: 14rpx 28rpx;
  1088. box-sizing: border-box;
  1089. position: fixed;
  1090. bottom: 0;
  1091. left: 0;
  1092. .ke {
  1093. font-family: PingFangSC, PingFang SC;
  1094. font-weight: 400;
  1095. font-size: 20rpx;
  1096. color: #333333;
  1097. line-height: 28rpx;
  1098. text-align: left;
  1099. font-style: normal;
  1100. }
  1101. .join {
  1102. width: 208rpx;
  1103. height: 76rpx;
  1104. border-radius: 40rpx;
  1105. border: 1rpx solid #ff1515;
  1106. font-family: PingFangSC, PingFang SC;
  1107. font-weight: 500;
  1108. font-size: 28rpx;
  1109. color: #f83224;
  1110. line-height: 76rpx;
  1111. text-align: left;
  1112. font-style: normal;
  1113. text-align: center;
  1114. }
  1115. .pin {
  1116. width: 208rpx;
  1117. height: 76rpx;
  1118. background: #f83224;
  1119. border-radius: 40rpx;
  1120. font-family: PingFangSC, PingFang SC;
  1121. font-weight: 500;
  1122. font-size: 28rpx;
  1123. color: #ffffff;
  1124. line-height: 76rpx;
  1125. text-align: center;
  1126. font-style: normal;
  1127. }
  1128. }
  1129. // 规格
  1130. .specification {
  1131. width: 670rpx;
  1132. // height: 280rpx;
  1133. background: #f4f4f4;
  1134. padding: 24rpx 22rpx;
  1135. box-sizing: border-box;
  1136. view:last-of-type {
  1137. margin-bottom: 0rpx !important;
  1138. }
  1139. .item {
  1140. font-family: PingFangSC, PingFang SC;
  1141. font-weight: 400;
  1142. font-size: 26rpx;
  1143. color: #333333;
  1144. line-height: 36rpx;
  1145. text-align: left;
  1146. font-style: normal;
  1147. }
  1148. }
  1149. // 推荐
  1150. .recommend {
  1151. width: 710rpx;
  1152. // height: 476rpx;
  1153. background: #ffffff;
  1154. border-radius: 16rpx;
  1155. padding: 24rpx 20rpx;
  1156. margin-top: 20rpx;
  1157. box-sizing: border-box;
  1158. .title {
  1159. font-family: PingFangSC, PingFang SC;
  1160. font-weight: 550;
  1161. font-size: 28rpx;
  1162. color: #222222;
  1163. line-height: 40rpx;
  1164. text-align: left;
  1165. font-style: normal;
  1166. }
  1167. }
  1168. //店铺
  1169. .store {
  1170. width: 710rpx;
  1171. height: 160rpx;
  1172. background: #ffffff;
  1173. border-radius: 16rpx;
  1174. padding: 24rpx 20rpx;
  1175. box-sizing: border-box;
  1176. margin-top: 20rpx;
  1177. .line {
  1178. background: rgba(151, 151, 151, 1);
  1179. width: 4rpx;
  1180. height: 20rpx;
  1181. margin: 0 18rpx;
  1182. }
  1183. .num {
  1184. font-family: SFPro, SFPro;
  1185. font-weight: 400;
  1186. font-size: 20rpx;
  1187. color: #777777;
  1188. line-height: 24rpx;
  1189. text-align: left;
  1190. font-style: normal;
  1191. }
  1192. .goshop {
  1193. // width: 108rpx;
  1194. height: 52rpx;
  1195. border-radius: 26rpx;
  1196. border: 1rpx solid #ff1515;
  1197. font-family: PingFangSC, PingFang SC;
  1198. font-weight: 400;
  1199. font-size: 24rpx;
  1200. color: #f83224;
  1201. line-height: 52rpx;
  1202. text-align: center;
  1203. font-style: normal;
  1204. padding: 0 20rpx;
  1205. box-sizing: border-box;
  1206. }
  1207. }
  1208. // 评论
  1209. .comment {
  1210. width: 710rpx;
  1211. // height: 356rpx;
  1212. background: #ffffff;
  1213. border-radius: 16rpx;
  1214. margin-top: 20rpx;
  1215. padding: 24rpx 20rpx;
  1216. box-sizing: border-box;
  1217. .content {
  1218. margin-top: 20rpx;
  1219. font-family: PingFangSC, PingFang SC;
  1220. font-weight: 400;
  1221. font-size: 26rpx;
  1222. color: #444444;
  1223. line-height: 36rpx;
  1224. text-align: left;
  1225. font-style: normal;
  1226. max-height: 112rpx;
  1227. overflow: hidden;
  1228. text-overflow: ellipsis;
  1229. white-space: wrap;
  1230. -webkit-line-clamp: 3;
  1231. word-break: break-all;
  1232. }
  1233. .name {
  1234. font-family: PingFangSC, PingFang SC;
  1235. font-weight: 400;
  1236. font-size: 24rpx;
  1237. color: #222222;
  1238. line-height: 34rpx;
  1239. text-align: left;
  1240. font-style: normal;
  1241. margin-left: 16rpx;
  1242. }
  1243. .ping {
  1244. font-family: PingFangSC, PingFang SC;
  1245. font-weight: 500;
  1246. font-size: 28rpx;
  1247. color: #222222;
  1248. line-height: 40rpx;
  1249. text-align: left;
  1250. font-style: normal;
  1251. }
  1252. .strip {
  1253. font-family: PingFangSC, PingFang SC;
  1254. font-weight: 400;
  1255. font-size: 24rpx;
  1256. color: #444444;
  1257. line-height: 34rpx;
  1258. text-align: left;
  1259. font-style: normal;
  1260. }
  1261. }
  1262. //服务
  1263. .serve {
  1264. width: 710rpx;
  1265. height: 180rpx;
  1266. background: #ffffff;
  1267. border-radius: 16rpx;
  1268. padding: 32rpx 20rpx;
  1269. box-sizing: border-box;
  1270. .top {
  1271. .change {
  1272. font-family: PingFangSC, PingFang SC;
  1273. font-weight: 400;
  1274. font-size: 28rpx;
  1275. color: #666666;
  1276. line-height: 40rpx;
  1277. text-align: left;
  1278. font-style: normal;
  1279. }
  1280. }
  1281. }
  1282. //折扣
  1283. .discount {
  1284. position: relative;
  1285. height: 312rpx;
  1286. .top {
  1287. width: 710rpx;
  1288. height: 124rpx;
  1289. background: linear-gradient(295deg, #fb6662 0%, #fd403b 100%);
  1290. border-radius: 16rpx 16rpx 0 0;
  1291. padding: 20rpx;
  1292. box-sizing: border-box;
  1293. line-height: 98rpx;
  1294. .count {
  1295. font-family: PingFangSC, PingFang SC;
  1296. font-weight: 400;
  1297. font-size: 20rpx;
  1298. color: #ffffff;
  1299. text-align: left;
  1300. font-style: normal;
  1301. }
  1302. .money {
  1303. font-size: 20rpx;
  1304. font-family: HarmonyOS_Sans_Medium;
  1305. font-size: 20rpx;
  1306. color: #ffffff;
  1307. text-align: left;
  1308. font-style: normal;
  1309. margin-left: 8rpx;
  1310. }
  1311. .right {
  1312. font-family: HarmonyOS_Sans;
  1313. font-size: 24rpx;
  1314. color: #ffffff;
  1315. text-align: left;
  1316. font-style: normal;
  1317. text-decoration-line: line-through;
  1318. margin-left: 16rpx;
  1319. }
  1320. }
  1321. .bottom {
  1322. width: 710rpx;
  1323. height: 208rpx;
  1324. background: #ffffff;
  1325. border-radius: 16rpx;
  1326. position: absolute;
  1327. top: 104rpx;
  1328. z-index: 2;
  1329. padding: 28rpx 20rpx;
  1330. box-sizing: border-box;
  1331. .title {
  1332. margin-top: 24rpx;
  1333. font-family: PingFangSC, PingFang SC;
  1334. font-weight: 550;
  1335. font-size: 32rpx;
  1336. color: #222222;
  1337. line-height: 44rpx;
  1338. text-align: left;
  1339. font-style: normal;
  1340. }
  1341. }
  1342. .tabs {
  1343. // width: 104rpx;
  1344. height: 40rpx;
  1345. background: rgba(255, 21, 21, 0.1);
  1346. border-radius: 4rpx;
  1347. padding: 4rpx 8rpx;
  1348. font-family: PingFangSC, PingFang SC;
  1349. font-weight: 400;
  1350. font-size: 22rpx;
  1351. color: #ff1515;
  1352. line-height: 40rpx;
  1353. text-align: center;
  1354. font-style: normal;
  1355. }
  1356. }
  1357. }
  1358. // 轮播图
  1359. .uni-margin-wrap {
  1360. width: 750rpx;
  1361. width: 100%;
  1362. .swiper {
  1363. height: 750rpx;
  1364. }
  1365. .swiper-item {
  1366. display: block;
  1367. height: 300rpx;
  1368. line-height: 300rpx;
  1369. text-align: center;
  1370. }
  1371. .swiper-list {
  1372. margin-top: 40rpx;
  1373. margin-bottom: 0;
  1374. }
  1375. .uni-common-mt {
  1376. margin-top: 60rpx;
  1377. position: relative;
  1378. }
  1379. .info {
  1380. position: absolute;
  1381. right: 20rpx;
  1382. }
  1383. .uni-padding-wrap {
  1384. width: 550rpx;
  1385. padding: 0 100rpx;
  1386. }
  1387. }
  1388. ::v-deep .u-popup__content data-v-17becaea {
  1389. align-items: center !important;
  1390. }
  1391. </style>