|
|
@ -1,9 +1,11 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<view :class="['page', {oh: !per}]"> |
|
|
|
<view :class="[{oh: !per}]"> |
|
|
|
<uni-search-bar class="search" radius="30" placeholder="请输入" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="searchConfirm" /> |
|
|
|
<image class="banner" src="@/static/image/index/banner.png" mode="widthFix"></image> |
|
|
|
|
|
|
|
|
|
|
|
<view class="banner"> |
|
|
|
<view class="page"> |
|
|
|
<image class="img" src="@/static/image/index/banner.png" mode="widthFix"></image> |
|
|
|
<view class="search-wrap"> |
|
|
|
|
|
|
|
<uni-search-bar class="search" radius="30" placeholder="请输入" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="searchConfirm" /> |
|
|
|
|
|
|
|
<view class="all" @click="toProduct">全部产品</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="block" style="margin-top: 0"> |
|
|
|
<view class="block" style="margin-top: 0"> |
|
|
@ -30,12 +32,8 @@ |
|
|
|
<image class="pic" :src="$util.getIcon(item)"></image> |
|
|
|
<image class="pic" :src="$util.getIcon(item)"></image> |
|
|
|
<view class="texts"> |
|
|
|
<view class="texts"> |
|
|
|
<view class="name ell">{{ item.productName }}</view> |
|
|
|
<view class="name ell">{{ item.productName }}</view> |
|
|
|
<view class="des ell">{{ item.productIntroduction }}</view> |
|
|
|
<view class="des ell">{{ item.typeName }}</view> |
|
|
|
<view class="meta"> |
|
|
|
<view class="meta">{{ item.marketUnitPrice }}元/年</view> |
|
|
|
<image class="icon" src="@/static/image/index/9.png"></image> |
|
|
|
|
|
|
|
适用专业: |
|
|
|
|
|
|
|
<text class="ell">{{ item.professionalName }}</text> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -52,24 +50,27 @@ |
|
|
|
<image class="pic" :src="$util.getIcon(item)"></image> |
|
|
|
<image class="pic" :src="$util.getIcon(item)"></image> |
|
|
|
<view class="texts"> |
|
|
|
<view class="texts"> |
|
|
|
<view class="name ell">{{ item.productName }}</view> |
|
|
|
<view class="name ell">{{ item.productName }}</view> |
|
|
|
<view class="des ell">{{ item.productIntroduction }}</view> |
|
|
|
<view class="des ell">{{ item.typeName }}</view> |
|
|
|
<view class="meta"> |
|
|
|
<view class="meta">{{ item.marketUnitPrice }}元/年</view> |
|
|
|
<image class="icon" src="@/static/image/index/9.png"></image> |
|
|
|
|
|
|
|
适用专业: |
|
|
|
|
|
|
|
<text class="ell">{{ item.professionalName }}</text> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view v-if="auth('产品:购物车')" class="plus"> |
|
|
|
|
|
|
|
<uni-badge size="small" :text="total" absolute="topRight" type="error"> |
|
|
|
|
|
|
|
<image class="icon" src="@/static/image/product/shop-blue.png" mode="widthFix" @click="$util.to('../shopCart/shopCart')"></image> |
|
|
|
|
|
|
|
</uni-badge> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view v-if="!per" class="per-mask">功能升级中,敬请期待...</view> |
|
|
|
<view v-if="!per" class="per-mask">功能升级中,敬请期待...</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { getUserRolesPermissionMenu } from '@/apis/modules/user.js' |
|
|
|
import { getUserRolesPermissionMenu } from '@/apis/modules/user.js' |
|
|
|
import { tagsList, listOfGoods } from '@/apis/modules/product.js' |
|
|
|
import { tagsList, listOfGoods, shoppingCartList } from '@/apis/modules/product.js' |
|
|
|
import { getTeamsByAccountId } from '@/apis/modules/client.js' |
|
|
|
import { getTeamsByAccountId } from '@/apis/modules/client.js' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
@ -81,12 +82,14 @@ |
|
|
|
tags: [], |
|
|
|
tags: [], |
|
|
|
hotProducts: [], |
|
|
|
hotProducts: [], |
|
|
|
offcialProducts: [], |
|
|
|
offcialProducts: [], |
|
|
|
|
|
|
|
total: 0, |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
onShow() { |
|
|
|
this.keyword = '' |
|
|
|
this.keyword = '' |
|
|
|
this.per = true |
|
|
|
this.per = true |
|
|
|
this.getInfo() |
|
|
|
this.getInfo() |
|
|
|
|
|
|
|
this.getShopCart() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 初始化权限 |
|
|
|
// 初始化权限 |
|
|
@ -167,6 +170,15 @@ |
|
|
|
this.tags = res.tagsList.slice(0, 8) |
|
|
|
this.tags = res.tagsList.slice(0, 8) |
|
|
|
}).catch(e => {}) |
|
|
|
}).catch(e => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取购物车数量 |
|
|
|
|
|
|
|
getShopCart() { |
|
|
|
|
|
|
|
shoppingCartList({ |
|
|
|
|
|
|
|
pageNum: 1, |
|
|
|
|
|
|
|
pageSize: 1000, |
|
|
|
|
|
|
|
}).then(({ data }) => { |
|
|
|
|
|
|
|
this.total = data.total |
|
|
|
|
|
|
|
}).catch(e => {}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 产品 |
|
|
|
// 产品 |
|
|
|
getProducts() { |
|
|
|
getProducts() { |
|
|
|
// 热销产品 |
|
|
|
// 热销产品 |
|
|
@ -221,32 +233,24 @@ |
|
|
|
<style scoped lang="scss"> |
|
|
|
<style scoped lang="scss"> |
|
|
|
.page { |
|
|
|
.page { |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
min-height: 100%; |
|
|
|
|
|
|
|
padding: 10rpx 22rpx; |
|
|
|
padding: 10rpx 22rpx; |
|
|
|
box-sizing: border-box; |
|
|
|
box-sizing: border-box; |
|
|
|
background-color: #fff; |
|
|
|
background-color: #fff; |
|
|
|
} |
|
|
|
} |
|
|
|
.banner { |
|
|
|
.banner { |
|
|
|
position: relative; |
|
|
|
|
|
|
|
.img { |
|
|
|
|
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.search-wrap { |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
.search { |
|
|
|
|
|
|
|
flex: 1; |
|
|
|
} |
|
|
|
} |
|
|
|
.info { |
|
|
|
} |
|
|
|
position: absolute; |
|
|
|
.all { |
|
|
|
top: 80rpx; |
|
|
|
font-size: 24rpx; |
|
|
|
left: 46rpx; |
|
|
|
color: #666; |
|
|
|
} |
|
|
|
|
|
|
|
.title { |
|
|
|
|
|
|
|
margin-bottom: 15rpx; |
|
|
|
|
|
|
|
font-size: 36rpx; |
|
|
|
|
|
|
|
font-weight: 600; |
|
|
|
|
|
|
|
color: #001D67; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.text { |
|
|
|
|
|
|
|
font-size: 20rpx; |
|
|
|
|
|
|
|
font-family: PingFangSC-Regular, PingFang SC; |
|
|
|
|
|
|
|
color: #001D67; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
.block { |
|
|
|
.block { |
|
|
|
margin: 20rpx 0; |
|
|
|
margin: 20rpx 0; |
|
|
@ -254,10 +258,6 @@ |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
justify-content: space-between; |
|
|
|
margin-bottom: 34rpx; |
|
|
|
margin-bottom: 34rpx; |
|
|
|
.all { |
|
|
|
|
|
|
|
font-size: 24rpx; |
|
|
|
|
|
|
|
color: #666; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
.title { |
|
|
|
.title { |
|
|
|
display: inline-flex; |
|
|
|
display: inline-flex; |
|
|
@ -289,7 +289,7 @@ |
|
|
|
margin-bottom: 18rpx; |
|
|
|
margin-bottom: 18rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.text { |
|
|
|
.text { |
|
|
|
width: 110rpx; |
|
|
|
width: 165rpx; |
|
|
|
margin: 0 auto; |
|
|
|
margin: 0 auto; |
|
|
|
font-size: 24rpx; |
|
|
|
font-size: 24rpx; |
|
|
|
color: #333; |
|
|
|
color: #333; |
|
|
@ -298,12 +298,14 @@ |
|
|
|
.list { |
|
|
|
.list { |
|
|
|
.item { |
|
|
|
.item { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
|
|
|
|
align-items: center; |
|
|
|
margin-bottom: 28rpx; |
|
|
|
margin-bottom: 28rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.pic { |
|
|
|
.pic { |
|
|
|
width: 136rpx; |
|
|
|
width: 120rpx; |
|
|
|
height: 136rpx; |
|
|
|
height: 120rpx; |
|
|
|
margin-right: 20rpx; |
|
|
|
margin-right: 20rpx; |
|
|
|
|
|
|
|
border-radius: 8px; |
|
|
|
} |
|
|
|
} |
|
|
|
.texts { |
|
|
|
.texts { |
|
|
|
width: calc(100% - 156rpx); |
|
|
|
width: calc(100% - 156rpx); |
|
|
@ -314,7 +316,7 @@ |
|
|
|
color: #333; |
|
|
|
color: #333; |
|
|
|
} |
|
|
|
} |
|
|
|
.des { |
|
|
|
.des { |
|
|
|
margin: 17rpx 0; |
|
|
|
margin: 10rpx 0; |
|
|
|
font-size: 24rpx; |
|
|
|
font-size: 24rpx; |
|
|
|
color: #666; |
|
|
|
color: #666; |
|
|
|
} |
|
|
|
} |
|
|
@ -333,4 +335,11 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.plus { |
|
|
|
|
|
|
|
bottom: 140rpx; |
|
|
|
|
|
|
|
right: 60rpx; |
|
|
|
|
|
|
|
.icon { |
|
|
|
|
|
|
|
width: 80rpx; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|