dengjie commit : 我的页面及其绑定公司,浏览记录,我的收藏页面 的样式初步完成

This commit is contained in:
clay
2022-12-17 01:57:06 +08:00
parent 9c5d40cbb9
commit 76b6d9e557
19 changed files with 720 additions and 621 deletions

View File

@@ -0,0 +1,72 @@
<template>
<view>
<view class="xw_content" v-for="(item,index) in cjsList" :key="index" @click="clickCj(index)">
<u--image :src="item.src" width="112rpx" height="112rpx" :lazy-load="true">
</u--image>
<view class="xw_right">
<view class="xw_title">
{{item.title}}
</view>
<view style="display: flex;">
<text class="cj_tags" v-for="(tagsItem,tagsIndex) in item.tags" :key="tagsIndex">
{{tagsItem.tag}}
</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
cjsList: [{
src: '/static/report/zhanwei_xf(1).png',
title: '西安兴沃丰餐饮管理有限责任公司',
tags: [{
tag: '咖啡'
},
{
tag: '饮品'
}
]
},
{
src: '/static/report/zhanwei_xf(2).png',
title: '福建省海纳川食品有限公司',
tags: [{
tag: '活冻鲍鱼'
},
{
tag: '鲍鱼罐头'
},
{
tag: '佛跳墙'
},
{
tag: '海螺片'
}
]
},
]
}
},
methods: {
// 跳转到认证厂家详情页
clickCj(index) {
if (index == 0) {
uni.navigateTo({
url: '/pages/detail/certifiedCjDetail/certifiedCjDetail'
})
}
}
}
}
</script>
<style>
</style>

59
components/news/news.vue Normal file
View File

@@ -0,0 +1,59 @@
<template>
<view>
<view class="xw_content" v-for="(item,index) in newsList" :key="index" @click="clickNews(index)">
<u--image :src="item.src" width="192rpx" height="122rpx" :lazy-load="true">
</u--image>
<view class="xw_right">
<view class="xw_title">
{{item.title}}
</view>
<view style="display: flex;">
<text class="xw_time">
{{item.time}}
</text>
<text class="xw_time xw_place">
{{item.place}}
</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
newsList: [{
src: '/static/report/zhanwei_xf.png',
title: '2022近50款食品饮料新品创新的方向都在这里',
time: '2022-12-03 09:59',
place: '第一食品资讯官方账号'
},
{
src: '/static/report/zhanwei_zh.png',
title: '食品企业如何开发新产品?创新思维又发挥着怎样的效应呢?',
time: '2022-10-18 14:43',
place: '腾讯新闻 '
},
{
src: '/static/report/zhanwei_zh.png',
title: '食品企业如何开发新产品?创新思维又发挥着怎样的效应呢?',
time: '2022-10-18 14:43',
place: '腾讯新闻'
},
],
}
},
methods: {
// 跳转到新闻详情页
clickNews(index) {
if (index == 0) {
uni.navigateTo({
url: '/pages/detail/xwDetail/xwDetail'
})
}
},
}
}
</script>

View File

@@ -0,0 +1,91 @@
<template>
<view>
<view class="products_box">
<u-grid :border="false" col="2">
<u-grid-item v-for="(item,index) in productList" :key="index">
<u-image src="/static/products/sy_bb.png" width="354rpx" height="539rpx" :lazy-load="true">
</u-image>
<view class="bgContent">
<view>
<u-image :src="item.src" width="346rpx" height="320rpx" :lazy-load="true"
@click="toDetailPage()">
</u-image>
<view class="img_tag">{{item.img_tag}}</view>
</view>
<view style="padding: 16rpx;">
<view class="title_box">
<text class="title">{{item.title}}</text>
<u-tag :text="item.tag" type="warning" shape="circle"></u-tag>
</view>
<view class="product_desc">
{{item.desc}}
</view>
<view class="releaseDate">
<u-image src="/static/products/sy_icon_sjf.png" width="22rpx" height="22rpx"
:lazy-load="true">
</u-image>
<text class="release">发布日期</text>
<text>{{item.time}}</text>
</view>
</view>
</view>
</u-grid-item>
</u-grid>
</view>
</view>
</template>
<script>
export default {
data() {
return {
productList: [{
src: '/static/products/zhanwei_dg.png',
title: '锅巴',
tag: '无添加剂',
img_tag: '零食铺子',
desc: '糯米蟹黄锅巴散装,非油炸绿色健康食品',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(2).png',
title: '干吃汤圆',
tag: '天然原料',
img_tag: '糕点卷酥',
desc: '休闲食品厂家甜品糯米食品零食闽南特产宵夜好吃糍粑',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(1).png',
title: '紫薯魔芋人参魔芋人参魔芋人参…',
tag: '天然原料',
img_tag: '健康创新',
desc: '紫薯魔芋人参代餐粉 冲调饮品贴牌加工 五谷杂粮粉代餐',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(3).png',
title: '焦糖饼干',
tag: '无防腐剂',
img_tag: '饼干曲奇',
desc: '比利时风味焦糖饼干代餐小吃零食品',
time: '2022-12-04'
}
]
}
},
methods: {
//点击图片跳转到详情页
toDetailPage() {
uni.navigateTo({
url: '/pages/detail/productsDetail/productsDetail'
})
}
}
}
</script>
<style lang="scss">
</style>

View File

@@ -87,6 +87,23 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, {
"path": "pages/bindCompony/bindCompony",
"style": {
"navigationBarTitleText": "绑定公司",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#12CA64",
"enablePullDownRefresh": false
}
}, {
"path": "pages/browseHistory/browseHistory",
"style": {
"navigationBarTitleText": "浏览记录",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#12CA64",
"enablePullDownRefresh": false
}
} }
], ],
"tabBar": { "tabBar": {

View File

@@ -0,0 +1,62 @@
<template>
<view>
<u--form labelPosition="left" :model="model">
<u-form-item label="公司名称" prop="userInfo.name" borderBottom>
<u--input v-model="model.userInfo.name" border="none" placeholder="请输入您的名称"
placeholderStyle="color: #CCCCCC;font-size: 24rpx;"></u--input>
</u-form-item>
<u-form-item label="公司电话" prop="userInfo.phone" borderBottom>
<u--input v-model="model.userInfo.phone" border="none" placeholder="请输入您的电话"
placeholderStyle="color: #CCCCCC;font-size: 24rpx;">
</u--input>
</u-form-item>
</u--form>
<u-button type="success" text="确定" color="#0EBB5B"></u-button>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss">
.u-form {
margin-top: 20rpx;
}
.u-form-item__body__left {
width: auto !important;
color: #3E3E3E;
margin-left: 20rpx;
margin-right: 50rpx;
}
.u-form-item__body {
padding: 24rpx 0 !important;
}
.u-form-item__body__left__content__label {
font-size: 24rpx !important;
}
.u-form-item {
background-color: #fff;
}
.u-button {
width: 644rpx !important;
height: 86rpx !important;
background: #0EBB5B;
border-radius: 20rpx !important;
margin-top: 168rpx;
}
</style>

View File

@@ -0,0 +1,196 @@
<template>
<view>
<view class="products_box">
<u-grid :border="false" col="2">
<u-grid-item v-for="(item,index) in productList" :key="index">
<u-image src="/static/products/sy_bb.png" width="354rpx" height="539rpx" :lazy-load="true">
</u-image>
<view class="bgContent">
<view>
<u-image :src="item.src" width="346rpx" height="320rpx" :lazy-load="true"
@click="toDetailPage()">
</u-image>
<view class="img_tag">{{item.img_tag}}</view>
</view>
<view style="padding: 16rpx;">
<view class="title_box">
<text class="title">{{item.title}}</text>
<u-tag :text="item.tag" type="warning" shape="circle"></u-tag>
</view>
<view class="product_desc">
{{item.desc}}
</view>
<view class="releaseDate">
<u-image src="/static/products/sy_icon_sjf.png" width="22rpx" height="22rpx"
:lazy-load="true">
</u-image>
<text class="release">发布日期</text>
<text>{{item.time}}</text>
</view>
</view>
</view>
<u-button v-if="type==1" type="success" text="移除" color="#0EBB5B"></u-button>
<u-button v-if="type==2" type="success" text="取消收藏" color="#0EBB5B"></u-button>
</u-grid-item>
</u-grid>
</view>
</view>
</template>
<script>
export default {
data() {
return {
type: '',
productList: [{
src: '/static/products/zhanwei_dg.png',
title: '锅巴',
tag: '无添加剂',
img_tag: '零食铺子',
desc: '糯米蟹黄锅巴散装,非油炸绿色健康食品',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(2).png',
title: '干吃汤圆',
tag: '天然原料',
img_tag: '糕点卷酥',
desc: '休闲食品厂家甜品糯米食品零食闽南特产宵夜好吃糍粑',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(1).png',
title: '紫薯魔芋人参魔芋人参魔芋人参…',
tag: '天然原料',
img_tag: '健康创新',
desc: '紫薯魔芋人参代餐粉 冲调饮品贴牌加工 五谷杂粮粉代餐',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(3).png',
title: '焦糖饼干',
tag: '无防腐剂',
img_tag: '饼干曲奇',
desc: '比利时风味焦糖饼干代餐小吃零食品',
time: '2022-12-04'
}
]
}
},
onLoad(options) {
this.type = options.id
},
methods: {
}
}
</script>
<style lang="scss">
.u-button {
width: 150rpx !important;
height: 50rpx !important;
background: #0EBB5B;
border-radius: 10rpx !important;
margin-top: 22rpx;
margin-bottom: 50rpx;
}
.products_box {
padding: 10rpx;
.u-grid-item {
.bgContent {
position: absolute;
right: 0;
top: 0;
.u-image__image {
margin-left: 6px;
}
.img_tag {
position: absolute;
padding: 2rpx 8rpx;
right: 5px;
top: 30rpx;
border-radius: 54rpx 0px 0px 54rpx;
box-shadow: 0px 2rpx 4rpx 0px #078C42;
background: linear-gradient(135deg, #0DB658 0%, #16DD6D 100%);
font-size: 20rpx;
color: #FFFFFF;
line-height: 28rpx;
}
.title_box {
position: relative;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.title {
width: 186rpx;
font-size: 26rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #0EBB5B;
line-height: 37rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.u-tag {
height: 26rpx;
line-height: 26rpx;
background: linear-gradient(124deg, #FEAA19 0%, #FDCF3A 100%);
.u-tag__text {
font-size: 20rpx;
}
}
}
.product_desc {
font-size: 22rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #3E3E3E;
line-height: 26rpx;
margin-top: 24rpx;
margin-bottom: 20rpx;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.releaseDate {
font-size: 22rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #A3A3A3;
line-height: 26rpx;
display: flex;
align-items: center;
padding-bottom: 25rpx;
image {
margin-left: 0;
}
.release {
padding: 0 10rpx 0 5rpx;
}
}
}
}
}
</style>

View File

@@ -1,19 +1,6 @@
<template> <template>
<view style="margin-top: 20rpx; height: 1176rpx;background: #FFFFFF;"> <view style="margin-top: 20rpx; height: 1176rpx;background: #FFFFFF;">
<view class="xw_content" v-for="(item,index) in cjsList" :key="index" @click="click(index)"> <certifiedCj></certifiedCj>
<u--image :src="item.src" width="112rpx" height="112rpx" :lazy-load="true">
</u--image>
<view class="xw_right">
<view class="xw_title">
{{item.title}}
</view>
<view style="display: flex;">
<text class="cj_tags" v-for="(tagsItem,tagsIndex) in item.tags" :key="tagsIndex">
{{tagsItem.tag}}
</text>
</view>
</view>
</view>
<view v-if="cjsShow" class="no-data">已经到底啦</view> <view v-if="cjsShow" class="no-data">已经到底啦</view>
</view> </view>
</template> </template>
@@ -23,46 +10,9 @@
data() { data() {
return { return {
cjsShow: true, cjsShow: true,
cjsList: [{
src: '/static/report/zhanwei_xf(1).png',
title: '西安兴沃丰餐饮管理有限责任公司',
tags: [{
tag: '咖啡'
},
{
tag: '饮品'
}
]
},
{
src: '/static/report/zhanwei_xf(2).png',
title: '福建省海纳川食品有限公司',
tags: [{
tag: '活冻鲍鱼'
},
{
tag: '鲍鱼罐头'
},
{
tag: '佛跳墙'
},
{
tag: '海螺片'
}
]
},
]
} }
}, },
methods: { methods: {
click(index) {
if (index == 0) {
uni.navigateTo({
url: '/pages/detail/certifiedCjDetail/certifiedCjDetail'
})
}
}
// this.cjsShow = this.list.length === 0 ? true : false // this.cjsShow = this.list.length === 0 ? true : false
} }
} }

View File

@@ -34,39 +34,7 @@
</u-tabs> </u-tabs>
</view> </view>
<!-- 产品 --> <!-- 产品 -->
<view class="products_box"> <products></products>
<u-grid :border="false" col="2">
<u-grid-item v-for="(item,index) in productList" :key="index">
<u-image src="/static/products/sy_bb.png" width="354rpx" height="539rpx" :lazy-load="true">
</u-image>
<view class="bgContent">
<view>
<u-image :src="item.src" width="346rpx" height="320rpx" :lazy-load="true"
@click="toDetailPage()">
</u-image>
<view class="img_tag">{{item.img_tag}}</view>
</view>
<view style="padding: 16rpx;">
<view class="title_box">
<text class="title">{{item.title}}</text>
<u-tag :text="item.tag" type="warning" shape="circle"></u-tag>
</view>
<view class="product_desc">
{{item.desc}}
</view>
<view class="releaseDate">
<u-image src="/static/products/sy_icon_sjf.png" width="22rpx" height="22rpx"
:lazy-load="true">
</u-image>
<text class="release">发布日期</text>
<text>{{item.time}}</text>
</view>
</view>
</view>
</u-grid-item>
</u-grid>
</view>
</view> </view>
</view> </view>
</template> </template>
@@ -127,39 +95,7 @@
'/static/products/sy_bg.png', '/static/products/sy_bg.png',
'https://cdn.uviewui.com/uview/swiper/swiper3.png' 'https://cdn.uviewui.com/uview/swiper/swiper3.png'
], ],
productList: [{
src: '/static/products/zhanwei_dg.png',
title: '锅巴',
tag: '无添加剂',
img_tag: '零食铺子',
desc: '糯米蟹黄锅巴散装,非油炸绿色健康食品',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(2).png',
title: '干吃汤圆',
tag: '天然原料',
img_tag: '糕点卷酥',
desc: '休闲食品厂家甜品糯米食品零食闽南特产宵夜好吃糍粑',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(1).png',
title: '紫薯魔芋人参魔芋人参魔芋人参…',
tag: '天然原料',
img_tag: '健康创新',
desc: '紫薯魔芋人参代餐粉 冲调饮品贴牌加工 五谷杂粮粉代餐',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(3).png',
title: '焦糖饼干',
tag: '无防腐剂',
img_tag: '饼干曲奇',
desc: '比利时风味焦糖饼干代餐小吃零食品',
time: '2022-12-04'
}
]
} }
}, },
onPullDownRefresh() { onPullDownRefresh() {
@@ -170,13 +106,8 @@
//点击一级分类 //点击一级分类
click(listIndex) { click(listIndex) {
this.$refs.uToast.success(`点击了第${listIndex}`) this.$refs.uToast.success(`点击了第${listIndex}`)
},
//点击图片跳转到详情页
toDetailPage() {
uni.navigateTo({
url: '/pages/detail/productsDetail/productsDetail'
})
} }
} }
} }
</script> </script>
@@ -255,101 +186,6 @@
} }
} }
.products_box {
padding: 10rpx;
.u-grid-item {
.bgContent {
position: absolute;
right: 0;
top: 0;
.u-image__image {
margin-left: 6px;
}
.img_tag {
position: absolute;
padding: 2rpx 8rpx;
right: 5px;
top: 30rpx;
border-radius: 54rpx 0px 0px 54rpx;
box-shadow: 0px 2rpx 4rpx 0px #078C42;
background: linear-gradient(135deg, #0DB658 0%, #16DD6D 100%);
font-size: 20rpx;
color: #FFFFFF;
line-height: 28rpx;
}
.title_box {
position: relative;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.title {
width: 186rpx;
font-size: 26rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #0EBB5B;
line-height: 37rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.u-tag {
height: 26rpx;
line-height: 26rpx;
background: linear-gradient(124deg, #FEAA19 0%, #FDCF3A 100%);
.u-tag__text {
font-size: 20rpx;
}
}
}
.product_desc {
font-size: 22rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #3E3E3E;
line-height: 26rpx;
margin-top: 24rpx;
margin-bottom: 20rpx;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.releaseDate {
font-size: 22rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #A3A3A3;
line-height: 26rpx;
display: flex;
align-items: center;
padding-bottom: 25rpx;
image {
margin-left: 0;
}
.release {
padding: 0 10rpx 0 5rpx;
}
}
}
}
}
} }
</style> </style>

View File

@@ -18,8 +18,19 @@
<text>顾发航</text> <text>顾发航</text>
</view> </view>
<view class="table"> <view class="table">
<u-cell-group>
<u-cell size="large" title="绑定公司" icon="/static/my/wo_icon_bd.png" :isLink="true" value="未绑定公司"
@click="bindCompany()">
</u-cell>
<u-cell size="large" title="会员中心" icon="/static/my/wo_icon_hyzx.png" :isLink="true"></u-cell>
<u-cell size="large" title="浏览记录" icon="/static/my/wo_icon_lljl.png" :isLink="true"
@click="toBrowseHistory()"></u-cell>
<u-cell size="large" title="我的收藏" icon="/static/my/wo_icon_sc.png" :isLink="true"
@click="toMyCollect()"></u-cell>
<u-cell size="large" title="联系客服" icon="/static/my/wo_icon_lxkf.png" :isLink="true"></u-cell>
</u-cell-group>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
@@ -29,11 +40,28 @@
show: false, show: false,
avatar: '/static/my/avatar.png', avatar: '/static/my/avatar.png',
normal: '/static/my/wo_icon_pthy.png', normal: '/static/my/wo_icon_pthy.png',
VIP: '/static/my/wo_icon_vip.png' VIP: '/static/my/wo_icon_vip.png',
} }
}, },
methods: { methods: {
//跳转到绑定公司页面
bindCompany() {
uni.navigateTo({
url: '/pages/bindCompony/bindCompony'
})
},
//跳转到浏览记录页面
toBrowseHistory() {
uni.navigateTo({
url: '/pages/browseHistory/browseHistory?id=' + 1
})
},
//跳转到我的收藏页面
toMyCollect() {
uni.navigateTo({
url: '/pages/browseHistory/browseHistory?id=' + 2
})
}
} }
} }
</script> </script>
@@ -51,7 +79,7 @@
color: #fff !important; color: #fff !important;
} }
.u-icon__icon { .uicon-arrow-left {
display: none !important; display: none !important;
} }
@@ -73,4 +101,38 @@
} }
} }
.table {
background-color: #fff;
margin-top: 50rpx;
}
.u-line {
display: none !important;
}
.u-cell--clickable {
background-color: #fff !important;
}
.u-cell {
border-bottom: 1rpx solid #EEEEEE;
}
.u-icon__icon--info {
font-size: 28rpx !important;
}
.u-cell__title-text {
margin-left: 20rpx;
font-size: 24rpx !important;
color: #252421;
line-height: 33rpx !important;
}
.u-cell__value {
font-size: 24rpx !important;
color: #CCCCCC !important;
}
</style> </style>

View File

@@ -1,22 +1,6 @@
<template> <template>
<view style="margin-top: 20rpx; height: 1176rpx;background: #FFFFFF;"> <view style="margin-top: 20rpx; height: 1176rpx;background: #FFFFFF;">
<view class="xw_content" v-for="(item,index) in newsList" :key="index" @click="clickNews(index)"> <news></news>
<u--image :src="item.src" width="192rpx" height="122rpx" :lazy-load="true">
</u--image>
<view class="xw_right">
<view class="xw_title">
{{item.title}}
</view>
<view style="display: flex;">
<text class="xw_time">
{{item.time}}
</text>
<text class="xw_time xw_place">
{{item.place}}
</text>
</view>
</view>
</view>
<view v-if="newsShow" class="no-data">已经到底啦</view> <view v-if="newsShow" class="no-data">已经到底啦</view>
</view> </view>
</template> </template>
@@ -26,39 +10,12 @@
data() { data() {
return { return {
newsShow: true, newsShow: true,
newsList: [{
src: '/static/report/zhanwei_xf.png',
title: '2022近50款食品饮料新品创新的方向都在这里',
time: '2022-12-03 09:59',
place: '第一食品资讯官方账号'
},
{
src: '/static/report/zhanwei_zh.png',
title: '食品企业如何开发新产品?创新思维又发挥着怎样的效应呢?',
time: '2022-10-18 14:43',
place: '腾讯新闻 '
},
{
src: '/static/report/zhanwei_zh.png',
title: '食品企业如何开发新产品?创新思维又发挥着怎样的效应呢?',
time: '2022-10-18 14:43',
place: '腾讯新闻'
},
],
} }
}, },
onLoad() { onLoad() {
}, },
methods: { methods: {
// 跳转到新闻详情页
clickNews(index) {
if (index == 0) {
uni.navigateTo({
url: '/pages/detail/xwDetail/xwDetail'
})
}
},
// this.newsShow = this.list.length === 0 ? true : false // this.newsShow = this.list.length === 0 ? true : false
} }
} }
@@ -74,45 +31,4 @@
color: #BBBBBB; color: #BBBBBB;
line-height: 28rpx; line-height: 28rpx;
} }
.xw_content {
background: #FFFFFF;
border: 1rpx solid #EEEEEE;
display: flex;
padding: 29rpx 19rpx;
.xw_right {
padding-left: 19rpx;
display: flex;
flex-direction: column;
.xw_title {
font-size: 30rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #3E3E3E;
line-height: 42rpx;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.xw_time {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #969696;
line-height: 33rpx;
padding-top: 3rpx;
}
.xw_place {
padding-left: 20rpx;
}
}
}
</style> </style>

View File

@@ -19,23 +19,7 @@
</u--image> </u--image>
<text class="xw_text text">行业新闻</text> <text class="xw_text text">行业新闻</text>
</view> </view>
<view class="xw_content" v-for="(item,index) in newsList" :key="index" @click="clickNews(index)"> <news></news>
<u--image :src="item.src" width="192rpx" height="122rpx" :lazy-load="true">
</u--image>
<view class="xw_right">
<view class="xw_title">
{{item.title}}
</view>
<view style="display: flex;">
<text class="xw_time">
{{item.time}}
</text>
<text class="xw_time xw_place">
{{item.place}}
</text>
</view>
</view>
</view>
</view> </view>
<!-- 新品发布 --> <!-- 新品发布 -->
@@ -45,39 +29,7 @@
</u--image> </u--image>
<text class="xpfb_text text">新品发布</text> <text class="xpfb_text text">新品发布</text>
</view> </view>
<view class="products_box"> <products></products>
<u-grid :border="false" col="2">
<u-grid-item v-for="(item,index) in productList" :key="index">
<u-image src="/static/products/sy_bb.png" width="354rpx" height="539rpx" :lazy-load="true">
</u-image>
<view class="bgContent">
<view>
<u-image :src="item.src" width="346rpx" height="320rpx" :lazy-load="true"
@click="toDetailPage()">
</u-image>
<view class="img_tag">{{item.img_tag}}</view>
</view>
<view style="padding: 18rpx;">
<view class="title_box">
<text class="title">{{item.title}}</text>
<u-tag :text="item.tag" type="warning" shape="circle"></u-tag>
</view>
<view class="product_desc">
{{item.desc}}
</view>
<view class="releaseDate">
<u-image src="/static/products/sy_icon_sjf.png" width="22rpx" height="22rpx"
:lazy-load="true">
</u-image>
<text class="release">发布日期</text>
<text>{{item.time}}</text>
</view>
</view>
</view>
</u-grid-item>
</u-grid>
</view>
</view> </view>
<!-- 认证厂家 --> <!-- 认证厂家 -->
@@ -87,20 +39,7 @@
</u--image> </u--image>
<text class="rzcj_text text">认证厂家</text> <text class="rzcj_text text">认证厂家</text>
</view> </view>
<view class="xw_content" v-for="(item,index) in cjsList" :key="index" @click="clickCj(index)"> <certifiedCj></certifiedCj>
<u--image :src="item.src" width="112rpx" height="112rpx" :lazy-load="true">
</u--image>
<view class="xw_right">
<view class="xw_title">
{{item.title}}
</view>
<view style="display: flex;">
<text class="cj_tags" v-for="(tagsItem,tagsIndex) in item.tags" :key="tagsIndex">
{{tagsItem.tag}}
</text>
</view>
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
@@ -122,90 +61,7 @@
title: '认证厂家' title: '认证厂家'
}, },
], ],
productList: [{
src: '/static/products/zhanwei_dg.png',
title: '锅巴',
tag: '无添加剂',
img_tag: '零食铺子',
desc: '糯米蟹黄锅巴散装,非油炸绿色健康食品',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(2).png',
title: '干吃汤圆',
tag: '天然原料',
img_tag: '糕点卷酥',
desc: '休闲食品厂家甜品糯米食品零食闽南特产宵夜好吃糍粑',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(1).png',
title: '紫薯魔芋人参魔芋人参魔芋人参…',
tag: '天然原料',
img_tag: '健康创新',
desc: '紫薯魔芋人参代餐粉 冲调饮品贴牌加工 五谷杂粮粉代餐',
time: '2022-12-04'
},
{
src: '/static/products/zhanwei_dg(3).png',
title: '焦糖饼干',
tag: '无防腐剂',
img_tag: '饼干曲奇',
desc: '比利时风味焦糖饼干代餐小吃零食品',
time: '2022-12-04'
}
],
newsList: [{
src: '/static/report/zhanwei_xf.png',
title: '2022近50款食品饮料新品创新的方向都在这里',
time: '2022-12-03 09:59',
place: '第一食品资讯官方账号'
},
{
src: '/static/report/zhanwei_zh.png',
title: '食品企业如何开发新产品?创新思维又发挥着怎样的效应呢?',
time: '2022-10-18 14:43',
place: '腾讯新闻 '
},
{
src: '/static/report/zhanwei_zh.png',
title: '食品企业如何开发新产品?创新思维又发挥着怎样的效应呢?',
time: '2022-10-18 14:43',
place: '腾讯新闻'
},
],
cjsList: [
{
src: '/static/report/zhanwei_xf(1).png',
title: '西安兴沃丰餐饮管理有限责任公司',
tags: [{
tag: '咖啡'
},
{
tag: '饮品'
}
]
},
{
src: '/static/report/zhanwei_xf(2).png',
title: '福建省海纳川食品有限公司',
tags: [{
tag: '活冻鲍鱼'
},
{
tag: '鲍鱼罐头'
},
{
tag: '佛跳墙'
},
{
tag: '海螺片'
}
]
},
]
} }
}, },
methods: { methods: {
@@ -222,28 +78,8 @@
}) })
} }
}, },
// 跳转到新闻详情页
clickNews(index) {
if (index == 0) {
uni.navigateTo({
url: '/pages/detail/xwDetail/xwDetail'
})
}
},
//点击图片跳转到详情页
toDetailPage() {
uni.navigateTo({
url: '/pages/detail/productsDetail/productsDetail'
})
},
// 跳转到认证厂家详情页
clickCj(index) {
if (index == 0) {
uni.navigateTo({
url: '/pages/detail/certifiedCjDetail/certifiedCjDetail'
})
}
}
} }
} }
</script> </script>
@@ -286,54 +122,7 @@
} }
.xw_content {
background: #FFFFFF;
border: 1rpx solid #EEEEEE;
display: flex;
padding: 29rpx 19rpx;
.xw_right {
padding-left: 19rpx;
display: flex;
flex-direction: column;
.xw_title {
font-size: 30rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #3E3E3E;
line-height: 42rpx;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.xw_time {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #969696;
line-height: 33rpx;
}
.xw_place {
padding-left: 20rpx;
}
.cj_tags {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #969696;
line-height: 33rpx;
padding-right: 10rpx;
margin-top: 35rpx;
}
}
}
.xpfb_text { .xpfb_text {
color: #FCAC18; color: #FCAC18;
@@ -342,101 +131,4 @@
.rzcj_text { .rzcj_text {
color: #78E13A; color: #78E13A;
} }
.products_box {
padding: 10rpx;
.u-grid-item {
.bgContent {
position: absolute;
right: 0;
top: 0;
.u-image__image {
margin-left: 5px;
}
.img_tag {
position: absolute;
padding: 2rpx 8rpx;
right: 5px;
top: 30rpx;
border-radius: 54rpx 0px 0px 54rpx;
box-shadow: 0px 2rpx 4rpx 0px #078C42;
background: linear-gradient(135deg, #0DB658 0%, #16DD6D 100%);
font-size: 20rpx;
color: #FFFFFF;
line-height: 28rpx;
}
.title_box {
position: relative;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.title {
width: 186rpx;
font-size: 26rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #0EBB5B;
line-height: 37rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.u-tag {
height: 26rpx;
line-height: 26rpx;
background: linear-gradient(124deg, #FEAA19 0%, #FDCF3A 100%);
.u-tag__text {
font-size: 20rpx;
}
}
}
.product_desc {
font-size: 22rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #3E3E3E;
line-height: 26rpx;
margin-top: 24rpx;
margin-bottom: 20rpx;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.releaseDate {
font-size: 22rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #A3A3A3;
line-height: 26rpx;
display: flex;
align-items: center;
padding-bottom: 25rpx;
image {
margin-left: 0;
}
.release {
padding: 0 10rpx 0 5rpx;
}
}
}
}
}
</style> </style>

BIN
static/my/wo_icon_bd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/my/wo_icon_hyzx.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
static/my/wo_icon_lljl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/my/wo_icon_lxkf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/my/wo_icon_sc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

48
static/styles/news.scss Normal file
View File

@@ -0,0 +1,48 @@
.xw_content {
background: #FFFFFF;
border: 1rpx solid #EEEEEE;
display: flex;
padding: 29rpx 19rpx;
.xw_right {
padding-left: 19rpx;
display: flex;
flex-direction: column;
.xw_title {
font-size: 30rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #3E3E3E;
line-height: 42rpx;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.xw_time {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #969696;
line-height: 33rpx;
}
.xw_place {
padding-left: 20rpx;
}
.cj_tags {
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #969696;
line-height: 33rpx;
padding-right: 10rpx;
margin-top: 35rpx;
}
}
}

View File

@@ -0,0 +1,97 @@
.products_box {
padding: 10rpx;
.u-grid-item {
position: relative;
.bgContent {
position: absolute;
right: 0;
top: 0;
.u-image__image {
margin-left: 6px;
}
.img_tag {
position: absolute;
padding: 2rpx 8rpx;
right: 5px;
top: 30rpx;
border-radius: 54rpx 0px 0px 54rpx;
box-shadow: 0px 2rpx 4rpx 0px #078C42;
background: linear-gradient(135deg, #0DB658 0%, #16DD6D 100%);
font-size: 20rpx;
color: #FFFFFF;
line-height: 28rpx;
}
.title_box {
position: relative;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.title {
width: 186rpx;
font-size: 26rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #0EBB5B;
line-height: 37rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.u-tag {
height: 26rpx;
line-height: 26rpx;
background: linear-gradient(124deg, #FEAA19 0%, #FDCF3A 100%);
.u-tag__text {
font-size: 20rpx;
}
}
}
.product_desc {
font-size: 22rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #3E3E3E;
line-height: 26rpx;
margin-top: 24rpx;
margin-bottom: 20rpx;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.releaseDate {
font-size: 22rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #A3A3A3;
line-height: 26rpx;
display: flex;
align-items: center;
padding-bottom: 25rpx;
image {
margin-left: 0;
}
.release {
padding: 0 10rpx 0 5rpx;
}
}
}
}
}

View File

@@ -12,7 +12,8 @@
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/ */
@import 'uview-ui/theme.scss'; @import 'uview-ui/theme.scss';
@import 'static/styles/products.scss';
@import 'static/styles/news.scss';
/* 颜色变量 */ /* 颜色变量 */