eli 2 éve
szülő
commit
7f80aa96b4

BIN
.DS_Store


+ 0 - 31
.eslintrc.js

@@ -1,31 +0,0 @@
-/*
- * Eslint config file
- * Documentation: https://eslint.org/docs/user-guide/configuring/
- * Install the Eslint extension before using this feature.
- */
-module.exports = {
-  env: {
-    es6: true,
-    browser: true,
-    node: true,
-  },
-  ecmaFeatures: {
-    modules: true,
-  },
-  parserOptions: {
-    ecmaVersion: 2018,
-    sourceType: 'module',
-  },
-  globals: {
-    wx: true,
-    App: true,
-    Page: true,
-    getCurrentPages: true,
-    getApp: true,
-    Component: true,
-    requirePlugin: true,
-    requireMiniProgram: true,
-  },
-  // extends: 'eslint:recommended',
-  rules: {},
-}

+ 0 - 2
app.json

@@ -2,12 +2,10 @@
   "pages":[
     "pages/index/index",
     "pages/submitPhone/index",
-   
     "pages/list/index",
     "pages/record/index",
     "pages/recharge/index",
     "pages/bill/index"
-    
   ],
   "tabBar": {
     "color": "#2c2c2c",

+ 2 - 1
pages/index/index.js

@@ -29,6 +29,7 @@ Page({
     wx.login({
       success (res) {
         if (res.code) {
+          console.log("code",res)
           let code = res.code
           wx.setStorageSync('code', res.code)
           // 调userinfo接口
@@ -45,7 +46,7 @@ Page({
               url: '/pages/submitPhone/index',
             })
           }).catch(err=>{
-            console.log('ERROR')
+            console.log('ERROR',err)
           });
         }
       }

+ 4 - 2
pages/index/index.wxml

@@ -2,6 +2,8 @@
   <view class="title">电费充值系统</view>
   <image class="img-style" src="/utils/images/home-img1.jpeg"></image>
   <image class="img-style" src="/utils/images/home-img2.jpeg"></image>
-  <view  class="btn_box" wx-if="{{tab == 1}}" bindtap="toLogin">微信授权登陆</view>
-  <view class="btn_box" wx-if="{{tab == 2}}" bindtap="toOut">更换账号登陆</view>
+  <button class="btn_box" wx-if="{{tab == 1}}" bindtap="toLogin">微信授权登陆</button>
+  <button class="btn_box" wx-if="{{tab == 2}}" bindtap="toOut">更换账号登陆</button>
+  <!-- <view  class="btn_box" wx-if="{{tab == 1}}" bindtap="toLogin">微信授权登陆</view> -->
+  <!-- <view class="btn_box" wx-if="{{tab == 2}}" bindtap="toOut">更换账号登陆</view> -->
 </view>

+ 2 - 2
pages/index/index.wxss

@@ -15,7 +15,7 @@
   margin-bottom: 10px;
 }
 .btn_box{
-  width: 90%;
+  width: 300px !important;
   margin: 0 auto;
   background: #1296db;
   color: #ffffff;
@@ -23,7 +23,7 @@
   text-align: center;
   height: 35px;
   border-radius: 3px;
-  line-height: 35px;
+  line-height: 20px;
   position: absolute;
   bottom: 50px;
 }

+ 1 - 1
pages/recharge/index.wxml

@@ -7,7 +7,7 @@
     <p class="top_style">余额:{{balance}}</p>
   </view>
   <view class="input_box">
-    <input class="input_style" bindinput='getInputName' type="number" placeholder="请输入充值金额"/>
+    <input class="input_style" bindinput='getInputName' type="digit" placeholder="请输入充值金额"/>
   </view>
   <view class="money_num">
     <view class="num_inner {{ tab == 1? 'blue_style':'' }}" data-info="{{1}}" bindtap="changeTab">100</view>

+ 2 - 0
pages/submitPhone/index.wxml

@@ -1,4 +1,6 @@
 <view class="container">
     <input class="input_style" type="number" bindinput='getInputName' placeholder="请输入手机号码" />
+    <view class="tips">请输入已报备到物业公司的手机号码</view>
     <view class="btn_box" bindtap="toSubmit">提交</view>
+    
 </view>

+ 6 - 0
pages/submitPhone/index.wxss

@@ -10,7 +10,13 @@
   box-sizing: border-box;
   padding: 2px 5px;
   margin-top: 10px;
+}
+.tips{
+  width: 300px;
   margin-bottom: 100px;
+  color: #1296db;
+  font-size: 14px;
+  margin-top: 5px;
 }
 .btn_box{
   width: 300px;

+ 2 - 1
project.config.json

@@ -50,5 +50,6 @@
     "include": []
   },
   "appid": "wxaf30a386748b4ed8",
-  "simulatorPluginLibVersion": {}
+  "simulatorPluginLibVersion": {},
+  "projectname": "dghd_miniapp"
 }

+ 0 - 8
project.private.config.json

@@ -1,8 +0,0 @@
-{
-  "projectname": "dghd_miniapp",
-  "setting": {
-    "compileHotReLoad": true,
-    "urlCheck": false
-  },
-  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
-}

+ 2 - 2
utils/http.js

@@ -1,6 +1,6 @@
 const ui = require('./ui');
- // const BASE_URL = 'http://192.168.2.246:8080/monitor'
-  const BASE_URL = 'http://119.29.97.109:8080/monitor' 
+ const BASE_URL = 'https://www.szkis.cn/monitor'
+  // const BASE_URL = 'http://119.29.97.109:8080/monitor' 
  
 function request(obj) {
     return new Promise(function(resolve, reject) {

+ 0 - 19
utils/util.js

@@ -1,19 +0,0 @@
-const formatTime = date => {
-  const year = date.getFullYear()
-  const month = date.getMonth() + 1
-  const day = date.getDate()
-  const hour = date.getHours()
-  const minute = date.getMinutes()
-  const second = date.getSeconds()
-
-  return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
-}
-
-const formatNumber = n => {
-  n = n.toString()
-  return n[1] ? n : `0${n}`
-}
-
-module.exports = {
-  formatTime
-}