productDetails.vue 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108
  1. <template>
  2. <view class="content">
  3. <view class="share-box centerV ">
  4. <image class="w48 h48 " src="/static/images/weixin.png" mode=""></image>
  5. <text class="color-text mt8 weight-500 fs20">微信分享</text>
  6. <button class="share" data-name="shareBtn" open-type="share"></button>
  7. </view>
  8. <!-- 商品轮播图片 -->
  9. <view class="shop-banner" @click="showImg()">
  10. <swiper
  11. class="swiper"
  12. :indicator-dots="false"
  13. :circular="true"
  14. :autoplay="true"
  15. :interval="3000"
  16. :duration="1000"
  17. indicator-color="rgba(255, 255, 255, 0.6)"
  18. indicator-active-color="#ffffff"
  19. @change="swiperChange">
  20. <swiper-item class="swiper-item" v-for="(item,index) in banner" :key="index">
  21. <image :src="item" mode="aspectFill"></image>
  22. <view class="cf-box" v-if="product.productType==2">
  23. <view class="title">处方药</view>
  24. <view class="subTitle">请在医师指导下使用</view>
  25. </view>
  26. </swiper-item>
  27. </swiper>
  28. <!-- 底部遮罩 -->
  29. <view class="banner-mask"></view>
  30. <!-- 数量 -->
  31. <view class="num-box"><text class="weight-500">{{ activeBanner }}</text>/{{ banner.length }}</view>
  32. </view>
  33. <!-- 详细信息 -->
  34. <view class="det-info">
  35. <view class="price-box">
  36. <view class="price">
  37. <text class="label">会员价</text>
  38. <text class="unit">¥</text>
  39. <text class="num" >{{product.price}}</text>
  40. <text class="fs24 color-text2">零售价</text>
  41. <text class="old" >¥{{product.otPrice}}</text>
  42. </view>
  43. <!-- <view class="share-box">
  44. <text class="text">分享</text>
  45. <image src="../../static/images/share1.png" mode=""></image>
  46. <button class="share" data-name="shareBtn" open-type="share">分享</button>
  47. </view> -->
  48. <text class="fs24 color-text2">月售{{product.sales}}件</text>
  49. </view>
  50. <view class="name-box">
  51. <view class="tag">{{utils.getDictLabelName("storeProductType",product.productType)}}</view>{{product.productName}}
  52. </view>
  53. <view class="intro" v-if="product.productInfo!=null" v-html="product.productInfo.replace(/\n/g,'<br>')">
  54. </view>
  55. <!-- <view class="intro-box">
  56. <text class="title-1">药品说明</text>
  57. <view class="line"></view>
  58. <view class="intro-text">
  59. <text class="title-2">药品说明:</text>
  60. <view class="intro-content ellipsis2" v-if="product.productInfo!=null" v-html="product.productInfo.replace(/\n/g,'<br>')">
  61. </view>
  62. </view>
  63. <view class="line"></view>
  64. <view class="intro-text">
  65. <text class="title-2">常见用法:</text>
  66. <view class="intro-content ellipsis2" v-if="product.productInfo!=null" v-html="product.productInfo.replace(/\n/g,'<br>')">
  67. </view>
  68. </view>
  69. <view class="line"></view>
  70. <view class="intro-text2">
  71. <text class="title-2">贮藏:</text>
  72. <view class="intro-content ellipsis2" v-if="product.productInfo!=null" v-html="product.productInfo.replace(/\n/g,'<br>')">
  73. </view>
  74. </view>
  75. </view> -->
  76. <!-- <view class="safe-box">
  77. <image src="../../static/images/safe.png" mode=""></image>
  78. <text class="text">免邮发货</text>
  79. <view class="line"></view>
  80. <text class="text">药师服务</text>
  81. <view class="line"></view>
  82. <text class="text">隐私保护</text>
  83. </view> -->
  84. </view>
  85. <view class="guige">
  86. <!-- <view class="guige-gg">
  87. <text class="gg-text">规格</text>
  88. <text class="gg-text2">{{productAttr.attrValues||'-'}}</text>
  89. </view> -->
  90. <view class="safe-box">
  91. <text class="text">服务</text>
  92. <view class="box">
  93. <view>
  94. <image src="../../static/images/service_icon14.png" mode=""></image>
  95. <text>免邮发货</text>
  96. </view>
  97. <view>
  98. <image src="../../static/images/service_icon14.png" mode=""></image>
  99. <text>药师服务</text>
  100. </view>
  101. <view>
  102. <image src="../../static/images/service_icon14.png" mode=""></image>
  103. <text>隐私保护</text>
  104. </view>
  105. <view @click="openEditMoney()">
  106. <image class='w48 h48' src="/static/images/right.png"></image>
  107. </view>
  108. </view>
  109. </view>
  110. <view class="popup-box" v-if="editShow">
  111. <view class="info-mask" @tap="cancelEditMoney()" ></view>
  112. <view class="info-form">
  113. <view class="top">
  114. <view class="title">服务</view>
  115. <view class="close" @click="cancelEditMoney()">
  116. <image class='w48 h48' src="../../static/images/close_icon24.png" mode=""></image>
  117. </view>
  118. </view>
  119. <view class="line"></view>
  120. <view class="form-box">
  121. <view class="form-item2">
  122. <view class="form-item-box">
  123. <image class='w28 h28' src="../../static/images/service_icon14.png" mode=""></image>
  124. <text>免邮发货</text>
  125. </view>
  126. <view class="form-content">
  127. 订单支付成功后48小时内发货,若未在48小时内发货,平台审核后消费者将会收到至少3元无门槛红包(特殊商品及不可抗力因素除外)
  128. </view>
  129. </view>
  130. <view class="form-item2">
  131. <view class="form-item-box">
  132. <image class='w28 h28' src="../../static/images/service_icon14.png" mode=""></image>
  133. <text>药师服务</text>
  134. </view>
  135. <view class="form-content">
  136. 用药关怀认证药师,24小时专业用药咨询
  137. </view>
  138. </view>
  139. <view class="form-item2">
  140. <view class="form-item-box">
  141. <image class='w28 h28' src="../../static/images/service_icon14.png" mode=""></image>
  142. <text>隐私保护</text>
  143. </view>
  144. <view class="form-content">
  145. 除患者本人或其授权的代理人外,其他人员未经允许不得随意查阅患者的医疗记录
  146. </view>
  147. </view>
  148. </view>
  149. <view class="btns">
  150. <view class="sub-btn" @click="cancelEditMoney()">确定</view>
  151. </view>
  152. </view>
  153. </view>
  154. </view>
  155. <!-- 购买人数、库存 -->
  156. <!-- <view class="inventor">
  157. <view class="left">
  158. <view class="head-box">
  159. <view class="head" v-for="(item,j) in 5" :key="j">
  160. <image src="../../static/images/head.jpg" mode=""></image>
  161. </view>
  162. </view>
  163. <view class="num-box">
  164. 已有 <text class="text">{{product.sales}}</text> 人购买
  165. </view>
  166. </view>
  167. <view class="right">
  168. 库存 <text class="text">{{product.stock}}{{product.unitName}}</text>
  169. </view>
  170. <view class="right">
  171. <text class="text">库存{{product.stock>0?'充足':'售罄'}} </text>
  172. </view>
  173. </view>
  174. -->
  175. <!-- 功效 -->
  176. <!-- <view class="effect">
  177. <view class="label">药品说明书</view>
  178. <view class="label">查看</view>
  179. </view> -->
  180. <view class="shop x-bc" v-if="storeSelectInfo.storeId">
  181. <view class="x-bc" style="flex: 1;overflow: hidden;">
  182. <view class="logo">
  183. <image :src="storeSelectInfo.logoUrl" mode="aspectFill"></image>
  184. </view>
  185. <view class="txtBox y-b">
  186. <view class="name">{{storeSelectInfo.storeName}}</view>
  187. <view class="desc">24小时营业 · 月售{{utils.formatSalesNum(storeSelectInfo.salesCount) }} · 支持预订</view>
  188. </view>
  189. </view>
  190. <button class="goShop" @click="navgetTo('/pages_shopping/store/index?storeId='+productValueSelect.storeId)">进店</button>
  191. </view>
  192. <!-- 图文详情 -->
  193. <view class="det-box">
  194. <view class="title">药品详情</view>
  195. <!-- <view class="det-title">
  196. <view class="tt">说明书</view>
  197. <view class="det-right">
  198. <text>查看详情</text>
  199. <image class='w48 h48' src="/static/images/right.png"></image>
  200. </view>
  201. </view> -->
  202. <!-- <view class="det-table">
  203. <view class="row">
  204. <text class="cell cell-1">通用名称</text>
  205. <text class="cell cell-2">云南白药气雾剂</text>
  206. </view>
  207. <view class="row">
  208. <text class="cell cell-1">成份</text>
  209. <text class="cell cell-2">国家保密方,本品含草乌(制)、雪上一枝蒿(制),其余成份略。</text>
  210. </view>
  211. <view class="row">
  212. <text class="cell cell-1">性状</text>
  213. <text class="cell cell-2">云南白药气雾剂为非定量阀门气雾剂,在耐压容器中的药液为淡黄...</text>
  214. </view>
  215. </view> -->
  216. <!-- <view class="det-table">
  217. <uni-table border stripe emptyText="暂无更多数据" >
  218. <uni-tr>
  219. <uni-th align="center">通用名称</uni-th>
  220. <uni-th align="center">成份</uni-th>
  221. <uni-th align="left">性状</uni-th>
  222. </uni-tr>
  223. <uni-tr>
  224. <uni-td>云南白药气雾剂</uni-td>
  225. <uni-td>国家保密方,本品含草乌(制)、雪上一枝蒿(制),其余成份略。</uni-td>
  226. <uni-td>云南白药气雾剂为非定量阀门气雾剂,在耐压容器中的药液为淡黄...</uni-td>
  227. </uni-tr>
  228. </uni-table>
  229. </view> -->
  230. <view class="inner">
  231. <view v-html="product.description" style="font-size:0"></view>
  232. </view>
  233. </view>
  234. <!-- 底部按钮 -->
  235. <view class="btn-foot">
  236. <view class="menu-box">
  237. <view class="item" @click="goHome">
  238. <image src="../../static/images/tab_home_icon24.png" mode=""></image>
  239. <text class="label">首页</text>
  240. </view>
  241. <view class="item" style="position: relative;">
  242. <image src="../../static/images/customer_service_icon24.png" mode=""></image>
  243. <text class="label">咨询</text>
  244. <button class="contact-btn" open-type="contact"></button>
  245. </view>
  246. <view class="item" @click="navgetTo('./cart')">
  247. <uni-badge size="small" :text="cartCount" absolute="rightTop" type="error">
  248. <image src="../../static/images/shopping_car_icon20.png" mode=""></image>
  249. </uni-badge>
  250. <text class="label">购物车</text>
  251. </view>
  252. </view>
  253. <view class="btn-box">
  254. <view class="btn cart" @click="addCart('cart')">加入购物车</view>
  255. <view class="btn buy" @click="addCart('buy')">{{buyText}}</view>
  256. </view>
  257. </view>
  258. <!-- 选择药品规格弹窗 -->
  259. <popupBottom ref="popup" :visible.sync="specVisible" title=" " radius="32" maxHeight="1024">
  260. <view class="product-spec">
  261. <!-- 商品信息 -->
  262. <view class="pro-info">
  263. <view class="img-box" @click="showImg(productValueSelect.image)">
  264. <image :src="productValueSelect.image==null||productValueSelect.image==''?product.image:productValueSelect.image" mode="aspectFill"></image>
  265. </view>
  266. <view class="info-text">
  267. <view class="info-title">{{product.productName}}</view>
  268. <view class="price">
  269. <view class="label">会员价</view>
  270. <text class="unit">¥</text>
  271. <text class="num">{{ productValueSelect.price ? productValueSelect.price.toFixed(2) : '0.00' }}</text>
  272. </view>
  273. <view class="desc-box">
  274. <text class="text">月售{{product.sales}}件</text>
  275. </view>
  276. </view>
  277. </view>
  278. <!-- <view class="pro-info">
  279. <view class="img-box" @click="showImg(productValueSelect.image)">
  280. <image :src="productValueSelect.image==null||productValueSelect.image==''?product.image:productValueSelect.image" mode="aspectFill"></image>
  281. </view>
  282. <view class="info-text">
  283. <view class="price">
  284. <text class="unit">¥</text>
  285. <text class="num">{{ productValueSelect.price ? productValueSelect.price.toFixed(2) : '0.00' }}</text>
  286. </view>
  287. <view class="desc-box">
  288. <text class="text" v-if="showServiceFee">服务费:¥{{ productValueSelect.serviceFee ? productValueSelect.serviceFee.toFixed(2) : '0.00' }}</text>
  289. <text class="text">已选:{{ productValueSelect.sku }}</text>
  290. <text class="text">库存:{{ productValueSelect.stock }}</text>
  291. </view>
  292. </view>
  293. </view> -->
  294. <!-- 健康师 -->
  295. <!-- <view class="tech-pBox" style="margin-top: 20rpx;">
  296. <view class="label">选择健康管理师</view>
  297. <view
  298. v-for="(item,index) in storePriceList.slice(0,2)"
  299. :key="index"
  300. :class="productValueSelect.storeId == item.storeId ? 'item hover':'item'"
  301. @click="storeChange(item,index)"
  302. >
  303. <image mode="aspectFill" :src="productValueSelect.image==null||productValueSelect.image==''?product.image:productValueSelect.image"></image>
  304. <view class="tech-right">
  305. <view class="tech-right-top">
  306. <text class="title-1">秦宇</text>
  307. <text class="title-2">健康管理师/执业药师</text>
  308. </view>
  309. <view class="tech-right-bottom">{{item.storeName}}</view>
  310. </view>
  311. </view>
  312. </view> -->
  313. <!-- 门店 -->
  314. <!-- <view class="spec-box form-item" v-if="stores.length>0">
  315. <text class="label">所属门店</text>
  316. <picker class="birth-picker" mode="selector" :value="storeIdx" :range="storeNames" @change="pickerChange" @columnchange="pickerColumnchange">
  317. <view class="right-box">
  318. <view class="input-box">
  319. <input type="text" v-model="storeName" placeholder="请选择门店" class="form-input" disabled="disabled" />
  320. </view>
  321. <image class="arrow" src="../../static/images/arrow_gray.png" mode=""></image>
  322. </view>
  323. </picker>
  324. </view> -->
  325. <view class="shop-pBox" style="margin-top: 20rpx;" v-if="storePriceList&&storePriceList.length>0">
  326. <view
  327. v-for="(item,index) in storePriceList.slice(0,3)"
  328. :key="index"
  329. :class="productValueSelect.storeId == item.storeId ? 'item hover':'item'"
  330. @click="storeChange(item,index)"
  331. >
  332. <view class="top x-bc">
  333. <view class="price"><b>¥</b>{{ item.price.toFixed(2) }}</view>
  334. <view class="num">销售{{utils.formatSalesNum(item.sales) }}</view>
  335. </view>
  336. <view class="bot x-bc shop-pBox-name">
  337. <view class="name">{{item.storeName}}</view>
  338. <view @click.stop="navgetTo('/pages_shopping/store/index?storeId='+item.storeId)">
  339. <u-icon name="arrow-right" color="#000" size="14"></u-icon>
  340. </view>
  341. </view>
  342. </view>
  343. <view class="shop-morebtn" @click="openStorePicker" v-show="storePriceList.length > 3">
  344. <view>查看全部</view>
  345. <view v-show="storeIdx > 2">
  346. <text>已选</text>
  347. <text style="margin: 0 10rpx;">{{storeSelectInfo.storeName}}</text>
  348. <text>¥{{productValueSelect.price.toFixed(2)}}</text>
  349. </view>
  350. </view>
  351. </view>
  352. <!-- 店铺弹窗 -->
  353. <u-popup :show="showStorePicker" :round="16" mode="bottom">
  354. <view class="storepopup">
  355. <view class="storepopup-title">
  356. 选择店铺
  357. <image class="close-icon" src="@/static/images/close40.png" mode="widthFix" @click="closeStorePicker"></image></view>
  358. <scroll-view class="shop-pBox storepopup-box" scroll-y="true">
  359. <view
  360. v-for="(item,index) in storePriceList"
  361. :key="index"
  362. :class="productValueSelect.storeId == item.storeId ? 'item hover':'item'"
  363. @click="pickerStore(item,index)"
  364. >
  365. <view class="top x-bc">
  366. <view class="price"><b>¥</b>{{ item.price.toFixed(2) }}</view>
  367. <view class="num">销售{{utils.formatSalesNum(item.sales) }}</view>
  368. </view>
  369. <view class="bot x-bc shop-pBox-name">
  370. <view class="name">{{item.storeName}}</view>
  371. <u-icon name="arrow-right" color="#000" size="14" @click.native.stop="navgetTo('/pages_shopping/store/index?storeId='+item.storeId)"></u-icon>
  372. </view>
  373. </view>
  374. </scroll-view>
  375. </view>
  376. </u-popup>
  377. <!-- 规格 -->
  378. <view class="spec-box">
  379. <view v-for="(item,index) in attrs">
  380. <view class="title">{{item.attrName}}</view>
  381. <view class="spec-list">
  382. <view
  383. v-for="(subItem,subindex) in item.values"
  384. :key="subindex"
  385. :class="subindex==item.index?'item active':'item'"
  386. @click="choseSpec(index,subindex)">
  387. {{ subItem }}
  388. </view>
  389. </view>
  390. </view>
  391. </view>
  392. <!-- 数量 -->
  393. <view class="price-num">
  394. <view class="label">数量</view>
  395. <view class="num-box">
  396. <view class="img-box" @click="lessNum()">
  397. <image v-if="specNum <= 1" src="../../static/images/jian.png" mode=""></image>
  398. <image v-else src="../../static/images/jian2.png" mode=""></image>
  399. </view>
  400. <input type="number" @change="changeNum" v-model="specNum" />
  401. <view class="img-box" @click="addNum()">
  402. <image src="../../static/images/add.png" mode=""></image>
  403. </view>
  404. </view>
  405. </view>
  406. <view class="sub-btn" @click="submit">确定</view>
  407. </view>
  408. </popupBottom>
  409. <view class="loadding" v-if="loadding==true">
  410. <image src="../..https://user.test.ylrztop.com/images/logo.png"></image>
  411. <text class="text">加载中...</text>
  412. </view>
  413. <u-modal :show="showModal" title="温馨提示" content="处方药须凭处方在药师指导下购买和使用" @confirm="hideModal()"></u-modal>
  414. </view>
  415. </template>
  416. <script>
  417. import {getDicts} from '@/api/index'
  418. import {getProductDetails,getProductStoreStock,getCartCount,addCart} from '@/api/product'
  419. import {getProductConfig} from '@/api/common'
  420. import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
  421. export default {
  422. components: {
  423. item:{},
  424. popupBottom
  425. },
  426. data() {
  427. return {
  428. editShow:false,
  429. loadding:true,
  430. buyText:"立即购买",
  431. // mTitle:"温馨提示",
  432. // mContent:"处方药须凭处方在药师指导下购买和使用",
  433. type:null,
  434. productValueSelect:{
  435. price:0,
  436. serviceFee:0
  437. },
  438. banner:[],
  439. productId:null,
  440. attrs:[],
  441. values:[],
  442. stores:[],
  443. storeId:null,
  444. storeNames:[],
  445. storeIdx:0,
  446. storeName:"",
  447. product:{
  448. price:0,
  449. otPrice:0,
  450. },
  451. showModal:false,
  452. // 当前轮播的图片
  453. activeBanner: 1,
  454. // 购物车数量
  455. cartCount: 0,
  456. // 规格弹窗
  457. specVisible: false,
  458. // 规格数量
  459. specNum: 1,
  460. config:null,
  461. showServiceFee:false,
  462. selectVal:"",
  463. // 链接带的storeId
  464. urlStoreId: undefined,
  465. showStorePicker: false,
  466. // 所选规格门店店铺价格
  467. storePriceList: [],
  468. // 所选店铺
  469. storeSelectInfo: {},
  470. // 保存选的规格
  471. choseSpecSubIndex: 0,
  472. choseSpecIndex: 0,
  473. };
  474. },
  475. onLoad(options) {
  476. this.urlStoreId = options.storeId || undefined
  477. if(options.userId!=null){
  478. uni.setStorageSync('tuiUserId',options.userId);
  479. }
  480. else if (options.hasOwnProperty('q') && options.q) {
  481. // 通过下面这步解码,可以拿到url的值
  482. const url = decodeURIComponent(options.q)
  483. this.url=url;
  484. // // 对url中携带的参数提取处理
  485. const obj = this.utils.urlToObj(url)
  486. uni.setStorageSync('tuiUserId',obj.userId);
  487. }
  488. uni.showShareMenu({
  489. withShareTicket:true,
  490. //小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
  491. menus:["shareAppMessage","shareTimeline"] //不设置默认发送给朋友
  492. })
  493. this.getDicts();
  494. this.productId = options.productId;
  495. if(this.utils.checkToken()){
  496. this.getCartCount();
  497. }
  498. // this.getProductConfig();
  499. },
  500. onShow() {
  501. this.getProductDetails();
  502. // this.getStoreList();
  503. },
  504. //发送给朋友
  505. onShareAppMessage(res) {
  506. if(this.utils.isLogin()){
  507. var user=JSON.parse( uni.getStorageSync('userInfo'))
  508. return {
  509. title: this.product.productName,
  510. path: '/pages/shopping/productDetails?productId='+this.product.productId+"&userId="+user.userId,
  511. imageUrl: 'https://user.test.ylrztop.com/images/logo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  512. }
  513. }
  514. },
  515. //分享到朋友圈
  516. onShareTimeline(res) {
  517. if(this.utils.isLogin()){
  518. var user=JSON.parse( uni.getStorageSync('userInfo'))
  519. return {
  520. title: this.product.productName,
  521. query:'productId='+this.product.productId+"&userId="+user.userId,//页面参数
  522. imageUrl: 'https://user.test.ylrztop.com/images/logo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  523. }
  524. }
  525. },
  526. methods: {
  527. getDicts:function(){
  528. getDicts().then(
  529. res => {
  530. if(res.code==200){
  531. uni.setStorageSync('dicts',JSON.stringify(res));
  532. }
  533. },
  534. rej => {}
  535. );
  536. },
  537. getStoreList(){
  538. getStoreList().then(
  539. res => {
  540. if(res.code==200){
  541. // uni.setStorageSync('dicts',JSON.stringify(res));
  542. }
  543. },
  544. rej => {}
  545. );
  546. },
  547. showImg(img) {
  548. if(img!=null){
  549. var imgs=[];
  550. imgs.push(img)
  551. //预览图片
  552. uni.previewImage({
  553. urls: imgs,
  554. current: imgs[0]
  555. });
  556. }
  557. else{
  558. //预览图片
  559. uni.previewImage({
  560. urls: this.banner,
  561. current: this.banner[0]
  562. });
  563. }
  564. },
  565. //服务弹窗
  566. openEditMoney(){
  567. this.editShow = true
  568. },
  569. cancelEditMoney(){
  570. this.editShow = false
  571. },
  572. doAddCart(type){
  573. if(this.specNum==0){
  574. uni.showToast({
  575. icon:'none',
  576. title: "库存不足",
  577. });
  578. return;
  579. }
  580. var isBuy=type=="buy"?1:0;
  581. console.log(this.productValueSelect,'ppp')
  582. let data = {isBuy:isBuy,cartNum:this.specNum,productId:this.productValueSelect.productId,attrValueId:this.productValueSelect.id};
  583. addCart(data).then(
  584. res => {
  585. if(res.code==200){
  586. if(type=="buy"){
  587. const selectCarts = [{
  588. storeId: this.storeId,
  589. data: {
  590. type: this.type,
  591. cartIds: res.id,
  592. }
  593. }]
  594. uni.navigateTo({
  595. url: '/pages/shopping/confirmOrder?type='+this.type+'&orderType='+this.orderType + '&confirmParam='+ encodeURIComponent(JSON.stringify(selectCarts))
  596. })
  597. // uni.navigateTo({
  598. // url: '/pages/shopping/confirmOrder?type='+this.type+"&cartIds="+res.id+"&orderType="+this.orderType+"&storeId="+this.storeId
  599. // })
  600. }
  601. else
  602. {
  603. this.getCartCount()
  604. uni.showToast({
  605. icon:'success',
  606. title: "添加成功",
  607. });
  608. }
  609. }else{
  610. uni.showToast({
  611. icon:'none',
  612. title: res.msg,
  613. });
  614. this.getProductDetails()
  615. }
  616. },
  617. rej => {}
  618. );
  619. },
  620. getCartCount(){
  621. let data = {productId:this.productId};
  622. getCartCount(data).then(
  623. cartRes => {
  624. if(cartRes.code==200){
  625. this.cartCount=cartRes.data;
  626. }
  627. },
  628. rej => {}
  629. );
  630. },
  631. // swiper变化事件
  632. swiperChange(event) {
  633. this.activeBanner = event.detail.current + 1
  634. },
  635. // 回到首页
  636. goHome() {
  637. uni.switchTab({
  638. url: '/pages/home/index'
  639. })
  640. },
  641. // 跳转页面
  642. navgetTo(url) {
  643. console.log("跳转")
  644. this.utils.isLogin().then(res => {
  645. if(res){
  646. uni.navigateTo({
  647. url: url
  648. })
  649. }
  650. })
  651. },
  652. // 加入购物车
  653. addCart(type) {
  654. this.utils.isLogin().then(res => {
  655. if(res){
  656. this.type=type;
  657. this.specVisible = true
  658. }
  659. });
  660. },
  661. getProductDetails(){
  662. let data = {
  663. productId:this.productId,
  664. storeId: this.urlStoreId || ""
  665. };
  666. getProductDetails(data).then(
  667. res => {
  668. this.loadding=false
  669. if(res.code==200){
  670. this.product=res.product;
  671. if(this.product.productType==1){
  672. this.buyText="立即购买"
  673. }
  674. else if(this.product.productType==2){
  675. this.showModal=true;
  676. this.buyText="开方购买"
  677. }
  678. this.product.otPrice=this.product.otPrice.toFixed(2);
  679. this.product.price=this.product.price.toFixed(2);
  680. if(this.product.sliderImage!=null){
  681. this.banner=this.product.sliderImage.split(',');
  682. }
  683. else{
  684. this.banner=[]
  685. }
  686. this.attrs=res.productAttr;
  687. this.attrs.forEach((item,index,arr)=>{
  688. item.values=item.attrValues.split(',');
  689. item.index=0
  690. });
  691. this.values=res.productValues;
  692. this.stores=res.stores;
  693. // this.storeNames=this.stores.map(store => store.storeName);
  694. if(this.stores.length>0 ){
  695. // this.storeName=this.storeNames[this.storeIdx];
  696. // urlStoreId存在表示在店铺内购买的商品
  697. this.storeId= this.urlStoreId || this.stores[this.storeIdx].storeId;
  698. }
  699. this.choseSpec(0,0)
  700. }
  701. else{
  702. uni.showToast({
  703. icon:'none',
  704. title: res.msg,
  705. });
  706. setTimeout(function(){
  707. uni.reLaunch({
  708. url: '/pages/home/index',
  709. })
  710. },2000)
  711. }
  712. },
  713. rej => {}
  714. );
  715. },
  716. getProductStoreStock(type){
  717. let data = {productId:this.productId,storeId:this.storeId};
  718. getProductStoreStock(data).then(
  719. res => {
  720. //this.loadding=false
  721. if(res.code==200){
  722. this.attrs=res.productAttr;
  723. this.attrs.forEach((item,index,arr)=>{
  724. item.values=item.attrValues.split(',');
  725. item.index=0
  726. });
  727. this.values=res.productValues;
  728. if(type == 'chooseStore') {
  729. this.choseSpec(this.choseSpecIndex,this.choseSpecSubIndex)
  730. } else {
  731. this.choseSpec(0,0)
  732. }
  733. }else{
  734. uni.showToast({
  735. icon:'none',
  736. title: res.msg,
  737. });
  738. setTimeout(function(){
  739. uni.reLaunch({
  740. url: '/pages/home/index',
  741. })
  742. },2000)
  743. }
  744. },
  745. rej => {}
  746. );
  747. },
  748. // 规格选择
  749. choseSpec(index,subIndex) {
  750. this.choseSpecIndex = index
  751. this.choseSpecSubIndex = subIndex
  752. this.attrs[index].index = subIndex;
  753. this.$forceUpdate();
  754. let productAttr = this.attrs;
  755. let values = [];
  756. for (let i = 0; i < productAttr.length; i++) {
  757. for (let j = 0; j < productAttr[i].values.length; j++) {
  758. if (productAttr[i].index === j) { //筛选出默认规格
  759. values.push(productAttr[i].values[j]);
  760. }
  761. }
  762. }
  763. let selectVal=values.sort().join(","); //返回值:默认
  764. this.selectVal=selectVal;
  765. console.log("qxj selectVal:"+selectVal);
  766. // var valueSelect=this.values.filter((item)=>{
  767. // return item.sku==selectVal;
  768. // });
  769. var valueSelect=this.getValueSelect();
  770. console.log("qxj valueSelect:"+JSON.stringify(valueSelect));
  771. if(valueSelect!=null&&valueSelect.length>0){
  772. this.productValueSelect=valueSelect[0];
  773. }
  774. console.log("qxj productValueSelect:"+JSON.stringify(this.productValueSelect));
  775. this.updateSpecNum();
  776. if(this.stores.length>0 && !this.urlStoreId){
  777. this.getStorePriceList()
  778. }
  779. },
  780. //更新数量
  781. updateSpecNum(){
  782. if(this.productValueSelect.stock==0){
  783. this.specNum=0;
  784. }
  785. else{
  786. this.specNum=1;
  787. }
  788. },
  789. changeNum(e) {
  790. this.specNum = e.detail.value.replace(/\D/g, '')
  791. if(this.specNum < 1) {
  792. this.specNum = 1
  793. }
  794. if(this.specNum>=this.productValueSelect.stock){
  795. this.specNum=this.productValueSelect.stock
  796. }
  797. },
  798. // 数量减法
  799. lessNum() {
  800. this.specNum--
  801. if(this.specNum < 1) {
  802. this.specNum = 1
  803. }
  804. if(this.specNum>=this.productValueSelect.stock){
  805. this.specNum=this.productValueSelect.stock
  806. }
  807. },
  808. // 数量加法
  809. addNum() {
  810. this.specNum++
  811. if(this.specNum>=this.productValueSelect.stock){
  812. this.specNum=this.productValueSelect.stock
  813. }
  814. console.log(this.specNum,'===')
  815. },
  816. // 确定选择该规格
  817. submit() {
  818. this.specVisible = false
  819. this.doAddCart(this.type);
  820. },
  821. hideModal(){
  822. this.showModal=false;
  823. },
  824. getProductConfig(){
  825. getProductConfig().then(
  826. res => {
  827. if(res.code==200){
  828. this.config=res.data;
  829. this.showServiceFee=this.config.isShowProductDetails;
  830. console.log(this.config);
  831. }
  832. },
  833. rej => {}
  834. );
  835. },
  836. getValueSelect(){
  837. var valueSelect;
  838. if(this.stores.length>0 && !this.urlStoreId){
  839. valueSelect=this.values.filter((item)=>{
  840. // return item.sku==this.selectVal;
  841. if(item.storeId) {
  842. return item.sku==this.selectVal && item.storeId==this.storeId;
  843. } else {
  844. return item.sku==this.selectVal;
  845. }
  846. });
  847. }else{
  848. valueSelect=this.values.filter((item)=>{
  849. return item.sku==this.selectVal;
  850. });
  851. }
  852. return valueSelect;
  853. },
  854. // pickerChange(e) {
  855. // this.storeIdx = parseInt(e.detail.value);
  856. // this.storeName=this.storeNames[this.storeIdx];
  857. // this.storeId=this.stores[this.storeIdx].storeId;
  858. // var valueSelect= this.getValueSelect();
  859. // this.productValueSelect=valueSelect[0];
  860. // this.getProductStoreStock();
  861. // },
  862. // pickerColumnchange(e){
  863. // },
  864. closeStorePicker() {
  865. this.showStorePicker = false
  866. },
  867. openStorePicker() {
  868. this.showStorePicker = true
  869. },
  870. pickerStore(item,index) {
  871. this.showStorePicker = false
  872. this.storeChange(item,index)
  873. },
  874. // 选择店铺价格
  875. storeChange(item,index) {
  876. this.storeIdx = index;
  877. this.storeId = item.storeId;
  878. var valueSelect= this.getValueSelect();
  879. this.productValueSelect=valueSelect[0];
  880. // this.getProductStoreStock("chooseStore");
  881. },
  882. // 更新所选规格的店铺价格
  883. getStorePriceList() {
  884. const priceList = this.values.filter(item => item.sku === this.productValueSelect.sku && item.storeId);
  885. this.storePriceList = priceList.map(item =>{
  886. const store = this.stores.find(it => item.storeId === it.storeId);
  887. if(store){
  888. return { ...item, storeName: store.storeName };
  889. }
  890. });
  891. // 获取页面店铺相关数据
  892. const selectStore = this.stores.find(it => this.productValueSelect.storeId === it.storeId);
  893. this.storeSelectInfo = selectStore || {}
  894. },
  895. }
  896. }
  897. </script>
  898. <style lang="scss">
  899. .share-box{
  900. // position: absolute;
  901. position: fixed;
  902. right: 24rpx;
  903. top: 70%;
  904. z-index: 99;
  905. width: 112rpx;
  906. height: 112rpx;
  907. border-radius: 16rpx 16rpx 16rpx 16rpx;
  908. border: 1rpx solid #EFF3F7;
  909. background-color: #FFFFFF;
  910. .share{
  911. display: inline-block;
  912. position: absolute;
  913. top: 0;
  914. left: 0;
  915. width: 100%;
  916. height: 100%;
  917. opacity: 0;
  918. }
  919. }
  920. .shop-banner{
  921. height: 756upx;
  922. background-color: #FFFFFF;
  923. position: relative;
  924. .swiper-item{
  925. box-sizing: border-box;
  926. position: relative;
  927. }
  928. .swiper,
  929. .swiper-item,
  930. .swiper-item image{
  931. width: 100%;
  932. height: 100%;
  933. }
  934. .banner-mask{
  935. width: 100%;
  936. height: 44upx;
  937. // background: linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
  938. // opacity: 0.8;
  939. position: absolute;
  940. left: 0;
  941. bottom: 0;
  942. z-index: 9;
  943. background-image: url(../../static/images/black_mask.png);
  944. background-size: 20upx 44upx;
  945. background-repeat: repeat-x;
  946. }
  947. .num-box{
  948. width: 80upx;
  949. height: 40upx;
  950. line-height: 40upx;
  951. text-align: center;
  952. font-size: 24upx;
  953. font-family: PingFang SC;
  954. // font-weight: 500;
  955. color: #FFFFFF;
  956. background: rgba(0, 0, 0, .7);
  957. border-radius: 20upx;
  958. position: absolute;
  959. right: 40upx;
  960. bottom: 34upx;
  961. z-index: 10;
  962. }
  963. .cf-box{
  964. position: absolute;
  965. z-index: 10;
  966. left: 0;
  967. right:0;
  968. top: calc(50% - 200rpx);
  969. bottom: calc(50% - 200rpx);
  970. background-color: rgba(0,0,0, 0.3);
  971. backdrop-filter: blur(2rpx); /* 背景模糊度 */
  972. display: flex;
  973. flex-direction: column;
  974. flex: 1;
  975. justify-content: center;
  976. align-items: center;
  977. color: #EDEEEF;
  978. .title{
  979. font-size: 40rpx;
  980. font-weight: bold;
  981. }
  982. .subTitle{
  983. font-size: 28rpx;
  984. font-weight: bold;
  985. margin-top: 10rpx;
  986. }
  987. }
  988. }
  989. .guige{
  990. padding:24upx;
  991. border-radius: 16upx;
  992. background: #fff;
  993. width: auto;
  994. font-size: 24upx;
  995. color: #222426;
  996. margin: 24upx;
  997. .guige-gg{
  998. .gg-text{
  999. color: #898E91 ;
  1000. margin-right: 40upx;
  1001. }
  1002. }
  1003. .safe-box{
  1004. display: flex;
  1005. align-items: center;
  1006. // padding-top: 24upx;
  1007. font-size: 24upx;
  1008. color: #222426;
  1009. .text{
  1010. color: #999999;
  1011. margin-right: 40upx;
  1012. }
  1013. .box{
  1014. display: flex;
  1015. align-items: center;
  1016. image{
  1017. width: 28upx;
  1018. height: 28upx;
  1019. margin-right: 10upx;
  1020. }
  1021. view{
  1022. display: flex;
  1023. align-items: center;
  1024. margin-right: 40upx;
  1025. &:last-child{
  1026. margin-right: 0;
  1027. image{
  1028. margin-right: 0;
  1029. }
  1030. }
  1031. }
  1032. }
  1033. }
  1034. .popup-box{
  1035. position: fixed;
  1036. top: 0;
  1037. right: 0;
  1038. left: 0;
  1039. bottom: 0;
  1040. z-index: 999;
  1041. display: flex;
  1042. justify-content: center;
  1043. align-items: flex-end;
  1044. .info-mask {
  1045. position: fixed;
  1046. top: 0;
  1047. right: 0;
  1048. bottom: 0;
  1049. left: 0;
  1050. background-color: rgba($color: #000000, $alpha: 0.5);
  1051. z-index: 999;
  1052. }
  1053. .info-form {
  1054. z-index: 1000;
  1055. width: 100%;
  1056. display: flex;
  1057. flex-direction: column;
  1058. justify-content: center;
  1059. align-items: center;
  1060. padding:0 30upx 60upx;
  1061. background: #FFFFFF;
  1062. border-radius: 40upx;
  1063. .top{
  1064. display: flex;
  1065. }
  1066. .line{
  1067. border-top: 1px solid #F1F1F1;
  1068. width: 100%;
  1069. }
  1070. .title{
  1071. padding: 30upx;
  1072. display: flex;
  1073. justify-content: center;
  1074. align-items: center;
  1075. font-size: 36upx;
  1076. font-weight: bold;
  1077. line-height: 44upx;
  1078. font-family: PingFang SC;
  1079. color: #222222;
  1080. }
  1081. .close{
  1082. padding-top:30rpx;
  1083. position: absolute;
  1084. right: 30upx;
  1085. }
  1086. .form-box{
  1087. width: 100%;
  1088. padding-top: 30upx;
  1089. .form-item2{
  1090. padding-bottom: 30upx;
  1091. // display: flex;
  1092. // align-items: flex-start;
  1093. // border-bottom: 1px solid #F1F1F1;
  1094. .form-item-box{
  1095. display: flex;
  1096. align-items: center;
  1097. text{
  1098. font-size: 28upx;
  1099. color: #222426;
  1100. margin-left: 10upx;
  1101. font-weight: bold;
  1102. }
  1103. }
  1104. .form-content{
  1105. font-size:24upx ;
  1106. text-align: left;
  1107. color: #626468 ;
  1108. margin-top: 20upx;
  1109. line-height: 40upx;
  1110. }
  1111. }
  1112. }
  1113. .btns{
  1114. width: 100%;
  1115. height: 120upx;
  1116. padding:20upx 30upx;
  1117. display: flex;
  1118. align-items: center;
  1119. justify-content: center;
  1120. .sub-btn{
  1121. width: 100%;
  1122. height: 88upx;
  1123. line-height: 88upx;
  1124. text-align: center;
  1125. font-size: 36upx;
  1126. font-family: PingFang SC;
  1127. font-weight: bold;
  1128. color: #FFFFFF;
  1129. background: #008FD3;
  1130. border-radius: 44upx;
  1131. }
  1132. }
  1133. }
  1134. }
  1135. }
  1136. .det-info{
  1137. // background: #FFFFFF;
  1138. // padding: 36upx 30upx 25upx;
  1139. background: #FFFFFF;
  1140. padding: 24rpx;
  1141. margin: 24rpx;
  1142. border-radius: 16rpx;
  1143. .price-box{
  1144. display: flex;
  1145. align-items: flex-end;
  1146. justify-content: space-between;
  1147. .price{
  1148. display: flex;
  1149. align-items: flex-end;
  1150. .label{
  1151. font-weight: 500;
  1152. font-size: 24rpx;
  1153. color: #FF5030;
  1154. font-family: PingFang SC;
  1155. line-height: 1.3;
  1156. margin-right: 10upx;
  1157. }
  1158. .unit{
  1159. font-size: 26upx;
  1160. font-family: PingFang SC;
  1161. font-weight: bold;
  1162. color: #FF6633;
  1163. line-height: 1.3;
  1164. }
  1165. .num{
  1166. font-size: 48upx;
  1167. font-family: PingFang SC;
  1168. font-weight: bold;
  1169. color: #FF5030;
  1170. margin-right: 20upx;
  1171. line-height: 1;
  1172. }
  1173. .old{
  1174. font-size: 24upx;
  1175. font-family: PingFang SC;
  1176. font-weight: 400;
  1177. // text-decoration: line-through;
  1178. color: #898E91;
  1179. margin-left: 10upx;
  1180. // line-height: 1.3;
  1181. }
  1182. }
  1183. // .share-box{
  1184. // width: 120upx;
  1185. // height: 46upx;
  1186. // border: 1px solid #0bb3f2;
  1187. // border-radius: 23upx;
  1188. // display: flex;
  1189. // align-items: center;
  1190. // justify-content: center;
  1191. // position: relative;
  1192. // .text{
  1193. // font-size: 26upx;
  1194. // font-family: PingFang SC;
  1195. // font-weight: 500;
  1196. // color: #0bb3f2;
  1197. // }
  1198. // image{
  1199. // margin-left: 2rpx;
  1200. // width: 25upx;
  1201. // height: 24upx;
  1202. // }
  1203. // .share{
  1204. // display: inline-block;
  1205. // position: absolute;
  1206. // top: 0;
  1207. // left: 0;
  1208. // width: 100%;
  1209. // height: 100%;
  1210. // opacity: 0;
  1211. // }
  1212. // }
  1213. .spec{
  1214. font-size: 24upx;
  1215. font-family: PingFang SC;
  1216. font-weight: 500;
  1217. color: #999999;
  1218. line-height: 36upx;
  1219. }
  1220. }
  1221. .name-box{
  1222. font-size: 32upx;
  1223. font-family: PingFang SC;
  1224. font-weight: bold;
  1225. color: #111111;
  1226. line-height: 44upx;
  1227. margin-top: 32upx;
  1228. .tag{
  1229. display: inline-block;
  1230. padding: 2upx 8upx;
  1231. height: 32upx;
  1232. background: #F5A623;
  1233. border-radius: 4upx;
  1234. margin-right: 10upx;
  1235. font-weight: 400;
  1236. font-size: 20rpx;
  1237. color: #FFFFFF;
  1238. line-height: 30upx;
  1239. float: left;
  1240. margin-top: 7upx;
  1241. }
  1242. }
  1243. .intro{
  1244. font-size: 26upx;
  1245. font-family: PingFang SC;
  1246. font-weight: 500;
  1247. color: #999999;
  1248. line-height: 36upx;
  1249. padding: 18upx 0 23upx;
  1250. // border-bottom: 1px solid #f7f7f7;
  1251. }
  1252. .intro-box{
  1253. display: flex;
  1254. justify-content: space-between;
  1255. align-items: center;
  1256. padding:20upx;
  1257. border-radius: 16upx;
  1258. background: #F5F7FA;
  1259. width: auto;
  1260. .title-1{
  1261. font-size: 24upx;
  1262. color:#222426 ;
  1263. font-weight: bold;
  1264. width: 40%;
  1265. text-align: center;
  1266. }
  1267. .title-2{
  1268. font-size: 24upx;
  1269. color:#222426;
  1270. font-weight: bold;
  1271. display: block;
  1272. }
  1273. .intro-text{
  1274. // padding: 0 20upx;
  1275. }
  1276. .intro-text2{
  1277. width:50%;
  1278. }
  1279. .intro-content{
  1280. color: #898E91;
  1281. font-size: 24upx;
  1282. }
  1283. .line{
  1284. width: 1px;
  1285. height: 40upx;
  1286. background: #EDEEEF;
  1287. margin: 0 20upx;
  1288. }
  1289. }
  1290. .safe-box{
  1291. display: flex;
  1292. align-items: center;
  1293. padding-top: 24upx;
  1294. image{
  1295. width: 20upx;
  1296. height: 24upx;
  1297. margin-right: 20upx;
  1298. }
  1299. .text{
  1300. font-size: 22upx;
  1301. font-family: PingFang SC;
  1302. font-weight: 500;
  1303. color: #999999;
  1304. line-height: 1;
  1305. }
  1306. .line{
  1307. width: 1px;
  1308. height: 23upx;
  1309. background: #EDEEEF;
  1310. margin: 0 20upx;
  1311. }
  1312. }
  1313. }
  1314. .inventor{
  1315. height: 88upx;
  1316. padding: 0 39upx 0 30upx;
  1317. margin-top: 10upx;
  1318. background: #FFFFFF;
  1319. display: flex;
  1320. align-items: center;
  1321. justify-content: space-between;
  1322. .left{
  1323. display: flex;
  1324. align-items: center;
  1325. .head-box{
  1326. margin-right: 27upx;
  1327. display: flex;
  1328. align-items: center;
  1329. .head{
  1330. width: 48upx;
  1331. height: 48upx;
  1332. border-radius: 50%;
  1333. overflow: hidden;
  1334. box-shadow: 0 0 0 1px #fff;
  1335. margin-right: -10upx;
  1336. image{
  1337. width: 100%;
  1338. height: 100%;
  1339. }
  1340. }
  1341. }
  1342. .num-box{
  1343. font-size: 24upx;
  1344. font-family: PingFang SC;
  1345. font-weight: 500;
  1346. color: #999999;
  1347. .text{
  1348. font-size: 24upx;
  1349. font-family: PingFang SC;
  1350. font-weight: 500;
  1351. color: #999999;
  1352. }
  1353. }
  1354. }
  1355. .right{
  1356. font-size: 24upx;
  1357. font-family: PingFang SC;
  1358. font-weight: 500;
  1359. color: #999999;
  1360. .text{
  1361. font-size: 24upx;
  1362. font-family: PingFang SC;
  1363. font-weight: 500;
  1364. color: #666666;
  1365. }
  1366. }
  1367. }
  1368. .effect{
  1369. box-sizing: border-box;
  1370. padding: 20upx 30upx;
  1371. background: #FFFFFF;
  1372. font-size: 28upx;
  1373. font-family: PingFang SC;
  1374. font-weight: 500;
  1375. color: #666666;
  1376. line-height: 1.8;
  1377. margin-top: 10upx;
  1378. display: flex;
  1379. flex-direction: row;
  1380. align-items: center;
  1381. justify-content: space-between;
  1382. .label{
  1383. font-size: 28upx;
  1384. font-family: PingFang SC;
  1385. font-weight: 500;
  1386. color: #111111;
  1387. line-height: 1.8;
  1388. }
  1389. }
  1390. .shop{
  1391. // box-sizing: border-box;
  1392. // padding: 20upx 30upx;
  1393. // background: #FFFFFF;
  1394. // font-size: 28upx;
  1395. // font-family: PingFang SC;
  1396. // font-weight: 500;
  1397. // color: #666666;
  1398. // line-height: 1.8;
  1399. // margin-top: 10upx;
  1400. // background: url(../../static/images/chu_query.png) no-repeat center center / cover;
  1401. box-sizing: border-box;
  1402. background: #FFFFFF;
  1403. font-size: 28upx;
  1404. font-family: PingFang SC;
  1405. font-weight: 500;
  1406. color: #666666;
  1407. line-height: 1.8;
  1408. padding: 24rpx;
  1409. margin: 24rpx;
  1410. border-radius: 16rpx;
  1411. .logo{
  1412. flex-shrink: 0;
  1413. width: 100rpx;
  1414. height: 100rpx;
  1415. border-radius: 16rpx;
  1416. overflow: hidden;
  1417. image{
  1418. width: 100%;
  1419. height: 100%;
  1420. }
  1421. }
  1422. .txtBox{
  1423. flex: 1;
  1424. overflow: hidden;
  1425. margin:0 30rpx;
  1426. }
  1427. .name{
  1428. font-size: 32upx;
  1429. font-weight: 600;
  1430. color: #333;
  1431. text-align: left;
  1432. overflow: hidden;
  1433. white-space: nowrap;
  1434. text-overflow: ellipsis;
  1435. }
  1436. .desc{
  1437. font-size: 24upx;
  1438. font-weight: normal;
  1439. color: #222426;
  1440. text-align: left;
  1441. }
  1442. .goShop{
  1443. flex-shrink: 0;
  1444. width: 96rpx;
  1445. height: 56rpx;
  1446. background: #fff;
  1447. border-radius: 30rpx;
  1448. color: #008FD3;
  1449. font-size: 24upx;
  1450. margin: 0;
  1451. border: 1px solid #008FD3;
  1452. padding: 0;
  1453. line-height: 56rpx;
  1454. display: flex;
  1455. align-items: center;
  1456. justify-content: center;
  1457. }
  1458. }
  1459. .tech-pBox{
  1460. box-sizing: border-box;
  1461. padding: 0upx 0upx;
  1462. background: #FFFFFF;
  1463. font-size: 28upx;
  1464. font-family: PingFang SC;
  1465. font-weight: 500;
  1466. color: #666666;
  1467. .label{
  1468. font-family: PingFang SC, PingFang SC;
  1469. font-weight: bold;
  1470. font-size: 26rpx;
  1471. color: #222426;
  1472. text-align: left;
  1473. padding: 24rpx 0;
  1474. }
  1475. .item{
  1476. border: 1px solid #fff;
  1477. border-radius: 12rpx;
  1478. padding:30upx;
  1479. border: 1px solid #EFF3F7;
  1480. display: flex;
  1481. align-items: center;
  1482. margin-bottom: 20rpx;
  1483. .price{
  1484. font-size: 42rpx;
  1485. font-family: PingFang SC;
  1486. font-weight: bold;
  1487. color: #FF6633;
  1488. display: flex;
  1489. flex: 1;
  1490. b{ font-size: 30rpx;line-height: 46rpx; margin-top: 14rpx; }
  1491. }
  1492. .num{
  1493. font-size: 28rpx;
  1494. font-family: PingFang SC;
  1495. font-weight: normal;
  1496. color: #999;
  1497. width:200rpx;
  1498. text-align: right;
  1499. }
  1500. .name{
  1501. max-width: 60%;
  1502. margin-right: 10rpx;
  1503. font-size: 28upx;
  1504. font-weight: normal;
  1505. color: #333;
  1506. text-align: left;
  1507. overflow: hidden;
  1508. white-space: nowrap;
  1509. text-overflow: ellipsis;
  1510. }
  1511. image{
  1512. width: 100rpx;
  1513. height: 100rpx;
  1514. border-radius: 50%;
  1515. margin-right: 30rpx;
  1516. }
  1517. .tech-right{
  1518. flex:1;
  1519. &-bottom{
  1520. font-family: PingFang SC;
  1521. color: #898E91;
  1522. font-size:24upx;
  1523. }
  1524. &-top{
  1525. display: flex;
  1526. align-items: flex-end;
  1527. margin-bottom: 10upx;
  1528. .title-1{
  1529. font-family: PingFang SC;
  1530. font-size:32upx;
  1531. color:#222426;
  1532. margin-right: 14upx;
  1533. }
  1534. .title-2{
  1535. font-family: PingFang SC;
  1536. font-weight: 400;
  1537. font-size:24upx;
  1538. color:#222426;
  1539. }
  1540. }
  1541. }
  1542. }
  1543. .hover{
  1544. border:1rpx solid #008FD3;
  1545. background: #F0FAFF;
  1546. }
  1547. .shop-morebtn {
  1548. margin-top: 14rpx;
  1549. box-sizing: border-box;
  1550. padding: 12rpx 30rpx;
  1551. font-size: 28rpx;
  1552. font-family: PingFang SC;
  1553. font-weight: 500;
  1554. color: #111111;
  1555. background: #F7F7F7;
  1556. border-radius: 32rpx;
  1557. text-align: center;
  1558. text {
  1559. color: #999;
  1560. }
  1561. }
  1562. }
  1563. .shop-pBox{
  1564. box-sizing: border-box;
  1565. padding: 0upx 0upx;
  1566. background: #FFFFFF;
  1567. font-size: 28upx;
  1568. font-family: PingFang SC;
  1569. font-weight: 500;
  1570. color: #666666;
  1571. .item{
  1572. border: 1px solid #fff;
  1573. border-radius: 12rpx;
  1574. padding:18rpx 20rpx 24rpx;
  1575. .price{
  1576. font-size: 42rpx;
  1577. font-family: PingFang SC;
  1578. font-weight: bold;
  1579. color: #FF6633;
  1580. display: flex;
  1581. flex: 1;
  1582. b{ font-size: 30rpx;line-height: 46rpx; margin-top: 14rpx; }
  1583. }
  1584. .num{
  1585. font-size: 28rpx;
  1586. font-family: PingFang SC;
  1587. font-weight: normal;
  1588. color: #999;
  1589. width:200rpx;
  1590. text-align: right;
  1591. }
  1592. .name{
  1593. max-width: 60%;
  1594. margin-right: 10rpx;
  1595. font-size: 28upx;
  1596. font-weight: normal;
  1597. color: #333;
  1598. text-align: left;
  1599. overflow: hidden;
  1600. white-space: nowrap;
  1601. text-overflow: ellipsis;
  1602. }
  1603. }
  1604. .hover{
  1605. border:1rpx solid #FF6633;
  1606. }
  1607. .shop-morebtn {
  1608. margin-top: 14rpx;
  1609. box-sizing: border-box;
  1610. padding: 12rpx 30rpx;
  1611. font-size: 28rpx;
  1612. font-family: PingFang SC;
  1613. font-weight: 500;
  1614. color: #111111;
  1615. background: #F7F7F7;
  1616. border-radius: 32rpx;
  1617. text-align: center;
  1618. text {
  1619. color: #999;
  1620. }
  1621. }
  1622. }
  1623. .shop-pBox-name {
  1624. display: flex;
  1625. align-items: center;
  1626. justify-content: flex-start;
  1627. }
  1628. .storepopup {
  1629. padding: 40rpx 20rpx 20rpx 20rpx;
  1630. .storepopup-title {
  1631. text-align: center;
  1632. margin-bottom: 30rpx;
  1633. position: relative;
  1634. .close-icon {
  1635. width: 40rpx;
  1636. height: 40rpx;
  1637. position: absolute;
  1638. right: 0;
  1639. top: 50%;
  1640. transform: translate(0, -50%);
  1641. }
  1642. }
  1643. .storepopup-box {
  1644. height: 60vh;
  1645. }
  1646. }
  1647. .det-box{
  1648. // margin-top: 10upx;
  1649. // padding: 40upx 30upx 130upx 30upx;
  1650. // background-color: #FFFFFF;
  1651. margin-top: 10upx;
  1652. background-color: #FFFFFF;
  1653. padding:24rpx;
  1654. margin: 24upx 24upx 175upx 24upx;
  1655. border-radius: 16rpx;
  1656. .title{
  1657. font-size: 32upx;
  1658. font-family: PingFang SC;
  1659. font-weight: bold;
  1660. color: #333333;
  1661. line-height: 60upx;
  1662. margin-bottom: 30upx;
  1663. padding-bottom: 24upx;
  1664. border-bottom: 1px solid #ECECEC;
  1665. }
  1666. .det-title{
  1667. display: flex;
  1668. align-items: center;
  1669. justify-content: space-between;
  1670. .tt{
  1671. font-size: 28upx;
  1672. font-weight: bold;
  1673. color: #222426;
  1674. }
  1675. }
  1676. .det-right{
  1677. display: flex;
  1678. font-size: 24upx;
  1679. color:#898E91;
  1680. align-items: center;
  1681. }
  1682. .det-table{
  1683. width: 100%;
  1684. margin: 24rpx 0;
  1685. background: #FFFFFF;
  1686. border-radius: 16rpx 16rpx 16rpx 16rpx;
  1687. border: 1rpx solid #ECECEC;
  1688. overflow: hidden;
  1689. font-size: 24rpx;
  1690. .row {
  1691. display: table-row;
  1692. }
  1693. .row:last-child .cell-1,.row:last-child .cell-2{
  1694. border-bottom: 0;
  1695. }
  1696. .cell {
  1697. display: table-cell;
  1698. padding: 24rpx;
  1699. // padding: 10px;
  1700. // margin: 10px;
  1701. // border: 1rpx solid #ECECEC;
  1702. &.cell-1{
  1703. width: 30%;
  1704. text-align: center;
  1705. color: #626468;
  1706. background: #F5F7FA;
  1707. border-right: 1rpx solid #ECECEC;
  1708. border-bottom: 1rpx solid #ECECEC;
  1709. }
  1710. &.cell-2{
  1711. color: #222426;
  1712. text-align: center;
  1713. border-bottom: 1rpx solid #ECECEC;
  1714. }
  1715. }
  1716. }
  1717. }
  1718. .btn-foot{
  1719. box-sizing: border-box;
  1720. width: 100%;
  1721. height: 151upx;
  1722. background: #FFFFFF;
  1723. padding: 0 24upx;
  1724. display: flex;
  1725. align-items: center;
  1726. justify-content: space-between;
  1727. position: fixed;
  1728. left: 0;
  1729. bottom: 0;
  1730. z-index: 99;
  1731. .menu-box{
  1732. display: flex;
  1733. align-items: center;
  1734. .item{
  1735. display: flex;
  1736. align-items: center;
  1737. flex-direction: column;
  1738. margin-right: 48upx;
  1739. &:last-child{
  1740. margin-right: 0;
  1741. }
  1742. image{
  1743. width: 40upx;
  1744. height: 40upx;
  1745. margin-bottom: 10upx;
  1746. }
  1747. .label{
  1748. font-size: 20upx;
  1749. font-family: PingFang SC;
  1750. font-weight: 500;
  1751. color: #626468;
  1752. text-align: center;
  1753. }
  1754. }
  1755. ::v-deep .uni-badge--x{
  1756. display: flex;
  1757. align-items: center;
  1758. justify-content: center;
  1759. }
  1760. ::v-deep .uni-badge{
  1761. border: none;
  1762. background-color: #FF3636;
  1763. font-family: Roboto;
  1764. }
  1765. }
  1766. .btn-box{
  1767. display: flex;
  1768. align-items: center;
  1769. .btn{
  1770. width: 200upx;
  1771. height: 88upx;
  1772. line-height: 88upx;
  1773. text-align: center;
  1774. border-radius: 44upx;
  1775. margin-left: 20upx;
  1776. font-size: 28upx;
  1777. font-family: PingFang SC;
  1778. font-weight: bold;
  1779. color: #FFFFFF;
  1780. &:first-child{
  1781. margin-left: 0;
  1782. }
  1783. &.cart{
  1784. background: #FF5030;
  1785. }
  1786. &.buy{
  1787. background: #008FD3;
  1788. }
  1789. }
  1790. }
  1791. }
  1792. .product-spec{
  1793. padding-bottom: 30upx;
  1794. .pro-info{
  1795. display: flex;
  1796. align-items: center;
  1797. .img-box{
  1798. width: 200upx;
  1799. height: 200upx;
  1800. background: #FFFFFF;
  1801. border-radius: 16upx;
  1802. overflow: hidden;
  1803. margin-right: 30upx;
  1804. image{
  1805. width: 100%;
  1806. height: 100%;
  1807. }
  1808. }
  1809. .info-text{
  1810. height: 200upx;
  1811. display: flex;
  1812. flex-direction: column;
  1813. justify-content: space-between;
  1814. .info-title{
  1815. font-family: PingFang SC;
  1816. font-weight: 600;
  1817. font-size: 28rpx;
  1818. color: #222426;
  1819. text-align: left;
  1820. }
  1821. .price{
  1822. display: flex;
  1823. align-items: flex-end;
  1824. .label{
  1825. font-weight:500;
  1826. font-size: 24rpx;
  1827. color: #FF5030;
  1828. font-family: PingFang SC;
  1829. line-height: 1.3;
  1830. margin-right: 10rpx;
  1831. }
  1832. .unit{
  1833. font-size: 32upx;
  1834. font-family: PingFang SC;
  1835. font-weight: bold;
  1836. color: #FF6633;
  1837. line-height: 1.2;
  1838. margin-right: 10upx;
  1839. }
  1840. .num{
  1841. font-size: 50upx;
  1842. font-family: PingFang SC;
  1843. font-weight: bold;
  1844. color: #FF6633;
  1845. line-height: 1;
  1846. }
  1847. }
  1848. .desc-box{
  1849. display: flex;
  1850. flex-direction: column;
  1851. padding-bottom: 9upx;
  1852. .text{
  1853. font-size: 26upx;
  1854. font-family: PingFang SC;
  1855. font-weight: 500;
  1856. color: #999999;
  1857. margin-top: 27upx;
  1858. line-height: 1;
  1859. &:first-child{
  1860. margin-top: 0;
  1861. }
  1862. }
  1863. }
  1864. }
  1865. }
  1866. .spec-box{
  1867. padding-top: 50upx;
  1868. .title{
  1869. font-size: 26upx;
  1870. font-family: PingFang SC;
  1871. font-weight: bold;
  1872. color: #111111;
  1873. line-height: 1;
  1874. }
  1875. .spec-list{
  1876. display: flex;
  1877. flex-wrap: wrap;
  1878. margin-top: 30upx;
  1879. .item{
  1880. box-sizing: border-box;
  1881. height: 64upx;
  1882. padding: 0 30upx;
  1883. line-height: 64upx;
  1884. font-size: 24upx;
  1885. font-family: PingFang SC;
  1886. font-weight: 500;
  1887. color: #111111;
  1888. background: #F7F7F7;
  1889. border: 1px solid #F7F7F7;
  1890. border-radius: 32upx;
  1891. margin-right: 20upx;
  1892. margin-bottom: 30upx;
  1893. &.active{
  1894. background: #F1FFFE;
  1895. border: 1px solid #008FD3;
  1896. color: #008FD3;
  1897. }
  1898. }
  1899. }
  1900. }
  1901. .price-num{
  1902. display: flex;
  1903. align-items: center;
  1904. justify-content: space-between;
  1905. margin-top: 14upx;
  1906. .label{
  1907. font-size: 26upx;
  1908. font-family: PingFang SC;
  1909. font-weight: bold;
  1910. color: #111111;
  1911. }
  1912. .num-box{
  1913. display: flex;
  1914. align-items: center;
  1915. .img-box{
  1916. width: 60upx;
  1917. height: 60upx;
  1918. // border-radius: 4upx;
  1919. border: 1px solid #dddddd;
  1920. display: flex;
  1921. align-items: center;
  1922. justify-content: center;
  1923. image{
  1924. width: 25rpx;
  1925. height: 25rpx;
  1926. }
  1927. }
  1928. input{
  1929. width: 60upx;
  1930. height: 60upx;
  1931. line-height: 60upx;
  1932. font-size: 28upx;
  1933. font-family: PingFang SC;
  1934. font-weight: 500;
  1935. color: #111111;
  1936. // border-radius: 4upx;
  1937. border-top: 1px solid #dddddd;
  1938. border-bottom: 1px solid #dddddd;
  1939. text-align: center;
  1940. // margin: 0 16upx;
  1941. }
  1942. }
  1943. }
  1944. .sub-btn{
  1945. width: 100%;
  1946. height: 88upx;
  1947. line-height: 88upx;
  1948. text-align: center;
  1949. font-size: 32upx;
  1950. font-family: PingFang SC;
  1951. font-weight: bold;
  1952. color: #FFFFFF;
  1953. background:#008FD3;
  1954. border-radius: 44upx;
  1955. margin-top: 30upx;
  1956. // margin-bottom: 30upx;
  1957. }
  1958. }
  1959. .contact-btn{
  1960. display: inline-block;
  1961. position: absolute;
  1962. top: 0;
  1963. left: 0;
  1964. width: 100%;
  1965. height: 100%;
  1966. opacity: 0;
  1967. z-index: 9999;
  1968. }
  1969. .loadding{
  1970. background-color: #fff;
  1971. display: flex;
  1972. flex-direction: column;
  1973. align-items: center;
  1974. justify-content: center;
  1975. position: absolute;
  1976. top: 0;
  1977. left: 0;
  1978. width: 100%;
  1979. height: 100%;
  1980. z-index: 9999;
  1981. image{
  1982. border-radius: 50%;
  1983. animation: load linear 1s infinite;
  1984. width: 120rpx;
  1985. height:120rpx;
  1986. }
  1987. .text{
  1988. font-size: 28rpx;
  1989. margin-top: 20rpx;
  1990. }
  1991. }
  1992. .form-item{
  1993. padding: 30upx 0;
  1994. display: flex;
  1995. align-items: flex-start;
  1996. border-bottom: 1px solid #F1F1F1;
  1997. &:last-child{
  1998. border-bottom: none;
  1999. }
  2000. .label{
  2001. width: 180upx;
  2002. text-align: left;
  2003. font-size: 30upx;
  2004. line-height: 44upx;
  2005. font-family: PingFang SC;
  2006. font-weight: 500;
  2007. color: #222222;
  2008. flex-shrink: 0;
  2009. }
  2010. input{
  2011. text-align: left;
  2012. }
  2013. .form-input{
  2014. font-size: 30upx;
  2015. font-family: PingFang SC;
  2016. font-weight: 500;
  2017. color: #999999;
  2018. text-align: left;
  2019. }
  2020. .form-textarea{
  2021. font-size: 30upx;
  2022. color: #999999;
  2023. height: 100upx;
  2024. padding: 4upx 0;
  2025. }
  2026. .birth-picker {
  2027. flex: 1;
  2028. display: flex;
  2029. align-items: center;
  2030. .right-box{
  2031. width: 100%;
  2032. display: flex;
  2033. align-items: center;
  2034. .input-box{
  2035. width: 470upx;
  2036. }
  2037. .arrow{
  2038. width: 13upx;
  2039. height: 23upx;
  2040. margin-left: 20upx;
  2041. }
  2042. }
  2043. }
  2044. }
  2045. </style>