productDetails.vue 36 KB

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