Ver código fonte

优化

master
liuminjian 3 anos atrás
pai
commit
1aaa1e9d33
21 arquivos alterados com 224 adições e 259 exclusões
  1. +1
    -0
      nsgk_entry/app.js
  2. +2
    -3
      nsgk_entry/app.json
  3. +0
    -23
      nsgk_entry/component/iPhoneXPatcher/iPhoneXPatcher.js
  4. +0
    -4
      nsgk_entry/component/iPhoneXPatcher/iPhoneXPatcher.json
  5. +0
    -4
      nsgk_entry/component/iPhoneXPatcher/iPhoneXPatcher.wxml
  6. +0
    -6
      nsgk_entry/component/iPhoneXPatcher/iPhoneXPatcher.wxss
  7. +0
    -32
      nsgk_entry/component/scrollTab/scrollTab.js
  8. +0
    -3
      nsgk_entry/component/scrollTab/scrollTab.json
  9. +0
    -9
      nsgk_entry/component/scrollTab/scrollTab.wxml
  10. +0
    -22
      nsgk_entry/component/scrollTab/scrollTab.wxss
  11. +5
    -2
      nsgk_entry/pages/index/index.js
  12. +10
    -2
      nsgk_entry/pages/index/index.wxml
  13. +55
    -3
      nsgk_entry/pages/index/index.wxss
  14. +69
    -0
      nsgk_entry/pages/user/login/login.js
  15. +6
    -0
      nsgk_entry/pages/user/login/login.json
  16. +15
    -0
      nsgk_entry/pages/user/login/login.wxml
  17. +61
    -0
      nsgk_entry/pages/user/login/login.wxss
  18. +0
    -88
      nsgk_entry/pages/wxAuth/wxAuth.js
  19. +0
    -3
      nsgk_entry/pages/wxAuth/wxAuth.json
  20. +0
    -10
      nsgk_entry/pages/wxAuth/wxAuth.wxml
  21. +0
    -45
      nsgk_entry/pages/wxAuth/wxAuth.wxss

+ 1
- 0
nsgk_entry/app.js Ver arquivo

@@ -20,6 +20,7 @@ App({
//获取设备信息
wx.getSystemInfo({
success: function (res) {
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;
}


+ 2
- 3
nsgk_entry/app.json Ver arquivo

@@ -1,10 +1,9 @@
{
"pages": [
"pages/index/index",
"pages/user/login/login",
"pages/show/show",
"pages/wxAuth/wxAuth",
"pages/logs/logs",
"component/scrollTab/scrollTab"
"pages/logs/logs"
],
"window": {
"backgroundTextStyle": "light",


+ 0
- 23
nsgk_entry/component/iPhoneXPatcher/iPhoneXPatcher.js Ver arquivo

@@ -1,23 +0,0 @@
// component/iPhoneXPatcher/iPhoneXPatcher.js
let APP = getApp();

Component({
/**
* 组件的属性列表
*/
properties: {
},

/**
* 组件的初始数据
*/
data: {
isIphoneX: APP.globalData.isIphoneX
},

/**
* 组件的方法列表
*/
methods: {}
})

+ 0
- 4
nsgk_entry/component/iPhoneXPatcher/iPhoneXPatcher.json Ver arquivo

@@ -1,4 +0,0 @@
{
"component": true,
"usingComponents": {}
}

+ 0
- 4
nsgk_entry/component/iPhoneXPatcher/iPhoneXPatcher.wxml Ver arquivo

@@ -1,4 +0,0 @@
<!--component/iPhoneXPatcher/iPhoneXPatcher.wxml-->
<view>
<view wx:if="{{isIphoneX}}" class="iphone-x-patcher"></view>
</view>

+ 0
- 6
nsgk_entry/component/iPhoneXPatcher/iPhoneXPatcher.wxss Ver arquivo

@@ -1,6 +0,0 @@
/* component/iPhoneXPatcher/iPhoneXPatcher.wxss */
.iphone-x-patcher {
width: 750rpx;
padding-bottom: 68rpx;
clear:both; /* 用于清除浮动(如: 提交订单页的底部 fixed 工具条) */
}

+ 0
- 32
nsgk_entry/component/scrollTab/scrollTab.js Ver arquivo

@@ -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 });
},
}
})

+ 0
- 3
nsgk_entry/component/scrollTab/scrollTab.json Ver arquivo

@@ -1,3 +0,0 @@
{
"component": true
}

+ 0
- 9
nsgk_entry/component/scrollTab/scrollTab.wxml Ver arquivo

@@ -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>


+ 0
- 22
nsgk_entry/component/scrollTab/scrollTab.wxss Ver arquivo

@@ -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;
}

+ 5
- 2
nsgk_entry/pages/index/index.js Ver arquivo

@@ -1,18 +1,21 @@
// pages/index/index.js
import * as UTIL from '../../utils/util.js';
Page({

/**
* 页面的初始数据
*/
data: {
isIPhoneX:false
},

/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {

this.setData({
isIPhoneX:UTIL.isIPhoneX()
})
},

/**


+ 10
- 2
nsgk_entry/pages/index/index.wxml Ver arquivo

@@ -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="header">
<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>

+ 55
- 3
nsgk_entry/pages/index/index.wxss Ver arquivo

@@ -2,8 +2,60 @@
width: 100vw;
height: 100vh;
}

.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;
}

+ 69
- 0
nsgk_entry/pages/user/login/login.js Ver arquivo

@@ -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 () {

}
})

+ 6
- 0
nsgk_entry/pages/user/login/login.json Ver arquivo

@@ -0,0 +1,6 @@
{
"usingComponents": {
"icon-loading":"/component/iconLoading/iconLoading"
},
"navigationStyle": "custom"
}

+ 15
- 0
nsgk_entry/pages/user/login/login.wxml Ver arquivo

@@ -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>

+ 61
- 0
nsgk_entry/pages/user/login/login.wxss Ver arquivo

@@ -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;
}

+ 0
- 88
nsgk_entry/pages/wxAuth/wxAuth.js Ver arquivo

@@ -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) {
}
})
}

});

+ 0
- 3
nsgk_entry/pages/wxAuth/wxAuth.json Ver arquivo

@@ -1,3 +0,0 @@
{
"navigationBarTitleText": "定位授权"
}

+ 0
- 10
nsgk_entry/pages/wxAuth/wxAuth.wxml Ver arquivo

@@ -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>

+ 0
- 45
nsgk_entry/pages/wxAuth/wxAuth.wxss Ver arquivo

@@ -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;
}

Carregando…
Cancelar
Salvar