Commit 60f123a3 authored by verestrasz's avatar verestrasz

update

parent b3399c9b
...@@ -206,7 +206,13 @@ export const transferSubmitOrder = { ...@@ -206,7 +206,13 @@ export const transferSubmitOrder = {
return { delivery, number, province, tranId, uaddress, uname, uphone } return { delivery, number, province, tranId, uaddress, uname, uphone }
} }
} }
//盲盒下单
export const BlindBoxSubmitOrder = {
url: "/order/blindBox/createOrder",
dealReqData: ({ delivery=0, province, tranId, uaddress, uname, uphone,goodsId }) => {
return { delivery, province, tranId, uaddress, uname, uphone,goodsId }
}
}
// 转让商品支付 // 转让商品支付
export const submitTransferPay = { export const submitTransferPay = {
url: "/tran/order/pay", url: "/tran/order/pay",
......
...@@ -14,7 +14,12 @@ export const GoodsType = { ...@@ -14,7 +14,12 @@ export const GoodsType = {
// 转让商品 // 转让商品
TRANSFER: 999 TRANSFER: 999
} }
export const SalesType={
// 普通
NORMAL: 1,
//盲盒
BLINDBOX:4
}
export const GoodsTypeObj = { export const GoodsTypeObj = {
[GoodsType.NORMAL]: { [GoodsType.NORMAL]: {
detailApi: 'getGoodsDetail', detailApi: 'getGoodsDetail',
......
import {SalesType} from "./goods"
export const OrderType = { export const OrderType = {
ORDER: 1, ORDER: 1,
DELIVERY: 2, DELIVERY: 2,
...@@ -272,36 +272,71 @@ export const OrderConfirmType = { ...@@ -272,36 +272,71 @@ export const OrderConfirmType = {
} }
export const OrderConfirmTypeObj = { export const OrderConfirmTypeObj = {
[OrderConfirmType.NORMAL]: { [SalesType.NORMAL]:{
api: "submitOrder", [OrderConfirmType.NORMAL]: {
comm: { api: "submitOrder",
coupon: true, comm: {
promotion: true, coupon: true,
integral: true promotion: true,
} integral: true
}, }
[OrderConfirmType.TRANSFER]: { },
api: "transferSubmitOrder", [OrderConfirmType.TRANSFER]: {
comm: { api: "transferSubmitOrder",
} comm: {
}, }
[OrderConfirmType.PRE_SALE_DEPOSIT]: { },
api: "submitOrder" [OrderConfirmType.PRE_SALE_DEPOSIT]: {
}, api: "submitOrder"
[OrderConfirmType.PRE_SALE_BALANCE]: { },
api: "submitOrder" [OrderConfirmType.PRE_SALE_BALANCE]: {
}, api: "submitOrder"
[OrderConfirmType.AUCTION_DEPOSIT]: { },
api: "submitOrder" [OrderConfirmType.AUCTION_DEPOSIT]: {
}, api: "submitOrder"
[OrderConfirmType.AUCTION_BALANCE]: { },
api: "submitOrder" [OrderConfirmType.AUCTION_BALANCE]: {
}, api: "submitOrder"
[OrderConfirmType.NFT]: { },
api: "submitOrder", [OrderConfirmType.NFT]: {
comm: { api: "submitOrder",
} comm: {
}
},
}, },
[SalesType.BLINDBOX]:{
[OrderConfirmType.NORMAL]: {
api: "BlindBoxSubmitOrder",
comm: {
coupon: true,
promotion: true,
integral: true
}
},
[OrderConfirmType.TRANSFER]: {
api: "BlindBoxSubmitOrder",
comm: {
}
},
[OrderConfirmType.PRE_SALE_DEPOSIT]: {
api: "BlindBoxSubmitOrder"
},
[OrderConfirmType.PRE_SALE_BALANCE]: {
api: "BlindBoxSubmitOrder"
},
[OrderConfirmType.AUCTION_DEPOSIT]: {
api: "BlindBoxSubmitOrder"
},
[OrderConfirmType.AUCTION_BALANCE]: {
api: "BlindBoxSubmitOrder"
},
[OrderConfirmType.NFT]: {
api: "BlindBoxSubmitOrder",
comm: {
}
},
}
} }
export const PayType = { export const PayType = {
......
...@@ -23,7 +23,7 @@ Vue.mixin({ ...@@ -23,7 +23,7 @@ Vue.mixin({
}, },
openBanner(item) { openBanner(item) {
if (item.bannerType == 1) { if (item.bannerType == 1) {
this.goGoods(item.number, item.goodsType); this.goGoods(item.number, item.goodsType,item.salesType);
} else { } else {
this.openUrl(item.url) this.openUrl(item.url)
} }
...@@ -39,10 +39,15 @@ Vue.mixin({ ...@@ -39,10 +39,15 @@ Vue.mixin({
goHome() { goHome() {
this.$router.push({ name: "home" }) this.$router.push({ name: "home" })
}, },
goGoods(goodsId, type = GoodsType.NORMAL) { goGoods(goodsId, type = GoodsType.NORMAL,salesType) {
let params = { goodsId } let params = { goodsId }
let query = { type } let query = { type }
this.$router.push({ name: "blind-box", params, query }) if(salesType===4){
this.$router.push({ name: "blind-box", params, query })
}else{
this.$router.push({ name: "goods", params, query })
}
}, },
goShop(merchantId) { goShop(merchantId) {
let params = { merchantId } let params = { merchantId }
......
...@@ -152,7 +152,7 @@ export const OrderMixin = { ...@@ -152,7 +152,7 @@ export const OrderMixin = {
}, },
handleBuy() { handleBuy() {
if (this.data.orders.length == 1) { if (this.data.orders.length == 1) {
this.goGoods(this.data.orders[0].goodsId) this.goGoods(this.data.orders[0].goodsId,this.data.orders[0].type,this.data.orders[0].salesType)
} else { } else {
this.goHome() this.goHome()
} }
......
...@@ -110,12 +110,18 @@ export default new Vuex.Store({ ...@@ -110,12 +110,18 @@ export default new Vuex.Store({
}, },
setOrderInfo(state, { selectAddrIndex, selectAddr, skuList, fromType, extData, type }) { setOrderInfo(state, { selectAddrIndex, selectAddr, skuList, fromType, extData, type,salesType=1}) {
let goodsMap = {} let goodsMap = {}
if (skuList && skuList.length !== 0) { if (skuList && skuList.length !== 0) {
skuList.forEach(item => { skuList.forEach(item => {
let { merchantId, merchantName, skuProps } = item let { merchantId, merchantName, skuProps } = item
let skuLabel = skuProps.map((item) => item.propVal).join("+") let skuLabel =""
if(salesType===4){
skuLabel=""
}else{
skuLabel=skuProps.map((item) => item.propVal).join("+")
}
if (!goodsMap[merchantId]) { if (!goodsMap[merchantId]) {
goodsMap[merchantId] = { merchantId, merchantName, skuList: [{ ...item, skuLabel }], vnote: "" } goodsMap[merchantId] = { merchantId, merchantName, skuList: [{ ...item, skuLabel }], vnote: "" }
} else { } else {
...@@ -123,7 +129,7 @@ export default new Vuex.Store({ ...@@ -123,7 +129,7 @@ export default new Vuex.Store({
} }
}); });
} }
let orderInfo = { selectAddrIndex, selectAddr, goodsMap, fromType, extData, type } let orderInfo = { selectAddrIndex, selectAddr, goodsMap, fromType, extData, type,salesType }
state.orderInfo = orderInfo state.orderInfo = orderInfo
setOrderInfo(orderInfo) setOrderInfo(orderInfo)
}, },
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> --> </div> -->
<div class="sales flex-default"> <div class="sales flex-default">
<div class="label">剩余</div> <div class="label">剩余</div>
<div class="stock">8000</div> <div class="stock">{{getSurplus.stock}}</div>
</div> </div>
<div class="price-con flex-default"> <div class="price-con flex-default">
<div class="price"> <div class="price">
...@@ -55,6 +55,12 @@ export default { ...@@ -55,6 +55,12 @@ export default {
goodsId: String, goodsId: String,
goodsTypeMap: Object, goodsTypeMap: Object,
transferData: Object, transferData: Object,
skus:{
type: Array,
default: () => {
return [];
},
}
}, },
computed: { computed: {
...mapState(["appPlatform"]), ...mapState(["appPlatform"]),
...@@ -77,6 +83,18 @@ export default { ...@@ -77,6 +83,18 @@ export default {
} }
return 0; return 0;
}, },
getSurplus(){
let circulation=0
let stock=0
for(let item of this.skus){
circulation+=item.circulation
stock+=item.stock
}
return {
circulation,
stock
}
}
}, },
data() { data() {
return { return {
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<van-popup v-model="showPopup" position="bottom" round closeable> <van-popup v-model="showPopup" position="bottom" round closeable>
<div class="blind-rule"> <div class="blind-rule">
<div class="title">规则说明</div> <div class="title">规则说明</div>
<div class="content">盲盒规则,这是盲盒规则,北京2022年冬</div> <div class="content" v-html="data && data.blindBoxRule"></div>
</div> </div>
</van-popup> </van-popup>
</div> </div>
...@@ -142,6 +142,7 @@ export default { ...@@ -142,6 +142,7 @@ export default {
background: #F5F7FB; background: #F5F7FB;
border-radius: 10px 10px 0px 0px; border-radius: 10px 10px 0px 0px;
padding:15px; padding:15px;
overflow: auto;
font-size: 14px; font-size: 14px;
} }
} }
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<div class="blind-sku-scroll"> <div class="blind-sku-scroll">
<div class="blind-sku-scroll-box flex-default"> <div class="blind-sku-scroll-box flex-default">
<div class="blind-card" v-for="(prop, index) in skus" :key="index" @click="showDetail(prop)"> <div class="blind-card" v-for="(prop, index) in skus" :key="index" @click="showDetail(prop)">
<img class="thumb" :src="prop.thumb" alt="" /> <img class="thumb" :src="prop.thumb" alt=""/>
<div class="name">{{prop.name}}</div> <div class="name">{{prop.name}}</div>
<div class="num">丨限量{{prop.circulation}}份丨</div> <div class="num">丨限量{{prop.circulation}}份丨</div>
<img src="@/assets/img/hide-box.png" class="hide-box" alt=""> <img src="@/assets/img/hide-box.png" class="hide-box" alt="" v-show="prop.isHide" >
</div> </div>
</div> </div>
</div> </div>
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
background: #ffffff; background: #ffffff;
border-radius: 6px; border-radius: 6px;
text-align: center; text-align: center;
padding: 10px 6px; padding: 10px 3px;
margin-left: 12px; margin-left: 12px;
position: relative; position: relative;
.thumb { .thumb {
......
...@@ -22,12 +22,13 @@ ...@@ -22,12 +22,13 @@
:goodsId="goodsId" :goodsId="goodsId"
:goodsTypeMap="goodsTypeMap" :goodsTypeMap="goodsTypeMap"
:transferData="transferData" :transferData="transferData"
:skus="goodsDetail.skus"
/> />
<blind-sku <blind-sku
:skuList="goodsDetail.skuList" :skuList="goodsDetail.skuList"
:skuMap="goodsDetail.skuMap" :skuMap="goodsDetail.skuMap"
:skus="goodsDetail.skus" :skus="goodsDetail.skus"
@buy="confirmBuy" @buy="confirmBuy"
/> />
<blind-detail ref="goodsDetail" :data="goodsDetail.details" /> <blind-detail ref="goodsDetail" :data="goodsDetail.details" />
...@@ -172,6 +173,8 @@ export default { ...@@ -172,6 +173,8 @@ export default {
shopImage, shopImage,
circulation, circulation,
sales, sales,
salesType,
blindBoxRule
} = goodsVo; } = goodsVo;
imgListJson = JSON.parse(imgList); imgListJson = JSON.parse(imgList);
...@@ -197,7 +200,6 @@ export default { ...@@ -197,7 +200,6 @@ export default {
description, description,
nftFile, nftFile,
}; };
let merchant = { let merchant = {
merchantId, merchantId,
merchantName, merchantName,
...@@ -209,7 +211,8 @@ export default { ...@@ -209,7 +211,8 @@ export default {
detail, detail,
merchantName, merchantName,
merchantId, merchantId,
circulation circulation,
blindBoxRule
}; };
let { skuList, skuMap } = this.genSku(skus); let { skuList, skuMap } = this.genSku(skus);
...@@ -222,8 +225,10 @@ export default { ...@@ -222,8 +225,10 @@ export default {
merchant, merchant,
details, details,
prop, prop,
skus skus,
salesType
}; };
console.log(this.goodsDetail)
}, },
genSku(skus) { genSku(skus) {
let skuObj = {}; let skuObj = {};
...@@ -274,12 +279,14 @@ export default { ...@@ -274,12 +279,14 @@ export default {
let { selectAddrIndex, selectAddr } = this; let { selectAddrIndex, selectAddr } = this;
let thumb = this.goodsDetail.desc.thumb; let thumb = this.goodsDetail.desc.thumb;
let goodsName = this.goodsDetail.desc.name; let goodsName = this.goodsDetail.desc.name;
console.log(this.goodsDetail.desc.defaultPrice)
let skuList = [ let skuList = [
{ {
...this.selectSku, ...this.selectSku,
...this.goodsDetail.merchant, ...this.goodsDetail.merchant,
thumb, thumb,
goodsName, goodsName,
originalPrice:this.goodsDetail.desc.defaultPrice
}, },
]; ];
let extData = {}, let extData = {},
...@@ -302,8 +309,8 @@ export default { ...@@ -302,8 +309,8 @@ export default {
skuList, skuList,
extData, extData,
type, type,
salesType:this.goodsDetail.salesType
}); });
this.$router.push({ name: "order-confirm" }); this.$router.push({ name: "order-confirm" });
}, },
}, },
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
class="item" class="item"
v-for="(item, index) in RecommendList" v-for="(item, index) in RecommendList"
:key="index" :key="index"
@click="goGoods(item.goodsId, item.type)" @click="goGoods(item.goodsId, item.type,item.salesType)"
> >
<img :src="item.thumb" /> <img :src="item.thumb" />
</div> </div>
......
...@@ -342,7 +342,9 @@ export default { ...@@ -342,7 +342,9 @@ export default {
circulation, circulation,
sales sales
} }
for(let item of skus){
item.originalPrice=defaultPrice
}
let { skuList, skuMap } = this.genSku(skus); let { skuList, skuMap } = this.genSku(skus);
this.goodsDetail = { this.goodsDetail = {
......
...@@ -58,7 +58,7 @@ import AddrSelectPopup from "@/components/addr-select-popup.vue"; ...@@ -58,7 +58,7 @@ import AddrSelectPopup from "@/components/addr-select-popup.vue";
import CouponSelectPopup from "./coupon-select-popup"; import CouponSelectPopup from "./coupon-select-popup";
import { mapState, mapGetters, mapMutations } from "vuex"; import { mapState, mapGetters, mapMutations } from "vuex";
import { expressCalc, promotionCalc } from "@/utils/mallCalc.js"; import { expressCalc, promotionCalc } from "@/utils/mallCalc.js";
import { OrderConfirmType, OrderConfirmTypeObj } from "@/enums"; import { OrderConfirmType, OrderConfirmTypeObj,SalesType } from "@/enums";
export default { export default {
components: { components: {
OrderAddr, OrderAddr,
...@@ -157,8 +157,9 @@ export default { ...@@ -157,8 +157,9 @@ export default {
return ret; return ret;
}, },
orderTypeObj() { orderTypeObj() {
let obj = OrderConfirmTypeObj[this.orderInfo.type]; let salesType=this.orderInfo.salesType || 1
return obj || OrderConfirmTypeObj[OrderConfirmType.NORMAL]; let obj = OrderConfirmTypeObj[salesType][this.orderInfo.type];
return obj || OrderConfirmTypeObj[salesType][OrderConfirmType.NORMAL];
}, },
orderTypeMap() { orderTypeMap() {
let map = {}; let map = {};
...@@ -278,20 +279,18 @@ export default { ...@@ -278,20 +279,18 @@ export default {
if (this.disable) { if (this.disable) {
return; return;
} }
// if (!this.orderInfo.selectAddr) {
// this.showAddr = true;
// return;
// }
this.$showLoading(); this.$showLoading();
let { selectAddr, goodsMap,salesType } = this.orderInfo;
let { selectAddr, goodsMap } = this.orderInfo;
let goodsIdCouponVos = this.couponSelectList.map((c) => c.couponId); let goodsIdCouponVos = this.couponSelectList.map((c) => c.couponId);
let merchantGoodsVos = []; let merchantGoodsVos = [];
let goodsId=""
Object.keys(goodsMap).forEach((shop) => { Object.keys(goodsMap).forEach((shop) => {
let orderSkuVos = []; let orderSkuVos = [];
let { vnote, merchantId } = goodsMap[shop]; let { vnote, merchantId } = goodsMap[shop];
goodsMap[shop].skuList.forEach((sku) => { goodsMap[shop].skuList.forEach((sku) => {
if(salesType===SalesType.BLINDBOX){
goodsId=sku.goodsId
}
let { num, skuId } = sku; let { num, skuId } = sku;
orderSkuVos.push({ orderSkuVos.push({
num, num,
...@@ -307,25 +306,20 @@ export default { ...@@ -307,25 +306,20 @@ export default {
let postData = { let postData = {
delivery: this.delivery ? 1 : 0, delivery: this.delivery ? 1 : 0,
// address: this.addrLabel + selectAddr.detailAddr,
// province: selectAddr.provinceCode,
// phone: selectAddr.phone,
// uname: selectAddr.name,
orderType: 1, orderType: 1,
merchantGoodsVos, merchantGoodsVos,
goodsIdCouponVos, goodsIdCouponVos,
// transfer
// uaddress: this.addrLabel + selectAddr.detailAddr,
// uname: selectAddr.name,
// uphone: selectAddr.phone,
}; };
if (this.orderTypeMap.TRANSFER) { if(salesType===SalesType.BLINDBOX){
let key = Object.keys(this.orderInfo.goodsMap)[0]; postData.goodsId=goodsId
postData.number = this.orderInfo.goodsMap[key].skuList[0].num; postData.delivery=0
postData.tranId = this.orderInfo.extData.tranId; }else{
if (this.orderTypeMap.TRANSFER) {
let key = Object.keys(this.orderInfo.goodsMap)[0];
postData.number = this.orderInfo.goodsMap[key].skuList[0].num;
postData.tranId = this.orderInfo.extData.tranId;
}
} }
this.$api({ this.$api({
apiName: this.orderTypeObj.api, apiName: this.orderTypeObj.api,
postData, postData,
......
...@@ -172,8 +172,9 @@ export default { ...@@ -172,8 +172,9 @@ export default {
...mapMutations(["clearPickUpGoodsInfo"]), ...mapMutations(["clearPickUpGoodsInfo"]),
confirmSetPwd() { confirmSetPwd() {
if (this.accountInfo.isPayPassword) { if (this.accountInfo.isPayPassword) {
return; return true;
} }
console.log(this.accountInfo.isPayPassword)
this.$confirm({ this.$confirm({
content: "您当前尚未设置支付密码,是否前往设置?", content: "您当前尚未设置支付密码,是否前往设置?",
confirm: () => { confirm: () => {
...@@ -191,7 +192,9 @@ export default { ...@@ -191,7 +192,9 @@ export default {
this.wxPay() this.wxPay()
break; break;
case 4: case 4:
this.showVerify = true; if(this.confirmSetPwd()){
this.showVerify = true;
}
break; break;
default: default:
this.showVerify = true; this.showVerify = true;
......
<template> <template>
<div <div
class="search-list-item-con flex-default" class="search-list-item-con flex-default"
@click="goGoods(data.goodsId, data.type)" @click="goGoods(data.goodsId, data.type,data.salesType,data.salesType)"
> >
<img class="thumb" :src="data.thumb" /> <img class="thumb" :src="data.thumb" />
<div class="desc flex-default"> <div class="desc flex-default">
......
<template> <template>
<div class="list-item-con" @click="goGoods(itemData.goodsId, itemData.type)"> <div class="list-item-con" @click="goGoods(itemData.goodsId, itemData.type,itemData.salesType)">
<div class="m-icon picture"> <div class="m-icon picture">
<img :src="itemData.thumb" /> <img :src="itemData.thumb" />
</div> </div>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
class="item-list-con flex-default" class="item-list-con flex-default"
v-for="(item, index) of list" v-for="(item, index) of list"
:key="'goods-item-' + index" :key="'goods-item-' + index"
@click="goGoods(item.goodsId, item.type)" @click="goGoods(item.goodsId, item.type,item.salesType)"
> >
<div class="left-img"> <div class="left-img">
<img class="thumb" :src="item.thumb" /> <img class="thumb" :src="item.thumb" />
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
v-for="(item, index) of list" v-for="(item, index) of list"
:key="'goods-item-' + index" :key="'goods-item-' + index"
:itemData="item" :itemData="item"
@click.native="goGoods(item.goodsId, item.type)" @click.native="goGoods(item.goodsId, item.type,item.salesType)"
/> />
</div> </div>
</div> </div>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
class="item-con flex-default" class="item-con flex-default"
v-for="(item, index) of list" v-for="(item, index) of list"
:key="'goods-item-' + index" :key="'goods-item-' + index"
@click="goGoods(item.goodsId, item.type)" @click="goGoods(item.goodsId, item.type,item.salesType)"
> >
<div class="goods-item flex-default"> <div class="goods-item flex-default">
<img class="thumb" :src="item.thumb" /> <img class="thumb" :src="item.thumb" />
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
class="item-con" class="item-con"
v-for="(item, index) of list" v-for="(item, index) of list"
:key="'goods-item-' + index" :key="'goods-item-' + index"
@click="goGoods(item.goodsId, item.type)" @click="goGoods(item.goodsId, item.type,item.salesType)"
> >
<div class="top"> <div class="top">
<img <img
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
v-for="(item, index) of list" v-for="(item, index) of list"
:key="'goods-item-' + index" :key="'goods-item-' + index"
:itemData="item" :itemData="item"
@click.native="goGoods(item.goodsId, item.type)" @click.native="goGoods(item.goodsId, item.type,item.salesType)"
/> />
</div> </div>
</div> </div>
......
<template> <template>
<div class="shop-recommend-goods-item" @click="goGoods(data.goodsId)"> <div class="shop-recommend-goods-item" @click="goGoods(data.goodsId,data.type,data.salesType)">
<img class="thumb" :src="data.thumb" /> <img class="thumb" :src="data.thumb" />
<div class="goods-info"> <div class="goods-info">
<div class="name">{{ data.name }}</div> <div class="name">{{ data.name }}</div>
......
<template> <template>
<div class="goods-item-con"> <div class="goods-item-con">
<div class="item-top flex-default" @click="goGoods(itemData.goodsId, itemData.type)"> <div class="item-top flex-default" @click="goGoods(itemData.goodsId, itemData.type,itemData.salesType)">
<div <div
class="flex-default" class="flex-default"
style="padding: 20rpx 0; align-items: center; flex-shrink: 0" style="padding: 20rpx 0; align-items: center; flex-shrink: 0"
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</div> </div>
</div> </div>
<div class="price_line flex-default"> <div class="price_line flex-default">
<div class="price" @click="goGoods(itemData.goodsId, itemData.type)"> <div class="price" @click="goGoods(itemData.goodsId, itemData.type,itemData.salesType)">
<m-price :amt="itemData.amount" /> <m-price :amt="itemData.amount" />
</div> </div>
<div class="operation"> <div class="operation">
......
<template> <template>
<div class="collection-item flex-default" @click="goGoods(itemData.goodsId, itemData.type)"> <div class="collection-item flex-default" @click="goGoods(itemData.goodsId, itemData.type,itemData.salesType)">
<div <div
class="flex-default" class="flex-default"
style="padding: 20rpx 0; align-items: center; flex-shrink: 0" style="padding: 20rpx 0; align-items: center; flex-shrink: 0"
......
<template> <template>
<div class="collection-item flex-default" @click="goGoods(itemData.goodsId, itemData.type)"> <div class="collection-item flex-default" @click="goGoods(itemData.goodsId, itemData.type,itemData.salesType)">
<div <div
class="flex-default" class="flex-default"
style="padding: 20rpx 0; align-items: center; flex-shrink: 0" style="padding: 20rpx 0; align-items: center; flex-shrink: 0"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<img class="thumb" :src="detail.order1st.thumb" /> <img class="thumb" :src="detail.order1st.thumb" />
<div class="spu"> <div class="spu">
<div class="name">{{ detail.order1st.name }}</div> <div class="name">{{ detail.order1st.name }}</div>
<div class="sku">{{ detail.order1st.propList | propFilter }}</div> <div class="sku">{{ detail.order1st.propList | propFilter(detail.order1st) }}</div>
</div> </div>
</div> </div>
<div class="info-list" scroll-x v-else> <div class="info-list" scroll-x v-else>
...@@ -121,8 +121,16 @@ export default { ...@@ -121,8 +121,16 @@ export default {
}, },
}, },
filters: { filters: {
propFilter(props) { propFilter(props,detail) {
return props.map((item) => item.value).join("+"); if(props){
return props.map((item) => item.value).join("+");
}else{
if(detail.salesType===4){
return '盲盒'
}
return ""
}
}, },
}, },
}; };
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<span class="name">{{ data.enterpriseName }}</span> <span class="name">{{ data.enterpriseName }}</span>
<m-icon icon="icon-more" :size="10" /> <m-icon icon="icon-more" :size="10" />
</div> </div>
<div class="goods flex-default" @click="goGoods(data.goodsId, data.type)"> <div class="goods flex-default" @click="goGoods(data.goodsId, data.type,data.salesType)">
<img class="thumb" :src="data.thumb" /> <img class="thumb" :src="data.thumb" />
<div class="spu"> <div class="spu">
<div class="name">{{ data.name }}</div> <div class="name">{{ data.name }}</div>
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
class="goods flex-default" class="goods flex-default"
v-for="(item, index) of data.orders" v-for="(item, index) of data.orders"
:key="`goods-item-${index}`" :key="`goods-item-${index}`"
@click="goGoods(item.goodsId, item.type)" @click="goGoods(item.goodsId, item.type,item.salesType)"
> >
<img class="thumb" :src="item.thumb" /> <img class="thumb" :src="item.thumb" />
<div class="spu"> <div class="spu">
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
<div class="sku">{{ item.propList | propFilter }}</div> <div class="sku">{{ item.propList | propFilter(item) }}</div>
</div> </div>
<div class="price"> <div class="price">
<div class="amt">{{ item.amount || 0 }}</div> <div class="amt">{{ item.amount || 0 }}</div>
...@@ -73,11 +73,21 @@ export default { ...@@ -73,11 +73,21 @@ export default {
}, },
computed: {}, computed: {},
filters: { filters: {
propFilter(val) { // propFilter(val) {
if (!val) { // if (!val) {
return ""; // return "";
// }
// return val.map((item) => item.value).join(" + ");
// },
propFilter(props,detail) {
if(props){
return props.map((item) => item.value).join("+");
}else{
if(detail.salesType===4){
return '盲盒'
}
return ""
} }
return val.map((item) => item.value).join(" + ");
}, },
}, },
methods: {}, methods: {},
......
...@@ -64,7 +64,8 @@ module.exports = { ...@@ -64,7 +64,8 @@ module.exports = {
// target: 'http://172.22.20.64:8100/root' // target: 'http://172.22.20.64:8100/root'
// target: 'http://172.22.17.176:12008' // target: 'http://172.22.17.176:12008'
// target: 'http://172.22.17.108:12008' // target: 'http://172.22.17.108:12008'
target: 'https://mall.inmvo.com/root' // target: 'https://mall.inmvo.com/root'
target: 'http://172.22.20.54:9089'
}, },
'/chat': { '/chat': {
pathRewrite: { pathRewrite: {
......
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