12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208 |
- <template>
- <view class="content">
- <!-- 商品轮播图片 -->
- <view class="shop-banner" @click="showImg()">
- <swiper
- class="swiper"
- :indicator-dots="false"
- :circular="true"
- :interval="3000"
- indicator-color="rgba(255, 255, 255, 0.6)"
- indicator-active-color="#ffffff"
- @change="swiperChange">
- <swiper-item class="swiper-item" v-for="(item,index) in banner" :key="index">
- <video id="myVideo" :src='item.url' v-show="item.type == 'video'"
- show-mute-btn='true' @fullscreenchange='changvideo'
- show-center-play-btn loop='true'
- vslide-gesture-in-fullscreen='true' :muted='muted'
- enable-danmu controls autoplay="true" object-fit='contain'
- class="videotop"></video>
- <image :src="item.url" mode="aspectFill" v-show="item.type == 'image'"></image>
- </swiper-item>
- </swiper>
- <!-- 底部遮罩 -->
- <!-- <view class="banner-mask"></view> -->
- <!-- 数量 -->
- <view class="num-box mb40">{{ activeBanner }}/{{ banner.length }}</view>
- </view>
- <!-- 详细信息 -->
- <view class="det-info">
- <view class="price-box">
- <view class="price">
- <text class="label" v-if="userinfo.isShow==1&&isuser==false">会员价</text>
- <text class="label" v-else>零售价</text>
- <text class="unit">¥</text>
- <text class="num" v-if="userinfo.isShow==1&&isuser==false">{{product.price}}</text>
- <text class="num" v-else>{{product.otPrice}}</text>
- <text class="label" v-if="userinfo.isShow==1&&isuser==false">零售价</text>
- <text class="old" v-if="userinfo.isShow==1&&isuser==false">¥{{product.otPrice}}</text>
- </view>
- <view class="share-box">
- <text class="text">分享</text>
- <image src="../../static/images/share1.png" mode=""></image>
- <button class="share" data-name="shareBtn" open-type="share">分享</button>
- </view>
- </view>
- <view class="name-box">
- <view class="tag">{{utils.getDictLabelName("storeProductType",product.productType)}}</view>{{product.productName}}
- </view>
- <view class="intro" v-if="product.productInfo!=null" v-html="product.productInfo.replace(/\n/g,'<br>')">
- </view>
- <view class="safe-box">
- <image src="../../static/images/safe.png" mode="" ></image>
- <text class="text" v-if="userinfo.isShow==1&&isuser==false">免邮发货</text>
- <view class="line" v-if="userinfo.isShow==1&&isuser==false"></view>
- <text class="text">健康服务</text>
- <view class="line"></view>
- <text class="text">隐私保护</text>
- </view>
- </view>
- <!-- 购买人数、库存 -->
- <view class="inventor" v-if="userinfo.isShow==1&&isuser==false">
- <view class="left">
- <!-- <view class="head-box">
- <view class="head" v-for="(item,j) in 5" :key="j">
- <image src="../../static/images/head.jpg" mode=""></image>
- </view>
- </view> -->
- <view class="num-box" >
- 已有 <text class="text">{{product.sales}}</text> 人购买
- </view>
- </view>
- <!-- <view class="right">
- 库存 <text class="text">{{product.stock}}{{product.unitName}}</text>
- </view> -->
- <!-- <view class="right">
- <text class="text">库存{{product.stock>0?'充足':'售罄'}} </text>
- </view> -->
- </view>
- <!-- 功效 -->
- <!-- <view class="effect">
- <view class="label">商品说明书</view>
- <view class="label">查看</view>
-
- </view> -->
- <!-- 图文详情 -->
- <view class="det-box">
- <view class="title">图文详情</view>
- <view class="inner">
- <view v-html="product.description" style="font-size:0"></view>
- </view>
- </view>
- <!-- 底部按钮 -->
- <view class="btn-foot" v-if="userinfo.isShow==1&&isuser==false">
- <view class="menu-box">
- <view class="item" @click="goHome">
- <image src="../../static/images/back_home.png" mode=""></image>
- <text class="label">首页</text>
- </view>
- <view class="item" style="position: relative;">
- <image src="../../static/images/consult_small.png" mode=""></image>
- <text class="label">咨询</text>
- <button class="contact-btn" open-type="contact"></button>
- </view>
- <view class="item" @click="navgetTo('./cart')">
- <uni-badge size="small" :text="cartCount" absolute="rightTop" type="error">
- <image src="../../static/images/cart36.png" mode=""></image>
- </uni-badge>
- <text class="label">购物车</text>
- </view>
- </view>
- <view class="btn-box">
- <view class="btn cart" @click="addCart('cart')">加入购物车</view>
- <view class="btn buy" @click="addCart('buy')">{{buyText}}</view>
- </view>
- </view>
- <!-- 选择商品规格弹窗 -->
- <popupBottom ref="popup" :visible.sync="specVisible" title=" " radius="32" maxHeight="1024">
- <view class="product-spec">
- <!-- 商品信息 -->
- <view class="pro-info">
- <view class="img-box" @click="showImg(productValueSelect.image)">
- <image :src="productValueSelect.image==null||productValueSelect.image==''?product.image:productValueSelect.image" mode="aspectFill"></image>
- </view>
- <view class="info-text">
- <view class="price">
- <text class="unit">¥</text>
- <text class="num">{{ productValueSelect.price.toFixed(2) }}</text>
- </view>
- <view class="desc-box">
- <text class="text">已选:{{ productValueSelect.sku }}</text>
- <text class="text">库存:{{ productValueSelect.stock }}</text>
- </view>
- </view>
- </view>
-
- <!-- 门店 -->
- <!-- <view class="spec-box form-item" v-if="stores.length>0">
- <text class="label">所属门店</text>
- <picker class="birth-picker" mode="selector" :value="storeIdx" :range="storeNames" @change="pickerChange" @columnchange="pickerColumnchange">
- <view class="right-box">
- <view class="input-box">
- <input type="text" v-model="storeName" placeholder="请选择门店" class="form-input" disabled="disabled" />
- </view>
- <image class="arrow" src="../../static/images/arrow_gray.png" mode=""></image>
- </view>
- </picker>
- </view> -->
-
- <!-- 规格 -->
- <view class="spec-box">
- <view v-for="(item,index) in attrs">
- <view class="title">{{item.attrName}}</view>
- <view class="spec-list">
- <view
- v-for="(subItem,subindex) in item.values"
- :key="subindex"
- :class="subindex==item.index?'item active':'item'"
- @click="choseSpec(index,subindex)">
- {{ subItem }}
- </view>
- </view>
- </view>
- </view>
- <!-- 数量 -->
- <view class="price-num">
- <view class="label">数量</view>
- <view class="num-box">
- <view class="img-box" @click="lessNum()">
- <image v-if="specNum <= 1" src="../../static/images/jian.png" mode=""></image>
- <image v-else src="../../static/images/jian2.png" mode=""></image>
- </view>
- <input type="number" @change="changeNum" v-model="specNum" />
- <view class="img-box" @click="addNum()">
- <image src="../../static/images/add.png" mode=""></image>
- </view>
- </view>
- </view>
- <view class="sub-btn" @click="submit">确定</view>
- </view>
- </popupBottom>
-
- <view class="loadding" v-if="loadding==true">
- <image src='../../static/images/logo.png'></image>
- <text class="text">加载中...</text>
- </view>
- <u-modal :show="showModal" title="温馨提示" content="处方药须凭处方在药师指导下购买和使用" @confirm="hideModal()"></u-modal>
- </view>
- </template>
- <script>
- import {getDicts} from '@/api/index'
- import {getProductDetails,getCartCount,addCart} from '@/api/product'
- import {
- getUserInfo
- } from '@/api/user'
- import popupBottom from '@/components/px-popup-bottom/px-popup-bottom.vue'
- export default {
- components: {
- item:{},
- popupBottom
- },
- data() {
- return {
- loadding:true,
- buyText:"立即购买",
- // mTitle:"温馨提示",
- // mContent:"处方药须凭处方在药师指导下购买和使用",
- type:null,
- productValueSelect:{
- price:0,
- serviceFee:0
- },
- banner:[],
- productId:null,
- attrs:[],
- values:[],
- stores:[],
- storeId:null,
- storeNames:[],
- storeIdx:0,
- storeName:"",
- product:{
- price:0,
- otPrice:0,
- },
- showModal:false,
- // 当前轮播的图片
- activeBanner: 1,
- // 购物车数量
- cartCount: 0,
- // 规格弹窗
- specVisible: false,
- // 规格数量
- specNum: 1,
- config:null,
- showServiceFee:false,
- selectVal:"",
- muted:true,
- userinfo:[],
- isuser:false
- };
- },
- onLoad(options) {
- console.log("qxj options:"+JSON.stringify(options));
- if(options.userId!=null){
- uni.setStorageSync('tuiUserId',options.userId);
- }
- else if (options.hasOwnProperty('q') && options.q) {
- // 通过下面这步解码,可以拿到url的值
- const url = decodeURIComponent(options.q)
- this.url=url;
- // // 对url中携带的参数提取处理
- const obj = this.utils.urlToObj(url)
- uni.setStorageSync('tuiUserId',obj.userId);
- }
- uni.showShareMenu({
- withShareTicket:true,
- //小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
- menus:["shareAppMessage","shareTimeline"] //不设置默认发送给朋友
- })
- this.getDicts();
- this.productId = options.productId;
- if(this.utils.checkToken()){
- this.getCartCount();
- }
- },
- onShow() {
- this.getProductDetails();
- if(uni.getStorageSync('AppToken')){
- this.getuser()
- }else{
- this.isuser=true
- }
- },
- //发送给朋友
- onShareAppMessage(res) {
- if(this.utils.isLogin()){
- var user=JSON.parse( uni.getStorageSync('userInfo'))
- return {
- title: this.product.productName,
- path: '/pages/shopping/productDetails?productId='+this.product.productId+"&userId="+user.userId,
- imageUrl: this.product.image//分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- }
- }
- },
- //分享到朋友圈
- onShareTimeline(res) {
- if(this.utils.isLogin()){
- var user=JSON.parse( uni.getStorageSync('userInfo'))
- return {
- title: this.product.productName,
- query:'productId='+this.product.productId+"&userId="+user.userId,//页面参数
- imageUrl: this.product.image //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
- }
- }
-
- },
- methods: {
- getuser(){
- getUserInfo().then(
- res => {
- if (res.code == 200) {
- if (res.user != null) {
- this.userinfo = res.user;
- console.log(this.userinfo)
- }
- } else {
- uni.showToast({
- icon: 'none',
- title: "请求失败",
- });
- }
- },
- rej => {}
- );
- },
- changvideo(e){
- if(e.target.fullScreen==true){
- this.muted=false
- }else{
- this.muted=true
- }
- e.target.fullScreen
- console.log(e.target.fullScreen)
- },
- getDicts:function(){
- getDicts().then(
- res => {
- if(res.code==200){
- uni.setStorageSync('dicts',JSON.stringify(res));
- }
- },
- rej => {}
- );
- },
- showImg(img) {
- if(img!=null){
- var imgs=[];
- imgs.push(img)
- //预览图片
- uni.previewImage({
- urls: imgs,
- current: imgs[0]
- });
- }
- else{
- //预览图片
- uni.previewImage({
- urls: this.banner,
- current: this.banner[0]
- });
- }
- },
- doAddCart(type){
- if(this.specNum==0){
- uni.showToast({
- icon:'none',
- title: "库存不足",
- });
- return;
- }
- var isBuy=type=="buy"?1:0;
- let data = {isBuy:isBuy,cartNum:this.specNum,productId:this.productValueSelect.productId,attrValueId:this.productValueSelect.id};
- addCart(data).then(
- res => {
- if(res.code==200){
- if(type=="buy"){
- uni.navigateTo({
- url: '/pages/shopping/confirmOrder?type='+this.type+"&cartIds="+res.id+"&orderType="+this.orderType+"&storeId="+this.storeId
- })
- }
- else
- {
- this.getCartCount()
- uni.showToast({
- icon:'success',
- title: "添加成功",
- });
- }
- }else{
- uni.showToast({
- icon:'none',
- title: res.msg,
- });
- this.getProductDetails()
- }
- },
- rej => {}
- );
- },
- getProductDetails(){
- let data = {productId:this.productId};
- getProductDetails(data).then(
- res => {
- this.loadding=false
- if(res.code==200){
- this.product=res.product;
- if(this.product.productType==1){
- this.buyText="立即购买"
- }
- else if(this.product.productType==2){
- this.showModal=true;
- this.buyText="开方购买"
- }
- this.product.otPrice=this.product.otPrice.toFixed(2);
- this.product.price=this.product.price.toFixed(2);
- if(this.product.sliderImage!=null){
- this.banner=this.product.sliderImage.split(',');
- // 使用正则表达式过滤MP4文件
- const mp4Files = this.banner.filter(fileName => fileName.split('.').pop() != "mp4");
- const mp4Files2 = this.banner.filter(fileName => fileName.split('.').pop() === "mp4");
- this.banner = mp4Files.map(item => {
- return {
- type: 'image',
- url:item
- }
- })
- if(mp4Files2.length!=0){
- this.banner.unshift( {
- type: 'video',
- url:mp4Files2[0]
- })
- }
- }
- else{
- this.banner=[]
- }
- this.attrs=res.productAttr;
- this.attrs.forEach((item,index,arr)=>{
- item.values=item.attrValues.split(',');
- item.index=0
- });
- this.values=res.productValues;
- this.choseSpec(0,0)
- // this.stores=res.stores;
- // this.storeNames=this.stores.map(store => store.storeName);
- // if(this.stores.length>0){
- // this.storeName=this.storeNames[this.storeIdx];
- // this.storeId=this.stores[this.storeIdx].storeId;
- // }
-
-
- }else{
- uni.showToast({
- icon:'none',
- title: res.msg,
- });
- setTimeout(function(){
- uni.reLaunch({
- url: '/pages/home/index',
- })
- },2000)
-
- }
- },
- rej => {}
- );
- },
- getCartCount(){
- let data = {productId:this.productId};
- getCartCount(data).then(
- cartRes => {
- if(cartRes.code==200){
- this.cartCount=cartRes.data;
- }
- },
- rej => {}
- );
-
- },
- // swiper变化事件
- swiperChange(event) {
- this.activeBanner = event.detail.current + 1
- },
- // 回到首页
- goHome() {
- uni.switchTab({
- url: '/pages/home/index'
- })
- },
- // 跳转页面
- navgetTo(url) {
- this.utils.isLogin().then(res => {
- if(res){
- uni.navigateTo({
- url: url
- })
- }
- })
- },
- // 加入购物车
- addCart(type) {
- this.utils.isLogin().then(res => {
- if(res){
- this.type=type;
- this.specVisible = true
- }
- })
- },
- // 规格选择
- choseSpec(index,subIndex) {
- this.attrs[index].index = subIndex;
- this.$forceUpdate();
- let productAttr = this.attrs;
- let values = [];
- for (let i = 0; i < productAttr.length; i++) {
- for (let j = 0; j < productAttr[i].values.length; j++) {
- if (productAttr[i].index === j) { //筛选出默认规格
- values.push(productAttr[i].values[j]);
- }
- }
- }
- let selectVal=values.sort().join(","); //返回值:默认
- this.selectVal=selectVal;
- // var valueSelect=this.values.filter((item)=>{
- // return item.sku==selectVal;
- // });
- var valueSelect=this.getValueSelect();
- console.log("qxj valueSelect:"+valueSelect);
- if(valueSelect!=null&&valueSelect.length>0){
- this.productValueSelect=valueSelect[0];
- }
- console.log("qxj productValueSelect:"+JSON.stringify(this.productValueSelect));
- this.updateSpecNum();
-
- },
- //更新数量
- updateSpecNum(){
- if(this.productValueSelect.stock==0){
- this.specNum=0;
- }
- else{
- this.specNum=1;
- }
- },
- changeNum(e) {
- this.specNum = e.detail.value.replace(/\D/g, '')
- if(this.specNum < 1) {
- this.specNum = 1
- }
- if(this.specNum>=this.productValueSelect.stock){
- this.specNum=this.productValueSelect.stock
- }
- },
- // 数量减法
- lessNum() {
- this.specNum--
- if(this.specNum < 1) {
- this.specNum = 1
- }
- if(this.specNum>=this.productValueSelect.stock){
- this.specNum=this.productValueSelect.stock
- }
- },
- // 数量加法
- addNum() {
- this.specNum++
- if(this.specNum>=this.productValueSelect.stock){
- this.specNum=this.productValueSelect.stock
- }
- },
- // 确定选择该规格
- submit() {
- this.specVisible = false
- this.doAddCart(this.type);
- },
- hideModal(){
- this.showModal=false;
- },
- getValueSelect(){
- var valueSelect=this.values.filter((item)=>{
- return item.sku==this.selectVal;
- });
- return valueSelect;
- },
- pickerChange(e) {
- console.log("pickerChange index:"+e.detail.value);
- var valueSelect=this.getValueSelect();
- this.productValueSelect=valueSelect[0];
-
- },
- pickerColumnchange(e){
-
- }
- }
- }
- </script>
- <style lang="scss">
- .videotop{
- height: 100%;
- width: 100%;
- }
- .shop-banner{
- height: 756upx;
- background-color: #FFFFFF;
- position: relative;
- .swiper-item{
- box-sizing: border-box;
- position: relative;
- }
- .swiper,
- .swiper-item,
- .swiper-item image{
- width: 100%;
- height: 100%;
- }
- .banner-mask{
- width: 100%;
- height: 44upx;
- // background: linear-gradient(0deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
- // opacity: 0.8;
- position: absolute;
- left: 0;
- bottom: 0;
- z-index: 9;
- background-image: url(../../static/images/black_mask.png);
- background-size: 20upx 44upx;
- background-repeat: repeat-x;
- }
- .num-box{
- width: 80upx;
- height: 44upx;
- line-height: 44upx;
- text-align: center;
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- background: rgba(0, 0, 0, .3);
- border-radius: 22upx;
- position: absolute;
- right: 30upx;
- bottom: 30upx;
- z-index: 10;
- }
- .cf-box{
- position: absolute;
- z-index: 10;
- left: 0;
- right:0;
- top: calc(50% - 200rpx);
- bottom: calc(50% - 200rpx);
- background-color: rgba(0,0,0, 0.3);
- backdrop-filter: blur(2rpx); /* 背景模糊度 */
- display: flex;
- flex-direction: column;
- flex: 1;
- justify-content: center;
- align-items: center;
- color: #EDEEEF;
- .title{
- font-size: 40rpx;
- font-weight: bold;
- }
- .subTitle{
- font-size: 28rpx;
- font-weight: bold;
- margin-top: 10rpx;
- }
- }
-
-
- }
- .det-info{
- background: #FFFFFF;
- padding: 36upx 30upx 25upx;
- .price-box{
- display: flex;
- align-items: center;
- justify-content: space-between;
- .price{
- display: flex;
- align-items: flex-end;
- .label{
- color: #333;
- font-size: 28upx;
- font-family: PingFang SC;
- line-height: 1.3;
- margin-right: 5upx;
- }
- .unit{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FF6633;
- line-height: 1.3;
- }
- .num{
- font-size: 40upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FF6633;
- margin: 0 20upx 0 10upx;
- line-height: 1;
- }
- .old{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- text-decoration: line-through;
- color: #BBBBBB;
- line-height: 1.3;
- }
- }
- .share-box{
- width: 120upx;
- height: 46upx;
- border: 1px solid#018C39;
- border-radius: 23upx;
- display: flex;
- align-items: center;
- justify-content: center;
- position: relative;
- .text{
- font-size: 26upx;
- font-family: PingFang SC;
- font-weight: 500;
- color:#018C39;
- }
- image{
- margin-left: 2rpx;
- width: 25upx;
- height: 24upx;
- }
- .share{
- display: inline-block;
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- opacity: 0;
- }
- }
- .spec{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 36upx;
- }
- }
- .name-box{
- font-size: 32upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #111111;
- line-height: 44upx;
- margin-top: 32upx;
- .tag{
- display: inline-block;
- padding: 0 6upx;
- height: 30upx;
- background: linear-gradient(90deg, #66b2ef 0%,#018C39 100%);
- border-radius: 4upx;
- margin-right: 10upx;
- font-size: 22upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FFFFFF;
- line-height: 30upx;
- float: left;
- margin-top: 7upx;
- }
- }
- .intro{
- font-size: 26upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 36upx;
- padding: 18upx 0 23upx;
- border-bottom: 1px solid #f7f7f7;
- }
- .safe-box{
- display: flex;
- align-items: center;
- padding-top: 24upx;
- image{
- width: 20upx;
- height: 24upx;
- margin-right: 20upx;
- }
- .text{
- font-size: 22upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 1;
- }
- .line{
- width: 1px;
- height: 23upx;
- background: #EDEEEF;
- margin: 0 20upx;
- }
- }
- }
- .inventor{
- height: 88upx;
- padding: 0 39upx 0 30upx;
- margin-top: 10upx;
- background: #FFFFFF;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .left{
- display: flex;
- align-items: center;
- .head-box{
- margin-right: 27upx;
- display: flex;
- align-items: center;
- .head{
- width: 48upx;
- height: 48upx;
- border-radius: 50%;
- overflow: hidden;
- box-shadow: 0 0 0 1px #fff;
- margin-right: -10upx;
- image{
- width: 100%;
- height: 100%;
- }
- }
- }
- .num-box{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- .text{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- }
- }
- }
- .right{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- .text{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- }
- }
- }
- .effect{
- box-sizing: border-box;
- padding: 20upx 30upx;
- background: #FFFFFF;
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- line-height: 1.8;
- margin-top: 10upx;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- .label{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #111111;
- line-height: 1.8;
- }
- }
- .det-box{
- margin-top: 10upx;
- padding: 40upx 30upx 130upx 30upx;
- background-color: #FFFFFF;
- .title{
- font-size: 30upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- line-height: 1;
- margin-bottom: 25upx;
- }
-
- }
-
- .btn-foot{
- box-sizing: border-box;
- width: 100%;
- height: 121upx;
- background: #FFFFFF;
- padding: 0 32upx 0 28upx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- position: fixed;
- left: 0;
- bottom: 0;
- z-index: 99;
- .menu-box{
- display: flex;
- align-items: center;
- .item{
- display: flex;
- align-items: center;
- flex-direction: column;
- margin-right: 48upx;
- &:last-child{
- margin-right: 0;
- }
- image{
- width: 36upx;
- height: 36upx;
- margin-bottom: 10upx;
- }
- .label{
- font-size: 20upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- text-align: center;
- }
- }
- /deep/.uni-badge--x{
- display: flex;
- align-items: center;
- justify-content: center;
- }
- /deep/.uni-badge{
- border: none;
- background-color: #FF3636;
- font-family: Roboto;
- }
- }
- .btn-box{
- display: flex;
- align-items: center;
- .btn{
- width: 200upx;
- height: 88upx;
- line-height: 88upx;
- text-align: center;
- border-radius: 44upx;
- margin-left: 20upx;
- font-size: 30upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FFFFFF;
- &:first-child{
- margin-left: 0;
- }
- &.cart{
- background: #FF6633;
- }
- &.buy{
- background:#018C39;
- }
- }
- }
- }
- .product-spec{
- .pro-info{
- display: flex;
- align-items: center;
- .img-box{
- width: 200upx;
- height: 200upx;
- background: #FFFFFF;
- border-radius: 16upx;
- overflow: hidden;
- margin-right: 30upx;
- image{
- width: 100%;
- height: 100%;
- }
- }
- .info-text{
- height: 200upx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .price{
- display: flex;
- align-items: flex-end;
- .unit{
- font-size: 32upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FF6633;
- line-height: 1.2;
- margin-right: 10upx;
- }
- .num{
- font-size: 50upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FF6633;
- line-height: 1;
- }
- }
- .desc-box{
- display: flex;
- flex-direction: column;
- padding-bottom: 9upx;
- .text{
- font-size: 26upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- margin-top: 27upx;
- line-height: 1;
- &:first-child{
- margin-top: 0;
- }
- }
- }
- }
- }
- .spec-box{
- padding-top: 50upx;
- .title{
- font-size: 34upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #111111;
- line-height: 1;
- }
- .spec-list{
- display: flex;
- flex-wrap: wrap;
- margin-top: 30upx;
- .item{
- box-sizing: border-box;
- height: 64upx;
- padding: 0 30upx;
- line-height: 64upx;
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #111111;
- background: #F7F7F7;
- border: 1px solid #F7F7F7;
- border-radius: 32upx;
- margin-right: 20upx;
- margin-bottom: 30upx;
- &.active{
- background: #F1FFFE;
- border: 1px solid #8AD5CE;
- color:#018C39;
- }
- }
- }
- }
- .price-num{
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-top: 14upx;
- .label{
- font-size: 34upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #111111;
- }
- .num-box{
- display: flex;
- align-items: center;
- .img-box{
- width: 60upx;
- height: 60upx;
- // border-radius: 4upx;
- border: 1px solid #dddddd;
- display: flex;
- align-items: center;
- justify-content: center;
- image{
- width: 25rpx;
- height: 25rpx;
- }
- }
- input{
- width: 60upx;
- height: 60upx;
- line-height: 60upx;
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #111111;
- // border-radius: 4upx;
- border-top: 1px solid #dddddd;
- border-bottom: 1px solid #dddddd;
- text-align: center;
- // margin: 0 16upx;
- }
- }
- }
- .sub-btn{
- width: 100%;
- height: 88upx;
- line-height: 88upx;
- text-align: center;
- font-size: 30upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FFFFFF;
- background:#018C39;
- border-radius: 44upx;
- margin-top: 30upx;
- // margin-bottom: 30upx;
-
- }
- }
- .contact-btn{
- display: inline-block;
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- opacity: 0;
- z-index: 9999;
- }
- .loadding{
- background-color: #fff;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 9999;
- image{
- border-radius: 50%;
- animation: load linear 1s infinite;
- width: 120rpx;
- height:120rpx;
- }
- .text{
- font-size: 28rpx;
- margin-top: 20rpx;
- }
- }
- .form-item{
- padding: 30upx 0;
- display: flex;
- align-items: flex-start;
- border-bottom: 1px solid #F1F1F1;
- &:last-child{
- border-bottom: none;
- }
- .label{
- width: 180upx;
- text-align: left;
- font-size: 30upx;
- line-height: 44upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #222222;
- flex-shrink: 0;
- }
- input{
- text-align: left;
- }
- .form-input{
- font-size: 30upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- text-align: left;
- }
- .form-textarea{
- font-size: 30upx;
- color: #999999;
- height: 100upx;
- padding: 4upx 0;
- }
-
- .birth-picker {
- flex: 1;
- display: flex;
- align-items: center;
-
- .right-box{
- width: 100%;
- display: flex;
- align-items: center;
- .input-box{
- width: 470upx;
- }
- .arrow{
- width: 13upx;
- height: 23upx;
- margin-left: 20upx;
- }
- }
- }
- }
- </style>
|