productDetails.vue 51 KB

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