productDetails.vue 51 KB

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