mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-24 05:46:04 +08:00
优化商品详情页面
This commit is contained in:
parent
f260c8e630
commit
808b1214ae
@ -56,3 +56,29 @@ export function getGroupBuyProduct(dataObj) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品
|
||||
*/
|
||||
export function getProduct(dataObj) {
|
||||
return new Promise(
|
||||
(resolve, reject) => {
|
||||
requestNoAuth({
|
||||
url: url.queryProduct,
|
||||
method: "GET",
|
||||
data: dataObj,
|
||||
//动态数据
|
||||
success: function(res) {
|
||||
if (res.statusCode == 200) {
|
||||
let _products = res.data.data;
|
||||
resolve(_products);
|
||||
return;
|
||||
}
|
||||
reject();
|
||||
},
|
||||
fail: function(e) {
|
||||
reject();
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -16,20 +16,6 @@
|
||||
<view class="express"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 积分商品 -->
|
||||
<view class="score-price-card" v-if="type === 'score'">
|
||||
<view class="x-f">
|
||||
<image class="score-img" src="http://shopro.7wpp.com/imgs/score.png" mode=""></image>
|
||||
<text class="price">{{ detail.price }}</text>
|
||||
</view>
|
||||
<view class="x-bc price-bottom-box">
|
||||
<view class="x-f">
|
||||
<view class="original-price">价值:¥{{ detail.original_price }}</view>
|
||||
<text class="line"></text>
|
||||
<view class="sold">已兑换:{{ detail.sales }}件</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 团购商品 -->
|
||||
<view class="groupon-price-box" v-if="detail.activity && detail.activity.type === 'groupon'">
|
||||
<view class="">
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
</view>
|
||||
|
||||
<view class="grid margin-bottom text-center col-2">
|
||||
<view class="padding-lr-xs margin-top-xs " v-for="(item,indexs) in products" :key="indexs">
|
||||
<view class="padding-lr-xs margin-top-xs margin-bottom-sm" v-for="(item,indexs) in products" :key="indexs">
|
||||
<view class="padding bg-white goods" @tap="_toGoodsDetail(item)">
|
||||
<view>
|
||||
<image class="goods-image" :src="item.coverPhoto"></image>
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
import uniNumberBox from '@/components/uni-number-box/uni-number-box.vue';
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
export default {
|
||||
name: 'shoproSku',
|
||||
name: 'vcSku',
|
||||
components: {
|
||||
uniNumberBox
|
||||
},
|
||||
@ -276,6 +276,10 @@ export default {
|
||||
// 当前所选规格下,获取所有有库存的 skuPrice
|
||||
getCanUseSkuPrice() {
|
||||
let newPrice = [];
|
||||
|
||||
if(this.skuPrice == undefined){
|
||||
return newPrice;
|
||||
}
|
||||
|
||||
for (let price of this.skuPrice) {
|
||||
if (price.stock <= 0) {
|
||||
|
||||
@ -93,6 +93,7 @@ export default {
|
||||
queryActivitiesType: baseUrl +'app/activitiesType/queryActivitiesType',
|
||||
queryProductLabel: baseUrl +'app/product/queryProductLabel',
|
||||
queryGroupBuyProduct: baseUrl +'app/groupBuy/queryGroupBuyProduct',
|
||||
queryProduct: baseUrl +'app/product/queryProduct',
|
||||
|
||||
NEED_NOT_LOGIN_PAGE: [
|
||||
'/pages/login/login',
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user