feat(specialareaList): showToast add duration
This commit is contained in:
parent
f0436d259c
commit
5c2ed3d87d
|
@ -17,41 +17,74 @@
|
||||||
<img :src="pkCountryImg" alt="" />
|
<img :src="pkCountryImg" alt="" />
|
||||||
<u-icon name="arrow-down" color="#999"></u-icon>
|
<u-icon name="arrow-down" color="#999"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<u-scroll-list :indicator="false" v-if="itemChildren.length > 1" class="tabList_a">
|
<u-scroll-list
|
||||||
|
:indicator="false"
|
||||||
|
v-if="itemChildren.length > 1"
|
||||||
|
class="tabList_a"
|
||||||
|
>
|
||||||
<view class="tab">
|
<view class="tab">
|
||||||
<view v-for="(item, index) in itemChildren" :key="index" @click="setSpecial(item)" v-show="item.isShow"
|
<view
|
||||||
:class="[specialArea == item.value ? 'actTab' : 'tab_i']">
|
v-for="(item, index) in itemChildren"
|
||||||
|
:key="index"
|
||||||
|
@click="setSpecial(item)"
|
||||||
|
v-show="item.isShow"
|
||||||
|
:class="[specialArea == item.value ? 'actTab' : 'tab_i']"
|
||||||
|
>
|
||||||
<view>{{ item.label }}</view>
|
<view>{{ item.label }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-scroll-list>
|
</u-scroll-list>
|
||||||
<view class="index_btm">
|
<view class="index_btm">
|
||||||
<view class="index_l">
|
<view class="index_l">
|
||||||
<view v-for="item in oneList" :class="['classIfy', oneId == item.pkId ? 'actOne' : '']" @click="
|
<view
|
||||||
(oneId = item.pkId),
|
v-for="item in oneList"
|
||||||
|
:class="['classIfy', oneId == item.pkId ? 'actOne' : '']"
|
||||||
|
@click="
|
||||||
|
((oneId = item.pkId),
|
||||||
getAllGoods(item.pkId),
|
getAllGoods(item.pkId),
|
||||||
getClassIfyTwo(item.pkId)
|
getClassIfyTwo(item.pkId))
|
||||||
" :key="item.pkId">{{ item.classifyName }}</view>
|
"
|
||||||
|
:key="item.pkId"
|
||||||
|
>{{ item.classifyName }}</view
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
<view class="index_r">
|
<view class="index_r">
|
||||||
<u-scroll-list :indicator="false" class="tabList">
|
<u-scroll-list :indicator="false" class="tabList">
|
||||||
<view class="tab">
|
<view class="tab">
|
||||||
<view v-for="(item, index) in twoList" :key="index"
|
<view
|
||||||
@click="(twoId = item.pkId), getAllGoods1(item.pkId)"
|
v-for="(item, index) in twoList"
|
||||||
:class="[twoId == item.pkId ? 'actTab' : 'tab_i']">
|
:key="index"
|
||||||
|
@click="((twoId = item.pkId), getAllGoods1(item.pkId))"
|
||||||
|
:class="[twoId == item.pkId ? 'actTab' : 'tab_i']"
|
||||||
|
>
|
||||||
<view>{{ item.classifyName }}</view>
|
<view>{{ item.classifyName }}</view>
|
||||||
<!-- <view :class="[twoId == item.pkId ? 'heng' : 'heng1']"></view> -->
|
<!-- <view :class="[twoId == item.pkId ? 'heng' : 'heng1']"></view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-scroll-list>
|
</u-scroll-list>
|
||||||
<view class="search">
|
<view class="search">
|
||||||
<u--input placeholder="请输入商品名称" placeholderStyle="font-size:14px;" prefixIcon="search"
|
<u--input
|
||||||
shape="circle" v-model="waresName" border="none" @confirm="getAllGoods1()"
|
placeholder="请输入商品名称"
|
||||||
prefixIconStyle="font-size: 22px;color: #909399"></u--input>
|
placeholderStyle="font-size:14px;"
|
||||||
|
prefixIcon="search"
|
||||||
|
shape="circle"
|
||||||
|
v-model="waresName"
|
||||||
|
border="none"
|
||||||
|
@confirm="getAllGoods1()"
|
||||||
|
prefixIconStyle="font-size: 22px;color: #909399"
|
||||||
|
></u--input>
|
||||||
</view>
|
</view>
|
||||||
<view class="goodList">
|
<view class="goodList">
|
||||||
<view v-for="item in goodList" :key="item.waresCode" class="goodList_i" @tap="goDetails(item)">
|
<view
|
||||||
<view class="fly" v-show="item.preSaleStatus == 3 || item.isSale == 1"></view>
|
v-for="item in goodList"
|
||||||
|
:key="item.waresCode"
|
||||||
|
class="goodList_i"
|
||||||
|
@tap="goDetails(item)"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
class="fly"
|
||||||
|
v-show="item.preSaleStatus == 3 || item.isSale == 1"
|
||||||
|
></view>
|
||||||
<img :src="item.cover1" class="cover" alt="" />
|
<img :src="item.cover1" class="cover" alt="" />
|
||||||
<view class="goodList_ir">
|
<view class="goodList_ir">
|
||||||
<view>
|
<view>
|
||||||
|
@ -60,14 +93,24 @@
|
||||||
}}</span>
|
}}</span>
|
||||||
{{ item.waresName }}
|
{{ item.waresName }}
|
||||||
</view>
|
</view>
|
||||||
<view class="pv"
|
<view
|
||||||
v-if="specialArea != 18 && specialArea != 13&& specialArea != 31&& specialArea != 10">
|
class="pv"
|
||||||
|
v-if="
|
||||||
|
specialArea != 18 &&
|
||||||
|
specialArea != 13 &&
|
||||||
|
specialArea != 31 &&
|
||||||
|
specialArea != 10
|
||||||
|
"
|
||||||
|
>
|
||||||
业绩:{{ item.waresAchieve | numberToCurrency }}
|
业绩:{{ item.waresAchieve | numberToCurrency }}
|
||||||
</view>
|
</view>
|
||||||
<view class="pv" v-if="specialArea ==10">
|
<view class="pv" v-if="specialArea == 10">
|
||||||
积分可抵扣:{{ item.deductMoney | numberToCurrency }}
|
积分可抵扣:{{ item.deductMoney | numberToCurrency }}
|
||||||
</view>
|
</view>
|
||||||
<view class="pv" v-if="specialArea == 31&&userInfo.isMakerSpace == 0">
|
<view
|
||||||
|
class="pv"
|
||||||
|
v-if="specialArea == 31 && userInfo.isMakerSpace == 0"
|
||||||
|
>
|
||||||
业绩:{{ item.waresAchieve | numberToCurrency }}
|
业绩:{{ item.waresAchieve | numberToCurrency }}
|
||||||
</view>
|
</view>
|
||||||
<view class="pv" v-if="specialArea == 13">
|
<view class="pv" v-if="specialArea == 13">
|
||||||
|
@ -75,18 +118,38 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="pv"> 销量:{{ item.sales | seles }} </view> -->
|
<!-- <view class="pv"> 销量:{{ item.sales | seles }} </view> -->
|
||||||
<view class="goodList_ib">
|
<view class="goodList_ib">
|
||||||
<view v-if="specialArea == 31&&userInfo.isMakerSpace == 1">
|
<view v-if="specialArea == 31 && userInfo.isMakerSpace == 1">
|
||||||
{{ item.vipPrice | numberToCurrency }}
|
{{ item.vipPrice | numberToCurrency }}
|
||||||
</view>
|
</view>
|
||||||
<view v-if="(specialArea == 31&&userInfo.isMakerSpace == 0)||specialArea !=31">
|
<view
|
||||||
|
v-if="
|
||||||
|
(specialArea == 31 && userInfo.isMakerSpace == 0) ||
|
||||||
|
specialArea != 31
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ item.waresPrice | numberToCurrency }}
|
{{ item.waresPrice | numberToCurrency }}
|
||||||
</view>
|
</view>
|
||||||
<img @click.stop="addCar(item)"
|
<img
|
||||||
v-show="item.preSaleStatus != 3 && item.isSale != 1&&specialArea != 31"
|
@click.stop="addCar(item)"
|
||||||
src="@/static/images/cart.png" alt="" />
|
v-show="
|
||||||
<img @click.stop="addCar(item)"
|
item.preSaleStatus != 3 &&
|
||||||
v-show="item.preSaleStatus != 3 && item.isSale != 1&&specialArea == 31&&userInfo.isMakerSpace == 0"
|
item.isSale != 1 &&
|
||||||
src="@/static/images/cart.png" alt="" />
|
specialArea != 31
|
||||||
|
"
|
||||||
|
src="@/static/images/cart.png"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
<img
|
||||||
|
@click.stop="addCar(item)"
|
||||||
|
v-show="
|
||||||
|
item.preSaleStatus != 3 &&
|
||||||
|
item.isSale != 1 &&
|
||||||
|
specialArea == 31 &&
|
||||||
|
userInfo.isMakerSpace == 0
|
||||||
|
"
|
||||||
|
src="@/static/images/cart.png"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="pv" v-show="specialArea == 31"> 统一零售价:{{ item.retailPrice| numberToCurrency | isLocal}} </view> -->
|
<!-- <view class="pv" v-show="specialArea == 31"> 统一零售价:{{ item.retailPrice| numberToCurrency | isLocal}} </view> -->
|
||||||
</view>
|
</view>
|
||||||
|
@ -95,27 +158,33 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-picker :show="isCountry" @cancel="isCountry = false" @confirm="sureCountry" :columns="countryList"
|
<u-picker
|
||||||
keyName="label"></u-picker>
|
:show="isCountry"
|
||||||
|
@cancel="isCountry = false"
|
||||||
|
@confirm="sureCountry"
|
||||||
|
:columns="countryList"
|
||||||
|
keyName="label"
|
||||||
|
></u-picker>
|
||||||
<selSpaceGoods ref="selSpaceGoods" @getCar="getCatLength"></selSpaceGoods>
|
<selSpaceGoods ref="selSpaceGoods" @getCar="getCatLength"></selSpaceGoods>
|
||||||
<cartBall ref="cart" :carLength="shopCarLength" :specialArea="specialArea"></cartBall>
|
<cartBall
|
||||||
|
ref="cart"
|
||||||
|
:carLength="shopCarLength"
|
||||||
|
:specialArea="specialArea"
|
||||||
|
></cartBall>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import backIcon from "@/components/backIcon.vue";
|
import backIcon from '@/components/backIcon.vue'
|
||||||
import cartBall from "@/components/cartBall.vue";
|
import cartBall from '@/components/cartBall.vue'
|
||||||
import {
|
import { mapGetters, mapActions } from 'vuex'
|
||||||
mapGetters,
|
import * as api from '@/config/goods'
|
||||||
mapActions
|
import clTabbar from '@/components/cl-tabbar.vue'
|
||||||
} from "vuex";
|
import selSpaceGoods from '@/components/selSpaceGoods.vue'
|
||||||
import * as api from "@/config/goods";
|
|
||||||
import clTabbar from "@/components/cl-tabbar.vue";
|
|
||||||
import selSpaceGoods from "@/components/selSpaceGoods.vue";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
"cl-tabbar": clTabbar,
|
'cl-tabbar': clTabbar,
|
||||||
backIcon,
|
backIcon,
|
||||||
cartBall,
|
cartBall,
|
||||||
selSpaceGoods,
|
selSpaceGoods,
|
||||||
|
@ -124,9 +193,9 @@
|
||||||
filters: {
|
filters: {
|
||||||
seles(value) {
|
seles(value) {
|
||||||
if (value > 999) {
|
if (value > 999) {
|
||||||
return 999 + "+";
|
return 999 + '+'
|
||||||
} else {
|
} else {
|
||||||
return value;
|
return value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -134,88 +203,98 @@
|
||||||
return {
|
return {
|
||||||
specialArea: 1,
|
specialArea: 1,
|
||||||
oneList: [],
|
oneList: [],
|
||||||
oneId: "",
|
oneId: '',
|
||||||
twoList: [],
|
twoList: [],
|
||||||
twoId: "",
|
twoId: '',
|
||||||
goodList: [],
|
goodList: [],
|
||||||
titLabel: "",
|
titLabel: '',
|
||||||
itemChildren: [],
|
itemChildren: [],
|
||||||
diff: 0,
|
diff: 0,
|
||||||
shopCarLength: false,
|
shopCarLength: false,
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
pkCountry: 1,
|
pkCountry: 1,
|
||||||
pkCountryLabel: "",
|
pkCountryLabel: '',
|
||||||
pkCountryImg: "",
|
pkCountryImg: '',
|
||||||
countryList: [],
|
countryList: [],
|
||||||
isCountry: false,
|
isCountry: false,
|
||||||
waresName: "",
|
waresName: '',
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log('%c [ options ]-25', 'font-size:13px; background:#cb38d2; color:#ff7cff;', options)
|
console.log(
|
||||||
|
'%c [ options ]-25',
|
||||||
|
'font-size:13px; background:#cb38d2; color:#ff7cff;',
|
||||||
|
options
|
||||||
|
)
|
||||||
if (JSON.parse(options.children).length > 0) {
|
if (JSON.parse(options.children).length > 0) {
|
||||||
let arr = [];
|
let arr = []
|
||||||
if (options.childArea) {
|
if (options.childArea) {
|
||||||
this.specialArea = options.childArea;
|
this.specialArea = options.childArea
|
||||||
// this.diff = 1
|
// this.diff = 1
|
||||||
} else {
|
} else {
|
||||||
JSON.parse(options.children).forEach((item) => {
|
JSON.parse(options.children).forEach(item => {
|
||||||
if (item.isShow) {
|
if (item.isShow) {
|
||||||
arr.push(item.value);
|
arr.push(item.value)
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
this.specialArea = arr[0];
|
this.specialArea = arr[0]
|
||||||
// this.diff = 0
|
// this.diff = 0
|
||||||
}
|
}
|
||||||
if (options.diff) {
|
if (options.diff) {
|
||||||
this.diff = options.diff;
|
this.diff = options.diff
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.specialArea = options.specialArea;
|
this.specialArea = options.specialArea
|
||||||
}
|
}
|
||||||
|
|
||||||
this.titLabel = options.label;
|
this.titLabel = options.label
|
||||||
let tempArr = JSON.parse(options.children);
|
let tempArr = JSON.parse(options.children)
|
||||||
if (this.specialArea != 18) {
|
if (this.specialArea != 18) {
|
||||||
api.menuList().then((res) => {
|
api.menuList().then(res => {
|
||||||
tempArr = tempArr.filter(item => res.data.find(ctem => ctem.menuKey == item.name));
|
tempArr = tempArr.filter(item =>
|
||||||
this.itemChildren = tempArr;
|
res.data.find(ctem => ctem.menuKey == item.name)
|
||||||
});
|
)
|
||||||
|
this.itemChildren = tempArr
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// 修改标题
|
// 修改标题
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: this.titLabel,
|
title: this.titLabel,
|
||||||
success: () => {},
|
success: () => {},
|
||||||
});
|
})
|
||||||
// 获取一级分类并获取商品列表
|
// 获取一级分类并获取商品列表
|
||||||
// this.getClassIfy()
|
// this.getClassIfy()
|
||||||
|
|
||||||
this.userInfo = uni.getStorageSync("User");
|
this.userInfo = uni.getStorageSync('User')
|
||||||
console.log('%c [ this.userInfo ]-242', 'font-size:13px; background:#cb38d2; color:#ff7cff;', this.userInfo)
|
console.log(
|
||||||
|
'%c [ this.userInfo ]-242',
|
||||||
|
'font-size:13px; background:#cb38d2; color:#ff7cff;',
|
||||||
|
this.userInfo
|
||||||
|
)
|
||||||
if (this.specialArea == 1) {
|
if (this.specialArea == 1) {
|
||||||
if (uni.getStorageSync("pkCountry")) {
|
if (uni.getStorageSync('pkCountry')) {
|
||||||
this.pkCountry = uni.getStorageSync("pkCountry");
|
this.pkCountry = uni.getStorageSync('pkCountry')
|
||||||
} else {
|
} else {
|
||||||
this.pkCountry = this.userInfo.pkSettleCountry;
|
this.pkCountry = this.userInfo.pkSettleCountry
|
||||||
uni.setStorageSync("pkCountry", this.pkCountry + "");
|
uni.setStorageSync('pkCountry', this.pkCountry + '')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.pkCountry = this.userInfo.pkSettleCountry;
|
this.pkCountry = this.userInfo.pkSettleCountry
|
||||||
}
|
}
|
||||||
this.setSpecial({
|
this.setSpecial({
|
||||||
value: this.specialArea
|
value: this.specialArea,
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
let that = this;
|
let that = this
|
||||||
uni.$on("returnData", function(data) {
|
uni.$on('returnData', function (data) {
|
||||||
that.specialArea = data.value;
|
that.specialArea = data.value
|
||||||
that.setSpecial({
|
that.setSpecial({
|
||||||
value: data.value
|
value: data.value,
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
// 获取国家
|
// 获取国家
|
||||||
this.getJScountry();
|
this.getJScountry()
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.cart.getCar()
|
this.$refs.cart.getCar()
|
||||||
})
|
})
|
||||||
|
@ -231,43 +310,41 @@
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['setSmallCarLength', 'setShopCarLength']),
|
...mapActions(['setSmallCarLength', 'setShopCarLength']),
|
||||||
changeCountry() {
|
changeCountry() {
|
||||||
this.isCountry = true;
|
this.isCountry = true
|
||||||
},
|
},
|
||||||
sureCountry(e) {
|
sureCountry(e) {
|
||||||
const {
|
const { value } = e
|
||||||
value
|
this.pkCountry = value[0].id
|
||||||
} = e;
|
this.pkCountryLabel = value[0].label
|
||||||
this.pkCountry = value[0].id;
|
this.pkCountryImg = value[0].img
|
||||||
this.pkCountryLabel = value[0].label;
|
this.isCountry = false
|
||||||
this.pkCountryImg = value[0].img;
|
uni.setStorageSync('pkCountry', this.pkCountry + '')
|
||||||
this.isCountry = false;
|
|
||||||
uni.setStorageSync("pkCountry", this.pkCountry + "");
|
|
||||||
// 获取分类一级
|
// 获取分类一级
|
||||||
this.getClassIfy();
|
this.getClassIfy()
|
||||||
this.$refs.cart.getCar();
|
this.$refs.cart.getCar()
|
||||||
},
|
},
|
||||||
getJScountry() {
|
getJScountry() {
|
||||||
api.currencyList().then((res) => {
|
api.currencyList().then(res => {
|
||||||
let data = res.data.map((item) => {
|
let data = res.data.map(item => {
|
||||||
return {
|
return {
|
||||||
img: item.nationalFlag2,
|
img: item.nationalFlag2,
|
||||||
id: item.pkId,
|
id: item.pkId,
|
||||||
label: item.shortName,
|
label: item.shortName,
|
||||||
};
|
|
||||||
});
|
|
||||||
this.countryList = [data];
|
|
||||||
this.countryList[0].forEach((item) => {
|
|
||||||
if (item.id == this.pkCountry) {
|
|
||||||
this.pkCountryLabel = item.label;
|
|
||||||
this.pkCountryImg = item.img;
|
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
});
|
this.countryList = [data]
|
||||||
|
this.countryList[0].forEach(item => {
|
||||||
|
if (item.id == this.pkCountry) {
|
||||||
|
this.pkCountryLabel = item.label
|
||||||
|
this.pkCountryImg = item.img
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
goShare() {
|
goShare() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/specialArea/share?specialArea=7",
|
url: '/pages/specialArea/share?specialArea=7',
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
setSpecial(item) {
|
setSpecial(item) {
|
||||||
if (item.value == 21) {
|
if (item.value == 21) {
|
||||||
|
@ -279,8 +356,8 @@
|
||||||
// JSON.stringify(this.itemChildren),
|
// JSON.stringify(this.itemChildren),
|
||||||
// })
|
// })
|
||||||
} else {
|
} else {
|
||||||
this.specialArea = item.value;
|
this.specialArea = item.value
|
||||||
this.getClassIfy();
|
this.getClassIfy()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addCar(item) {
|
addCar(item) {
|
||||||
|
@ -290,35 +367,36 @@
|
||||||
number: 1,
|
number: 1,
|
||||||
waresCode: item.waresCode,
|
waresCode: item.waresCode,
|
||||||
productGroup: item.productGroup,
|
productGroup: item.productGroup,
|
||||||
};
|
}
|
||||||
if (
|
if (
|
||||||
item.isMakerGift == 2 &&
|
item.isMakerGift == 2 &&
|
||||||
(item.specialArea == 1 || item.specialArea == 3)
|
(item.specialArea == 1 || item.specialArea == 3)
|
||||||
) {
|
) {
|
||||||
this.$refs.selSpaceGoods.getData(carList);
|
this.$refs.selSpaceGoods.getData(carList)
|
||||||
} else {
|
} else {
|
||||||
api.addShopping(carList).then((res) => {
|
api.addShopping(carList).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '购物车添加成功',
|
title: '购物车添加成功',
|
||||||
icon: "success",
|
icon: 'success',
|
||||||
mask: true,
|
mask: true,
|
||||||
});
|
duration: 500,
|
||||||
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$store
|
this.$store
|
||||||
.dispatch("getCarLength", this.specialArea)
|
.dispatch('getCarLength', this.specialArea)
|
||||||
.then((res) => {
|
.then(res => {
|
||||||
this.shopCarLength = res.data.smallCount;
|
this.shopCarLength = res.data.smallCount
|
||||||
});
|
})
|
||||||
}, 200);
|
}, 200)
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getCatLength() {
|
getCatLength() {
|
||||||
this.$store.dispatch("getCarLength", this.specialArea).then((res) => {
|
this.$store.dispatch('getCarLength', this.specialArea).then(res => {
|
||||||
this.shopCarLength = res.data.smallCount;
|
this.shopCarLength = res.data.smallCount
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
getClassIfy() {
|
getClassIfy() {
|
||||||
api
|
api
|
||||||
|
@ -327,16 +405,16 @@
|
||||||
specialArea: this.specialArea,
|
specialArea: this.specialArea,
|
||||||
hierarchy: 0,
|
hierarchy: 0,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(res => {
|
||||||
res.data.unshift({
|
res.data.unshift({
|
||||||
classifyName: '全部',
|
classifyName: '全部',
|
||||||
pkId: "",
|
pkId: '',
|
||||||
});
|
})
|
||||||
this.oneList = res.data;
|
this.oneList = res.data
|
||||||
this.oneId = this.oneList[0]?this.oneList[0].pkId : '';
|
this.oneId = this.oneList[0] ? this.oneList[0].pkId : ''
|
||||||
this.getClassIfyTwo(this.oneList[0].pkId);
|
this.getClassIfyTwo(this.oneList[0].pkId)
|
||||||
this.getAllGoods(this.oneList[0].pkId);
|
this.getAllGoods(this.oneList[0].pkId)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 获取分类二级
|
// 获取分类二级
|
||||||
getClassIfyTwo(pkId) {
|
getClassIfyTwo(pkId) {
|
||||||
|
@ -347,30 +425,30 @@
|
||||||
hierarchy: 1,
|
hierarchy: 1,
|
||||||
pkCountry: this.pkCountry,
|
pkCountry: this.pkCountry,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(res => {
|
||||||
res.data.unshift({
|
res.data.unshift({
|
||||||
classifyName: '全部',
|
classifyName: '全部',
|
||||||
pkId: pkId,
|
pkId: pkId,
|
||||||
});
|
})
|
||||||
this.twoList = res.data;
|
this.twoList = res.data
|
||||||
this.twoId = pkId;
|
this.twoId = pkId
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
getAllGoods(id) {
|
getAllGoods(id) {
|
||||||
api
|
api
|
||||||
.getAllGoods({
|
.getAllGoods({
|
||||||
pkCountry: this.pkCountry,
|
pkCountry: this.pkCountry,
|
||||||
specialArea: Number(this.specialArea),
|
specialArea: Number(this.specialArea),
|
||||||
pkAreaClassify: id ? id : "",
|
pkAreaClassify: id ? id : '',
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(res => {
|
||||||
this.goodList = res.data;
|
this.goodList = res.data
|
||||||
this.goodList.forEach((item) => {
|
this.goodList.forEach(item => {
|
||||||
if (item.waresName.length > 11) {
|
if (item.waresName.length > 11) {
|
||||||
item.waresName = item.waresName.substring(0, 11) + "...";
|
item.waresName = item.waresName.substring(0, 11) + '...'
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
getAllGoods1(id) {
|
getAllGoods1(id) {
|
||||||
api
|
api
|
||||||
|
@ -380,58 +458,64 @@
|
||||||
waresName: this.waresName,
|
waresName: this.waresName,
|
||||||
pkAreaClassify: id ? id : this.oneId,
|
pkAreaClassify: id ? id : this.oneId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(res => {
|
||||||
this.goodList = res.data;
|
this.goodList = res.data
|
||||||
this.goodList.forEach((item) => {
|
this.goodList.forEach(item => {
|
||||||
if (item.waresName.length > 11) {
|
if (item.waresName.length > 11) {
|
||||||
item.waresName = item.waresName.substring(0, 11) + "...";
|
item.waresName = item.waresName.substring(0, 11) + '...'
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
goDetails(item) {
|
goDetails(item) {
|
||||||
if (item.preSaleStatus != 3 && item.isSale != 1) {
|
if (item.preSaleStatus != 3 && item.isSale != 1) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/specialArea/details?waresCode=" +
|
url:
|
||||||
|
'/pages/specialArea/details?waresCode=' +
|
||||||
item.waresCode +
|
item.waresCode +
|
||||||
"&specialArea=" +
|
'&specialArea=' +
|
||||||
item.specialArea,
|
item.specialArea,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.index_header {
|
.index_header {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-family: PingFang SC-Semibold, PingFang SC;
|
font-family:
|
||||||
|
PingFang SC-Semibold,
|
||||||
|
PingFang SC;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
background: #f9f9f9;
|
background: #f9f9f9;
|
||||||
height: 93vh;
|
height: 93vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabList_a {}
|
.tabList_a {
|
||||||
|
}
|
||||||
|
|
||||||
.index_btm {
|
.index_btm {
|
||||||
flex: 1; // display: flex;
|
flex: 1; // display: flex;
|
||||||
|
|
||||||
.index_l {
|
.index_l {
|
||||||
width: 198rpx;
|
width: 198rpx;
|
||||||
padding: 10rpx 0;
|
padding: 10rpx 0;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-family: PingFang SC-Regular, PingFang SC;
|
font-family:
|
||||||
|
PingFang SC-Regular,
|
||||||
|
PingFang SC;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
@ -448,33 +532,31 @@
|
||||||
margin-left: 198rpx; // padding: 20rpx;
|
margin-left: 198rpx; // padding: 20rpx;
|
||||||
// display: flex;
|
// display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.classIfy {
|
.classIfy {
|
||||||
padding: 20rpx 20rpx;
|
padding: 20rpx 20rpx;
|
||||||
margin: 20rpx 0;
|
margin: 20rpx 0;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-family: Microsoft YaHei;
|
font-family: Microsoft YaHei;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
.actOne {
|
||||||
|
|
||||||
.actOne {
|
|
||||||
// border-left: 6rpx solid #005BAC;
|
// border-left: 6rpx solid #005BAC;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #005BAC;
|
background: #005bac;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab {
|
.tab {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 24rpx;
|
padding: 0 24rpx;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
.tab_i {
|
||||||
|
|
||||||
.tab_i {
|
|
||||||
// width: 120rpx;
|
// width: 120rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
@ -495,16 +577,18 @@
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
height: 58rpx;
|
height: 58rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.actTab {
|
.actTab {
|
||||||
// width: 120rpx;
|
// width: 120rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: PingFang SC-Semibold, PingFang SC;
|
font-family:
|
||||||
|
PingFang SC-Semibold,
|
||||||
|
PingFang SC;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
// color: #005BAC;
|
// color: #005BAC;
|
||||||
background-color: #005BAC;
|
background-color: #005bac;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
margin-right: 28rpx;
|
margin-right: 28rpx;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -519,41 +603,41 @@
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
height: 58rpx;
|
height: 58rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.heng {
|
.heng {
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 2px;
|
height: 2px;
|
||||||
background: #005BAC;
|
background: #005bac;
|
||||||
border-radius: 1px 1px 1px 1px;
|
border-radius: 1px 1px 1px 1px;
|
||||||
margin-top: 4rpx;
|
margin-top: 4rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.heng1 {
|
.heng1 {
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 2px;
|
height: 2px;
|
||||||
background: f9f9f9;
|
background: f9f9f9;
|
||||||
border-radius: 1px 1px 1px 1px;
|
border-radius: 1px 1px 1px 1px;
|
||||||
margin-top: 4rpx;
|
margin-top: 4rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.heng2 {
|
.heng2 {
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 2px;
|
height: 2px;
|
||||||
background: f9f9f9;
|
background: f9f9f9;
|
||||||
border-radius: 1px 1px 1px 1px;
|
border-radius: 1px 1px 1px 1px;
|
||||||
margin-top: 4rpx;
|
margin-top: 4rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .u-scroll-list {
|
::v-deep .u-scroll-list {
|
||||||
padding-bottom: 10rpx;
|
padding-bottom: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.zhan {
|
.zhan {
|
||||||
height: 200px;
|
height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goodList {
|
.goodList {
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
height: 95vh;
|
height: 95vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
@ -608,24 +692,24 @@
|
||||||
border: 1px solid #eeeeee;
|
border: 1px solid #eeeeee;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pv {
|
.pv {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shareImg {
|
.shareImg {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
margin: 14rpx 24rpx;
|
margin: 14rpx 24rpx;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
top: 5rpx;
|
top: 5rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shareImg1 {
|
.shareImg1 {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
margin: 14rpx 24rpx;
|
margin: 14rpx 24rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
@ -639,9 +723,9 @@
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.qzbq {
|
.qzbq {
|
||||||
background: #d61820;
|
background: #d61820;
|
||||||
border-radius: 2px 2px 2px 2px;
|
border-radius: 2px 2px 2px 2px;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
|
@ -650,13 +734,13 @@
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search {
|
.search {
|
||||||
margin: 10rpx 20rpx;
|
margin: 10rpx 20rpx;
|
||||||
padding: 10rpx;
|
padding: 10rpx;
|
||||||
background: #eeeeee;
|
background: #eeeeee;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue