productDetails.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500
  1. <template>
  2. <view class="content">
  3. <!-- 商品轮播图片 -->
  4. <view class="shop-banner" @click="showImg()">
  5. <swiper
  6. class="swiper"
  7. :indicator-dots="false"
  8. :circular="true"
  9. :autoplay="true"
  10. :interval="3000"
  11. :duration="1000"
  12. indicator-color="rgba(255, 255, 255, 0.6)"
  13. indicator-active-color="#ffffff"
  14. @change="swiperChange">
  15. <swiper-item class="swiper-item" v-for="(item,index) in banner" :key="index">
  16. <image :src="item" mode="aspectFill"></image>
  17. <view class="cf-box" v-if="product.productType==2">
  18. <view class="title">处方药</view>
  19. <view class="subTitle">请在医师指导下使用</view>
  20. </view>
  21. </swiper-item>
  22. </swiper>
  23. <!-- 底部遮罩 -->
  24. <view class="banner-mask"></view>
  25. <!-- 数量 -->
  26. <view class="num-box">{{ activeBanner }}/{{ banner.length }}</view>
  27. </view>
  28. <!-- 详细信息 -->
  29. <view class="det-info">
  30. <view class="price-box">
  31. <view class="price">
  32. <text class="label">会员价</text>
  33. <text class="unit">¥</text>
  34. <text class="num" >{{product.price}}</text>
  35. <text class="label">零售价</text>
  36. <text class="old" >¥{{product.otPrice}}</text>
  37. </view>
  38. <view class="share-box">
  39. <text class="text">分享</text>
  40. <image src="../../static/images/share1.png" mode=""></image>
  41. <button class="share" data-name="shareBtn" open-type="share">分享</button>
  42. </view>
  43. </view>
  44. <view class="name-box">
  45. <view class="tag">{{utils.getDictLabelName("storeProductType",product.productType)}}</view>{{product.productName}}
  46. </view>
  47. <view class="intro" v-if="product.productInfo!=null" v-html="product.productInfo.replace(/\n/g,'<br>')">
  48. </view>
  49. <view class="safe-box">
  50. <image src="../../static/images/safe.png" mode=""></image>
  51. <text class="text">免邮发货</text>
  52. <view class="line"></view>
  53. <text class="text">药师服务</text>
  54. <view class="line"></view>
  55. <text class="text">隐私保护</text>
  56. </view>
  57. </view>
  58. <!-- 购买人数、库存 -->
  59. <view class="inventor">
  60. <view class="left">
  61. <!-- <view class="head-box">
  62. <view class="head" v-for="(item,j) in 5" :key="j">
  63. <image src="../../static/images/head.jpg" mode=""></image>
  64. </view>
  65. </view> -->
  66. <view class="num-box">
  67. 已有 <text class="text">{{product.sales}}</text> 人购买
  68. </view>
  69. </view>
  70. <!-- <view class="right">
  71. 库存 <text class="text">{{product.stock}}{{product.unitName}}</text>
  72. </view>
  73. <view class="right">
  74. <text class="text">库存{{product.stock>0?'充足':'售罄'}} </text>
  75. </view>
  76. -->
  77. </view>
  78. <!-- 功效 -->
  79. <!-- <view class="effect">
  80. <view class="label">药品说明书</view>
  81. <view class="label">查看</view>
  82. </view> -->
  83. <view class="shop x-bc" v-if="storeSelectInfo.storeId">
  84. <view class="x-bc" style="flex: 1;overflow: hidden;">
  85. <view class="logo">
  86. <image :src="storeSelectInfo.logoUrl" mode="aspectFill"></image>
  87. </view>
  88. <view class="txtBox y-b">
  89. <view class="name">{{storeSelectInfo.storeName}}</view>
  90. <view class="desc">销售{{utils.formatSalesNum(storeSelectInfo.salesCount) }} 24小时营业 支持预订</view>
  91. </view>
  92. </view>
  93. <button class="goShop" @click="navgetTo('/pages_shopping/store/index?storeId='+productValueSelect.storeId)">进店</button>
  94. </view>
  95. <!-- 图文详情 -->
  96. <view class="det-box">
  97. <view class="title">图文详情</view>
  98. <view class="inner">
  99. <view v-html="product.description" style="font-size:0"></view>
  100. </view>
  101. </view>
  102. <!-- 底部按钮 -->
  103. <view class="btn-foot">
  104. <view class="menu-box">
  105. <view class="item" @click="goHome">
  106. <image src="../../static/images/back_home.png" mode=""></image>
  107. <text class="label">首页</text>
  108. </view>
  109. <view class="item" style="position: relative;">
  110. <image src="../../static/images/consult_small.png" mode=""></image>
  111. <text class="label">咨询</text>
  112. <button class="contact-btn" open-type="contact"></button>
  113. </view>
  114. <view class="item" @click="navgetTo('./cart')">
  115. <uni-badge size="small" :text="cartCount" absolute="rightTop" type="error">
  116. <image src="../../static/images/cart36.png" mode=""></image>
  117. </uni-badge>
  118. <text class="label">购物车</text>
  119. </view>
  120. </view>
  121. <view class="btn-box">
  122. <view class="btn cart" @click="addCart('cart')">加入购物车</view>
  123. <view class="btn buy" @click="addCart('buy')">{{buyText}}</view>
  124. </view>
  125. </view>
  126. <!-- 选择药品规格弹窗 -->
  127. <popupBottom ref="popup" :visible.sync="specVisible" title=" " radius="32" maxHeight="1024">
  128. <view class="product-spec">
  129. <!-- 商品信息 -->
  130. <view class="pro-info">
  131. <view class="img-box" @click="showImg(productValueSelect.image)">
  132. <image :src="productValueSelect.image==null||productValueSelect.image==''?product.image:productValueSelect.image" mode="aspectFill"></image>
  133. </view>
  134. <view class="info-text">
  135. <view class="price">
  136. <text class="unit">¥</text>
  137. <text class="num">{{ productValueSelect.price ? productValueSelect.price.toFixed(2) : '0.00' }}</text>
  138. </view>
  139. <view class="desc-box">
  140. <text class="text" v-if="showServiceFee">服务费:¥{{ productValueSelect.serviceFee ? productValueSelect.serviceFee.toFixed(2) : '0.00' }}</text>
  141. <text class="text">已选:{{ productValueSelect.sku }}</text>
  142. <text class="text">库存:{{ productValueSelect.stock }}</text>
  143. </view>
  144. </view>
  145. </view>
  146. <!-- 门店 -->
  147. <!-- <view class="spec-box form-item" v-if="stores.length>0">
  148. <text class="label">所属门店</text>
  149. <picker class="birth-picker" mode="selector" :value="storeIdx" :range="storeNames" @change="pickerChange" @columnchange="pickerColumnchange">
  150. <view class="right-box">
  151. <view class="input-box">
  152. <input type="text" v-model="storeName" placeholder="请选择门店" class="form-input" disabled="disabled" />
  153. </view>
  154. <image class="arrow" src="../../static/images/arrow_gray.png" mode=""></image>
  155. </view>
  156. </picker>
  157. </view> -->
  158. <view class="shop-pBox" style="margin-top: 20rpx;" v-if="storePriceList&&storePriceList.length>0">
  159. <view
  160. v-for="(item,index) in storePriceList.slice(0,3)"
  161. :key="index"
  162. :class="productValueSelect.storeId == item.storeId ? 'item hover':'item'"
  163. @click="storeChange(item,index)"
  164. >
  165. <view class="top x-bc">
  166. <view class="price"><b>¥</b>{{ item.price.toFixed(2) }}</view>
  167. <view class="num">销售{{utils.formatSalesNum(item.sales) }}</view>
  168. </view>
  169. <view class="bot x-bc shop-pBox-name">
  170. <view class="name">{{item.storeName}}</view>
  171. <view @click.stop="navgetTo('/pages_shopping/store/index?storeId='+item.storeId)">
  172. <u-icon name="arrow-right" color="#000" size="14"></u-icon>
  173. </view>
  174. </view>
  175. </view>
  176. <view class="shop-morebtn" @click="openStorePicker" v-show="storePriceList.length > 3">
  177. <view>查看全部</view>
  178. <view v-show="storeIdx > 2">
  179. <text>已选</text>
  180. <text style="margin: 0 10rpx;">{{storeSelectInfo.storeName}}</text>
  181. <text>¥{{productValueSelect.price.toFixed(2)}}</text>
  182. </view>
  183. </view>
  184. </view>
  185. <!-- 店铺弹窗 -->
  186. <u-popup :show="showStorePicker" :round="16" mode="bottom">
  187. <view class="storepopup">
  188. <view class="storepopup-title">
  189. 选择店铺
  190. <image class="close-icon" src="@/static/images/close40.png" mode="widthFix" @click="closeStorePicker"></image></view>
  191. <scroll-view class="shop-pBox storepopup-box" scroll-y="true">
  192. <view
  193. v-for="(item,index) in storePriceList"
  194. :key="index"
  195. :class="productValueSelect.storeId == item.storeId ? 'item hover':'item'"
  196. @click="pickerStore(item,index)"
  197. >
  198. <view class="top x-bc">
  199. <view class="price"><b>¥</b>{{ item.price.toFixed(2) }}</view>
  200. <view class="num">销售{{utils.formatSalesNum(item.sales) }}</view>
  201. </view>
  202. <view class="bot x-bc shop-pBox-name">
  203. <view class="name">{{item.storeName}}</view>
  204. <u-icon name="arrow-right" color="#000" size="14" @click.native.stop="navgetTo('/pages_shopping/store/index?storeId='+item.storeId)"></u-icon>
  205. </view>
  206. </view>
  207. </scroll-view>
  208. </view>
  209. </u-popup>
  210. <!-- 规格 -->
  211. <view class="spec-box">
  212. <view v-for="(item,index) in attrs">
  213. <view class="title">{{item.attrName}}</view>
  214. <view class="spec-list">
  215. <view
  216. v-for="(subItem,subindex) in item.values"
  217. :key="subindex"
  218. :class="subindex==item.index?'item active':'item'"
  219. @click="choseSpec(index,subindex)">
  220. {{ subItem }}
  221. </view>
  222. </view>
  223. </view>
  224. </view>
  225. <!-- 数量 -->
  226. <view class="price-num">
  227. <view class="label">数量</view>
  228. <view class="num-box">
  229. <view class="img-box" @click="lessNum()">
  230. <image v-if="specNum <= 1" src="../../static/images/jian.png" mode=""></image>
  231. <image v-else src="../../static/images/jian2.png" mode=""></image>
  232. </view>
  233. <input type="number" @change="changeNum" v-model="specNum" />
  234. <view class="img-box" @click="addNum()">
  235. <image src="../../static/images/add.png" mode=""></image>
  236. </view>
  237. </view>
  238. </view>
  239. <view class="sub-btn" @click="submit">确定</view>
  240. </view>
  241. </popupBottom>
  242. <view class="loadding" v-if="loadding==true">
  243. <image src="../../static/images/logo.png"></image>
  244. <text class="text">加载中...</text>
  245. </view>
  246. <u-modal :show="showModal" title="温馨提示" content="处方药须凭处方在药师指导下购买和使用" @confirm="hideModal()"></u-modal>
  247. </view>
  248. </template>
  249. <script>
  250. import {getDicts} from '@/api/index'
  251. import {getProductDetails,getProductStoreStock,getCartCount,addCart} from '@/api/product'
  252. import {getProductConfig} from '@/api/common'
  253. import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
  254. export default {
  255. components: {
  256. item:{},
  257. popupBottom
  258. },
  259. data() {
  260. return {
  261. loadding:true,
  262. buyText:"立即购买",
  263. // mTitle:"温馨提示",
  264. // mContent:"处方药须凭处方在药师指导下购买和使用",
  265. type:null,
  266. productValueSelect:{
  267. price:0,
  268. serviceFee:0
  269. },
  270. banner:[],
  271. productId:null,
  272. attrs:[],
  273. values:[],
  274. stores:[],
  275. storeId:null,
  276. storeNames:[],
  277. storeIdx:0,
  278. storeName:"",
  279. product:{
  280. price:0,
  281. otPrice:0,
  282. },
  283. showModal:false,
  284. // 当前轮播的图片
  285. activeBanner: 1,
  286. // 购物车数量
  287. cartCount: 0,
  288. // 规格弹窗
  289. specVisible: false,
  290. // 规格数量
  291. specNum: 1,
  292. config:null,
  293. showServiceFee:false,
  294. selectVal:"",
  295. // 链接带的storeId
  296. urlStoreId: undefined,
  297. showStorePicker: false,
  298. // 所选规格门店店铺价格
  299. storePriceList: [],
  300. // 所选店铺
  301. storeSelectInfo: {},
  302. // 保存选的规格
  303. choseSpecSubIndex: 0,
  304. choseSpecIndex: 0,
  305. };
  306. },
  307. onLoad(options) {
  308. this.urlStoreId = options.storeId || undefined
  309. if(options.userId!=null){
  310. uni.setStorageSync('tuiUserId',options.userId);
  311. }
  312. else if (options.hasOwnProperty('q') && options.q) {
  313. // 通过下面这步解码,可以拿到url的值
  314. const url = decodeURIComponent(options.q)
  315. this.url=url;
  316. // // 对url中携带的参数提取处理
  317. const obj = this.utils.urlToObj(url)
  318. uni.setStorageSync('tuiUserId',obj.userId);
  319. }
  320. uni.showShareMenu({
  321. withShareTicket:true,
  322. //小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
  323. menus:["shareAppMessage","shareTimeline"] //不设置默认发送给朋友
  324. })
  325. this.getDicts();
  326. this.productId = options.productId;
  327. if(this.utils.checkToken()){
  328. this.getCartCount();
  329. }
  330. this.getProductConfig();
  331. },
  332. onShow() {
  333. this.getProductDetails();
  334. },
  335. //发送给朋友
  336. onShareAppMessage(res) {
  337. if(this.utils.isLogin()){
  338. var user=JSON.parse( uni.getStorageSync('userInfo'))
  339. return {
  340. title: this.product.productName,
  341. path: '/pages/shopping/productDetails?productId='+this.product.productId+"&userId="+user.userId,
  342. imageUrl: '/static/images/logo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  343. }
  344. }
  345. },
  346. //分享到朋友圈
  347. onShareTimeline(res) {
  348. if(this.utils.isLogin()){
  349. var user=JSON.parse( uni.getStorageSync('userInfo'))
  350. return {
  351. title: this.product.productName,
  352. query:'productId='+this.product.productId+"&userId="+user.userId,//页面参数
  353. imageUrl: '/static/images/logo.png' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
  354. }
  355. }
  356. },
  357. methods: {
  358. getDicts:function(){
  359. getDicts().then(
  360. res => {
  361. if(res.code==200){
  362. uni.setStorageSync('dicts',JSON.stringify(res));
  363. }
  364. },
  365. rej => {}
  366. );
  367. },
  368. showImg(img) {
  369. if(img!=null){
  370. var imgs=[];
  371. imgs.push(img)
  372. //预览图片
  373. uni.previewImage({
  374. urls: imgs,
  375. current: imgs[0]
  376. });
  377. }
  378. else{
  379. //预览图片
  380. uni.previewImage({
  381. urls: this.banner,
  382. current: this.banner[0]
  383. });
  384. }
  385. },
  386. doAddCart(type){
  387. if(this.specNum==0){
  388. uni.showToast({
  389. icon:'none',
  390. title: "库存不足",
  391. });
  392. return;
  393. }
  394. var isBuy=type=="buy"?1:0;
  395. let data = {isBuy:isBuy,cartNum:this.specNum,productId:this.productValueSelect.productId,attrValueId:this.productValueSelect.id};
  396. addCart(data).then(
  397. res => {
  398. if(res.code==200){
  399. if(type=="buy"){
  400. const selectCarts = [{
  401. storeId: this.storeId,
  402. data: {
  403. type: this.type,
  404. cartIds: res.id,
  405. }
  406. }]
  407. uni.navigateTo({
  408. url: '/pages/shopping/confirmOrder?type='+this.type+'&orderType='+this.orderType + '&confirmParam='+ encodeURIComponent(JSON.stringify(selectCarts))
  409. })
  410. // uni.navigateTo({
  411. // url: '/pages/shopping/confirmOrder?type='+this.type+"&cartIds="+res.id+"&orderType="+this.orderType+"&storeId="+this.storeId
  412. // })
  413. }
  414. else
  415. {
  416. this.getCartCount()
  417. uni.showToast({
  418. icon:'success',
  419. title: "添加成功",
  420. });
  421. }
  422. }else{
  423. uni.showToast({
  424. icon:'none',
  425. title: res.msg,
  426. });
  427. this.getProductDetails()
  428. }
  429. },
  430. rej => {}
  431. );
  432. },
  433. getCartCount(){
  434. let data = {productId:this.productId};
  435. getCartCount(data).then(
  436. cartRes => {
  437. if(cartRes.code==200){
  438. this.cartCount=cartRes.data;
  439. }
  440. },
  441. rej => {}
  442. );
  443. },
  444. // swiper变化事件
  445. swiperChange(event) {
  446. this.activeBanner = event.detail.current + 1
  447. },
  448. // 回到首页
  449. goHome() {
  450. uni.switchTab({
  451. url: '/pages/home/index'
  452. })
  453. },
  454. // 跳转页面
  455. navgetTo(url) {
  456. console.log("跳转")
  457. this.utils.isLogin().then(res => {
  458. if(res){
  459. uni.navigateTo({
  460. url: url
  461. })
  462. }
  463. })
  464. },
  465. // 加入购物车
  466. addCart(type) {
  467. this.utils.isLogin().then(res => {
  468. if(res){
  469. this.type=type;
  470. this.specVisible = true
  471. }
  472. });
  473. },
  474. getProductDetails(){
  475. let data = {
  476. productId:this.productId,
  477. storeId: this.urlStoreId || ""
  478. };
  479. getProductDetails(data).then(
  480. res => {
  481. this.loadding=false
  482. if(res.code==200){
  483. this.product=res.product;
  484. if(this.product.productType==1){
  485. this.buyText="立即购买"
  486. }
  487. else if(this.product.productType==2){
  488. this.showModal=true;
  489. this.buyText="开方购买"
  490. }
  491. this.product.otPrice=this.product.otPrice.toFixed(2);
  492. this.product.price=this.product.price.toFixed(2);
  493. if(this.product.sliderImage!=null){
  494. this.banner=this.product.sliderImage.split(',');
  495. }
  496. else{
  497. this.banner=[]
  498. }
  499. this.attrs=res.productAttr;
  500. this.attrs.forEach((item,index,arr)=>{
  501. item.values=item.attrValues.split(',');
  502. item.index=0
  503. });
  504. this.values=res.productValues;
  505. this.stores=res.stores;
  506. // this.storeNames=this.stores.map(store => store.storeName);
  507. if(this.stores.length>0 ){
  508. // this.storeName=this.storeNames[this.storeIdx];
  509. // urlStoreId存在表示在店铺内购买的商品
  510. this.storeId= this.urlStoreId || this.stores[this.storeIdx].storeId;
  511. }
  512. this.choseSpec(0,0)
  513. }
  514. else{
  515. uni.showToast({
  516. icon:'none',
  517. title: res.msg,
  518. });
  519. setTimeout(function(){
  520. uni.reLaunch({
  521. url: '/pages/home/index',
  522. })
  523. },2000)
  524. }
  525. },
  526. rej => {}
  527. );
  528. },
  529. getProductStoreStock(type){
  530. let data = {productId:this.productId,storeId:this.storeId};
  531. getProductStoreStock(data).then(
  532. res => {
  533. //this.loadding=false
  534. if(res.code==200){
  535. this.attrs=res.productAttr;
  536. this.attrs.forEach((item,index,arr)=>{
  537. item.values=item.attrValues.split(',');
  538. item.index=0
  539. });
  540. this.values=res.productValues;
  541. if(type == 'chooseStore') {
  542. this.choseSpec(this.choseSpecIndex,this.choseSpecSubIndex)
  543. } else {
  544. this.choseSpec(0,0)
  545. }
  546. }else{
  547. uni.showToast({
  548. icon:'none',
  549. title: res.msg,
  550. });
  551. setTimeout(function(){
  552. uni.reLaunch({
  553. url: '/pages/home/index',
  554. })
  555. },2000)
  556. }
  557. },
  558. rej => {}
  559. );
  560. },
  561. // 规格选择
  562. choseSpec(index,subIndex) {
  563. this.choseSpecIndex = index
  564. this.choseSpecSubIndex = subIndex
  565. this.attrs[index].index = subIndex;
  566. this.$forceUpdate();
  567. let productAttr = this.attrs;
  568. let values = [];
  569. for (let i = 0; i < productAttr.length; i++) {
  570. for (let j = 0; j < productAttr[i].values.length; j++) {
  571. if (productAttr[i].index === j) { //筛选出默认规格
  572. values.push(productAttr[i].values[j]);
  573. }
  574. }
  575. }
  576. let selectVal=values.sort().join(","); //返回值:默认
  577. this.selectVal=selectVal;
  578. console.log("qxj selectVal:"+selectVal);
  579. // var valueSelect=this.values.filter((item)=>{
  580. // return item.sku==selectVal;
  581. // });
  582. var valueSelect=this.getValueSelect();
  583. console.log("qxj valueSelect:"+JSON.stringify(valueSelect));
  584. if(valueSelect!=null&&valueSelect.length>0){
  585. this.productValueSelect=valueSelect[0];
  586. }
  587. console.log("qxj productValueSelect:"+JSON.stringify(this.productValueSelect));
  588. this.updateSpecNum();
  589. if(this.stores.length>0 && !this.urlStoreId){
  590. this.getStorePriceList()
  591. }
  592. },
  593. //更新数量
  594. updateSpecNum(){
  595. if(this.productValueSelect.stock==0){
  596. this.specNum=0;
  597. }
  598. else{
  599. this.specNum=1;
  600. }
  601. },
  602. changeNum(e) {
  603. this.specNum = e.detail.value.replace(/\D/g, '')
  604. if(this.specNum < 1) {
  605. this.specNum = 1
  606. }
  607. if(this.specNum>=this.productValueSelect.stock){
  608. this.specNum=this.productValueSelect.stock
  609. }
  610. },
  611. // 数量减法
  612. lessNum() {
  613. this.specNum--
  614. if(this.specNum < 1) {
  615. this.specNum = 1
  616. }
  617. if(this.specNum>=this.productValueSelect.stock){
  618. this.specNum=this.productValueSelect.stock
  619. }
  620. },
  621. // 数量加法
  622. addNum() {
  623. this.specNum++
  624. if(this.specNum>=this.productValueSelect.stock){
  625. this.specNum=this.productValueSelect.stock
  626. }
  627. },
  628. // 确定选择该规格
  629. submit() {
  630. this.specVisible = false
  631. this.doAddCart(this.type);
  632. },
  633. hideModal(){
  634. this.showModal=false;
  635. },
  636. getProductConfig(){
  637. getProductConfig().then(
  638. res => {
  639. if(res.code==200){
  640. this.config=res.data;
  641. this.showServiceFee=this.config.isShowProductDetails;
  642. console.log(this.config);
  643. }
  644. },
  645. rej => {}
  646. );
  647. },
  648. getValueSelect(){
  649. var valueSelect;
  650. if(this.stores.length>0 && !this.urlStoreId){
  651. valueSelect=this.values.filter((item)=>{
  652. // return item.sku==this.selectVal;
  653. if(item.storeId) {
  654. return item.sku==this.selectVal && item.storeId==this.storeId;
  655. } else {
  656. return item.sku==this.selectVal;
  657. }
  658. });
  659. }else{
  660. valueSelect=this.values.filter((item)=>{
  661. return item.sku==this.selectVal;
  662. });
  663. }
  664. return valueSelect;
  665. },
  666. // pickerChange(e) {
  667. // this.storeIdx = parseInt(e.detail.value);
  668. // this.storeName=this.storeNames[this.storeIdx];
  669. // this.storeId=this.stores[this.storeIdx].storeId;
  670. // var valueSelect= this.getValueSelect();
  671. // this.productValueSelect=valueSelect[0];
  672. // this.getProductStoreStock();
  673. // },
  674. // pickerColumnchange(e){
  675. // },
  676. closeStorePicker() {
  677. this.showStorePicker = false
  678. },
  679. openStorePicker() {
  680. this.showStorePicker = true
  681. },
  682. pickerStore(item,index) {
  683. this.showStorePicker = false
  684. this.storeChange(item,index)
  685. },
  686. // 选择店铺价格
  687. storeChange(item,index) {
  688. this.storeIdx = index;
  689. this.storeId = item.storeId;
  690. var valueSelect= this.getValueSelect();
  691. this.productValueSelect=valueSelect[0];
  692. this.getProductStoreStock("chooseStore");
  693. },
  694. // 更新所选规格的店铺价格
  695. getStorePriceList() {
  696. const priceList = this.values.filter(item => item.sku === this.productValueSelect.sku && item.storeId);
  697. this.storePriceList = priceList.map(item =>{
  698. const store = this.stores.find(it => item.storeId === it.storeId);
  699. if(store){
  700. return { ...item, storeName: store.storeName };
  701. }
  702. });
  703. // 获取页面店铺相关数据
  704. const selectStore = this.stores.find(it => this.productValueSelect.storeId === it.storeId);
  705. this.storeSelectInfo = selectStore || {}
  706. },
  707. }
  708. }
  709. </script>
  710. <style lang="scss">
  711. .shop-banner{
  712. height: 756upx;
  713. background-color: #FFFFFF;
  714. position: relative;
  715. .swiper-item{
  716. box-sizing: border-box;
  717. position: relative;
  718. }
  719. .swiper,
  720. .swiper-item,
  721. .swiper-item image{
  722. width: 100%;
  723. height: 100%;
  724. }
  725. .banner-mask{
  726. width: 100%;
  727. height: 44upx;
  728. // background: linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
  729. // opacity: 0.8;
  730. position: absolute;
  731. left: 0;
  732. bottom: 0;
  733. z-index: 9;
  734. background-image: url(../../static/images/black_mask.png);
  735. background-size: 20upx 44upx;
  736. background-repeat: repeat-x;
  737. }
  738. .num-box{
  739. width: 80upx;
  740. height: 44upx;
  741. line-height: 44upx;
  742. text-align: center;
  743. font-size: 24upx;
  744. font-family: PingFang SC;
  745. font-weight: 500;
  746. color: #FFFFFF;
  747. background: rgba(0, 0, 0, .3);
  748. border-radius: 22upx;
  749. position: absolute;
  750. right: 30upx;
  751. bottom: 30upx;
  752. z-index: 10;
  753. }
  754. .cf-box{
  755. position: absolute;
  756. z-index: 10;
  757. left: 0;
  758. right:0;
  759. top: calc(50% - 200rpx);
  760. bottom: calc(50% - 200rpx);
  761. background-color: rgba(0,0,0, 0.3);
  762. backdrop-filter: blur(2rpx); /* 背景模糊度 */
  763. display: flex;
  764. flex-direction: column;
  765. flex: 1;
  766. justify-content: center;
  767. align-items: center;
  768. color: #EDEEEF;
  769. .title{
  770. font-size: 40rpx;
  771. font-weight: bold;
  772. }
  773. .subTitle{
  774. font-size: 28rpx;
  775. font-weight: bold;
  776. margin-top: 10rpx;
  777. }
  778. }
  779. }
  780. .det-info{
  781. background: #FFFFFF;
  782. padding: 36upx 30upx 25upx;
  783. .price-box{
  784. display: flex;
  785. align-items: center;
  786. justify-content: space-between;
  787. .price{
  788. display: flex;
  789. align-items: flex-end;
  790. .label{
  791. color: #333;
  792. font-size: 28upx;
  793. font-family: PingFang SC;
  794. line-height: 1.3;
  795. margin-right: 5upx;
  796. }
  797. .unit{
  798. font-size: 28upx;
  799. font-family: PingFang SC;
  800. font-weight: bold;
  801. color: #FF6633;
  802. line-height: 1.3;
  803. }
  804. .num{
  805. font-size: 40upx;
  806. font-family: PingFang SC;
  807. font-weight: bold;
  808. color: #FF6633;
  809. margin: 0 20upx 0 10upx;
  810. line-height: 1;
  811. }
  812. .old{
  813. font-size: 28upx;
  814. font-family: PingFang SC;
  815. font-weight: 500;
  816. text-decoration: line-through;
  817. color: #BBBBBB;
  818. line-height: 1.3;
  819. }
  820. }
  821. .share-box{
  822. width: 120upx;
  823. height: 46upx;
  824. border: 1px solid #0bb3f2;
  825. border-radius: 23upx;
  826. display: flex;
  827. align-items: center;
  828. justify-content: center;
  829. position: relative;
  830. .text{
  831. font-size: 26upx;
  832. font-family: PingFang SC;
  833. font-weight: 500;
  834. color: #0bb3f2;
  835. }
  836. image{
  837. margin-left: 2rpx;
  838. width: 25upx;
  839. height: 24upx;
  840. }
  841. .share{
  842. display: inline-block;
  843. position: absolute;
  844. top: 0;
  845. left: 0;
  846. width: 100%;
  847. height: 100%;
  848. opacity: 0;
  849. }
  850. }
  851. .spec{
  852. font-size: 24upx;
  853. font-family: PingFang SC;
  854. font-weight: 500;
  855. color: #999999;
  856. line-height: 36upx;
  857. }
  858. }
  859. .name-box{
  860. font-size: 32upx;
  861. font-family: PingFang SC;
  862. font-weight: bold;
  863. color: #111111;
  864. line-height: 44upx;
  865. margin-top: 32upx;
  866. .tag{
  867. display: inline-block;
  868. padding: 0 6upx;
  869. height: 30upx;
  870. background: linear-gradient(90deg, #66b2ef 0%, #0bb3f2 100%);
  871. border-radius: 4upx;
  872. margin-right: 10upx;
  873. font-size: 22upx;
  874. font-family: PingFang SC;
  875. font-weight: bold;
  876. color: #FFFFFF;
  877. line-height: 30upx;
  878. float: left;
  879. margin-top: 7upx;
  880. }
  881. }
  882. .intro{
  883. font-size: 26upx;
  884. font-family: PingFang SC;
  885. font-weight: 500;
  886. color: #999999;
  887. line-height: 36upx;
  888. padding: 18upx 0 23upx;
  889. border-bottom: 1px solid #f7f7f7;
  890. }
  891. .safe-box{
  892. display: flex;
  893. align-items: center;
  894. padding-top: 24upx;
  895. image{
  896. width: 20upx;
  897. height: 24upx;
  898. margin-right: 20upx;
  899. }
  900. .text{
  901. font-size: 22upx;
  902. font-family: PingFang SC;
  903. font-weight: 500;
  904. color: #999999;
  905. line-height: 1;
  906. }
  907. .line{
  908. width: 1px;
  909. height: 23upx;
  910. background: #EDEEEF;
  911. margin: 0 20upx;
  912. }
  913. }
  914. }
  915. .inventor{
  916. height: 88upx;
  917. padding: 0 39upx 0 30upx;
  918. margin-top: 10upx;
  919. background: #FFFFFF;
  920. display: flex;
  921. align-items: center;
  922. justify-content: space-between;
  923. .left{
  924. display: flex;
  925. align-items: center;
  926. .head-box{
  927. margin-right: 27upx;
  928. display: flex;
  929. align-items: center;
  930. .head{
  931. width: 48upx;
  932. height: 48upx;
  933. border-radius: 50%;
  934. overflow: hidden;
  935. box-shadow: 0 0 0 1px #fff;
  936. margin-right: -10upx;
  937. image{
  938. width: 100%;
  939. height: 100%;
  940. }
  941. }
  942. }
  943. .num-box{
  944. font-size: 24upx;
  945. font-family: PingFang SC;
  946. font-weight: 500;
  947. color: #999999;
  948. .text{
  949. font-size: 24upx;
  950. font-family: PingFang SC;
  951. font-weight: 500;
  952. color: #999999;
  953. }
  954. }
  955. }
  956. .right{
  957. font-size: 24upx;
  958. font-family: PingFang SC;
  959. font-weight: 500;
  960. color: #999999;
  961. .text{
  962. font-size: 24upx;
  963. font-family: PingFang SC;
  964. font-weight: 500;
  965. color: #666666;
  966. }
  967. }
  968. }
  969. .effect{
  970. box-sizing: border-box;
  971. padding: 20upx 30upx;
  972. background: #FFFFFF;
  973. font-size: 28upx;
  974. font-family: PingFang SC;
  975. font-weight: 500;
  976. color: #666666;
  977. line-height: 1.8;
  978. margin-top: 10upx;
  979. display: flex;
  980. flex-direction: row;
  981. align-items: center;
  982. justify-content: space-between;
  983. .label{
  984. font-size: 28upx;
  985. font-family: PingFang SC;
  986. font-weight: 500;
  987. color: #111111;
  988. line-height: 1.8;
  989. }
  990. }
  991. .shop{
  992. box-sizing: border-box;
  993. padding: 20upx 30upx;
  994. background: #FFFFFF;
  995. font-size: 28upx;
  996. font-family: PingFang SC;
  997. font-weight: 500;
  998. color: #666666;
  999. line-height: 1.8;
  1000. margin-top: 10upx;
  1001. background: url(../../static/images/chu_query.png) no-repeat center center / cover;
  1002. .logo{
  1003. flex-shrink: 0;
  1004. width: 120rpx;
  1005. height: 80rpx;
  1006. border-radius: 10rpx;
  1007. image{
  1008. width: 100%;
  1009. height: 100%;
  1010. }
  1011. }
  1012. .txtBox{
  1013. flex: 1;
  1014. overflow: hidden;
  1015. margin:0 15rpx;
  1016. }
  1017. .name{
  1018. font-size: 32upx;
  1019. font-weight: 600;
  1020. color: #333;
  1021. text-align: left;
  1022. overflow: hidden;
  1023. white-space: nowrap;
  1024. text-overflow: ellipsis;
  1025. }
  1026. .desc{
  1027. font-size: 26upx;
  1028. font-weight: normal;
  1029. color: #666;
  1030. text-align: left;
  1031. }
  1032. .goShop{
  1033. flex-shrink: 0;
  1034. width: 120rpx;
  1035. height: 60rpx;
  1036. background: #fff;
  1037. border-radius: 30rpx;
  1038. color: #333;
  1039. font-size: 28upx;
  1040. margin: 0;
  1041. }
  1042. }
  1043. .shop-pBox{
  1044. box-sizing: border-box;
  1045. padding: 0upx 0upx;
  1046. background: #FFFFFF;
  1047. font-size: 28upx;
  1048. font-family: PingFang SC;
  1049. font-weight: 500;
  1050. color: #666666;
  1051. .item{
  1052. border: 1px solid #fff;
  1053. border-radius: 12rpx;
  1054. padding:18rpx 20rpx 24rpx;
  1055. .price{
  1056. font-size: 42rpx;
  1057. font-family: PingFang SC;
  1058. font-weight: bold;
  1059. color: #FF6633;
  1060. display: flex;
  1061. flex: 1;
  1062. b{ font-size: 30rpx;line-height: 46rpx; margin-top: 14rpx; }
  1063. }
  1064. .num{
  1065. font-size: 28rpx;
  1066. font-family: PingFang SC;
  1067. font-weight: normal;
  1068. color: #999;
  1069. width:200rpx;
  1070. text-align: right;
  1071. }
  1072. .name{
  1073. max-width: 60%;
  1074. margin-right: 10rpx;
  1075. font-size: 28upx;
  1076. font-weight: normal;
  1077. color: #333;
  1078. text-align: left;
  1079. overflow: hidden;
  1080. white-space: nowrap;
  1081. text-overflow: ellipsis;
  1082. }
  1083. }
  1084. .hover{
  1085. border:1rpx solid #FF6633;
  1086. }
  1087. .shop-morebtn {
  1088. margin-top: 14rpx;
  1089. box-sizing: border-box;
  1090. padding: 12rpx 30rpx;
  1091. font-size: 28rpx;
  1092. font-family: PingFang SC;
  1093. font-weight: 500;
  1094. color: #111111;
  1095. background: #F7F7F7;
  1096. border-radius: 32rpx;
  1097. text-align: center;
  1098. text {
  1099. color: #999;
  1100. }
  1101. }
  1102. }
  1103. .shop-pBox-name {
  1104. display: flex;
  1105. align-items: center;
  1106. justify-content: flex-start;
  1107. }
  1108. .storepopup {
  1109. padding: 40rpx 20rpx 20rpx 20rpx;
  1110. .storepopup-title {
  1111. text-align: center;
  1112. margin-bottom: 30rpx;
  1113. position: relative;
  1114. .close-icon {
  1115. width: 40rpx;
  1116. height: 40rpx;
  1117. position: absolute;
  1118. right: 0;
  1119. top: 50%;
  1120. transform: translate(0, -50%);
  1121. }
  1122. }
  1123. .storepopup-box {
  1124. height: 60vh;
  1125. }
  1126. }
  1127. .det-box{
  1128. margin-top: 10upx;
  1129. padding: 40upx 30upx 130upx 30upx;
  1130. background-color: #FFFFFF;
  1131. .title{
  1132. font-size: 30upx;
  1133. font-family: PingFang SC;
  1134. font-weight: bold;
  1135. color: #333333;
  1136. line-height: 1;
  1137. margin-bottom: 25upx;
  1138. }
  1139. }
  1140. .btn-foot{
  1141. box-sizing: border-box;
  1142. width: 100%;
  1143. height: 121upx;
  1144. background: #FFFFFF;
  1145. padding: 0 32upx 0 28upx;
  1146. display: flex;
  1147. align-items: center;
  1148. justify-content: space-between;
  1149. position: fixed;
  1150. left: 0;
  1151. bottom: 0;
  1152. z-index: 99;
  1153. .menu-box{
  1154. display: flex;
  1155. align-items: center;
  1156. .item{
  1157. display: flex;
  1158. align-items: center;
  1159. flex-direction: column;
  1160. margin-right: 48upx;
  1161. &:last-child{
  1162. margin-right: 0;
  1163. }
  1164. image{
  1165. width: 36upx;
  1166. height: 36upx;
  1167. margin-bottom: 10upx;
  1168. }
  1169. .label{
  1170. font-size: 20upx;
  1171. font-family: PingFang SC;
  1172. font-weight: 500;
  1173. color: #666666;
  1174. text-align: center;
  1175. }
  1176. }
  1177. ::v-deep .uni-badge--x{
  1178. display: flex;
  1179. align-items: center;
  1180. justify-content: center;
  1181. }
  1182. ::v-deep .uni-badge{
  1183. border: none;
  1184. background-color: #FF3636;
  1185. font-family: Roboto;
  1186. }
  1187. }
  1188. .btn-box{
  1189. display: flex;
  1190. align-items: center;
  1191. .btn{
  1192. width: 200upx;
  1193. height: 88upx;
  1194. line-height: 88upx;
  1195. text-align: center;
  1196. border-radius: 44upx;
  1197. margin-left: 20upx;
  1198. font-size: 30upx;
  1199. font-family: PingFang SC;
  1200. font-weight: bold;
  1201. color: #FFFFFF;
  1202. &:first-child{
  1203. margin-left: 0;
  1204. }
  1205. &.cart{
  1206. background: #FF6633;
  1207. }
  1208. &.buy{
  1209. background: #0bb3f2;
  1210. }
  1211. }
  1212. }
  1213. }
  1214. .product-spec{
  1215. .pro-info{
  1216. display: flex;
  1217. align-items: center;
  1218. .img-box{
  1219. width: 200upx;
  1220. height: 200upx;
  1221. background: #FFFFFF;
  1222. border-radius: 16upx;
  1223. overflow: hidden;
  1224. margin-right: 30upx;
  1225. image{
  1226. width: 100%;
  1227. height: 100%;
  1228. }
  1229. }
  1230. .info-text{
  1231. height: 200upx;
  1232. display: flex;
  1233. flex-direction: column;
  1234. justify-content: space-between;
  1235. .price{
  1236. display: flex;
  1237. align-items: flex-end;
  1238. .unit{
  1239. font-size: 32upx;
  1240. font-family: PingFang SC;
  1241. font-weight: bold;
  1242. color: #FF6633;
  1243. line-height: 1.2;
  1244. margin-right: 10upx;
  1245. }
  1246. .num{
  1247. font-size: 50upx;
  1248. font-family: PingFang SC;
  1249. font-weight: bold;
  1250. color: #FF6633;
  1251. line-height: 1;
  1252. }
  1253. }
  1254. .desc-box{
  1255. display: flex;
  1256. flex-direction: column;
  1257. padding-bottom: 9upx;
  1258. .text{
  1259. font-size: 26upx;
  1260. font-family: PingFang SC;
  1261. font-weight: 500;
  1262. color: #999999;
  1263. margin-top: 27upx;
  1264. line-height: 1;
  1265. &:first-child{
  1266. margin-top: 0;
  1267. }
  1268. }
  1269. }
  1270. }
  1271. }
  1272. .spec-box{
  1273. padding-top: 50upx;
  1274. .title{
  1275. font-size: 34upx;
  1276. font-family: PingFang SC;
  1277. font-weight: bold;
  1278. color: #111111;
  1279. line-height: 1;
  1280. }
  1281. .spec-list{
  1282. display: flex;
  1283. flex-wrap: wrap;
  1284. margin-top: 30upx;
  1285. .item{
  1286. box-sizing: border-box;
  1287. height: 64upx;
  1288. padding: 0 30upx;
  1289. line-height: 64upx;
  1290. font-size: 28upx;
  1291. font-family: PingFang SC;
  1292. font-weight: 500;
  1293. color: #111111;
  1294. background: #F7F7F7;
  1295. border: 1px solid #F7F7F7;
  1296. border-radius: 32upx;
  1297. margin-right: 20upx;
  1298. margin-bottom: 30upx;
  1299. &.active{
  1300. background: #F1FFFE;
  1301. border: 1px solid #8AD5CE;
  1302. color: #0bb3f2;
  1303. }
  1304. }
  1305. }
  1306. }
  1307. .price-num{
  1308. display: flex;
  1309. align-items: center;
  1310. justify-content: space-between;
  1311. margin-top: 14upx;
  1312. .label{
  1313. font-size: 34upx;
  1314. font-family: PingFang SC;
  1315. font-weight: bold;
  1316. color: #111111;
  1317. }
  1318. .num-box{
  1319. display: flex;
  1320. align-items: center;
  1321. .img-box{
  1322. width: 60upx;
  1323. height: 60upx;
  1324. // border-radius: 4upx;
  1325. border: 1px solid #dddddd;
  1326. display: flex;
  1327. align-items: center;
  1328. justify-content: center;
  1329. image{
  1330. width: 25rpx;
  1331. height: 25rpx;
  1332. }
  1333. }
  1334. input{
  1335. width: 60upx;
  1336. height: 60upx;
  1337. line-height: 60upx;
  1338. font-size: 28upx;
  1339. font-family: PingFang SC;
  1340. font-weight: 500;
  1341. color: #111111;
  1342. // border-radius: 4upx;
  1343. border-top: 1px solid #dddddd;
  1344. border-bottom: 1px solid #dddddd;
  1345. text-align: center;
  1346. // margin: 0 16upx;
  1347. }
  1348. }
  1349. }
  1350. .sub-btn{
  1351. width: 100%;
  1352. height: 88upx;
  1353. line-height: 88upx;
  1354. text-align: center;
  1355. font-size: 30upx;
  1356. font-family: PingFang SC;
  1357. font-weight: bold;
  1358. color: #FFFFFF;
  1359. background: #0bb3f2;
  1360. border-radius: 44upx;
  1361. margin-top: 30upx;
  1362. // margin-bottom: 30upx;
  1363. }
  1364. }
  1365. .contact-btn{
  1366. display: inline-block;
  1367. position: absolute;
  1368. top: 0;
  1369. left: 0;
  1370. width: 100%;
  1371. height: 100%;
  1372. opacity: 0;
  1373. z-index: 9999;
  1374. }
  1375. .loadding{
  1376. background-color: #fff;
  1377. display: flex;
  1378. flex-direction: column;
  1379. align-items: center;
  1380. justify-content: center;
  1381. position: absolute;
  1382. top: 0;
  1383. left: 0;
  1384. width: 100%;
  1385. height: 100%;
  1386. z-index: 9999;
  1387. image{
  1388. border-radius: 50%;
  1389. animation: load linear 1s infinite;
  1390. width: 120rpx;
  1391. height:120rpx;
  1392. }
  1393. .text{
  1394. font-size: 28rpx;
  1395. margin-top: 20rpx;
  1396. }
  1397. }
  1398. .form-item{
  1399. padding: 30upx 0;
  1400. display: flex;
  1401. align-items: flex-start;
  1402. border-bottom: 1px solid #F1F1F1;
  1403. &:last-child{
  1404. border-bottom: none;
  1405. }
  1406. .label{
  1407. width: 180upx;
  1408. text-align: left;
  1409. font-size: 30upx;
  1410. line-height: 44upx;
  1411. font-family: PingFang SC;
  1412. font-weight: 500;
  1413. color: #222222;
  1414. flex-shrink: 0;
  1415. }
  1416. input{
  1417. text-align: left;
  1418. }
  1419. .form-input{
  1420. font-size: 30upx;
  1421. font-family: PingFang SC;
  1422. font-weight: 500;
  1423. color: #999999;
  1424. text-align: left;
  1425. }
  1426. .form-textarea{
  1427. font-size: 30upx;
  1428. color: #999999;
  1429. height: 100upx;
  1430. padding: 4upx 0;
  1431. }
  1432. .birth-picker {
  1433. flex: 1;
  1434. display: flex;
  1435. align-items: center;
  1436. .right-box{
  1437. width: 100%;
  1438. display: flex;
  1439. align-items: center;
  1440. .input-box{
  1441. width: 470upx;
  1442. }
  1443. .arrow{
  1444. width: 13upx;
  1445. height: 23upx;
  1446. margin-left: 20upx;
  1447. }
  1448. }
  1449. }
  1450. }
  1451. </style>