Commit b26877ef by 赵雅纹

sku

parent 91bcf738
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
<view class="item-title">{{productName}}</view> <view class="item-title">{{productName}}</view>
</view> </view>
<view class="pro-price-wrap"> <view class="pro-price-wrap">
<view class="pro-plus-price" wx:if="{{memberPrice}}"> <view class="pro-plus-price">
<text>¥</text> <text>¥</text>
<text class="plus-price">{{memberPrice}}</text> <text class="plus-price">{{memberPrice ? memberPrice : (minSalePrice / 100)}}</text>
<image mode="widthFix" src="/assets/imgs/7_1_0/member-icon.png"></image> <image wx:if="{{memberPrice}}" mode="widthFix" src="/assets/imgs/7_1_0/member-icon.png"></image>
</view> </view>
<view class="pro-member-price" wx:if="{{plusPrice}}"> <view class="pro-member-price" wx:if="{{plusPrice}}">
<text>¥</text> <text>¥</text>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<view class="hot-item-desc border_box"> <view class="hot-item-desc border_box">
<view class="item-name">{{item.productName}}</view> <view class="item-name">{{item.productName}}</view>
<view class="item-desc">{{item.productStatusDesc}}</view> <view class="item-desc">{{item.productStatusDesc}}</view>
<view class="item-vip-price weui-flex" wx:if="{{item.memberPrice}}"> <view class="item-vip-price weui-flex">
<view class="" > <view class="" >
<image <image
class="item-vip" class="item-vip"
...@@ -17,10 +17,11 @@ ...@@ -17,10 +17,11 @@
lazy-load="false" lazy-load="false"
binderror="" binderror=""
bindload="" bindload=""
wx:if="{{item.memberPrice}}"
/> />
</view> </view>
<text class="vip-sale-price border_box">¥{{item.memberPrice}}</text> <text class="vip-sale-price border_box">¥{{item.memberPrice ? item.memberPrice : (item.minSalePrice / 100)}}</text>
<text class="vip-original-price">¥189</text> <!-- <text class="vip-original-price">¥189</text> -->
</view> </view>
<view class="item-plus-price weui-flex" wx:if="{{item.plusPrice}}"> <view class="item-plus-price weui-flex" wx:if="{{item.plusPrice}}">
<view class=""> <view class="">
......
...@@ -107,6 +107,7 @@ Component({ ...@@ -107,6 +107,7 @@ Component({
// this.setData({ // this.setData({
// price // price
// }) // })
}, },
/** /**
...@@ -123,6 +124,7 @@ Component({ ...@@ -123,6 +124,7 @@ Component({
isOutStock: false, // 背景色 isOutStock: false, // 背景色
clickDataStock: 0, clickDataStock: 0,
salePrice:0, salePrice:0,
picUrl:''
}, },
detached: function () { detached: function () {
...@@ -262,11 +264,12 @@ Component({ ...@@ -262,11 +264,12 @@ Component({
} else { } else {
return false return false
} }
console.log('........', clickData)
// 有库存 // 有库存
let btnText = '确定' let btnText = '确定'
let isOutStock = false let isOutStock = false
// 没库存 // 没库存
if (!clickData.stock) { if (!this.data.skuStock) {
isOutStock = true isOutStock = true
btnText = "商品暂无库存" btnText = "商品暂无库存"
} }
...@@ -312,6 +315,7 @@ Component({ ...@@ -312,6 +315,7 @@ Component({
this.setData({ this.setData({
skuStock: this.data.skuInfos[i].stock, skuStock: this.data.skuInfos[i].stock,
salePrice: this.data.skuInfos[i].salePrice, salePrice: this.data.skuInfos[i].salePrice,
picUrl: this.data.skuInfos[i].picUrl,
skuId: this.data.skuInfos[i].skuId skuId: this.data.skuInfos[i].skuId
}) })
} }
...@@ -334,6 +338,7 @@ Component({ ...@@ -334,6 +338,7 @@ Component({
var skuStock = 0 var skuStock = 0
var skuId = '' var skuId = ''
var salePrice = 0 var salePrice = 0
var picUrl = ''
var curSku = 0 var curSku = 0
var curSkus = this.data.skuInfos.filter(function (item) { var curSkus = this.data.skuInfos.filter(function (item) {
curSku = item curSku = item
...@@ -348,6 +353,7 @@ Component({ ...@@ -348,6 +353,7 @@ Component({
skuStock = item.stock skuStock = item.stock
skuId = item.skuId skuId = item.skuId
salePrice = item.salePrice salePrice = item.salePrice
picUrl = item.picUrl
} }
console.log(flag) console.log(flag)
...@@ -371,7 +377,8 @@ Component({ ...@@ -371,7 +377,8 @@ Component({
skuText: skuText, skuText: skuText,
proNum: proNum, proNum: proNum,
skuId: skuId, skuId: skuId,
salePrice: salePrice salePrice: salePrice,
picUrl: picUrl
} }
// if (!this.data.priceNoChange) { // if (!this.data.priceNoChange) {
// updateData.price = price// 拼团规格没有价格信息 // updateData.price = price// 拼团规格没有价格信息
......
...@@ -7,9 +7,8 @@ ...@@ -7,9 +7,8 @@
src="/images/close.png" src="/images/close.png"
bindtap="hidePopup" bindtap="hidePopup"
/> />
<view class="top-info clearfix"> <view class="top-info clearfix">
<image mode="widthFix" src="{{curSku.sku_pic_url && curSku.sku_pic_url != 'undefined' ? (imageDomain + curSku.sku_pic_url) : indexImg}}" /> <image mode="widthFix" src="{{picUrl && picUrl != 'undefined' ? picUrl : indexImg}}" />
<view class="top-text"> <view class="top-text">
<!-- <view class="price-text" wx:if="{{exchangePrice <= 0}}">¥{{price / 100}}</view> --> <!-- <view class="price-text" wx:if="{{exchangePrice <= 0}}">¥{{price / 100}}</view> -->
<view class="price-text">¥{{salePrice /100}}</view> <view class="price-text">¥{{salePrice /100}}</view>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<view class="product-price"> <view class="product-price">
<view class="price-wrap"> <view class="price-wrap">
<view class="price-icon" wx:if="{{memberLevel}}">会员专享价</view> <view class="price-icon" wx:if="{{memberLevel}}">会员专享价</view>
<text class="price">¥{{productInfo.maxSalePrice / 100}}</text> <text class="price">¥{{productInfo.minSalePrice / 100}}</text>
<!-- <text class="cost-price">¥888</text> --> <!-- <text class="cost-price">¥888</text> -->
</view> </view>
<button <button
...@@ -54,8 +54,9 @@ ...@@ -54,8 +54,9 @@
<view class="member-price" wx:if="{{openPlusStatus}}"> <view class="member-price" wx:if="{{openPlusStatus}}">
<view class="member-price-info"> <view class="member-price-info">
<image class="member-price-icon" src="/assets/imgs/7_1_0/plus.png" /> <image class="member-price-icon" src="/assets/imgs/7_1_0/plus.png" />
<text class="before-reduce-price">¥558,</text> <text class="before-reduce-price">¥{{productInfo.plusPrice ? (productInfo.plusPrice / 100) : (productInfo.minSalePrice / 100)
<text class="reduce-price">本次立减¥60</text> }}</text>
<!-- <text class="reduce-price">本次立减¥60</text> -->
</view> </view>
<view class="open"> <view class="open">
<text class="open-text">立即开通</text> <text class="open-text">立即开通</text>
...@@ -136,11 +137,12 @@ ...@@ -136,11 +137,12 @@
bindsubmit="addCart" bindsubmit="addCart"
report-submit report-submit
name='nav' name='nav'
wx:if="{{!fromZc}}" wx:if="{{!fromZc && productInfo.productStatus == 2}}"
> >
<button class="cart-button get-formId--btn" formType="submit">加入购物车</button> <button disabled="" class="cart-button get-formId--btn" formType="submit">加入购物车</button>
</form> </form>
<form <form
wx:if="{{productInfo.productStatus == 2}}"
class='get-formId get-formId--form' class='get-formId get-formId--form'
bindsubmit="goBuy" bindsubmit="goBuy"
report-submit report-submit
...@@ -159,7 +161,7 @@ ...@@ -159,7 +161,7 @@
product-name="{{productInfo.productName}}" product-name="{{productInfo.productName}}"
spec-item="{{productInfo.specItemList}}" spec-item="{{productInfo.specItemList}}"
good-type="{{productInfo.productType}}" good-type="{{productInfo.productType}}"
index-img="{{productInfo.listUrls}}" index-img="{{productInfo.indexUrl}}"
sku-infos="{{productInfo.productSku}}" sku-infos="{{productInfo.productSku}}"
show="{{showSkuPopup}}" show="{{showSkuPopup}}"
bind:skuselect="confirmClick" bind:skuselect="confirmClick"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment