productdetails.vue 40 KB

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