Commit 58a574d8 authored by zhengke's avatar zhengke

增加页面

parent 0e981854
<style>
.koraActivity{
height:auto;
width:100%;
background-color: #F3F5F7;
padding-top:20px;
}
.koraActivityContent{
/* display: flex; */
margin:15px;
}
.activeList{
width:120px;
height:170px;
background-color: #fff;
border-radius: 3px;
color:#404040;
text-align: center;
margin-right:12px;
font-size:13px;
margin-bottom:12px;
display:inline-block;
}
.activeList:nth-child(3n+3){
margin-right:0;
}
.activieTop{
width:100%;
height:100px;
}
.activieTop img{
width:100%;
height:100%;
}
.activeName{
font-size:14px;
margin:8px 0;
}
.categray_Brand{
width:84px;
height:26px;
color:#fff;
font-size:14px;
line-height: 26px;
padding-right:12px;
text-align: center;
background-image: url(../../static/images/brand.png);
}
.viewDetail{
width:65px;
height:25px;
font-size:12px;
background-color: #0c0053;
color:#fff;
text-align: center;
line-height: 25px;
border-radius: 3px;
margin: auto;
}
</style>
<template>
<view>
<view style="border: #00D6A6;">最新动态</view>
<view class="koraActivity">
<view class="categray_Brand">
贸易活动
</view>
<view class="koraActivityContent">
<view class="activeList">
<view class="activieTop">
<img src="../../static/images/icon/GradeAudit.png" alt=""/>
</view>
<view class="activeName">本地活动</view>
<view class="viewDetail">查看详情</view>
</view>
<view class="activeList">
<view class="activieTop">
<img src="../../static/images/icon/GradeAudit.png" alt=""/>
</view>
<view class="activeName">本地活动</view>
<view class="viewDetail">查看详情</view>
</view>
<view class="activeList">
<view class="activieTop">
<img src="../../static/images/icon/GradeAudit.png" alt=""/>
</view>
<view class="activeName">本地活动</view>
<view class="viewDetail">查看详情</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: '',
mainColor: '',
dataList:[]
}
},
created() {
},
mounted() {
this.getData();
},
onLoad(option) {
},
methods: {
//获取数据
getData() {
this.request2({
url: "/api/AppletGoods/GetProductCategoryAllList",
data: {},
},
(res) => {
if (res.resultCode == 1) {
this.dataList = res.data;
}
}
);
},
//跳转详情
goDetail(item){
uni.navigateTo({
url: '/pages/goods/list?CategoryIds=' + item.Id
});
}
}
}
</script>
......
<style>
.categoryMain{
height:auto;
width:100%;
background-color: #F3F5F7;
padding-top:20px;
}
.categoryContent{
/* display: flex; */
margin:15px;
}
.cateList{
width:120px;
height:130px;
background-color: #fff;
border-radius: 3px;
color:#404040;
text-align: center;
margin-right:12px;
font-size:13px;
margin-bottom:12px;
display:inline-block;
}
.cateList:nth-child(3n+3){
margin-right:0;
}
.categoryTop{
width:100%;
height:92px;
}
.categoryTop img{
width:100%;
height:100%;
}
.cateName{
margin-top:10px;
}
.categray_Brand{
width:84px;
height:26px;
color:#fff;
font-size:14px;
line-height: 26px;
padding-right:12px;
text-align: center;
background-image: url(../../static/images/brand.png);
}
</style>
<template>
<view>
<view style="border: #007AFF;">品牌</view>
<view class="categoryMain">
<view class="categray_Brand">
品牌
</view>
<view class="categoryContent">
<view class="cateList" v-for="(item,index) in dataList" :key="index" @click="goDetail(item)">
<view class="categoryTop">
<img :src="item.IconPath" alt=""/>
</view>
<view class="cateName">{{item.Name}}</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: '',
mainColor: '',
dataList:[]
}
},
created() {
},
mounted() {
this.getData();
},
onLoad(option) {
},
methods: {
//获取数据
getData() {
this.request2({
url: "/api/AppletGoods/GetProductCategoryAllList",
data: {},
},
(res) => {
if (res.resultCode == 1) {
this.dataList = res.data;
}
}
);
},
//跳转详情
goDetail(item){
uni.navigateTo({
url: '/pages/goods/list?CategoryIds=' + item.Id
});
}
}
}
</script>
......
......@@ -68,10 +68,14 @@
backgroundColor: this.navs.backgroundColor
};
}
this.bg = this.formatStyle.backgroundColor
this.bg = this.formatStyle.backgroundColor;
if(this.cols&&this.cols.length>0){
this.clickItem.url = this.cols[0][0].url;
}
},
methods: {
clickHandler(item) {
console.log(item,'item');
this.clickItem = item;
},
},
......
<template>
<view>
<style>
.koraNewsList{
display: flex;
width:100%;
height:100px;
padding:10px;
border-bottom: 1px solid #F4F4F4;
flex:1;
}
.newsLeft{
width:140px;
height:80px;
flex-shrink:0;
}
.newsLeft img{
width:100%;
height:100%;
}
.koranewRight{
position: relative;
}
.koraDate{
position: absolute;
color:#B9B9B9;
bottom:0;
font-size:13px;
}
.koraRName{
color:#404040;
font-size:14px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
<view style="border: #C92B2B;">活动</view>
}
</style>
<template>
<view class="koraNews">
<view class="koraNewsList">
<view class="newsLeft">
<img src="../../static/images/icon/GradeAudit.png" alt=""/>
</view>
<view class="koranewRight">
<view class="koraRName">机智的FTA生活机智的FTA生活机智的FTA生活机智的FTA生活机智的FTA生活机智的FTA生活机智的FTA生活机智的FTA生活机智的FTA生活机智的FTA生活</view>
<view class="koraDate">2020/06/09</view>
</view>
</view>
<view class="koraNewsList">
<view class="newsLeft">
<img src="../../static/images/icon/GradeAudit.png" alt=""/>
</view>
<view>
<view class="koraRName">机智的FTA生活</view>
<view class="koraDate">2020/06/09</view>
</view>
</view>
</view>
</template>
......@@ -17,7 +70,3 @@
}
}
</script>
<style>
</style>
......@@ -33,16 +33,6 @@
{
"path": "pages/webbox/webbox"
}
,{
"path" : "components/navpage/category",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"subPackages": [{
"root": "pages/goods",
......
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