Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yma16
yma16_miniprogram
提交
cdd17045
Y
yma16_miniprogram
项目概览
yma16
/
yma16_miniprogram
通知
11
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yma16_miniprogram
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
cdd17045
编写于
10月 17, 2022
作者:
yma16
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update loading use
上级
004f4f60
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
36 addition
and
11 deletion
+36
-11
miniprogram/pages/home/home.js
miniprogram/pages/home/home.js
+20
-6
miniprogram/pages/home/home.wxml
miniprogram/pages/home/home.wxml
+3
-1
miniprogram/pages/home/home.wxss
miniprogram/pages/home/home.wxss
+13
-4
未找到文件。
miniprogram/pages/home/home.js
浏览文件 @
cdd17045
...
...
@@ -12,9 +12,9 @@ Page({
content
:
'
我是父组件的content
'
,
footContent
:
"
bottomContent
"
,
headBackground
:
[
{
class
:
'
header-swiper-one
'
,
content
:
'
数据分析
'
,
articleId
:
32
},
{
class
:
'
header-swiper-two
'
,
content
:
'
前端开发
'
,
articleId
:
33
},
{
class
:
'
header-swiper-three
'
,
content
:
'
全栈开发
'
,
articleId
:
34
}
{
class
:
'
header-swiper-one
'
,
content
:
'
数据分析
'
,
articleId
:
32
,
img
:
'
https://yongma16.xyz/staticFile/common/img/data.png
'
},
{
class
:
'
header-swiper-two
'
,
content
:
'
前端开发
'
,
articleId
:
33
,
img
:
'
https://yongma16.xyz/staticFile/common/img/front.png
'
},
{
class
:
'
header-swiper-three
'
,
content
:
'
全栈开发
'
,
articleId
:
34
,
img
:
'
https://yongma16.xyz/staticFile/common/img/back.png
'
}
],
swiperConfig
:
{
indicatorDots
:
true
,
...
...
@@ -23,7 +23,7 @@ Page({
autoplay
:
false
,
interval
:
5000
,
duration
:
1000
,
indicatorColor
:
"
#2e86de
"
,
indicatorColor
:
"
rgba(255,255,255,.2)
"
,
indicatorActiveColor
:
"
#dff9fb
"
,
},
menuIsShow
:
false
,
...
...
@@ -55,8 +55,13 @@ Page({
const
articleObjId
=
this
.
data
.
headBackground
[
0
].
articleId
this
.
updateHomeContent
(
articleObjId
)
},
/**
* 更新
* @param {*} articleObjId
*/
updateHomeContent
(
articleObjId
){
this
.
triggerHomeContent
(
articleObjId
)
this
.
triggerClearHomeContent
()
this
.
triggerGetHomeContent
(
articleObjId
)
},
/**
* 卡片变动修改内容
...
...
@@ -70,11 +75,19 @@ Page({
/**
* 触发子组件跟新id
*/
triggerHomeContent
(
id
){
trigger
Get
HomeContent
(
id
){
const
homeComponent
=
this
.
selectComponent
(
'
#home-content-id
'
)
homeComponent
.
getRemoteArticle
(
id
)
},
/**
* 触发子组件删除article
*/
triggerClearHomeContent
(){
const
homeComponent
=
this
.
selectComponent
(
'
#home-content-id
'
)
homeComponent
.
clearArticle
()
},
/**
* 获取文章
* @param {*} id
...
...
@@ -83,6 +96,7 @@ Page({
const
paramId
=
this
.
data
.
currentArticleId
;
const
blogComponent
=
this
.
selectComponent
(
'
#blog-id
'
)
blogComponent
.
setLoading
(
true
)
blogComponent
.
clearArticleNode
()
const
baseUrl
=
this
.
data
.
baseUrl
const
path
=
this
.
data
.
path
const
that
=
this
...
...
miniprogram/pages/home/home.wxml
浏览文件 @
cdd17045
...
...
@@ -19,7 +19,9 @@
<swiper indicator-dots="{{swiperConfig.indicatorDots}}" indicator-color="{{ swiperConfig.indicatorColor}}" indicator-active-color="{{swiperConfig.indicatorActiveColor}}" autoplay="{{ swiperConfig.autoplay }}" interval="{{swiperConfig.interval}}" duration="{{swiperConfig.duration}}" class="swiper-design" bindchange="swiperChange">
<block wx:for="{{headBackground}}" wx:key="*this">
<swiper-item>
<view class="swiper-item {{item.class}}">
<view class="swiper-item {{item.class}}"
style="background: url({{item.img}});"
>
{{item.content}}
</view>
</swiper-item>
...
...
miniprogram/pages/home/home.wxss
浏览文件 @
cdd17045
...
...
@@ -10,7 +10,7 @@ page {
position: relative;
width: 100vw;
height:100vh;
background:
rgba(4, 173, 240, 0.6)
;
background:
transparent
;
}
/* 箭头 //上右边下左 */
...
...
@@ -120,16 +120,24 @@ page {
width: 100%;
text-align: center;
line-height: 150px;
font-weight: bold;
height: 100%;
background-color: rgba(0, 183, 255,.9)
}
.header-swiper-one{
background-color: rgba(0, 183, 255,.8);
background-repeat: no-repeat;
background-size: cover;
/* background-color: rgba(0, 183, 255,.9); */
}
.header-swiper-two{
background-color: rgba(0, 183, 255,.9);
background-repeat: no-repeat;
background-size: cover;
/* background-color: rgba(0, 183, 255,.9); */
}
.header-swiper-three{
background-color:rgba(0, 183, 255,1);
background-repeat: no-repeat;
background-size: cover;
/* background-color:rgba(0, 183, 255,.9); */
}
.caontainer-header content-title{
...
...
@@ -179,6 +187,7 @@ page {
}
.btn-actived{
color:#ffffff;
font-weight: bold;
background-color: rgb(8, 183, 252);
border:1px solid rgb(8, 183, 252);
box-shadow: 0 5px 5px 5px rgba(8, 183, 252,.5);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录