Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
ai-card
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 69ee857f
authored
Sep 05, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'kuangyq_v2.10.0' of
http://192.168.3.233:8090/saas/mini-program/ai…
…-card into kuangyq_v2.10.0
2 parents
04ada9cd
16e47581
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
11 deletions
pages/tab/index/index.js
pages/tab/index/index.wxml
pages/tab/index/index.wxss
pages/tab/index/index.js
View file @
69ee857
...
@@ -15,19 +15,23 @@ Page({
...
@@ -15,19 +15,23 @@ Page({
tabList
:
[
tabList
:
[
{
{
name
:
'公司介绍'
,
name
:
'公司介绍'
,
icon
:
'icon-company'
icon
:
'icon-company'
,
icon1
:
'icon-company1'
},
},
{
{
name
:
'方案介绍'
,
name
:
'方案介绍'
,
icon
:
'icon-product'
icon
:
'icon-product'
,
icon1
:
'icon-product1'
},
},
{
{
name
:
'视频直播'
,
name
:
'视频直播'
,
icon
:
'icon-video'
icon
:
'icon-video'
,
icon1
:
'icon-video'
},
},
{
{
name
:
'合作申请'
,
name
:
'合作申请'
,
icon
:
'icon-cooperation'
icon
:
'icon-cooperation'
,
icon1
:
'icon-cooperation'
},
},
],
],
menuList
:
[
menuList
:
[
...
@@ -50,12 +54,16 @@ Page({
...
@@ -50,12 +54,16 @@ Page({
console
.
log
(
e
.
currentTarget
);
console
.
log
(
e
.
currentTarget
);
const
{
name
}
=
e
.
currentTarget
.
dataset
.
name
;
const
{
name
}
=
e
.
currentTarget
.
dataset
.
name
;
const
curTabIndex
=
e
.
currentTarget
.
dataset
.
index
;
const
curTabIndex
=
e
.
currentTarget
.
dataset
.
index
;
this
.
setData
({
// 视频直播和合作申请是跳转新页面,不需要设置激活样式
curTabIndex
:
curTabIndex
if
(
curTabIndex
!==
2
&&
curTabIndex
!==
3
)
{
})
this
.
setData
({
curTabIndex
:
curTabIndex
})
}
console
.
log
(
this
.
data
.
curTabIndex
);
switch
(
name
)
{
switch
(
name
)
{
case
"合作申请"
:
case
"合作申请"
:
wx
.
$router
.
go
(
"applicationPartener"
);
//
wx.$router.go("applicationPartener");
break
;
break
;
case
"视频直播"
:
case
"视频直播"
:
console
.
log
(
'跳转直播'
)
console
.
log
(
'跳转直播'
)
...
...
pages/tab/index/index.wxml
View file @
69ee857
<!-- pages/tab/index/index.wxml -->
<!-- pages/tab/index/index.wxml -->
<user-info></user-info>
<user-info></user-info>
<!-- 面向渠道 -->
<import src="../../template/channel/channel.wxml" />
<import src="../../template/channel/channel.wxml" />
<template is="channel"></template>
<template is="channel"></template>
<!-- tab介绍 -->
<view class="tab-list">
<view class="tab-list">
<block wx:for="{{tabList}}">
<block wx:for="{{tabList}}">
<view class="tab-item {{curTabIndex === index ? 'tab-item-active' : '' }}" data-name="{{item}}" data-index="{{index}}" bindtap="introduce">
<view class="tab-item {{curTabIndex === index ? 'tab-item-active' : '' }} {{index === 3 ? 'tab-apply' : ''}}" data-name="{{item}}" data-index="{{index}}"bindtap="introduce">
<image class="tab-img" mode="widthFix" webp src="{{IMGURL}}/home/{{item.icon}}.png"></image>
<image wx:if="{{curTabIndex !== index}}" class="tab-img" mode="widthFix" webp src="{{IMGURL}}/home/{{item.icon1}}.png"></image>
<image wx:else class="tab-img" mode="widthFix" webp src="{{IMGURL}}/home/{{item.icon}}.png"></image>
<view>{{item.name}}</view>
<view>{{item.name}}</view>
<!-- 合作申请hot -->
<image wx:if="{{index === 3}}" class="icon-hot" webp src="{{IMGURL}}/home/icon-hot.png"></image>
</view>
</view>
</block>
</block>
</view>
</view>
...
...
pages/tab/index/index.wxss
View file @
69ee857
...
@@ -20,12 +20,27 @@ page {
...
@@ -20,12 +20,27 @@ page {
color: #6E6D8F;
color: #6E6D8F;
text-align: center;
text-align: center;
margin-top: 24rpx;
margin-top: 24rpx;
position: relative;
}
}
.tab-item-active {
.tab-item-active {
color: #FFFFFF;
color: #FFFFFF;
background-image: url("https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/icon-bg.png");
background-image: url("https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/icon-bg.png");
background-size: 160rpx 144rpx;
background-size: 100% 100%;
}
.tab-apply {
background: #F0F0FF;
font-weight: 600;
color: #5850FF;
}
.icon-hot {
width: 56rpx;
height: 24rpx;
position: absolute;
top: 0;
right: 0;
}
}
.tab-img {
.tab-img {
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment