Commit bdb170b3 by LJM

Merge branch 'master' of http://git.ichunt.net/xiaokang/H5_2.0

parents a37d0c8e 735616d5
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
position: fixed; position: fixed;
top:0rpx; top:0rpx;
left:0rpx; left:0rpx;
z-index: 3;
width:100%;
.icon-arrleft{ .icon-arrleft{
font-size: 44rpx; font-size: 44rpx;
color:$uni-color999; color:$uni-color999;
...@@ -31,7 +33,7 @@ ...@@ -31,7 +33,7 @@
input{ input{
height: 66rpx; height: 66rpx;
line-height: 66rpx; line-height: 66rpx;
width:300rpx; width:410rpx;
font-size: 24rpx; font-size: 24rpx;
color:$uni-color666; color:$uni-color666;
...@@ -92,4 +94,184 @@ ...@@ -92,4 +94,184 @@
} }
} }
.shiftbox{
height: 88rpx;
line-height: 88rpx;
background: #fff;
border-radius: 10px 10px 0px 0px;
font-size: 26rpx;
color:$uni-color333;
width:100%;
.sjpx{
position: relative;
&::after{
content:"";
position: absolute;
border-width: 8rpx;
right:-22rpx;
top:27rpx;
border-style: solid;
border-color:transparent transparent $uni-color999 transparent ;
}
&::before{
content:"";
position: absolute;
border-width: 8rpx;
border-style: solid;
top:47rpx;
right:-22rpx;
border-color:$uni-color999 transparent transparent transparent ;
}
}
.sxbox{
position: relative;
text{color:$uni-color999;font-size: 40rpx;}
left:18rpx;
.icon{margin-left: 9rpx;}
&::after{
content:"";
position: absolute;
height:40rpx;
width:1rpx;
background: #C2C4CC;
left:-43rpx;
top:26rpx;
}
}
.act{
color:$uni-coloract;
font-weight: 600;
&.top{
&::after{
border-color:transparent transparent $uni-coloract transparent ;
}
}
&.bot{
&::before{
border-color: $uni-coloract transparent transparent transparent ;
}
}
}
}
.databox{
width:100%;
padding:0 24rpx;
background: #fff;
.group{
padding:24rpx 0;
border-bottom: 1rpx solid #F5F5F7;
&:last-child{border:0rpx;}
.toprs1{
height:48rpx;
line-height: 48rpx;
margin-bottom: 12rpx;
navigator{
height:48rpx;
line-height: 48rpx;
.goodsName{
font-size: 28rpx;
color:$uni-color333;
font-weight: 600;
max-width:400rpx;
}
.actag{
height: 28rpx;
padding: 0 10rpx;
line-height: 28rpx;
background: #FF3700;
border-radius: 0px 14rpx 14rpx 0px;
color:#fff;
position: relative;
margin-left: 10rpx;
top:10rpx;
}
}
.addcar{
width: 142rpx;
height: 48rpx;
line-height: 48rpx;
background: #1969F9;
color:#fff;
font-size: 22rpx;
text-align: center;
border-radius: 6rpx;
font-weight: 400;
}
.kfbtns{
width: 142rpx;
height: 48rpx;
line-height: 44rpx;
background: #fff;
color:#1969F9;
border:2rpx solid #1969F9;
font-size: 22rpx;
text-align: center;
border-radius: 6rpx;
font-weight: 400;
}
}
.labelsd{color:#9D9FA6;}
.toprs2{
margin-top: 6rpx;
font-size: 24rpx;
height:33rpx;
line-height: 33rpx;
.l2{width:396rpx;}
.r2{
width:269rpx;
}
}
.toprs3{
margin-top: 6rpx;
font-size: 24rpx;
height:33rpx;
line-height: 33rpx;
.priceb{
text{
color:$uni-colorwarning;
&.p1{width:126rpx;margin-right: 14rpx;}
&.p2{width:160rpx;margin-right: 14rpx;}
}
}
}
}
}
.nodatabox{
padding-top: 100rpx;
text-align: center;
image{
display: block;
margin:0 auto;
width:356rpx;
height:356rpx;
margin-bottom: 28rpx;
}
}
.loadEnd{
height: 62rpx;
line-height: 62rpx;
background: #F5F5F7;
font-size: 22rpx;
text-align: center;
color:#C6C7CC;
}
&.fixeds{
padding-top:176rpx;
.shiftbox{
border-radius: 0rpx;
top:88rpx;
left:0rpx;
position: fixed;
}
}
} }
\ No newline at end of file
<template> <template>
<view class="brandpage"> <view class="brandpage fixeds">
<view class="header row verCenter " :class="{'act':isSearch}"> <view class="header row verCenter " :class="{'act':isSearch}">
<text v-back class="icon iconfont icon-arrleft"></text> <text v-back class="icon iconfont icon-arrleft"></text>
<view class="inputbox row verCenter" > <view class="inputbox row verCenter" >
...@@ -22,27 +22,117 @@ ...@@ -22,27 +22,117 @@
<view class="zkbtnsi row verCenter" v-show="!zkshow" @click="zkshow=!zkshow">展开详情<text class="icon iconfont icon-arrbot"></text></view> <view class="zkbtnsi row verCenter" v-show="!zkshow" @click="zkshow=!zkshow">展开详情<text class="icon iconfont icon-arrbot"></text></view>
<view class="zkbtnsi row verCenter" v-show="zkshow" @click="zkshow=!zkshow">收起详情<text class="icon iconfont icon-arrtop"></text></view> <view class="zkbtnsi row verCenter" v-show="zkshow" @click="zkshow=!zkshow">收起详情<text class="icon iconfont icon-arrtop"></text></view>
</view> </view>
<view class="datasc">
<view class="shiftbox row avarage ">
<view class="rank1 row ">综合</view>
<view class="rank2 row sjpx act top">库存</view>
<view class="rank3 row sjpx act bot">价格</view>
</view>
<view class="databox">
<view class="group" v-for="(item,index) in list" :key="index">
<view class="toprs1 row bothSide">
<navigator :url="'/item?goods_id='+item.goods_id" class="row">
<view class="goodsName elep">{{item.goods_name}}</view>
<view class="actag" v-if="item.ac_type==10">{{item.activity_info.sign}}</view>
</navigator>
<view class="addcar" v-if="item.is_buy==1" @click="addcarpopfunc(item.goods_id)">加入购物车</view>
<view class="kfbtns" v-if="item.is_buy!=1" @click="addcarpopfunc(item.goods_id)">联系客服</view>
</view>
<view class="toprs2 row bothSide">
<view class="l2 elep"><text class="labelsd">品牌:</text>{{item.brand_name}}</view>
<view class="r2 elep"><text class="labelsd">起订量:</text>{{item.moq}}</view>
</view>
<view class="toprs2 row bothSide">
<view class="l2 elep"><text class="labelsd">供应商:</text>{{item.supplier_name}}</view>
<view class="r2 elep"><text class="labelsd">库存:</text>{{item.stock}}</view>
</view>
<view class="toprs3 row bothSide">
<view class="row">
<text class="labelsd">价格:</text>
<view class="row priceb" v-if="item.ladder_price[0]">
<text class="p1">{{item.ladder_price[0].purchases}}+</text>
<text class="p2">{{item.ladder_price[0].price_ac||item.ladder_price[0].price_cn}}</text>
<text class="p3">${{item.ladder_price[0].price_ac_us||item.ladder_price[0].price_us}}</text>
</view>
</view>
<text class="labelsd" @click="addcarpopfunc(item.goods_id)">更多阶梯价<text
class="icon iconfont icon-arrbot"></text></text>
</view>
</view>
</view>
</view>
<view class="nodatabox" v-show="isInitLogin&&list.length==0">
<image src="https://img.ichunt.com/images/ichunt/202304/10/d502aef8d15d42187482a48915196270.png">
</image>
</view>
<!-- 数据已全部加载 -->
<view v-if="isLoadEnd" class="loadEnd">—— 数据已全部加载 ——</view>
<addCar ref="addCarPop" /> <addCar ref="addCarPop" />
</view> </view>
</template> </template>
<script> <script>
import addCar from '@/components/addcar.vue'; import addCar from '@/components/addcar.vue';
import {Api_Es,Ichunt_Api} from '@/util/api.js';
export default { export default {
data() { data() {
return { return {
brand_id:"", brand_id:"",
isSearch:false, isSearch:false,
zkshow:false zkshow:false,
kfurl:"",
list:[],
isInitLogin:0,
class_id1:"",
class_id2:"",
page:1,
page_size:10,
isLoadEnd: false // 是否已全部加载完
} }
}, },
onShow() {
this.getData();
this.getqqurl()
},
onLoad: function(option) { onLoad: function(option) {
this.brand_id = this.$Route.query.brand_id; this.brand_id = this.$Route.query.brand_id;
console.log(this.brand_id); console.log(this.brand_id);
}, },
async onReachBottom() {
// 如果正在加载中或已全部加载完,则直接返回
if (this.isLoadEnd) {
return;
}
// 开始加载数据
this.getData();
},
methods: { methods: {
getqqurl:function(){
this.request(Ichunt_Api + "/api/common/data", 'GET', {}, ).then(res => {
if (res.err_code === 0) {
this.kfurl=res.data.kfqq_xk.data
}
});
},
getData() { getData() {
this.request(Api_Es + "/optimum/goods", 'POST', {class_id1:13396,page:this.page,page_size:this.page_size},true,true).then(res => {
this.isInitLogin=1;
if (res.error_code == 0) {
this.class_id1_name=res.data.class_id1_name;
this.class_id2_name=res.data.class_id2_name;
this.page++;
let newDataList = res.data.goods_lists||[];
this.list = this.list.concat(newDataList);
if (newDataList.length <this.page_size) {
this.isLoadEnd = true;
}
}else{
this.list=[]
}
});
}, },
addcarpopfunc(goods_id) { addcarpopfunc(goods_id) {
this.$refs.addCarPop.addcarpopfunc(goods_id); this.$refs.addCarPop.addcarpopfunc(goods_id);
......
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 sign in to comment