123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- <template name="navbars">
- <view>
- <view class="navbars-content clearfix">
- <view class="nav-item" v-for="(item,index) in navList" :key="index" @click="NavToDetailPage(item,index)">
- <view class="icon">
- <image class="icon-image" :src="item.icon" mode="widthFix"></image>
- </view>
- <view class="name">{{ item.name }}</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default{
- name:'navbars',
- props:{
- list:{
- type:Array
- }
- },
- data() {
- return{
- current:100,
- navList:[
- {
- icon:'https://img-b.caimei365.com/group1/M00/04/30/rB-lHGRWI1iABlx4AAAY99ppI8M213.png',
- name:'国产'
- },
- {
- icon:'https://img-b.caimei365.com/group1/M00/04/30/rB-lHGRWI1iAT3-xAAAWkMn2pTE248.png',
- name:'进口'
- },
- {
- icon:'https://img-b.caimei365.com/group1/M00/04/30/rB-lHGRWI1iAZqveAAAZP05rdM4857.png',
- name:'皮肤管理'
- },
- {
- icon:'https://img-b.caimei365.com/group1/M00/04/30/rB-lHGRWI1iAXGqgAAAXb1UNnBQ046.png',
- name:'抗衰'
- },
- {
- icon:'https://img-b.caimei365.com/group1/M00/04/30/rB-lHGRWI1iAZVX0AAAW2oMOngI226.png',
- name:'私密'
- },
- {
- icon:'https://img-b.caimei365.com/group1/M00/04/30/rB-lHGRWI1iAbpnIAAAWmTGXZe4226.png',
- name:'水光针'
- },
- {
- icon:'https://img-b.caimei365.com/group1/M00/04/30/rB-lHGRWI1iART5pAAAWbNXCp6A170.png',
- name:'易耗品'
- },
- {
- icon:'https://img-b.caimei365.com/group1/M00/04/30/rB-lHGRWI1iAQ1UxAAAYn0g_csA191.png',
- name:'除皱'
- },
- ]
- }
- },
- created(){
- // this.initData(this.list)
- },
- computed: {
-
- },
- methods:{
- initData(list){
- this.navList = list
- },
- NavToDetailPage(pros,index) {//跳转
- if(index === 3){
- let linkPath = 'https://static.caimei365.com/app/caimei-activity-h5/html/2023/activity_02.html'
- this.$api.navigateTo(`/pages/h5/activity/activity?link=${linkPath}&linkId=382`)
- }else{
- /**
- * 页面跳转类型
- * 1、二级页面,2、搜索项目仪器,3、直播页面,4、自由页面,5、商品详情,6、仪器项目详情,7、供应商主页
- * 8、专题活动页,9、二手市场介绍,10、二手商品列表,11、二手商品发布,12、商品搜索,13、信息详情
- * 14、品牌招商介绍页,15、维修保养介绍页,16、首页,17、注册页,18、信息中心,19、供应商列表
- * 23、新活动专题页面
- **/
- if(pros.linkType){
- const typeMap = {
- 1:`/pages/goods/goods-instrument?linkId=${pros.linkParam.id}&title=${pros.name}`,
- 3:'/pages/h5/article/path-live',
- 4:'/pages/h5/other/brands',
- 10:'/pages/second/product/product-list',
- 14:'/pages/h5/other/brand',
- 15:'/pages/h5/other/repair',
- 18:`/pages/h5/article/path?link=${pros.link}`,
- 20:`/pages/goods/good-floor?linkId=${pros.linkParam.id}&title=${pros.name}`,
- 21:'/pages/h5/activity/meobohui',
- 22:`/pages/goods/good-floor-temp?linkId=${pros.linkParam.id}&title=${pros.name}`,
- 23:`/pages/h5/activity/activity-topic?linkId=${pros.linkParam.id}`, //活动专题页面
- 25:'/pages/goods/goods-doc-list' ,//美业资料
- 28:`/pages/h5/article/path?link=${pros.link}`, // 采美认证通
- 29:'/pages/user/coupon/coupon-collection',//领券中心
-
- }
- const url = typeMap[pros.linkType]
- this.$api.navigateTo(url)
- }
- }
- }
- }
- }
- </script>
- <style lang="scss">
- .navbars-content{
- width: 100%;
- height: auto;
- box-sizing: border-box;
- padding: 0 24rpx;
- margin-top: 48rpx;
- .nav-item{
- width: 164rpx;
- height: auto;
- float: left;
- margin-bottom: 30rpx;
- margin-right: 15.3rpx;
- &:nth-child(4){
- margin-right: 0;
- }
- &:nth-child(8){
- margin-right: 0;
- }
- .icon{
- width: 110rpx;
- height: 110rpx;
- margin: 0 auto;
- position: relative;
- .icon-image{
- width: 110rpx;
- height: 110rpx;
- display: block;
- }
- .icon-new{
- width: 44rpx;
- height: 22rpx;
- display: block;
- position: absolute;
- right: 0;
- top: 20rpx;
- }
- }
- .name{
- width: 100%;
- height: 40rpx;
- line-height: 40rpx;
- text-align: center;
- font-size: $font-size-26;
- color: #666666;
- }
- .nav-cell-main{
- width: 100%;
- height: auto;
- position: absolute;
- right: 0;
- .nav-cell{
- width: 164rpx;
- height: auto;
- float: left;
- margin-bottom: 30rpx;
- margin-right: 15.3rpx;
- &:nth-child(4){
- margin-right: 0;
- }
- &:nth-child(8){
- margin-right: 0;
- }
- .icon{
- width: 130rpx;
- height: 130rpx;
- margin: 0 auto;
- position: relative;
- .icon-image{
- width: 130rpx;
- height: 130rpx;
- display: block;
- }
- .icon-new{
- width: 44rpx;
- height: 22rpx;
- display: block;
- position: absolute;
- right: 0;
- top: 20rpx;
- }
- }
- .name{
- width: 100%;
- height: 40rpx;
- line-height: 40rpx;
- text-align: center;
- font-size: $font-size-28;
- color: #666666;
- }
- }
- }
- }
- }
- </style>
|