main
fanfan 9 months ago
parent 204751135b
commit 92a2b97b05
  1. 60
      pages/goods/detail.vue

@ -40,7 +40,7 @@
<view class="rightBox"> <view class="rightBox">
<image :src="$picUrl+'/static/detail/ben.png'" v-if="userInfo.user_type==40" <image :src="$picUrl+'/static/detail/ben.png'" v-if="userInfo.user_type==40"
style="width: 44rpx;height: 42rpx;"></image> style="width: 44rpx;height: 42rpx;"></image>
<image :src="$picUrl+'/static/detail/zhuan.png'" v-if="userInfo.user_type==30" <image :src="$picUrl+'/static/detail/zhuan.png'" v-if="userInfo.user_type==30"
style="width: 44rpx;height: 38rpx;"></image> style="width: 44rpx;height: 38rpx;"></image>
<image :src="$picUrl+'/static/detail/sheng.png'" v-if="userInfo.user_type==20"></image> <image :src="$picUrl+'/static/detail/sheng.png'" v-if="userInfo.user_type==20"></image>
<text class="span" <text class="span"
@ -121,13 +121,13 @@
<view class="title">已选</view> <view class="title">已选</view>
<view class="info" style="justify-content: flex-start;" v-if="goods.skuList.length>0"> <view class="info" style="justify-content: flex-start;" v-if="goods.skuList.length>0">
<text <text
style="margin-right: 10rpx;">{{selectSku.title.name}}-{{selectSku.value.name}}</text>{{selectShop}} style="margin-right: 10rpx;">{{goods.cmmdty_model}}&nbsp;&nbsp;{{selectSku.title.name}}-{{selectSku.value.name}}</text>{{selectNum}}
</view> </view>
<u-icon name="arrow-right" color="#B7B7B7" v-if="stockValue=='有货'"></u-icon> <u-icon name="arrow-right" color="#B7B7B7" v-if="stockValue=='有货'"></u-icon>
</view> </view>
<view class="chosed" v-else @click="stockValue=='有货'?choseSku(3):''"> <view class="chosed" v-else @click="stockValue=='有货'?choseSku(3):''">
<view class="title">已选</view> <view class="title">已选</view>
<view class="info">{{selectNum}}</view> <view class="info">{{goods.cmmdty_model}}&nbsp;&nbsp;{{selectNum}}</view>
<u-icon name="arrow-right" color="#B7B7B7"></u-icon> <u-icon name="arrow-right" color="#B7B7B7"></u-icon>
</view> </view>
<view class="chosed" v-if="goods.skuList && goods.skuList.length > 0 && goods.skuList[0].stock_num > 0"> <view class="chosed" v-if="goods.skuList && goods.skuList.length > 0 && goods.skuList[0].stock_num > 0">
@ -165,7 +165,7 @@
<view class="title">保障</view> <view class="title">保障</view>
<view class="info"> <view class="info">
<view class="infoBao" v-for="(item,index) in serveList" :key="index"> <view class="infoBao" v-for="(item,index) in serveList" :key="index">
<image :src="$picUrl+'/static/detail/selectIcon.png'" class="buy"></image> <image :src="$picUrl+'/static/detail/selectIcon.png'" class="buy"></image>
<text class="info" style="margin-right: 3rpx;">{{item.name}}</text> <text class="info" style="margin-right: 3rpx;">{{item.name}}</text>
</view> </view>
@ -284,10 +284,14 @@
<template v-if="isSeckill"> <template v-if="isSeckill">
<template v-if="isBuy"> <template v-if="isBuy">
<template v-if="seckillText=='距离'"> <template v-if="seckillText=='距离'">
<view class="addCar" :style="{'background': stockValue=='有货'?'#FF9E2B':'#cecece' }" @click="stockValue=='有货'?choseSku(2):''"> <view class="addCar"
:style="{'background': stockValue=='有货'?'#FF9E2B':'#cecece' }"
@click="stockValue=='有货'?choseSku(2):''">
加入购物车 加入购物车
</view> </view>
<view class="buyNow" :style="{'background': stockValue=='有货'?'linear-gradient(102deg, #FE5E06 0%, #F3221A 100%)':'#cecece' }" @click="stockValue=='有货'?choseSku(3):''" > <view class="buyNow"
:style="{'background': stockValue=='有货'?'linear-gradient(102deg, #FE5E06 0%, #F3221A 100%)':'#cecece' }"
@click="stockValue=='有货'?choseSku(3):''">
立即购买 立即购买
</view> </view>
</template> </template>
@ -304,10 +308,13 @@
</template> </template>
</template> </template>
<template v-else> <template v-else>
<view class="addCar" :style="{'background': stockValue=='有货'?'#FF9E2B':'#cecece' }" @click="stockValue=='有货'?choseSku(2):''"> <view class="addCar" :style="{'background': stockValue=='有货'?'#FF9E2B':'#cecece' }"
@click="stockValue=='有货'?choseSku(2):''">
加入购物车 加入购物车
</view> </view>
<view class="buyNow" :style="{'background': stockValue=='有货'?'linear-gradient(102deg, #FE5E06 0%, #F3221A 100%)':'#cecece' }" @click="stockValue=='有货'?choseSku(3):''"> <view class="buyNow"
:style="{'background': stockValue=='有货'?'linear-gradient(102deg, #FE5E06 0%, #F3221A 100%)':'#cecece' }"
@click="stockValue=='有货'?choseSku(3):''">
立即购买 立即购买
</view> </view>
</template> </template>
@ -409,8 +416,8 @@
<image :src="$picUrl+'/static/toTop.png?=1'"></image> <image :src="$picUrl+'/static/toTop.png?=1'"></image>
</view> </view>
<view v-if="isTodo"> <view v-if="isTodo">
<SkuPopup v-model="showSkuPopup" :skuMode="skuMode" :goods="goods" :addressResult='addressResult' @getSku='onGetSku' <SkuPopup v-model="showSkuPopup" :skuMode="skuMode" :goods="goods" :addressResult='addressResult'
@addCart="onAddCart" /> @getSku='onGetSku' @addCart="onAddCart" />
</view> </view>
<setPrice ref="setRange" @getprice="getprice" /> <setPrice ref="setRange" @getprice="getprice" />
<!-- 海报图弹层 --> <!-- 海报图弹层 -->
@ -499,7 +506,7 @@
onLoad(options) { onLoad(options) {
const that = this; const that = this;
let result = uni.getStorageSync("addressResult") let result = uni.getStorageSync("addressResult")
this.addressResult = result?result.address_component:this.addressResult this.addressResult = result ? result.address_component : this.addressResult
this.isPre = options.isPre ? options.isPre : null this.isPre = options.isPre ? options.isPre : null
// query // query
// this.onRecordQuery(options) // this.onRecordQuery(options)
@ -552,7 +559,10 @@
methods: { methods: {
async getGoodsStockInfor() { async getGoodsStockInfor() {
let params = { let params = {
list:[{goods_id:this.goodsId,num:this.selectNum}], list: [{
goods_id: this.goodsId,
num: this.selectNum
}],
province: this.addressResult ? this.addressResult.province : '江苏省', province: this.addressResult ? this.addressResult.province : '江苏省',
city: this.addressResult ? this.addressResult.city : '南京市', city: this.addressResult ? this.addressResult.city : '南京市',
district: this.addressResult ? this.addressResult.district : '玄武区' district: this.addressResult ? this.addressResult.district : '玄武区'
@ -1504,16 +1514,18 @@
overflow: hidden; overflow: hidden;
.title { .title {
font-size: 24rpx; font-family: PingFang SC, PingFang SC;
font-weight: 400; font-weight: 500;
color: #C4C4C4; font-size: 30rpx;
color: #A5A5A5;
margin-right: 38rpx; margin-right: 38rpx;
} }
.info { .info {
flex: 1; flex: 1;
font-size: 24rpx; font-family: PingFang SC, PingFang SC;
font-weight: 400; font-weight: 500;
font-size: 30rpx;
color: #3D3D3D; color: #3D3D3D;
display: flex; display: flex;
align-items: center; align-items: center;
@ -1549,24 +1561,24 @@
} }
.infoLeft { .infoLeft {
height: 34rpx; font-family: PingFang SC, PingFang SC;
font-size: 24rpx; font-weight: 500;
font-weight: 400; font-size: 30rpx;
color: #FE3636; color: #FE3636;
line-height: 34rpx; line-height: 34rpx;
image { image {
width: 8rpx; width: 12rpx;
height: 14rpx; height: 18rpx;
margin: 0 10rpx 0 8rpx; margin: 0 10rpx 0 8rpx;
} }
} }
.address { .address {
height: 34rpx; height: 34rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 400; font-weight: 500;
font-size: 30rpx;
color: #3D3D3D; color: #3D3D3D;
line-height: 34rpx; line-height: 34rpx;

Loading…
Cancel
Save