-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #718 from KuhnHuge/master
- Loading branch information
Showing
36 changed files
with
477 additions
and
263 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 实验分组 | ||
|
||
## 二维码: | ||
![image](https://github.com/KuhnHuge/web-wechat-2017/blob/master/1514080901236/%E6%8D%95%E8%8E%B76.PNG) | ||
|
||
## 说明: | ||
在现有分组中加入分组事件,然后加入其中的分组就可以实现分组。 | ||
|
||
## 页面设计: | ||
首页是已加入的分组。 | ||
|
||
第二页是已有的分组。 | ||
|
||
第三页是反馈。 | ||
|
||
|
||
## 主要截图 | ||
### 首页 | ||
![image](https://github.com/KuhnHuge/web-wechat-2017/blob/master/1514080901236/%E6%8D%95%E8%8E%B7.PNG) | ||
|
||
### 第二页 | ||
![image](https://github.com/KuhnHuge/web-wechat-2017/blob/master/1514080901236/%E6%8D%95%E8%8E%B72.PNG) | ||
![image](https://github.com/KuhnHuge/web-wechat-2017/blob/master/1514080901236/%E6%8D%95%E8%8E%B75.PNG) | ||
|
||
### 反馈界面 | ||
![image](https://github.com/KuhnHuge/web-wechat-2017/blob/master/1514080901236/%E6%8D%95%E8%8E%B73.PNG) |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,93 @@ | ||
const app = getApp() | ||
Page({ | ||
onLoad: function (options) { | ||
var GroupKey = options.GroupKey | ||
console.log(GroupKey) | ||
if(GroupKey=="2"||GroupKey=="4") | ||
{ | ||
this.setData({ | ||
button_status: !this.data.primary, | ||
text: "已加入", | ||
num: "21", | ||
}) | ||
} | ||
wx.showModal({ | ||
title: '提示', | ||
content: '这是一个模态弹窗,Key=' + GroupKey, | ||
success: function (res) { | ||
if (res.confirm) { | ||
console.log('用户点击确定') | ||
} | ||
} | ||
}) | ||
if (app.globalData.userInfo) { | ||
this.setData({ | ||
userInfo: app.globalData.userInfo, | ||
hasUserInfo: true | ||
}) | ||
} else if (this.data.canIUse) { | ||
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 | ||
// 所以此处加入 callback 以防止这种情况 | ||
app.userInfoReadyCallback = res => { | ||
this.setData({ | ||
userInfo: res.userInfo, | ||
hasUserInfo: true | ||
}) | ||
} | ||
} else { | ||
// 在没有 open-type=getUserInfo 版本的兼容处理 | ||
wx.getUserInfo({ | ||
success: res => { | ||
app.globalData.userInfo = res.userInfo | ||
this.setData({ | ||
userInfo: res.userInfo, | ||
hasUserInfo: true | ||
}) | ||
} | ||
}) | ||
} | ||
} | ||
, | ||
data:{ | ||
button_status:"primary", | ||
text:"加入", | ||
detail: "4人一组", | ||
num:"20", | ||
group_1:[ | ||
{ name: "小明", key: "1" }, { name: "王强", key: "2" }, { name: "小可", key: "3"} | ||
] | ||
} | ||
|
||
, | ||
join:function(e){ | ||
var ddd; | ||
this.setData({ | ||
button_status: !this.data.primary, | ||
text:"已加入" , | ||
num:"21", | ||
}) | ||
wx.showModal({ | ||
title: '提示', | ||
content: '这是一个假的已加入', | ||
success: function (res) { | ||
if (res.confirm) { | ||
console.log('用户点击确定') | ||
} | ||
} | ||
}) | ||
try { | ||
wx.setStorageSync('userin', 'userin') | ||
} catch (e) { | ||
} | ||
} | ||
, | ||
getUserInfo: function (e) { | ||
console.log(e) | ||
app.globalData.userInfo = e.detail.userInfo | ||
this.setData({ | ||
userInfo: e.detail.userInfo, | ||
hasUserInfo: true | ||
}) | ||
} | ||
|
||
}); |
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 @@ | ||
{} |
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,24 @@ | ||
<view class="page"> | ||
<view class="page__bd page__bd_spacing"> | ||
<view class="button-sp-area"> | ||
<button class="weui-btn" type="{{button_status}}" plain="true" bindtap='join'>{{text}}</button> | ||
<view class='num'>当前人数:{{num}} | ||
</view> | ||
</view> | ||
<view class="details"> | ||
{{detail}} | ||
</view> | ||
<view class='group'> | ||
<block wx:for="{{group_1}}" wx:key="*this"> | ||
<view class='pepole_list'> | ||
<image class='id_image' src='../../images/头像{{item.key}}.jpg'></image> | ||
<view class='namelist'>{{item.name}}</view> | ||
</view> | ||
</block> | ||
<view class='pepole_list'> | ||
<image class='id_image' src='../../images/加.png'></image> | ||
<view class='namelist'>{{onname}}</view> | ||
</view> | ||
</view> | ||
</view> | ||
</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,47 @@ | ||
.button-sp-area{ | ||
margin: 0 auto; | ||
padding-top: 15px; | ||
width: 90%; | ||
} | ||
.mini-btn{ | ||
margin-right: 5px; | ||
} | ||
.num{ | ||
font-size: 15px; | ||
float: right; | ||
} | ||
.details{ | ||
clear: both; | ||
width: 90%; | ||
margin: 0 auto; | ||
padding-bottom: 5px; | ||
border-bottom:solid 1px #777 ; | ||
} | ||
.id_image{ | ||
width: 40px; | ||
height: 40px; | ||
float: left; | ||
margin-right: 8px; | ||
border-radius: 50%; | ||
} | ||
.namelist{ | ||
float: left; | ||
} | ||
.group{ | ||
width: 90%; | ||
margin: 20px 0 0 5%; | ||
border: solid 1px #777; | ||
float: left; | ||
border-radius: 2px; | ||
} | ||
.pepole_list{ | ||
float: left; | ||
width: 90%; | ||
margin: 7px 5% 7px 5%; | ||
padding: 2px 0 2px 0; | ||
border-bottom: solid 1px #777; | ||
} | ||
block{ | ||
width: 100%; | ||
float: left; | ||
} |
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,62 @@ | ||
//index.js | ||
//获取应用实例 | ||
const app = getApp() | ||
|
||
Page({ | ||
data: { | ||
motto: 'Hello World', | ||
userInfo: {}, | ||
hasUserInfo: false, | ||
canIUse: wx.canIUse('button.open-type.getUserInfo'), | ||
|
||
}, | ||
//事件处理函数 | ||
bindViewTap: function () { | ||
wx.navigateTo({ | ||
url: '../logs/logs' | ||
}) | ||
}, | ||
submit_1: function (e) { | ||
wx.showToast({ | ||
title: "提交成功" | ||
}); | ||
}, | ||
onLoad: function () { | ||
if (app.globalData.userInfo) { | ||
this.setData({ | ||
userInfo: app.globalData.userInfo, | ||
hasUserInfo: true | ||
}) | ||
} else if (this.data.canIUse) { | ||
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 | ||
// 所以此处加入 callback 以防止这种情况 | ||
app.userInfoReadyCallback = res => { | ||
this.setData({ | ||
userInfo: res.userInfo, | ||
hasUserInfo: true | ||
}) | ||
} | ||
} else { | ||
// 在没有 open-type=getUserInfo 版本的兼容处理 | ||
wx.getUserInfo({ | ||
success: res => { | ||
app.globalData.userInfo = res.userInfo | ||
this.setData({ | ||
userInfo: res.userInfo, | ||
hasUserInfo: true | ||
}) | ||
} | ||
}) | ||
} | ||
}, | ||
getUserInfo: function (e) { | ||
console.log(e) | ||
app.globalData.userInfo = e.detail.userInfo | ||
this.setData({ | ||
userInfo: e.detail.userInfo, | ||
hasUserInfo: true | ||
}) | ||
} | ||
|
||
|
||
}) |
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 @@ | ||
{ | ||
"navigationBarTitleText": "用户反馈", | ||
"enablePullDownRefresh":false | ||
} |
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,12 @@ | ||
|
||
<view class="container"> | ||
<view class='row text_box'> | ||
<textarea class='text' name="content" value="{{content}}" placeholder="请输入您的反馈" /> | ||
</view> | ||
<view class='row btn_box'> | ||
<button bindtap="submit_1" class='submit'>提交反馈</button> | ||
</view> | ||
<view class='row version'> | ||
<view class='txt'>版本1.0</view> | ||
</view> | ||
</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,49 @@ | ||
|
||
page{ | ||
height: 100%; | ||
} | ||
.container{ | ||
height: 100%; | ||
flex-flow:column nowrap; | ||
align-items:center; | ||
justify-content: center; | ||
} | ||
.container .row{ | ||
width: 100%; | ||
} | ||
|
||
.text{ | ||
width: 90%; | ||
height: 400rpx; | ||
flex-shrink:1; | ||
margin: 0 auto; | ||
border-radius: 10rpx; | ||
color: #999; | ||
font-size: 14px; | ||
padding: 10px; | ||
background: #ffffff; | ||
box-sizing: border-box; | ||
} | ||
.btn_box{ | ||
margin-top: 100rpx; | ||
} | ||
.submit{ | ||
width: 180px; | ||
background: #444; | ||
border: none; | ||
color: #fff; | ||
font-size: 16px; | ||
margin-top: 20px; | ||
} | ||
.version{ | ||
margin-top: 100rpx; | ||
} | ||
.version .txt{ | ||
text-align: center; | ||
font-size: 14px; | ||
color: #999; | ||
} | ||
.text_box{ | ||
border: solid 1px #bbb; | ||
border-radius: 3px; | ||
} |
Oops, something went wrong.