大理市民卡小程序1.0提交
diff --git a/pages/index/index.js b/pages/index/index.js
new file mode 100644
index 0000000..aec3f72
--- /dev/null
+++ b/pages/index/index.js
@@ -0,0 +1,194 @@
+//index.js
+//获取应用实例
+const app = getApp()
+
+Page({
+  data: {
+    bind: '',
+    bindcolor: '',
+    sign: '',
+    signcolor: '',
+    userInfo: {},
+    hasUserInfo: false,
+    canIUse: wx.canIUse('button.open-type.getUserInfo'),
+
+  },
+  tabChange(e) {
+    console.log('tab change', e)
+  },
+
+  //事件处理函数
+  bindViewTap: function() {
+    wx.navigateTo({
+      url: '../logs/logs'
+    })
+  },
+  testButton: function() {
+
+    console.log(app.globalData.userInfo)
+    wx.showModal({
+      title: '提示',
+      content: '该功能暂未完成,完整版请使用大理市民卡app',
+
+      duration: 2000
+    })
+  },
+  onLoad: function() {
+
+    var brightness=wx.getStorageSync("brightness");
+
+    if(!wx.$isEmpty(brightness)){
+      wx.setScreenBrightness({
+        value: brightness,
+      })
+    }
+
+    var userid = wx.getStorageSync("userid");
+    var signed = wx.getStorageSync("signed");
+    if (wx.$isEmpty(userid)) {
+      this.setData({
+        bind: '未绑定',
+        bindcolor: 'red'
+      })
+
+    } else {
+      this.setData({
+        bind: '已绑定',
+        bindcolor: 'green'
+      })
+    }
+    if (wx.$isEmpty(signed) || signed != 'yes') {
+      this.setData({
+        sign: '未签约',
+        signcolor: 'red'
+      })
+    } else {
+      this.setData({
+        sign: '已签约',
+        signcolor: 'green'
+      })
+    }
+
+    // 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
+    })
+  },
+  pageredirect: function(e) {
+    wx.navigateTo({
+      url: '../wxlogin/wxlogin'
+    })
+  },
+  doBind: function() {
+    wx.navigateTo({
+      url: '../bindcard/bindcard'
+    })
+  },
+  doSign: function() {
+    var check = wx.$checkBankcard();
+    if (!check) {
+      return;
+    }
+    wx.navigateTo({
+      url: '../signxy/signxy'
+    })
+  },
+  doCardLost: function() {
+    wx.navigateTo({
+      url: '../cardlost/cardlost'
+    })
+  },
+  doScan: function() {
+    var check = wx.$checkBankcard();
+    if (!check) {
+    
+      return;
+    }
+
+    wx.scanCode({
+      success(ret) {
+        console.log(ret);
+
+        var url = ret.result;
+       
+
+        if (url.indexOf("yy.dlsmk.cn") >= 0) {
+          if (url.indexOf("?") > 0) {
+            url = url + '&userid=' + userid;
+          } else {
+            url = url + '?userid=' + userid;
+          }
+          wx.setStorageSync('trueurl', url);
+          wx.navigateTo({
+            url: '../scan2/scan2'
+          })
+        }
+        wx.setStorageSync('scanurl', url);
+        console.log(url);
+        wx.navigateTo({
+          url: '../scan/scan'
+        })
+        //}
+      }
+    })
+
+  },
+  doGetBill: function() {
+    var check = wx.$checkBankcard();
+    if (!check) {
+      return;
+    }
+    wx.navigateTo({
+      url: '../bill/bill',
+    })
+  },
+  doQrcode: function() {
+    var check = wx.$checkBankcard();
+    if (!check) {
+      return;
+    }
+    wx.navigateTo({
+      url: '../qrcode/qrcode',
+    })
+  },
+  doSafety: function() {
+    // var check = checkBankcard();
+    // if (!check) {
+    //   return;
+    // }
+    wx.navigateTo({
+      url: '../safety/safety',
+    })
+  }
+
+})
\ No newline at end of file
diff --git a/pages/index/index.json b/pages/index/index.json
new file mode 100644
index 0000000..e619f4d
--- /dev/null
+++ b/pages/index/index.json
@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    
+  },
+  "navigationBarTitleText": "大理市民卡"
+}
\ No newline at end of file
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
new file mode 100644
index 0000000..257b1c0
--- /dev/null
+++ b/pages/index/index.wxml
@@ -0,0 +1,64 @@
+<view class="container">
+  <view class="page-body">
+    <view class="global-background">
+      <view class="page-top"></view>
+
+      <view class="whitebox">
+        <view class="row-item" style="margin-top:30%">
+          <button class="flexButton" bindtap="doScan">
+            <image src="/weui/images/scan.jpg" class="boximage roundImage"></image>
+            <text class="qrcodeText">扫一扫</text>
+          </button>
+          <button class="flexButton" bindtap="doQrcode">
+            <image src="/weui/images/qrcode.jpg" class="boximage roundImage"></image>
+            <text class="qrcodeText">付款码</text>
+          </button>
+        </view>
+
+
+      </view>
+
+
+      <view class="row-item " style="position:relative;width:100%;background-color:white;padding-top:80rpx">
+
+        <button class="flexButton" hover-class="flexButton-hover" bindtap="doCardLost">
+          <image src="/weui/images/icon_card.png" class="boximage"></image>
+          <text class="btn-text">市民卡挂失</text>
+        </button>
+        <button class="flexButton" hover-class="flexButton-hover" style="border:1px solid #ccc; border-width:0 1px;" bindtap="doGetBill">
+          <image src="/weui/images/icon_bill.png" class="boximage"></image>
+          <text class="btn-text">账单查询</text>
+        </button>
+        <button class="flexButton " hover-class="flexButton-hover" bindtap="doSafety">
+          <image src="/weui/images/icon_securty.png" class="boximage"></image>
+          <text class="btn-text">账户安全</text>
+        </button>
+
+      </view>
+
+      <view class=" center inline-item" bindtap="doBind" style="margin-top:1%;">
+        <view style="float:left">
+          银行卡
+        </view>
+        <view style="float:right;display: block;" style="margin-left:75%;color:{{bindcolor}}">
+          {{bind}}
+        </view>
+        <view class="arrow-icon" style="float:right;">
+          >
+        </view>
+      </view>
+      <view class=" center inline-item" bindtap="doSign" >
+        <view style="float:left">
+          签约代扣免密付
+        </view>
+        <view style="float:right;display: block;" style="margin-left:62%;color:{{signcolor}}">
+          {{sign}}
+        </view>
+        <view class="arrow-icon" style="float:right;">
+          >
+        </view>
+      </view>
+    </view>
+
+  </view>
+</view>
\ No newline at end of file
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
new file mode 100644
index 0000000..f3953e8
--- /dev/null
+++ b/pages/index/index.wxss
@@ -0,0 +1,130 @@
+/**index.wxss**/
+
+
+.btn-text{
+  margin-top: 10rpx;
+  font-size: 22rpx;
+  
+}
+.userinfo {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+.userinfo-avatar {
+  width: 128rpx;
+  height: 128rpx;
+  margin: 20rpx;
+  border-radius: 50%;
+  margin-top: 30rpx;
+}
+
+.userinfo-nickname {
+  color: #aaa;
+  z-index: 2;
+}
+
+.usermotto {
+  margin-top: 200px;
+}
+
+.demo-text-1 {
+  background: black;
+}
+
+
+
+.page-section-title {
+  font-size: 20px;
+  margin-left: 10px;
+  font-weight: bold;
+  color: white;
+}
+
+.whitebox {
+  border: 2px solid white;
+  box-shadow: 1px 2px 5px #d6d6d6;
+  border-radius: 5px;
+  width: 80%;
+  height: 27%;
+  top: 8%;
+  left: 10%;
+  background-color: white;
+  position: absolute;
+  z-index: 1;
+}
+
+.boximage {
+  width: 66rpx;
+  height: 66rpx;
+ 
+  margin: 0 auto;
+  margin-top: 25rpx;
+  position: relative;
+}
+
+.flexButton {
+  border-radius: 0px;
+  vertical-align: bottom;
+  height: 150rpx;
+  padding: 0rpx;
+  background-color: white;
+  float: left;
+  /* margin-top: 37%; */
+  padding-bottom: 20rpx;
+  display: flex; /*flex居中排版*/
+  flex-direction: column;
+}
+
+.roundImage{
+ border-radius: 50%;
+ width: 88rpx;
+  margin: 0 auto;
+  height: 88rpx;
+}
+
+
+.flexButton-hover {
+  background-color: #d6d6d6;
+}
+
+.qrcodeText {
+  margin-top: 10rpx;
+  font-size: 22rpx;
+  color: #aaa;
+}
+
+
+.row-item {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+}
+
+.col-item {
+  display: flex;
+  flex-direction: col;
+  justify-content: space-around;
+}
+
+.text{
+  text-align: justify;
+}
+.text::after{
+  width: 100%;
+  display: inline-block;
+  content: '';  
+}
+.click-bar{
+  position:relative;
+  width:100%;
+  background-color:white;
+  height:2rem;
+  border: 1px solid rgb(240, 240, 240);
+  border-style: solid none none none;
+}
+
+
+
+