| @@ -20,6 +20,7 @@ App({ | |||||
| //获取设备信息 | //获取设备信息 | ||||
| wx.getSystemInfo({ | wx.getSystemInfo({ | ||||
| success: function (res) { | success: function (res) { | ||||
| that.globalData.systemType = res.system.indexOf("Android") >= 0 ? "Android" : "IOS"; | that.globalData.systemType = res.system.indexOf("Android") >= 0 ? "Android" : "IOS"; | ||||
| that.globalData.isIphoneX = res.model.indexOf("iPhone X") >= 0 || res.model.indexOf("iPhone 1") >= 0; | that.globalData.isIphoneX = res.model.indexOf("iPhone X") >= 0 || res.model.indexOf("iPhone 1") >= 0; | ||||
| } | } | ||||
| @@ -1,10 +1,9 @@ | |||||
| { | { | ||||
| "pages": [ | "pages": [ | ||||
| "pages/index/index", | "pages/index/index", | ||||
| "pages/user/login/login", | |||||
| "pages/show/show", | "pages/show/show", | ||||
| "pages/wxAuth/wxAuth", | |||||
| "pages/logs/logs", | |||||
| "component/scrollTab/scrollTab" | |||||
| "pages/logs/logs" | |||||
| ], | ], | ||||
| "window": { | "window": { | ||||
| "backgroundTextStyle": "light", | "backgroundTextStyle": "light", | ||||
| @@ -1,23 +0,0 @@ | |||||
| // component/iPhoneXPatcher/iPhoneXPatcher.js | |||||
| let APP = getApp(); | |||||
| Component({ | |||||
| /** | |||||
| * 组件的属性列表 | |||||
| */ | |||||
| properties: { | |||||
| }, | |||||
| /** | |||||
| * 组件的初始数据 | |||||
| */ | |||||
| data: { | |||||
| isIphoneX: APP.globalData.isIphoneX | |||||
| }, | |||||
| /** | |||||
| * 组件的方法列表 | |||||
| */ | |||||
| methods: {} | |||||
| }) | |||||
| @@ -1,4 +0,0 @@ | |||||
| { | |||||
| "component": true, | |||||
| "usingComponents": {} | |||||
| } | |||||
| @@ -1,4 +0,0 @@ | |||||
| <!--component/iPhoneXPatcher/iPhoneXPatcher.wxml--> | |||||
| <view> | |||||
| <view wx:if="{{isIphoneX}}" class="iphone-x-patcher"></view> | |||||
| </view> | |||||
| @@ -1,6 +0,0 @@ | |||||
| /* component/iPhoneXPatcher/iPhoneXPatcher.wxss */ | |||||
| .iphone-x-patcher { | |||||
| width: 750rpx; | |||||
| padding-bottom: 68rpx; | |||||
| clear:both; /* 用于清除浮动(如: 提交订单页的底部 fixed 工具条) */ | |||||
| } | |||||
| @@ -1,32 +0,0 @@ | |||||
| // component/tabbar/tabbar.js | |||||
| let APP = getApp(); | |||||
| Component({ | |||||
| /** | |||||
| * 组件的属性列表 | |||||
| */ | |||||
| properties: { | |||||
| tabs: { type: Array, value: [] }, | |||||
| activeTab:{type:Number,value:0} | |||||
| }, | |||||
| /** | |||||
| * 组件的初始数据 | |||||
| */ | |||||
| data: { | |||||
| }, | |||||
| /** | |||||
| * 组件的方法列表 | |||||
| */ | |||||
| methods: { | |||||
| handleTabClick: function handleTabClick(e) { | |||||
| let {index, item} = e.currentTarget.dataset; | |||||
| this.setData({ activeTab: index }); | |||||
| this.triggerEvent('tabclick', { choiceIndex: index, item:item }); | |||||
| }, | |||||
| } | |||||
| }) | |||||
| @@ -1,3 +0,0 @@ | |||||
| { | |||||
| "component": true | |||||
| } | |||||
| @@ -1,9 +0,0 @@ | |||||
| <!--可滑动的 tab标签--> | |||||
| <scroll-view class="scroll_class" scroll-x="true"> | |||||
| <view class="tab_container"> | |||||
| <block wx:for="{{tabs}}" wx:key="id" > | |||||
| <view class="tab_item Al_shenhui_text_color " bindtap="handleTabClick" data-index="{{index}}" data-item="{{item}}">{{item.name}}</view> | |||||
| </block> | |||||
| </view> | |||||
| </scroll-view> | |||||
| @@ -1,22 +0,0 @@ | |||||
| .scroll_class | |||||
| { | |||||
| width: 90vw; | |||||
| height: 100%; | |||||
| } | |||||
| .tab_container | |||||
| { | |||||
| width: auto; | |||||
| height: 100%; | |||||
| white-space: nowrap; | |||||
| } | |||||
| .tab_item | |||||
| { | |||||
| padding: 0rpx 20rpx; | |||||
| height: 72rpx; | |||||
| line-height: 72rpx; | |||||
| text-align: center; | |||||
| display: inline-block; | |||||
| } | |||||
| @@ -1,18 +1,21 @@ | |||||
| // pages/index/index.js | // pages/index/index.js | ||||
| import * as UTIL from '../../utils/util.js'; | |||||
| Page({ | Page({ | ||||
| /** | /** | ||||
| * 页面的初始数据 | * 页面的初始数据 | ||||
| */ | */ | ||||
| data: { | data: { | ||||
| isIPhoneX:false | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad: function (options) { | onLoad: function (options) { | ||||
| this.setData({ | |||||
| isIPhoneX:UTIL.isIPhoneX() | |||||
| }) | |||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -1,7 +1,15 @@ | |||||
| <view class="container" style="background: url('../../image/login/container_bg.jpg') center center no-repeat; background-size: 100% auto;"> | <view class="container" style="background: url('../../image/login/container_bg.jpg') center center no-repeat; background-size: 100% auto;"> | ||||
| <view class="header"> | <view class="header"> | ||||
| <view class="principal">农村事项审批与记账</view> | <view class="principal">农村事项审批与记账</view> | ||||
| <view></view> | |||||
| <view class="instructions">报账简单,操作便捷</view> | |||||
| </view> | |||||
| <view class="quick-login" style="bottom:{{isIPhoneX?'8vh':'5vh'}}"> | |||||
| <view class="key-login">微信一键登录</view> | |||||
| <view class="authorization" style="margin-top:{{isIPhoneX?'5vh':'3vh'}}"> | |||||
| <label> | |||||
| <checkbox value="cb" checked="true" class="changeSize"/> | |||||
| <text>我已阅读并同意用户协议和隐私政策</text> | |||||
| </label> | |||||
| </view> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -2,8 +2,60 @@ | |||||
| width: 100vw; | width: 100vw; | ||||
| height: 100vh; | height: 100vh; | ||||
| } | } | ||||
| .container .header{ | .container .header{ | ||||
| padding-top: 25.61vh; | |||||
| height: 37.3vh; | |||||
| padding-top: 25.24vh; | |||||
| height: 36.94vh; | |||||
| } | |||||
| .container .header .principal{ | |||||
| height: 6.15vh; | |||||
| line-height: 6.15vh; | |||||
| margin-bottom: 0.61vh; | |||||
| text-align: center; | |||||
| font-size: 4.92vh; | |||||
| color: #2c7339; | |||||
| } | |||||
| .container .header .instructions{ | |||||
| font-size: 2.46vh; | |||||
| height: 4.92vh; | |||||
| line-height: 4.92vh; | |||||
| text-align: center; | |||||
| color: #2c7339; | |||||
| } | |||||
| .container .quick-login{ | |||||
| position: fixed; | |||||
| /* bottom: 8vh; */ | |||||
| width: 100%; | |||||
| } | |||||
| .container .quick-login .key-login{ | |||||
| width: 89vw; | |||||
| height: 5.17vh; | |||||
| background:#ffffff; | |||||
| margin:0 auto; | |||||
| border-radius: 5.17vh; | |||||
| text-align: center; | |||||
| line-height: 5.17vh; | |||||
| font-size: 2.21vh; | |||||
| color: #2c7339; | |||||
| box-shadow: 8rpx 6rpx 20rpx rgba(0,0,0,.3); | |||||
| } | |||||
| .container .quick-login .authorization{ | |||||
| margin-top: 5vh; | |||||
| display: flex; | |||||
| justify-content: center; /* 相对父元素水平居中 */ | |||||
| align-items: center; /* 子元素相对父元素垂直居中 */ | |||||
| color: #fff; | |||||
| } | |||||
| .container .quick-login .authorization .changeSize{ | |||||
| transform: scale(0.7,0.7); | |||||
| } | |||||
| .container .quick-login .authorization .changeSize .wx-checkbox-input { | |||||
| border-radius: 1vh; | |||||
| } | |||||
| .container .quick-login .authorization text{ | |||||
| margin-left: -.5vw; | |||||
| } | } | ||||
| @@ -0,0 +1,69 @@ | |||||
| // pages/index/index.js | |||||
| import * as UTIL from '../../../utils/util.js'; | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| isIPhoneX:false | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function (options) { | |||||
| this.setData({ | |||||
| isIPhoneX:UTIL.isIPhoneX() | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| onHide: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom: function () { | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage: function () { | |||||
| } | |||||
| }) | |||||
| @@ -0,0 +1,6 @@ | |||||
| { | |||||
| "usingComponents": { | |||||
| "icon-loading":"/component/iconLoading/iconLoading" | |||||
| }, | |||||
| "navigationStyle": "custom" | |||||
| } | |||||
| @@ -0,0 +1,15 @@ | |||||
| <view class="container" style="background: url('../../../image/login/container_bg.jpg') center center no-repeat; background-size: 100% auto;"> | |||||
| <view class="header"> | |||||
| <view class="principal">农村事项审批与记账</view> | |||||
| <view class="instructions">报账简单,操作便捷</view> | |||||
| </view> | |||||
| <view class="quick-login" style="bottom:{{isIPhoneX?'8vh':'5vh'}}"> | |||||
| <view class="key-login">微信一键登录</view> | |||||
| <view class="authorization" style="margin-top:{{isIPhoneX?'5vh':'3vh'}}"> | |||||
| <label> | |||||
| <checkbox value="cb" checked="true" class="changeSize"/> | |||||
| <text>我已阅读并同意用户协议和隐私政策</text> | |||||
| </label> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| @@ -0,0 +1,61 @@ | |||||
| .container{ | |||||
| width: 100vw; | |||||
| height: 100vh; | |||||
| } | |||||
| .container .header{ | |||||
| padding-top: 25.24vh; | |||||
| height: 36.94vh; | |||||
| } | |||||
| .container .header .principal{ | |||||
| height: 6.15vh; | |||||
| line-height: 6.15vh; | |||||
| margin-bottom: 0.61vh; | |||||
| text-align: center; | |||||
| font-size: 4.92vh; | |||||
| color: #2c7339; | |||||
| } | |||||
| .container .header .instructions{ | |||||
| font-size: 2.46vh; | |||||
| height: 4.92vh; | |||||
| line-height: 4.92vh; | |||||
| text-align: center; | |||||
| color: #2c7339; | |||||
| } | |||||
| .container .quick-login{ | |||||
| position: fixed; | |||||
| /* bottom: 8vh; */ | |||||
| width: 100%; | |||||
| } | |||||
| .container .quick-login .key-login{ | |||||
| width: 89vw; | |||||
| height: 5.17vh; | |||||
| background:#ffffff; | |||||
| margin:0 auto; | |||||
| border-radius: 5.17vh; | |||||
| text-align: center; | |||||
| line-height: 5.17vh; | |||||
| font-size: 2.21vh; | |||||
| color: #2c7339; | |||||
| box-shadow: 8rpx 6rpx 20rpx rgba(0,0,0,.3); | |||||
| } | |||||
| .container .quick-login .authorization{ | |||||
| margin-top: 5vh; | |||||
| display: flex; | |||||
| justify-content: center; /* 相对父元素水平居中 */ | |||||
| align-items: center; /* 子元素相对父元素垂直居中 */ | |||||
| color: #fff; | |||||
| } | |||||
| .container .quick-login .authorization .changeSize{ | |||||
| transform: scale(0.7,0.7); | |||||
| } | |||||
| .container .quick-login .authorization .changeSize .wx-checkbox-input { | |||||
| border-radius: 1vh; | |||||
| } | |||||
| .container .quick-login .authorization text{ | |||||
| margin-left: -.5vw; | |||||
| } | |||||
| @@ -1,88 +0,0 @@ | |||||
| // pages/wxAuth/wxAuth.js | |||||
| let APP = getApp(); | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function (options) { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow: function () { | |||||
| let that = this; | |||||
| wx.authorize({ | |||||
| scope: 'scope.userLocation', | |||||
| success() { | |||||
| getApp().globalData.setInfo.locationOpenIdWX=true; | |||||
| wx.navigateBack({ | |||||
| delta: 1 | |||||
| }) | |||||
| }, | |||||
| fail() { | |||||
| //如果之前已经拒绝过,直接返回fail 不弹窗 | |||||
| getApp().globalData.setInfo=false; | |||||
| } | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| onHide: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom: function () { | |||||
| } | |||||
| , | |||||
| /** | |||||
| * 跳转到设置页面 | |||||
| */ | |||||
| toSettingPage: function () { | |||||
| wx.openSetting({ | |||||
| success(res) { | |||||
| } | |||||
| }) | |||||
| } | |||||
| }); | |||||
| @@ -1,3 +0,0 @@ | |||||
| { | |||||
| "navigationBarTitleText": "定位授权" | |||||
| } | |||||
| @@ -1,10 +0,0 @@ | |||||
| <view class="auth-box"> | |||||
| <view class="icon-box"></view> | |||||
| <view class="text-box">获取地理位置失败</view> | |||||
| <view class="button-box"> | |||||
| <button bindtap="toSettingPage">开启定位</button> | |||||
| </view> | |||||
| <view class="tips-box">若小程序定位已开启</view> | |||||
| <view class="tips-box">请检查微信定位服务是否开启</view> | |||||
| </view> | |||||
| @@ -1,45 +0,0 @@ | |||||
| .auth-box { | |||||
| } | |||||
| .auth-box .icon-box { | |||||
| margin: 270rpx auto 0; | |||||
| display: block; | |||||
| width: 400rpx; | |||||
| height: 400rpx; | |||||
| background: url("https://shgm.jjyyx.com/m/images/error_img4.png?20190704") no-repeat center; | |||||
| background-size: contain; | |||||
| } | |||||
| .auth-box .text-box { | |||||
| margin-top: 60rpx; | |||||
| font-size: 40rpx; | |||||
| color: #999999; | |||||
| text-align: center; | |||||
| } | |||||
| .auth-box .button-box { | |||||
| margin-top: 60rpx; | |||||
| margin-bottom: 60rpx; | |||||
| font-size: 30rpx; | |||||
| text-align: center; | |||||
| } | |||||
| .auth-box .button-box button { | |||||
| width: 320rpx; | |||||
| height: 72rpx; | |||||
| border: 1px solid #FF4752; | |||||
| border-radius: 36rpx; | |||||
| text-align: center; | |||||
| line-height: 72rpx; | |||||
| background: #fff; | |||||
| color: #FF4752; | |||||
| padding: 0rpx; | |||||
| } | |||||
| .auth-box .tips-box { | |||||
| font-size: 28rpx; | |||||
| line-height: 40rpx; | |||||
| color: #999999; | |||||
| text-align: center; | |||||
| } | |||||