diff --git a/littleApp_child/app.json b/littleApp_child/app.json index c35ed2a..9751159 100644 --- a/littleApp_child/app.json +++ b/littleApp_child/app.json @@ -1,5 +1,6 @@ { "pages": [ + "pages/home/home", "pages/Setting/Setting", "pages/PersonalInfo/PersonalInfo", @@ -21,7 +22,9 @@ "pages/system_notifacations/system_notifacations", "pages/vipService/vipService", "pages/childcare_knowledge/childcare_knowledge", + "pages/CompleteTouristInfo/CompleteTouristInfo", "pages/Register/Register" + ], "window": { "backgroundTextStyle": "light", diff --git a/littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.js b/littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.js new file mode 100644 index 0000000..d2f185f --- /dev/null +++ b/littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.js @@ -0,0 +1,42 @@ +// 完善游客信息 + +// 网络请求工具类 +var networkUtil = require('../../utils/network_util.js') +var api = require('../../utils/apiFile.js') + + +// 是否有更多 +var userId = '' +var token = '' + +Page({ + data: { + }, + /*---------生命周期--------*/ + onLoad: function (e) { + userId = e.userId + token = e.token + }, + formSubmit: function (e) { + networkUtil.showLoading() + getApp().globalData.token = token + var param = { 'username': '李白', 'birth': '2017-02-15'} + networkUtil._put(api.kTourisInfo + userId, param, function (res) { + console.log(res) + getApp().globalData.token = '' + wx.showModal({ + title: '提示', + content: '注册成功,立即登录', + success: function (res) { + if (res.confirm) { + wx.navigateBack({ + delta: 5 + }) + } + } + }) + }, function (res) { + networkUtil.showErrorToast(res.errormsg) + }) + } +}) diff --git a/littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.json b/littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.json new file mode 100644 index 0000000..4448f4b --- /dev/null +++ b/littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.json @@ -0,0 +1,6 @@ +{ + "navigationBarBackgroundColor": "#48C17B", + "navigationBarTitleText": "我的收藏", + "navigationBarTextStyle": "white", + "backgroundColor": "#d8dbd4" +} \ No newline at end of file diff --git a/littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.wxml b/littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.wxml new file mode 100644 index 0000000..fbf7ece --- /dev/null +++ b/littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.wxml @@ -0,0 +1,15 @@ + +
+ + + + + + + 生日 + 性别 + + + +
+
\ No newline at end of file diff --git a/littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.wxss b/littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.wxss new file mode 100644 index 0000000..11cd6dd --- /dev/null +++ b/littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.wxss @@ -0,0 +1 @@ +@import "../home/css/login.wxss"; \ No newline at end of file diff --git a/littleApp_child/pages/Register/Register.js b/littleApp_child/pages/Register/Register.js index 02933c7..cbd1456 100644 --- a/littleApp_child/pages/Register/Register.js +++ b/littleApp_child/pages/Register/Register.js @@ -12,7 +12,7 @@ var isFirst = true Page({ data: { inputFocus: { codeInput: false }, - time: '60s', + time: '0s', }, // 获取验证码 getVerifyCode: function (e) { @@ -23,7 +23,7 @@ Page({ } if (numberUtil.IsTelPhoneNumber(phone) && name.length > 0) { var that = this - networkUtil._post(api.bindDoc, { username: name, phone: phone }, function (res) { + networkUtil._post(api.bindDoc, { username: name, phone: phone,'type':2 }, function (res) { console.log("getVerifyCode:", res) }, function (res) { @@ -98,12 +98,9 @@ Page({ }) }, 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() + + wx.navigateTo({ + url: '../CompleteTouristInfo/CompleteTouristInfo?userId=' + data.id + '&token=' + data.token, + }) } }) \ No newline at end of file diff --git a/littleApp_child/pages/Register/Register.wxss b/littleApp_child/pages/Register/Register.wxss index 4802330..48d0af0 100644 --- a/littleApp_child/pages/Register/Register.wxss +++ b/littleApp_child/pages/Register/Register.wxss @@ -1,101 +1 @@ -.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; -} +@import "../home/css/login.wxss"; diff --git a/littleApp_child/pages/home/home.js b/littleApp_child/pages/home/home.js index 3d313c0..f19bfaf 100644 --- a/littleApp_child/pages/home/home.js +++ b/littleApp_child/pages/home/home.js @@ -255,8 +255,8 @@ Page({ getVerifyCode: function (e) { console.log("name:" + name) console.log("phone:" + phone) - name = '小向阳' - phone = '18202810912' + // name = '小向阳' + // phone = '18202810912' if (timeCount < 60) { return } diff --git a/littleApp_child/utils/apiFile.js b/littleApp_child/utils/apiFile.js index 79639ba..5a18160 100644 --- a/littleApp_child/utils/apiFile.js +++ b/littleApp_child/utils/apiFile.js @@ -37,5 +37,7 @@ module.exports = { // 7niu kApiQiNiuImageToken:'v1/tokens/qiniu', // 改用户信息 - kApiModifyMyInfo:'v1/users' + kApiModifyMyInfo:'v1/users', + // 游客用户信息 + kTourisInfo: 'baby/users/', } \ No newline at end of file