From 74ae3cc42696473daa29dde271cb5a914fcaa1b3 Mon Sep 17 00:00:00 2001
From: luoye <397379429@qq.com>
Date: Fri, 8 Sep 2017 14:35:58 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E9=A1=B5=20=202=E4=B8=AA?=
=?UTF-8?q?=E5=84=BF=E7=AB=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
littleApp_child/app.js | 4 +-
littleApp_child/app.json | 11 +--
littleApp_child/pages/CheckReport/CheckReport.js | 2 +-
littleApp_child/pages/Register/Register.js | 109 +++++++++++++++++++++++
littleApp_child/pages/Register/Register.json | 6 ++
littleApp_child/pages/Register/Register.wxml | 26 ++++++
littleApp_child/pages/Register/Register.wxss | 101 +++++++++++++++++++++
littleApp_child/pages/SearchPage/SearchPage.wxml | 5 ++
littleApp_child/pages/SearchPage/SearchPage.wxss | 24 ++++-
littleApp_child/pages/feedback/feedback.wxml | 6 +-
littleApp_child/pages/home/home.js | 14 ++-
littleApp_child/pages/home/home.wxml | 9 +-
littleApp_child/pages/home/home.wxss | 4 +-
littleApp_child/pages/mySaved/mySaved.wxml | 2 +-
14 files changed, 298 insertions(+), 25 deletions(-)
create mode 100644 littleApp_child/pages/Register/Register.js
create mode 100644 littleApp_child/pages/Register/Register.json
create mode 100644 littleApp_child/pages/Register/Register.wxml
create mode 100644 littleApp_child/pages/Register/Register.wxss
diff --git a/littleApp_child/app.js b/littleApp_child/app.js
index 1b90ae8..2ebdf17 100644
--- a/littleApp_child/app.js
+++ b/littleApp_child/app.js
@@ -22,6 +22,7 @@ App({
var userId = wx.getStorageSync('userId')
this.globalData.token = userToken
this.globalData.userId = userId
+ this.globalData.currentId = userId[0]
console.log(userToken)
// wx.navigateTo({
@@ -323,7 +324,8 @@ App({
userId:'',
openInfo: {},
artList:[],
- days:0
+ days:0,
+ currentId:''
},
})
\ No newline at end of file
diff --git a/littleApp_child/app.json b/littleApp_child/app.json
index af4c156..90e683c 100644
--- a/littleApp_child/app.json
+++ b/littleApp_child/app.json
@@ -1,7 +1,5 @@
{
"pages": [
-
-
"pages/home/home",
"pages/Setting/Setting",
"pages/PersonalInfo/PersonalInfo",
@@ -10,23 +8,18 @@
"pages/mySaved/mySaved",
"pages/CheckReport/CheckReport",
"pages/articleLists/articleLists",
-
-
"pages/SearchPage/SearchPage",
"pages/login/login",
"pages/inspectionReport/inspectionReport",
-
"pages/doctorList/doctorList",
"pages/doctor/doctor",
-
-
"pages/chatroom/chatroom",
"pages/chat/chat",
"pages/childcare_knowledge_detail/childcare_knowledge_detail",
"pages/system_notifacations/system_notifacations",
"pages/vipService/vipService",
- "pages/childcare_knowledge/childcare_knowledge"
-
+ "pages/childcare_knowledge/childcare_knowledge",
+ "pages/Register/Register"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/littleApp_child/pages/CheckReport/CheckReport.js b/littleApp_child/pages/CheckReport/CheckReport.js
index 47ad568..b6f4e6a 100644
--- a/littleApp_child/pages/CheckReport/CheckReport.js
+++ b/littleApp_child/pages/CheckReport/CheckReport.js
@@ -153,7 +153,7 @@ Page({
getCheckList() {
var self = this
// 列表
- networkUtil._get(api.checkList, { patientId: getApp().globalData.userId[0]}, function (res) {
+ networkUtil._get(api.checkList, { patientId: getApp().globalData.currentId}, function (res) {
console.log('获取时间信息', res)
var showLeft = true
diff --git a/littleApp_child/pages/Register/Register.js b/littleApp_child/pages/Register/Register.js
new file mode 100644
index 0000000..02933c7
--- /dev/null
+++ b/littleApp_child/pages/Register/Register.js
@@ -0,0 +1,109 @@
+
+// 网络请求工具类
+var networkUtil = require('../../utils/network_util.js')
+var numberUtil = require('../../utils/numberUtil.js')
+var api = require('../../utils/apiFile.js')
+
+var timeCount = 60;
+var timer;
+var phone;
+var name;
+var isFirst = true
+Page({
+ data: {
+ inputFocus: { codeInput: false },
+ time: '60s',
+ },
+ // 获取验证码
+ getVerifyCode: function (e) {
+ console.log("name:" + name)
+ console.log("phone:" + phone)
+ if (timeCount < 60) {
+ return
+ }
+ if (numberUtil.IsTelPhoneNumber(phone) && name.length > 0) {
+ var that = this
+ networkUtil._post(api.bindDoc, { username: name, phone: phone }, function (res) {
+ console.log("getVerifyCode:", res)
+
+ }, function (res) {
+ timeCount = 60
+ clearTimeout(timer);
+ that.setData({
+ time: '0s'
+ })
+ networkUtil.showErrorToast(res.errormsg)
+ })
+ if (timeCount == 60) {
+ this.keepTime()
+ }
+ } else {
+ networkUtil.showErrorToast('请输入正确手机号码和姓名')
+ return
+ }
+ },
+ // 计时器
+ keepTime: function () {
+ var that = this
+ timeCount--
+ that.setData({
+ time: timeCount + 's'
+ })
+ if (timeCount == 0) {
+ timeCount = 60
+ clearTimeout(timer);
+ return
+ }
+ timer = setTimeout(function () {
+ that.keepTime()
+ }, 1000)
+ },
+ blurInput: function (e) {
+ phone = e.detail.value
+ // console.log(e)
+ },
+ blurNameInput: function (e) {
+ name = e.detail.value
+ // console.log(e)
+ },
+ // 提交表单
+ formSubmit: function (e) {
+
+ var self = this
+ if (e.detail.value.code == "") {
+ wx.showModal({
+ title: '提示',
+ content: '请输入验证码',
+ showCancel: false,
+ success: function (res) {
+ }
+ })
+ return
+ }
+ networkUtil.showLoading()
+ var param = { code: e.detail.value.code, phone: phone,'type':2 }
+ if (getApp().globalData.openInfo.mpid) {
+ param.gzopenid = getApp().globalData.openInfo.mpid
+ console.log('绑定mpid', param)
+ }
+ if (getApp().globalData.openInfo.code) {
+ param.jscode = getApp().globalData.openInfo.code
+ console.log('绑定code', param)
+ }
+ networkUtil._get(api.verifyCode, param, function (res) {
+ console.log(res)
+ self.loginSuccess(res.data)
+ }, function (res) {
+ networkUtil.showErrorToast(res.errormsg)
+ })
+ },
+ loginSuccess(data) {
+ // wx.setStorageSync('userToken', data.token)
+ // wx.setStorageSync('userId', data.patientIds)
+ // wx.setStorageSync('hxName', data.hxName)
+ // wx.setStorageSync('hxPassWord', data.hxPassWord)
+ // getApp().globalData.token = data.token
+ // getApp().globalData.userId = data.patientIds
+ this.homePage()
+ }
+})
\ No newline at end of file
diff --git a/littleApp_child/pages/Register/Register.json b/littleApp_child/pages/Register/Register.json
new file mode 100644
index 0000000..7581b51
--- /dev/null
+++ b/littleApp_child/pages/Register/Register.json
@@ -0,0 +1,6 @@
+{
+ "navigationBarBackgroundColor": "#48C17B",
+ "navigationBarTitleText": "游客注册",
+ "navigationBarTextStyle": "white",
+ "backgroundColor": "#d8dbd4"
+}
\ No newline at end of file
diff --git a/littleApp_child/pages/Register/Register.wxml b/littleApp_child/pages/Register/Register.wxml
new file mode 100644
index 0000000..82576ab
--- /dev/null
+++ b/littleApp_child/pages/Register/Register.wxml
@@ -0,0 +1,26 @@
+
+
+
\ No newline at end of file
diff --git a/littleApp_child/pages/Register/Register.wxss b/littleApp_child/pages/Register/Register.wxss
new file mode 100644
index 0000000..4802330
--- /dev/null
+++ b/littleApp_child/pages/Register/Register.wxss
@@ -0,0 +1,101 @@
+.input-placeholder {
+ font-size: 13px;
+ color: #999;
+}
+
+page {
+ background-color: white;
+}
+
+.record-topbar {
+ width: 100%;
+ height: 45px;
+ background: #ffd5dd;
+ font-size: 12px;
+ color: #ee7289;
+ text-align: center;
+ line-height: 45px;
+}
+
+.record-input-constainer {
+ margin: 40px 10px 0 10px;
+}
+
+.record-input_bg {
+ /*background: beige;*/
+ display: flex;
+ align-items: center;
+ justify-content: flex-start;
+ height: 42px;
+ border: solid 1px;
+ border-radius: 5px;
+}
+
+.record-input_title {
+ /*background-color: green;*/
+ width: 50px;
+ height: 20px;
+ text-align: left;
+ line-height: 20px;
+ font: medium;
+ font-size: 14px;
+ color: #000;
+ padding-left: 15px;
+ border-right: solid #e8eae5 1px;
+}
+
+.input {
+ /*background-color: red;*/
+ font-size: 13px;
+ color: #999;
+ margin-left: 10px;
+ width: 110px;
+ margin-top: 3px;
+}
+
+.record-submit-btn {
+ font: medium;
+ font-size: 20px;
+ color: white;
+ margin-left: 10px;
+ margin-right: 10px;
+ height: 45px;
+ line-height: 45px;
+ border-radius: 22.5px;
+ background-color: #48c17b;
+ width: calc(100%-20px);
+ margin-top: 200px;
+ text-align: center;
+}
+
+.code-input_bg {
+ /*background: beige;*/
+ display: flex;
+ align-items: center;
+ justify-content: flex-start;
+ height: 42px;
+ border: solid 1px;
+ border-radius: 5px;
+ width: 70%;
+}
+
+.record-time-text {
+ font: lighter;
+ margin-left: 10px;
+ width: 30%;
+ text-align: center;
+ font-size: 15px;
+ color: #666;
+ height: 42px;
+ line-height: 42px;
+ margin-top: 15px;
+ border-radius: 4px;
+ float: right;
+ background: #f6f6f6;
+ border: 1px solid #d3d3d3;
+ /*background-color: rgba(1, 1, 1, 1);*/
+}
+
+.code_view {
+ display: flex;
+}
diff --git a/littleApp_child/pages/SearchPage/SearchPage.wxml b/littleApp_child/pages/SearchPage/SearchPage.wxml
index 5f9d61a..e3ccf2e 100644
--- a/littleApp_child/pages/SearchPage/SearchPage.wxml
+++ b/littleApp_child/pages/SearchPage/SearchPage.wxml
@@ -7,6 +7,11 @@
取消
+
+
+ 什么东东
+ 什么东东啊
+
diff --git a/littleApp_child/pages/SearchPage/SearchPage.wxss b/littleApp_child/pages/SearchPage/SearchPage.wxss
index 52b2649..28165f6 100644
--- a/littleApp_child/pages/SearchPage/SearchPage.wxss
+++ b/littleApp_child/pages/SearchPage/SearchPage.wxss
@@ -1,5 +1,9 @@
@import "../childcare_knowledge/childcare_knowledge.wxss";
+page {
+ height: calc(100% - 38px);
+}
+
.searchBar_bg {
background: #48C17B;
width: 100%;
@@ -49,7 +53,6 @@
/* 列表 */
.history_list {
background: white;
- margin-top: 40px;
min-height: 288px;
display: flex;
flex-direction: column;
@@ -109,4 +112,23 @@
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
+}
+
+
+/* 标签内容 */
+.recommend_labels {
+ margin-top: 38px;
+ width: 100%;
+ background: white;
+}
+
+.recommend_label {
+ font-size: 12px;
+ color: #58A478;
+ height: 18px;
+ display: inline-block;
+ margin-left: 8px;
+ background: #F2FDF7;
+ border-radius: 2px;
+ padding: 2px 5px 2px 5px;
}
\ No newline at end of file
diff --git a/littleApp_child/pages/feedback/feedback.wxml b/littleApp_child/pages/feedback/feedback.wxml
index 73308fe..ce4a668 100644
--- a/littleApp_child/pages/feedback/feedback.wxml
+++ b/littleApp_child/pages/feedback/feedback.wxml
@@ -7,15 +7,15 @@
选择反馈类型
-
+
无法正常使用
-
+
内容意见
-
+
其他反馈
diff --git a/littleApp_child/pages/home/home.js b/littleApp_child/pages/home/home.js
index 6c578fd..3d313c0 100644
--- a/littleApp_child/pages/home/home.js
+++ b/littleApp_child/pages/home/home.js
@@ -99,7 +99,7 @@ Page({
})
},
getNameFocus:function(){
- var self=this
+ var self = this
var inputFocus = { nameInput: true, phoneInput: false, codeInput: false }
self.setData({
inputFocus: inputFocus
@@ -189,11 +189,11 @@ Page({
this.getUserInfo()
},
// 获取用户信息
- getUserInfo() {
+ getUserInfo(userId) {
networkUtil.showLoading()
var self = this
var param = { 'token': app.globalData.token }
- networkUtil._get(api.userInfo + app.globalData.userId[0], {}, function (res) {
+ networkUtil._get(api.userInfo + app.globalData.currentId, {}, function (res) {
console.log('获取用户信息',res)
app.globalData.days = res.data.data.days
app.globalData.userInfo = res.data.data
@@ -246,10 +246,17 @@ Page({
})
},
/*---------------欢迎介绍页面---------------*/
+ toRegister(){
+ wx.navigateTo({
+ url: '../Register/Register',
+ })
+ },
// 获取验证码
getVerifyCode: function (e) {
console.log("name:" + name)
console.log("phone:" + phone)
+ name = '小向阳'
+ phone = '18202810912'
if (timeCount < 60) {
return
}
@@ -336,6 +343,7 @@ Page({
wx.setStorageSync('hxPassWord', data.hxPassWord)
getApp().globalData.token = data.token
getApp().globalData.userId = data.patientIds
+ getApp().globalData.currentId = data.patientIds[0]
this.homePage()
}
diff --git a/littleApp_child/pages/home/home.wxml b/littleApp_child/pages/home/home.wxml
index dd55239..7594648 100644
--- a/littleApp_child/pages/home/home.wxml
+++ b/littleApp_child/pages/home/home.wxml
@@ -135,6 +135,7 @@
+
@@ -145,23 +146,23 @@
-
+
-
+
-
+
-
+ 游客注册
\ No newline at end of file
diff --git a/littleApp_child/pages/home/home.wxss b/littleApp_child/pages/home/home.wxss
index 702768a..bbf90c0 100644
--- a/littleApp_child/pages/home/home.wxss
+++ b/littleApp_child/pages/home/home.wxss
@@ -214,7 +214,7 @@
}
/* 文章ne内容背景 */
.article_content {
- height: 133px;
+ height: 134px;
position: relative;
width: 100%;
}
@@ -265,7 +265,7 @@
.article_content_bottomBar_labels {
position: absolute;
right: 0px;
- height: 100%;
+ /* height: 100%; */
}
.article_content_bottomBar_likes {
diff --git a/littleApp_child/pages/mySaved/mySaved.wxml b/littleApp_child/pages/mySaved/mySaved.wxml
index bade052..d76e9f9 100644
--- a/littleApp_child/pages/mySaved/mySaved.wxml
+++ b/littleApp_child/pages/mySaved/mySaved.wxml
@@ -8,7 +8,7 @@
-
+
{{item.title}}
{{item.introduction}}
--
1.8.3.1