大理市民卡小程序1.0提交
diff --git a/pages/findpaypwd/findpaypwd.js b/pages/findpaypwd/findpaypwd.js
new file mode 100644
index 0000000..b01a5bf
--- /dev/null
+++ b/pages/findpaypwd/findpaypwd.js
@@ -0,0 +1,166 @@
+// pages/findpaypwd/findpaypwd.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ phone: '',
+ code: '',
+ sendTime: '获取验证码',
+ sendColor: 'rgb(124, 255, 112)',
+ snsMsgWait: 30,
+ smsFlag: true
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+ wx.setNavigationBarTitle({
+ title: '获取验证码',
+ })
+
+ var phone = wx.getStorageSync('phoneX');
+ console.log(phone);
+ if (!wx.$isEmpty(phone)) {
+ this.setData({
+ phone: phone
+ })
+ } else {
+ phone = wx.getStorageSync('phone');
+ this.setData({
+ phone: phone
+ })
+ }
+ },
+ setPhone: function (e) {
+ this.setData({
+ phone: e.detail.value
+ })
+ },
+
+ setCode: function(e) {
+ this.setData({
+ code: e.detail.value
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function() {
+
+ },
+
+ doNext: function() {
+ var code = this.data.code;
+ if (wx.$isEmpty(code)) {
+ return;
+ }
+ var param = {
+ "code": code,
+ }
+ wx.showLoading({
+ title: '加载中',
+ })
+ wx.$doPost('/v1/checkcode', param, function(ok, ret) {
+ wx.hideLoading();
+ if (ok) {
+
+ if (ret.data.code == 200) {
+ wx.setStorageSync("randomcode", ret.data.randcode);
+ wx.setStorageSync("paypwdtype", "find");
+
+ wx.navigateTo({
+ url: '../paypwdset/paypwdset',
+ })
+ } else {
+ wx.showModal({
+ title: '错误',
+ content: ret.data.message,
+ duration: 2000
+ })
+
+ }
+ } else {
+ wx.showModal({
+ title: '错误',
+ content: ret.data.message,
+ duration: 2000
+ })
+
+ }
+ })
+ },
+
+ getCode: function() {
+ if (false == this.data.smsFlag) {
+ return;
+ }
+ wx.$doCountdown(this);
+
+
+ wx.$doPost('/v1/code', {}, function(ok, ret) {
+
+ if (ok) {
+ if (ret.data.code == 200) {} else {
+ wx.showModal({
+ title: '错误',
+ content: ret.data.msg,
+
+ duration: 2000
+ })
+ }
+ } else {
+ wx.showModal({
+ title: '错误',
+ content: "请求失败了" + ret.data.status + ",请稍后再试",
+ duration: 2000
+ })
+ }
+ })
+ }
+})
\ No newline at end of file
diff --git a/pages/findpaypwd/findpaypwd.json b/pages/findpaypwd/findpaypwd.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/findpaypwd/findpaypwd.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/findpaypwd/findpaypwd.wxml b/pages/findpaypwd/findpaypwd.wxml
new file mode 100644
index 0000000..3828936
--- /dev/null
+++ b/pages/findpaypwd/findpaypwd.wxml
@@ -0,0 +1,26 @@
+<view class="container">
+
+ <view class="global-background">
+ <view class="inline-item center" style="margin-top: 50rpx;">
+ <view class="input-desc">
+ 手机号
+ </view>
+ <input value="{{phone}}" maxlength="11" placeholder="请输入市民卡预留的手机号" style="width: 70%;" bindinput="setPhone"></input>
+ </view>
+ <view class="inline-item center">
+
+ <view class="input-desc">
+ 验证码
+ </view>
+ <input placeholder="请输入验证码" type="number" style="width:45%" bindinput="setCode"></input>
+ <view class="authcode center" style="color:{{sendColor}}" bindtap="getCode">
+ {{sendTime}}
+ </view>
+
+ </view>
+
+
+ <button bindtap="doNext" class="long-btn" style="width: 90%;">下一步</button>
+
+ </view>
+</view>
\ No newline at end of file
diff --git a/pages/findpaypwd/findpaypwd.wxss b/pages/findpaypwd/findpaypwd.wxss
new file mode 100644
index 0000000..50214de
--- /dev/null
+++ b/pages/findpaypwd/findpaypwd.wxss
@@ -0,0 +1 @@
+/* pages/findpaypwd/findpaypwd.wxss */
\ No newline at end of file