roose 4 years ago
parent
commit
144330ecf3

+ 6 - 10
app.json

@@ -1,15 +1,12 @@
 {
   "pages": [
-    "pages/personInfo/personInfo", 
-    "pages/visitandinfo/visitandinfo",
+    "pages/updatepassword/updatepassword",
     "pages/login/login",
+    "pages/personInfo/personInfo",
+    "pages/visitandinfo/visitandinfo",
     "pages/index/index",
-   
-    
-    "pages/collectInfo/collectInfo",
-   
     "pages/paiming/paiming",
-    "pages/updatepassword/updatepassword"
+    "pages/collectInfo/collectInfo"
   ],
   "window": {
     "backgroundTextStyle": "light",
@@ -59,8 +56,7 @@
     "color": "#a9b7b7",
     "selectedColor": "#999999",
     "borderStyle": "black",
-    "list": [
-      {
+    "list": [{
         "pagePath": "pages/index/index",
         "text": "首页",
         "selectedIconPath": "./images/tabBar5.png",
@@ -84,7 +80,7 @@
         "selectedIconPath": "./images/tabBar8.png",
         "iconPath": "./images/tabBar4.png"
       }
-     
+
     ]
   },
   "style": "v2",

+ 62 - 0
pages/updatepassword/updatepassword.js

@@ -0,0 +1,62 @@
+const app = require('../../utils/util.js');
+var util = require('../../utils/md5.js')
+Page({
+  data: {
+    defaultType1: true,
+    passwordType1: true
+  },
+  eyeStatus1() {
+    if (this.data.defaultType1) {
+      this.setData({
+        passwordType1: false,
+        defaultType1: false,
+      })
+    } else {
+      this.setData({
+        passwordType1: true,
+        defaultType1: true,
+      })
+    }
+  },
+  formSubmit(e) {
+    console.log(e.detail, "daying");
+    var password = e.detail.value.pwd;
+    wx.request({
+      url: app.globalData.publicUrl + '/applet/bing',
+      method: "GET",
+      data: {
+        name: e.detail.value.name,
+        pwd: util.hexMD5(password),
+        appletsId: wx.getStorageSync('openId')
+      },
+      success: (res) => {
+
+      }
+    })
+    // wx.switchTab({
+    //   url: '/pages/index/index',
+    // })
+  },
+  onLoad: function () {
+    var that = this;
+    wx.login({
+      success: res => {
+        // 获取到用户的 code 之后:res.code
+        console.log("用户的code:" + res.code);
+        const appid = "wx1c015df104db7030"
+        const secret = "d1956c1b5d3601657c98b0dc80a006f7"
+        let url = 'https://api.weixin.qq.com/sns/jscode2session?appid=' + appid + '&secret=' + secret + '&js_code=' + res.code + '&grant_type=authorization_code';
+        wx.request({
+          // 自行补上自己的 APPID 和 SECRET
+          url: url,
+          success: res => {
+            // 获取到用户的 openid
+            console.log("用户的openid:" + res.data.openid);
+            wx.setStorageSync('openId', res.data.openid)
+          }
+        });
+      }
+    });
+
+  },
+})

+ 1 - 1
pages/updatepassword/updatepassword.json

@@ -1,4 +1,4 @@
 {
-  "navigationBarTitleText":"个人中心",
+  "navigationBarTitleText":"登录",
   "usingComponents": {}
 }

+ 17 - 51
pages/updatepassword/updatepassword.wxml

@@ -1,56 +1,22 @@
-<view class='container'>
-	<view class="personxx">
-	<view class="tx"><open-data type="userAvatarUrl"></open-data></view>
-	<view class="nc"><open-data type="userNickName" lang="zh_CN"></open-data>.你好</view>
-	<!-- <button class="gologin" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">获取手机号</button> -->
+<view>
+	<image src="/images/bg_main_new.jpg" style="width: 100%; height: 400rpx;"> </image>
+	<view class="home">
+		民政信息采集系统
 	</view>
-		<view class="top-content">
-			<view class="content"  bindtap="goMytraining">
-				<view>
-					<van-image fit="cover" width="76rpx" height="76rpx" src="/images/person1.png" />
-				</view>
-				<view class='right-bpx'>
-					<view class='big-title'>我的培训</view>
-					<view class="small-title">社会总是善待努力学习的人</view>
-				</view>
+	<form bindsubmit="formSubmit">
+		<view class="box">
+			<view class="name">
+				<image src="/images/user.png" style="width: 40rpx; height: 40rpx;"> </image>
+				<input name='name' class="weui-input" placeholder="请输入账号" />
 			</view>
-			<view class="content" bindtap="goMypoints">
-				<view>
-					<van-image fit="cover" width="76rpx" height="76rpx" src="/images/person2.png" />
-				</view>
-				<view class='right-bpx'>
-					<view class='big-title'>我的积分</view>
-					<view class="small-title">积少成多,检验收获</view>
-				</view>
+			<view class="name" style=" margin-top: 50rpx;">
+				<image src="/images/pwd.png" style="width: 40rpx; height: 40rpx;"> </image>
+				<input name='pwd' class="weui-input" password='{{passwordType1}}' placeholder="请输入密码" />
+				<image src='{{defaultType1? "/images/eye_close.png": "/images/eye_open.png"}}' class='eye-image' bindtap='eyeStatus1'></image>
 			</view>
-			<view class="content" bindtap="goMyhz">
-				<view>
-					<van-image fit="cover" width="76rpx" height="76rpx" src="/images/person3.png" />
-				</view>
-				<view class='right-bpx'>
-					<view class='big-title'>我的互动</view>
-					<view class="small-title">随时发布问题</view>
-				</view>
+			<view class="register">
+				<button formType="submit">登录并绑定微信号</button>
 			</view>
-			<view class="content" bindtap="hqgz">
-				<view>
-					<van-image fit="cover" width="76rpx" height="76rpx" src="/images/person4.png" />
-				</view>
-				<view class='right-bpx'>
-					<view class='big-title'>后期跟踪</view>
-				</view>
-			</view>
-			<view class="content" bindtap="toIdentity">
-				<view>
-					<van-image fit="cover" width="76rpx" height="76rpx" src="/images/person5.png" />
-				</view>
-				<view class='right-bpx'>
-				<!-- <button class='big-title' open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">身份认证
-				</button> -->
-				<!-- <view><button class='big-title' open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">身份认证
-				</button></view> -->
-					<view class='big-title' >身份认证</view>
-				</view>
-			</view>
-		</view> 
+		</view>
+	</form>
 </view>

+ 33 - 45
pages/updatepassword/updatepassword.wxss

@@ -1,55 +1,43 @@
-page {
-  background-color: #f2f2f2;
+.home {
+  text-align: center;
+  margin-top: 60rpx;
+  font-weight: bold;
 }
-.personxx {
-  width: 710rpx;
-  margin-left: 20rpx;
-  margin-top: 20rpx;
-  height: 210rpx;
+
+.name {
   display: flex;
-  background-color: #fff;
-  border-radius: 20rpx;
-}
-.tx {
-  width: 180rpx;
-  height: 180rpx;
-  border-radius: 90rpx;
-  overflow: hidden;
-  margin-left: 50rpx;
-  margin-top: 15rpx;
+  border: 1px solid #ccc;
+  padding: 20rpx;
+  border-radius: 10rpx;
 }
-.nc{
-  margin-top: 100rpx;
-  margin-left: 50rpx;
-  font-size: 28rpx;
+
+.box {
+  width: 80%;
+  margin: 0 auto;
+  margin-top: 60rpx;
 }
 
-.top-content {
-  width: 710rpx;
+input {
   margin-left: 20rpx;
-  margin-top: 20rpx;
-  background-color: #fff;
-  border-radius: 20rpx;
-}
-.content {
-  display: flex;
-  margin: 40rpx;
-  border-bottom: 1rpx solid rgba(221,221,221,1);
-  padding-bottom: 20rpx;
+  width: 430rpx;
 }
-/* .content:last-child {
-  border-bottom: unset
-} */
-.big-title {
-  font-size: 32rpx;
-  text-align: left;
-  color: #222222;
-  /* border: 1px solid red; */
+
+.eye-image {
+  color: #fff;
+  width: 50rpx;
+  height: 50rpx;
+  margin-left: 20rpx;
 }
-.small-title{
-  color: #999999;
-  font-size:25rpx;
+
+.register {
+  margin-top: 60rpx;
 }
-.right-bpx {
-  margin-left: 40rpx;
+
+button:not([size='mini']) {
+  width: 100% !important;
+  margin-left: auto;
+  margin-right: auto;
+  color: white;
+  background: #1989FA;
+  font-size: 28rpx;
 }