productdetails.vue 44 KB

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