-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
642 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
yun-music/miniprogram/components/bottom-modal/bottom-modal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// components/bottom-modal/bottom-modal.js | ||
/* | ||
author:付金伟 | ||
time:2020.2.15 | ||
function:底部弹出层组件 | ||
*/ | ||
Component({ | ||
/** | ||
* 组件的属性列表 | ||
*/ | ||
properties: { | ||
//控制弹出层是否显示 | ||
modalShow:Boolean, | ||
}, | ||
|
||
options:{ | ||
styleIsolation:'apply-shared', | ||
multipleSlots:true //启用多个插槽 | ||
}, | ||
/** | ||
* 组件的初始数据 | ||
*/ | ||
data: { | ||
|
||
}, | ||
|
||
/** | ||
* 组件的方法列表 | ||
*/ | ||
methods: { | ||
//弹出窗关闭事件 | ||
onClose(){ | ||
this.setData({ | ||
modalShow:false | ||
}) | ||
}, | ||
} | ||
}) |
4 changes: 4 additions & 0 deletions
4
yun-music/miniprogram/components/bottom-modal/bottom-modal.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"component": true, | ||
"usingComponents": {} | ||
} |
9 changes: 9 additions & 0 deletions
9
yun-music/miniprogram/components/bottom-modal/bottom-modal.wxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!--components/bottom-modal/bottom-modal.wxml--> | ||
<!--遮罩层,遮盖底部--> | ||
<view class="model" hidden="{{!modalShow}}"> | ||
<view class="panel"> | ||
<i class="iconfont icon-shanchuyitiao" bindtap="onClose"></i> | ||
<!--slot插槽 用于承载用户的WSML的一些事件功能--> | ||
<slot name="modal-content"></slot> | ||
</view> | ||
</view> |
26 changes: 26 additions & 0 deletions
26
yun-music/miniprogram/components/bottom-modal/bottom-modal.wxss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* components/bottom-modal/bottom-modal.wxss */ | ||
.model{ | ||
position: fixed; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
z-index: 99;/*层数*/ | ||
text-align: center; | ||
background: rgba(0, 0, 0, 0.6); | ||
} | ||
.panel{ | ||
position: absolute; | ||
bottom: 0rpx; | ||
left: 0; | ||
width: 100%; | ||
height: 300rpx; | ||
background-color: #f8f8f8; | ||
} | ||
/*直接修改外部样式*/ | ||
.model .icon-shanchuyitiao{ | ||
position: absolute; | ||
right: 10rpx; | ||
top: 10rpx; | ||
padding:20rpx;/*增加点击区域大小*/ | ||
} |
35 changes: 35 additions & 0 deletions
35
yun-music/miniprogram/components/login-souquan/login-souquan.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// components/login-souquan/login-souquan.js | ||
Component({ | ||
/** | ||
* 组件的属性列表 | ||
*/ | ||
properties: { | ||
modalShow:Boolean | ||
}, | ||
|
||
/** | ||
* 组件的初始数据 | ||
*/ | ||
data: { | ||
|
||
}, | ||
|
||
/** | ||
* 组件的方法列表 | ||
*/ | ||
methods: { | ||
onGetUserInfo(event){ | ||
console.log(event) | ||
const userInfo=event.detail.userInfo | ||
//如果detail.userInfo存在,那么就是授权成功的,否则是授权失败,即被拒绝 | ||
if (userInfo) { | ||
this.setData({ | ||
modalShow:false | ||
}) | ||
this.triggerEvent('loginsuccess',userInfo) | ||
}else{ | ||
this.triggerEvent('loginfail',) | ||
} | ||
} | ||
} | ||
}) |
6 changes: 6 additions & 0 deletions
6
yun-music/miniprogram/components/login-souquan/login-souquan.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"component": true, | ||
"usingComponents": { | ||
"bs-bottom-modal":"/components/bottom-modal/bottom-modal" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
yun-music/miniprogram/components/login-souquan/login-souquan.wxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<bs-bottom-modal modalShow="{{modalShow}}"> | ||
<view slot="modal-content"> | ||
<button class="login" open-type="getUserInfo" bindgetuserinfo="onGetUserInfo">获取授权信息</button> | ||
</view> | ||
</bs-bottom-modal> |
8 changes: 8 additions & 0 deletions
8
yun-music/miniprogram/components/login-souquan/login-souquan.wxss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* components/login-souquan/login-souquan.wxss */ | ||
.login{ | ||
font-size: 32rpx; | ||
height: 80rpx; | ||
background-color: #d43c33; | ||
color: #fff; | ||
margin: 110rpx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// components/search/search.js | ||
/* | ||
author:付金伟 | ||
time:2020.2.15 | ||
function:部落搜索组件 | ||
*/ | ||
Component({ | ||
/** | ||
* 组件的属性列表 | ||
*/ | ||
properties: { | ||
placeholder:{ | ||
type:String, | ||
value:'请输入' | ||
} | ||
}, | ||
//接受外部CSS样式 | ||
externalClasses:[ | ||
"iconfont", | ||
"icon-sousuo", | ||
], | ||
|
||
/** | ||
* 组件的初始数据 | ||
*/ | ||
data: { | ||
|
||
}, | ||
|
||
/** | ||
* 组件的方法列表 | ||
*/ | ||
methods: { | ||
|
||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"component": true, | ||
"usingComponents": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!--components/search/search.wxml--> | ||
<view class="container"> | ||
<i class="iconfont icon-sousuo find" ></i> | ||
<input class="bar" placeholder="{{placeholder}}" placeholder-class="in-bar"></input> | ||
<button class="search">搜索</button> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* components/search/search.wxss */ | ||
.container{ | ||
display: flex; | ||
align-items: center; | ||
margin-left: 20rpx; | ||
position: relative; | ||
} | ||
.bar{ | ||
flex: 8; | ||
height: 68rpx; | ||
font-size: 28rpx; | ||
border-radius: 50rpx; | ||
background-color: #f5f5f5; | ||
padding-left: 60rpx; | ||
} | ||
.search{ | ||
flex: 1; | ||
background: #d43c33; | ||
color: #fff; | ||
margin-left: 20rpx; | ||
font-size: 24rpx; | ||
} | ||
.in-bar{ | ||
color: #999; | ||
} | ||
.find{ | ||
position: absolute; | ||
top: 50%; | ||
transform: translate(16rpx,-50%); | ||
color: #9f9f9f; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.