diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..115cc02 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,31 @@ +/* + * 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: {}, +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..14ea590 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# Windows +[Dd]esktop.ini +Thumbs.db +$RECYCLE.BIN/ + +# macOS +.DS_Store +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes + +# Node.js +node_modules/ diff --git a/app.js b/app.js new file mode 100644 index 0000000..e2774eb --- /dev/null +++ b/app.js @@ -0,0 +1,158 @@ +import * as STORAGE from './utils/storage' +import * as UTIL from './utils/util' +import * as API from './utils/API' +let APP = getApp(); + +App({ + onLaunch() { + var that = this; + //存储storage初始化globalData数据-- + //何时存储,用来判断,不用获取code + that.initGlobalData(); + //获取code + UTIL.getCOdeFromWX({ + complate: (code) => { + // //获取openId + that.getOpenIdFromFW(code); + } + }); + //获取设备信息 + 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; + } + }); + }, + + onShow() { + //更新机制 + this.wxappUpdateManager(); + }, + globalData: { + // 系统用户登录信息(用户id、token) + userInfo: { + token: '', + toastTimeout:null + }, + //微信用户登陆信息(昵称、头像、省、城市) + wxUserInfo: { + nickName: '', + avatarUrl: '', + province: '', + city: '' + } + , + /** + * 小程序设置 + */ + setInfo: { + //定位授权 + locationOpenIdWX: false, + //纬度 + latitude:'', + //经度 + longitude:'', + } + , + systemType:'',//设备类型 Android IOS + isIphoneX: false, // 用来标识当前手机机型是否为 iPhone X + }, + /** + * 从服务端获取openId + */ + getOpenIdFromFW(code) { + let sendData = { + code: code + } + UTIL.httpRequestNoneDetal(API.URL_GET_OPENID, sendData, "POST", { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + // UTIL.showToastNoneIcon("openId:" + res._data.openid); + STORAGE.setToken(res.token) + STORAGE.setOpenId(res.data.openId) + STORAGE.setSessionKey(res.data.sessionKey) + getApp().globalData.userInfo.token = res.token; + } else { + //未获取到openId + STORAGE.setOpenId(res.data.openId) + STORAGE.setSessionKey(res.data.sessionKey) + } + } + }) + }, + /** + * 初始化globalData + */ + initGlobalData() { + var userInfo = { + token: STORAGE.getToken() + } + console.log(userInfo) + this.globalData.userInfo = userInfo; + } + , + /** + * 小程序更新机制 + * 获取小程序更新机制兼容 + */ + wxappUpdateManager() { + if (wx.canIUse('getUpdateManager')) { + const updateManager = wx.getUpdateManager(); + if (!!updateManager) { + updateManager.onCheckForUpdate(function (res) { + // 请求完新版本信息的回调 + if (res.hasUpdate) { + updateManager.onUpdateReady(function () { + wx.showModal({ + title: '更新提示', + content: '新版本已经准备好,是否重启应用?', + success: function (res) { + if (res.confirm) { + // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 + updateManager.applyUpdate() + } + } + }) + }) + updateManager.onUpdateFailed(function () { + // 新的版本下载失败 + wx.showModal({ + title: '已经有新版本了哟~', + content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~', + }) + }) + } + }) + } + } else { + // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示 + wx.showModal({ + title: '提示', + content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。' + }) + } + }, + showToast(msg, selfClass = '') { + clearTimeout(this.globalData.toastTimeout); + const page = getCurrentPages(); + const currPage = page[page.length - 1]; + currPage.setData({ + toastData: { + showFlag: true, + toastMsg: msg, + selfClass, + }, + }); + + this.globalData.toastTimeout = setTimeout(() => { + currPage.setData({ + toastData: { + showFlag: false, + selfClass: '', + }, + }); + }, 2000); + }, +}) diff --git a/app.json b/app.json new file mode 100644 index 0000000..16d5830 --- /dev/null +++ b/app.json @@ -0,0 +1,19 @@ +{ + "pages": [ + "pages/user/login/login", + "pages/index/index" + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "农燊高科", + "navigationBarTextStyle": "black" + }, + "style": "v2", + "sitemapLocation": "sitemap.json", + "permission": { + "scope.userLocation": { + "desc": "你的位置信息将用于小程序位置接口的效果展示" + } + } +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..8653c53 --- /dev/null +++ b/app.wxss @@ -0,0 +1,49 @@ +/**app.wxss**/ +@import '/style/main.wxss'; +@import "./templates/global/global.wxss"; +@import "/style/iconfont.wxss"; +Page { + font-size: 28rpx; + line-height: 35rpx; + background-color: #F4F4F4; + color: #444; +} + +view, +scroll-view, +swiper, +movable-view, +icon, +text, +progress, +button, +checkbox, +form, +input, +label, +picker, +picker-view, +radio, +slider, +switch, +textarea, +navigator, +audio, +image, +video, +map, +canvas, +contact-button { + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +.Al_shenhui_text_color { + color: #8b8686; +} +.singleLinHidenEllipsis +{ + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + +} diff --git a/component/iconLoading/iconLoading.js b/component/iconLoading/iconLoading.js new file mode 100644 index 0000000..7bbfb06 --- /dev/null +++ b/component/iconLoading/iconLoading.js @@ -0,0 +1,40 @@ +// component/iconLoading/iconLoading.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + innerText: { + type: String, + value: 'default value', + } + + }, + + /** + * 组件的初始数据 + */ + data: { + isShowLoading: false + + }, + + /** + * 组件的方法列表 + */ + methods: { + //隐藏弹框 + hideLoading() { + this.setData({ + isShowLoading: false + }) + }, + //展示弹框 + showLoading() { + this.setData({ + isShowLoading: true + }) + } + + } +}) diff --git a/component/iconLoading/iconLoading.json b/component/iconLoading/iconLoading.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/component/iconLoading/iconLoading.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/component/iconLoading/iconLoading.wxml b/component/iconLoading/iconLoading.wxml new file mode 100644 index 0000000..c259712 --- /dev/null +++ b/component/iconLoading/iconLoading.wxml @@ -0,0 +1,7 @@ + + + + + {{innerText}} + + \ No newline at end of file diff --git a/component/iconLoading/iconLoading.wxss b/component/iconLoading/iconLoading.wxss new file mode 100644 index 0000000..45c105e --- /dev/null +++ b/component/iconLoading/iconLoading.wxss @@ -0,0 +1,20 @@ +/* component/iconLoading/iconLoading.wxss */ +.global-loading { + z-index: 999999; + position: fixed; + top: 0%; + left: 0%; + width: 100%; + height: 100%; + background-color: rgba(255, 255, 255, 0.5); +} +.global-loading .img{ + position: absolute; + top: 50%; + left: 50%; + width: 180rpx; + height: 180rpx; + -webkit-transform: translate(-90rpx, -90rpx); + transform: translate(-90rpx, -90rpx); + z-index: 9999999; +} \ No newline at end of file diff --git a/env/env.js b/env/env.js new file mode 100644 index 0000000..a3abd48 --- /dev/null +++ b/env/env.js @@ -0,0 +1,11 @@ +module.exports = { + DEV: { + URL_PREFIX: 'http://116.255.223.226:8081/nsgk_test', + }, + PRE: { + URL_PREFIX: 'http://116.255.223.226:8081/nsgk_test', + }, + PROD: { + URL_PREFIX: 'http://116.255.223.226:8081/nsgk_test', + } + } \ No newline at end of file diff --git a/image/index/child_function_01.png b/image/index/child_function_01.png new file mode 100644 index 0000000..5dfd9dc Binary files /dev/null and b/image/index/child_function_01.png differ diff --git a/image/index/child_function_02.png b/image/index/child_function_02.png new file mode 100644 index 0000000..7f90f19 Binary files /dev/null and b/image/index/child_function_02.png differ diff --git a/image/index/child_function_03.png b/image/index/child_function_03.png new file mode 100644 index 0000000..4412f3c Binary files /dev/null and b/image/index/child_function_03.png differ diff --git a/image/index/child_function_04.png b/image/index/child_function_04.png new file mode 100644 index 0000000..1b483e7 Binary files /dev/null and b/image/index/child_function_04.png differ diff --git a/image/index/child_function_05.png b/image/index/child_function_05.png new file mode 100644 index 0000000..7f51070 Binary files /dev/null and b/image/index/child_function_05.png differ diff --git a/image/index/header_bg.png b/image/index/header_bg.png new file mode 100644 index 0000000..24aa8b0 Binary files /dev/null and b/image/index/header_bg.png differ diff --git a/image/index/header_job.png b/image/index/header_job.png new file mode 100644 index 0000000..a647433 Binary files /dev/null and b/image/index/header_job.png differ diff --git a/image/index/nav_01.png b/image/index/nav_01.png new file mode 100644 index 0000000..f40fa7c Binary files /dev/null and b/image/index/nav_01.png differ diff --git a/image/index/nav_02.png b/image/index/nav_02.png new file mode 100644 index 0000000..dab3971 Binary files /dev/null and b/image/index/nav_02.png differ diff --git a/image/index/nav_03.png b/image/index/nav_03.png new file mode 100644 index 0000000..5f6aff5 Binary files /dev/null and b/image/index/nav_03.png differ diff --git a/image/index/nav_04.png b/image/index/nav_04.png new file mode 100644 index 0000000..e47b48e Binary files /dev/null and b/image/index/nav_04.png differ diff --git a/image/index/process_icon.png b/image/index/process_icon.png new file mode 100644 index 0000000..707bcc8 Binary files /dev/null and b/image/index/process_icon.png differ diff --git a/image/login/container_bg.jpg b/image/login/container_bg.jpg new file mode 100644 index 0000000..64be52d Binary files /dev/null and b/image/login/container_bg.jpg differ diff --git a/pages/index/index.js b/pages/index/index.js new file mode 100644 index 0000000..1b46b05 --- /dev/null +++ b/pages/index/index.js @@ -0,0 +1,56 @@ +import * as UTIL from '../../utils/util.js'; +import * as API from '../../utils/API.js'; +Page({ + data: { + //顶部胶囊按钮位置信息rect + CustomMenuButton: null, + wrokScrollHeight:0, + userInfoObj:{} //用户信息 + }, + onLoad: function (options) { + + //获取用户信息 + this.getUserInfo() + + + //获取滚动条高度 + this.computeBarLocation(); + }, + /* 计算bar 高度*/ + computeBarLocation() { + var that = this; + let CustomMenuButton = wx.getMenuButtonBoundingClientRect(); + let CustomWidows = wx.getSystemInfoSync(); + // 根据文档,先创建一个SelectorQuery对象实例 + let query = wx.createSelectorQuery().in(this); + query.select('.top_title').boundingClientRect(); + query.select('.information_header').boundingClientRect(); + query.select('.navList_main').boundingClientRect(); + query.select('.child_function').boundingClientRect(); + query.select('.work_plan').boundingClientRect(); + + query.exec((res) => { + let wrokScrollHeight = CustomWidows.windowHeight; + res.forEach((v)=>{ + wrokScrollHeight = wrokScrollHeight - v.height; + }) + wrokScrollHeight = wrokScrollHeight-CustomMenuButton.top-CustomMenuButton.bottom -15; + that.setData({ + wrokScrollHeight: wrokScrollHeight, + }); + }) + that.setData({ + CustomMenuButton: CustomMenuButton, + }); + }, + /* 获取用户信息*/ + getUserInfo(){ + UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + this.setData({userInfoObj:res.user}) + } + } + }) + } +}) \ No newline at end of file diff --git a/pages/index/index.json b/pages/index/index.json new file mode 100644 index 0000000..3ced4d8 --- /dev/null +++ b/pages/index/index.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "icon-loading":"/component/iconLoading/iconLoading" + }, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml new file mode 100644 index 0000000..4a0a49f --- /dev/null +++ b/pages/index/index.wxml @@ -0,0 +1,249 @@ + + + + + + + + + + {{userInfoObj.nickName}} + + + {{userInfoObj.remark}} + + + + + 已完成 + 120件 + + + 已完成 + 120件 + + + + + {{userInfoObj.allDeptName}} + + + + + + + + + + + 支出申请 + + + + + + 收入登记 + + + + + + 记账申请 + + + + + + 财务公开 + + + + + + + 收款人 + + + + 付款人 + + + + 合同报送 + + + + 固资变动 + + + + 资源变动 + + + + + 待办0 + 已办 + 已发起 + 已制单 + > + + + + + + + + 我的擦撒十大黑科技暗杀可接受的和 + 待审 + 2021-1-26 + + + + + 银行转账 + + -2600.00 + + + + + + 我的擦撒十大黑科技暗杀可接受的和 + 待审 + 2021-1-26 + + + + + 银行转账 + + -2600.00 + + + + + + 我的擦撒十大黑科技暗杀可接受的和 + 待审 + 2021-1-26 + + + + + 银行转账 + + -2600.00 + + + + + + 我的擦撒十大黑科技暗杀可接受的和 + 待审 + 2021-1-26 + + + + + 银行转账 + + -2600.00 + + + + + + 我的擦撒十大黑科技暗杀可接受的和 + 待审 + 2021-1-26 + + + + + 银行转账 + + -2600.00 + + + + + + 我的擦撒十大黑科技暗杀可接受的和 + 待审 + 2021-1-26 + + + + + 银行转账 + + -2600.00 + + + + + + 我的擦撒十大黑科技暗杀可接受的和 + 待审 + 2021-1-26 + + + + + 银行转账 + + -2600.00 + + + + + + 我的擦撒十大黑科技暗杀可接受的和 + 待审 + 2021-1-26 + + + + + 银行转账 + + -2600.00 + + + + + + 我的擦撒十大黑科技暗杀可接受的和 + 待审 + 2021-1-26 + + + + + 银行转账 + + -2600.00 + + + + + + 我的擦撒十大黑科技暗杀可接受的和 + 待审 + 2021-1-26 + + + + + 银行转账 + + -2600.00 + + + + + + + + \ No newline at end of file diff --git a/pages/index/index.wxss b/pages/index/index.wxss new file mode 100644 index 0000000..131bbc0 --- /dev/null +++ b/pages/index/index.wxss @@ -0,0 +1,291 @@ + +.singleLinHidenEllipsis{ + color: black; + text-align: center; + width: auto; +} +.information_header{ + /* padding: 30rpx 32rpx 54rpx; */ + padding: 10rpx 32rpx 54rpx; + display: flex; +} +.information_header .portrait_head{ + width: 110rpx; + height: 110rpx; + background: #000; + border-radius: 50%; +} +.information_header .information_main{ + flex: 1; + padding-left: 16rpx; +} +.information_header .name_wrap{ + display: flex; + height: 54rpx; + align-items: center; + margin-bottom: 10rpx; +} +.information_header .name_wrap .name{ + font-size: 46rpx; +} +.information_header .name_wrap .jobs{ + margin-left: 18rpx; + width: 155rpx; + height: 40rpx; + background: #5bae75; + border:2rpx solid #2c8e68; + color: #fff; + border-radius: 40rpx; + display: flex; + font-size: 28rpx; + justify-content: center; + align-items: center; +} +.information_header .name_wrap .jobs .icon{ + width: 26rpx; + height: 27rpx; + margin-right: 5rpx; +} + +.information_header .task_wrap{ + display: flex; + height: 44rpx; + margin-bottom: 18rpx; +} +.information_header .unfinished{ + margin-left: 12rpx; +} +.information_header .task_wrap .flex_block{ + + height: 48rpx; + display: flex; + background: #fff; + line-height: 44rpx; + border-radius: 44rpx; + border:2rpx solid #2c8e68; + text-align: center; + font-size: 28rpx; +} +.information_header .task_wrap .flex_block .desc{ + width: 115rpx; + background: #2c8e68; + position:relative; + overflow: hidden; + color: #fff; + line-height: 44rpx; + border-top-left-radius: 44rpx; + border-bottom-left-radius: 44rpx; + margin-top: -1rpx; + margin-left: -1rpx; +} + +.information_header .task_wrap .flex_block .desc::before{ + position:absolute; + top:-40rpx; + right:-40rpx; + content:""; + z-index:1; + width:110rpx; /*如果需要圆角的话 不用比box的宽度长,如果不需要圆角需要增长*/ + height:40rpx; + background-color:#fff; + transform:rotate(-75deg); + transform-origin:right bottom; + border-radius:0px; +} + +.information_header .task_wrap .flex_block .event{ + color: #2c8e68; + margin-left: -2%; + padding:0 8rpx 0 5rpx; +} + + +.information_header .address_wrap{ + font-size: 26rpx; + color: #2b8e68; + height: 46rpx; + line-height: 46rpx; +} + +.navList_main{ + width: 685rpx; + height: 228rpx; + background-color: #fff; + border-radius: 24rpx; + margin:0 auto; + display: flex; + box-shadow: 0rpx 0rpx 12rpx rgba(0,0,0,.2); +} +.navList_main .tab_item{ + flex: 1; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.navList_main .tab_item .icon{ + width: 100rpx; + height: 100rpx; + margin-bottom: 12rpx; +} +.navList_main .tab_item .icon_img{ + width: 100rpx; + height: 100rpx; +} +.navList_main .tab_item .desc{ + font-size: 26rpx; +} + +.child_function{ + margin: 55rpx 20rpx 0; + display: flex; +} +.child_function .flex_block{ + flex: 1; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} +.child_function .flex_block .image{ + width: 76rpx; + height: 70rpx; + margin-bottom: 20rpx; +} +.child_function .flex_block .attribute{ + width: 76rpx; + height: 70rpx; +} + +.child_function .flex_block .desc{ + font-size: 26rpx; +} + +.work_plan{ + padding: 40rpx 32.5rpx 30rpx; + display: flex; +} + +.work_plan .menu_item{ + height: 60rpx; + width: 140rpx; + background-color: #fff; + box-shadow: 0rpx 0rpx 9rpx rgba(0,0,0,.2); + border-radius: 60rpx; + line-height: 60rpx; + text-align: center; + font-size: 32rpx; + position: relative; + margin-right: 16rpx; + +} +.work_plan .menu_item.active{ + background-color: #5bae78; + color: #fff; +} +.work_plan .menu_item .remind{ + height: 30rpx; + background: #e90101; + color: #fff; + font-size: 26rpx; + position: absolute; + line-height: 30rpx; + padding:0 10rpx; + border-radius: 50%; + top: -10rpx; + right: -10rpx; +} + +.work_plan .more{ + flex: 1; + text-align: center; + line-height: 60rpx; + font-size: 36rpx; + color: #31936c; +} + +.workflow{ + padding: 10rpx 32.5rpx; +} +.workflow .workflow_list{ + height: 150rpx; + background-color: #fff; + border-radius: 24rpx; + box-shadow:0rpx 0rpx 10rpx rgba(0,0,0,.1); + margin-bottom: 20rpx; + padding:15rpx 25rpx 10rpx 35rpx; +} +.workflow .workflow_list .process_intro{ + display: flex; + height: 62rpx; + align-items: center; +} + +.workflow .process_intro .name{ + width: 324rpx; + font-size: 34rpx; + margin-right: 30rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.workflow .process_intro .state{ + width: 93rpx; + height: 42rpx; + background-color: #fbe3e3; + color: #f31e1f; + border-radius: 12rpx; + text-align: center; + line-height: 42rpx; +} + +.workflow .process_intro .time{ + flex: 1; + text-align: right; + font-size: 32rpx; + color: #9ea1aa; +} + + +.workflow .workflow_list .process_pay{ + display: flex; + height: 52rpx; + align-items: center; +} + + +.workflow .workflow_list .process_pay .describe{ + font-size: 30rpx; + width: 330rpx; + color: #3c9370; + display: flex; + align-items: center; +} +.workflow .workflow_list .process_pay .describe .amount_icon{ + width: 32rpx; + height: 32rpx; + margin-right: 12rpx; +} + +.workflow .workflow_list .process_pay .amount{ + font-size: 38rpx; + flex: 1; + text-align: right; + color: #f31e1f; +} +.workflow .workflow_list .process_pay .amount .unit{ + font-size: 26rpx; +} + +/* + + 啊啊啊啊啊啊啊啊啊啊 + 待审 + 2021-1-26 + + + 银行转账 + ¥-2600.00 + + */ \ No newline at end of file diff --git a/pages/user/login/login.js b/pages/user/login/login.js new file mode 100644 index 0000000..35c3b65 --- /dev/null +++ b/pages/user/login/login.js @@ -0,0 +1,116 @@ +// pages/index/index.js +import * as UTIL from '../../../utils/util.js'; +import * as API from '../../../utils/API.js'; +import * as STORAGE from '../../../utils/storage' +const APP = getApp(); +Page({ + data: { + isIPhoneX:false, + privacyCheck:true //用户协议 + }, + onLoad: function (options) { + this.setData({ + isIPhoneX:UTIL.isIPhoneX() + }) + this.automaticLogin() + }, + //自动登录 + automaticLogin(){ + let automatic = STORAGE.getToken(); + let getOpenId = STORAGE.getOpenId(); + if(automatic == '' && getOpenId ==''){ + UTIL.getCOdeFromWX({ + complate: (code) => { + let sendData = { + code: code + } + UTIL.httpRequestNoneDetal(API.URL_GET_OPENID, sendData, "POST", { + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + wx.navigateTo({ + url: '/pages/index/index', + }) + } + } + }) + } + }); + }else{ + wx.navigateTo({ + url: '/pages/index/index', + }) + } + }, + //用户隐私协议选项 + checkboxChange: function(res) { + let checkStatus = false; + if(res.detail.value.length!=0){ + checkStatus = true; + }else{ + checkStatus = false; + } + this.setData({ + privacyCheck:checkStatus + }) + }, + //微信一键登录授权 + getPhoneNumber: function(res) { + let that = this; + let { + detail + } = res; + if (!detail.encryptedData) { + //允许授权 + APP.showToast("未获取到手机号码,注册失败!"); + return; + }else if(this.data.privacyCheck == false){ + APP.showToast("请阅读并同意用户协议和隐私政策!"); + return; + } + let sendData = { + sessionKey:STORAGE.getSessionKey(), + iv:detail.iv, + encryptedData:detail.encryptedData + } + UTIL.httpRequest(API.URL_POST_DECRYPTEDWXDATA, sendData,{ + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + let phoneNumber = res.data.phoneNumber; + //微信手机号码绑定 + that.wxUserBand(phoneNumber) + // UTIL.showToastNoneIcon("数据共:" + res._data.length + "条"); + } else { + //待删 + + UTIL.showToastNoneIcon(res.msg) + } + }, + fail: (res) => { + UTIL.showToastNoneIcon(API.MSG_FAIL_HTTP) + } + }); + }, + wxUserBand(phone){ + let sendData = { + openId:STORAGE.getOpenId(), + phonenumber:phone + } + UTIL.httpRequest(API.URL_POST_USERBAND, sendData,{ + success: (res) => { + if (res.code == API.SUCCESS_CODE) { + wx.navigateTo({ + url: '/pages/index/index', + }) + }else{ + UTIL.showToastNoneIcon(res.msg) + } + }, + fail: (res) => { + UTIL.showToastNoneIcon(API.MSG_FAIL_HTTP) + } + }); + console.log(sendData) + // + } + +}) \ No newline at end of file diff --git a/pages/user/login/login.json b/pages/user/login/login.json new file mode 100644 index 0000000..3ced4d8 --- /dev/null +++ b/pages/user/login/login.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "icon-loading":"/component/iconLoading/iconLoading" + }, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/pages/user/login/login.wxml b/pages/user/login/login.wxml new file mode 100644 index 0000000..8595723 --- /dev/null +++ b/pages/user/login/login.wxml @@ -0,0 +1,20 @@ + + + + + + 农村事项审批与记账 + 报账简单,操作便捷 + + + diff --git a/pages/user/login/login.wxss b/pages/user/login/login.wxss new file mode 100644 index 0000000..b7ebd37 --- /dev/null +++ b/pages/user/login/login.wxss @@ -0,0 +1,62 @@ +.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); + padding: 0; +} + +.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; +} \ No newline at end of file diff --git a/project.config.json b/project.config.json new file mode 100644 index 0000000..9d51a13 --- /dev/null +++ b/project.config.json @@ -0,0 +1,82 @@ +{ + "description": "项目配置文件", + "packOptions": { + "ignore": [ + { + "type": "file", + "value": ".eslintrc.js" + } + ] + }, + "setting": { + "urlCheck": false, + "es6": true, + "enhance": true, + "postcss": true, + "preloadBackgroundData": false, + "minified": true, + "newFeature": false, + "coverView": true, + "nodeModules": false, + "autoAudits": false, + "showShadowRootInWxmlPanel": true, + "scopeDataCheck": false, + "uglifyFileName": false, + "checkInvalidKey": true, + "checkSiteMap": false, + "uploadWithSourceMap": true, + "compileHotReLoad": false, + "lazyloadPlaceholderEnable": false, + "useMultiFrameRuntime": true, + "useApiHook": true, + "useApiHostProcess": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "useIsolateContext": true, + "userConfirmedBundleSwitch": false, + "packNpmManually": false, + "packNpmRelationList": [], + "minifyWXSS": true, + "disableUseStrict": false, + "minifyWXML": true, + "showES6CompileOption": false, + "useCompilerPlugins": false, + "ignoreUploadUnusedFiles": true + }, + "compileType": "miniprogram", + "libVersion": "2.21.1", + "appid": "wxaace54cc2cf8924b", + "projectname": "WXMB", + "debugOptions": { + "hidedInDevtools": [] + }, + "scripts": {}, + "staticServerOptions": { + "baseURL": "", + "servePath": "" + }, + "isGameTourist": false, + "condition": { + "search": { + "list": [] + }, + "conversation": { + "list": [] + }, + "game": { + "list": [] + }, + "plugin": { + "list": [] + }, + "gamePlugin": { + "list": [] + }, + "miniprogram": { + "list": [] + } + } +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json new file mode 100644 index 0000000..538d73f --- /dev/null +++ b/project.private.config.json @@ -0,0 +1,23 @@ +{ + "condition": { + "plugin": { + "list": [] + }, + "game": { + "list": [] + }, + "gamePlugin": { + "list": [] + }, + "miniprogram": { + "list": [ + { + "name": "pages/show/show", + "pathName": "pages/index/index", + "query": "", + "scene": null + } + ] + } + } +} \ No newline at end of file diff --git a/sitemap.json b/sitemap.json new file mode 100644 index 0000000..ca02add --- /dev/null +++ b/sitemap.json @@ -0,0 +1,7 @@ +{ + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [{ + "action": "allow", + "page": "*" + }] +} \ No newline at end of file diff --git a/style/iconfont.wxss b/style/iconfont.wxss new file mode 100644 index 0000000..e186a3c --- /dev/null +++ b/style/iconfont.wxss @@ -0,0 +1,42 @@ +@font-face { + font-family: "iconfont"; /* Project id 3051601 */ + src: url('//at.alicdn.com/t/font_3051601_80e3j4e5om7.woff2?t=1640658441847') format('woff2'), + url('//at.alicdn.com/t/font_3051601_80e3j4e5om7.woff?t=1640658441847') format('woff'), + url('//at.alicdn.com/t/font_3051601_80e3j4e5om7.ttf?t=1640658441847') format('truetype'); +} + +.iconfont { + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-bianji:before { + content: "\e63d"; +} + +.icon-caipinguanli:before { + content: "\e63f"; +} + +.icon-sousuo:before { + content: "\e62b"; +} + +.icon-jiantou:before { + content: "\e627"; +} + +.icon-jiantouyou:before { + content: "\e628"; +} + +.icon-jiantoushang:before { + content: "\e629"; +} + +.icon-guanbi:before { + content: "\e62a"; +} diff --git a/style/main.wxss b/style/main.wxss new file mode 100644 index 0000000..4518fc7 --- /dev/null +++ b/style/main.wxss @@ -0,0 +1,23 @@ +page { + /* 标准色 */ + --blue: #0f3f69; + --red: #ff4752; + --orange: #ffa601; + --golden: #d4b871; + --gray: #94969c; + --black: #444444; + --white: #fff; + --pale: #e7e7e7; + /* 浅色 */ + --orangeLight: #FFFAEB; + --blueLight: #155c99; + --redLight: #FF4752; + --grayLight: #e7e7e7; + --grayWhite: #f4f4f4; + /* 背景色 */ + --bgGrayWhite: #f4f4f4; + --bgGrayWhiteLight: #f8f8f8; + /* 渐变色 */ + + /* 阴影透明色 */ +} diff --git a/templates/global/global.js b/templates/global/global.js new file mode 100644 index 0000000..3db8765 --- /dev/null +++ b/templates/global/global.js @@ -0,0 +1,18 @@ + +function modalResult(event) { + const { result } = event.currentTarget.dataset; + const page = getCurrentPages(); + const currPage = page[page.length - 1]; + + currPage.setData({ + modalData: { + showFlag: false, + } + }); + + return result === '1'; +} + +export { + modalResult, +} \ No newline at end of file diff --git a/templates/global/global.wxml b/templates/global/global.wxml new file mode 100644 index 0000000..ab673b7 --- /dev/null +++ b/templates/global/global.wxml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/global/global.wxss b/templates/global/global.wxss new file mode 100644 index 0000000..6df2354 --- /dev/null +++ b/templates/global/global.wxss @@ -0,0 +1,167 @@ + + /** + * 提示层 - 没有更多了 + */ + + .noMore { + width: 100%; + font-size: 24rpx; + color: #CCC; + text-align: center; + padding: 20rpx 0; + padding-bottom: env(safe-area-inset-bottom); + } + + + /** + * 提示层 - 暂无数据 + */ + + .error-page-tpl { + position: fixed; + left: 0; + top: 35%; + width: 100%; + transform: translate(0, -50%); + display: flex; + flex-flow: column; + justify-content: center; + align-items: center; + z-index: 2; + } + + .error-page-tpl image { + width: 400rpx; + height: 400rpx; + } + + .error-page-tpl .error-tpl-msg { + margin-top: -30rpx; + font-size: 24rpx; + color: #999; + word-wrap: break-word; + word-break: normal; + width: 100%; + text-align: center; + } + .error-page-tpl .zb-back-live{ + display: block; + /* width: 192rpx; */ + height: 64rpx; + margin: 30rpx auto 0; + line-height: 64rpx; + text-align: center; + font-size: 30rpx; + color: var(--blueLight); + background: #fff; + border-radius: 32rpx; + border: 1rpx solid #7AA6CC; + padding: 0 32rpx; + } + + /** + * 全局 toast 提示层样式 + */ + + .toast-container { + position: fixed; + left: 0; + bottom: 20%; + width: 100%; + transform: translate(0, -50%); + transform: translate3d(0, -50%, 10000rpx); + z-index: 99999; + text-align: center; + overflow: hidden; + } + + .toast-container text { + display: inline-block; + padding: 20rpx; + font-size: 28rpx; + line-height: 1.2; + color: #FFF; + background: rgba(0, 0, 0, 0.8); + border-radius: 12rpx; + } + + .modal-container { + position: fixed; + left: 0; + top: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.5); + display: flex; + flex-flow: column; + justify-content: center; + align-items: center; + z-index: 9999; + transform: translateZ(100rpx); + } + + .modal-container .modal-msg-container { + width: 540rpx; + background: #FFF; + border-radius: 20rpx; + } + + .modal-container .modal-msg-container .modal-msg { + padding: 60rpx 20rpx; + line-height: 40rpx; + font-size: 32rpx; + color: #444; + text-align: center; + } + + .modal-container .modal-msg-container .modal-btn-container { + border-top: 2rpx solid #ededed; + width: 100%; + height: 96rpx; + font-size: 32rpx; + color: #444; + display: flex; + justify-content: center; + align-items: center; + overflow: hidden; + } + + .modal-container .modal-msg-container .modal-btn-container view { + flex: 1; + text-align: center; + line-height: 0; + padding: 48rpx; + } + + .modal-container .modal-msg-container .modal-btn-container .confirm-btn { + color: #FF4752; + } + + .modal-container .modal-msg-container .modal-btn-container .cancel-btn { + border-right: 2rpx solid #ededed; + } + + #global-loading { + z-index: 9999999; + position: fixed; + top: 0%; + left: 0%; + width: 100%; + height: 100%; + background-color: rgba(255, 255, 255, 0.5); + } + + #global-loading.hide-mask { + background: transparent; + } + + #global-loading image { + position: absolute; + top: 50%; + left: 50%; + width: 180rpx; + height: 180rpx; + -webkit-transform: translate(-90rpx, -90rpx); + transform: translate(-90rpx, -90rpx); + z-index: 99999999; + } \ No newline at end of file diff --git a/utils/API.js b/utils/API.js new file mode 100644 index 0000000..1f476a8 --- /dev/null +++ b/utils/API.js @@ -0,0 +1,54 @@ +let EVN_CONFIG = require('../env/env'); +// const DISTRIBUTE_ENVIROMENT = 'PROD'; +const DISTRIBUTE_ENVIROMENT = 'DEV'; + +let { + URL_PREFIX, +} = EVN_CONFIG[DISTRIBUTE_ENVIROMENT]; +//用户登录页面,接口检测用户token失效,需跳转重新登录 +const USER_LOGIN_PAGE_PATH='/pages/user/login/login'; +//接口成功 +const SUCCESS_CODE = 200; +//微信登陆失效 +const INVALID_USER_TOKEN_CODE = '001007'; + + +/****************接口提示信息start ****************/ +const MSG_FAIL_HTTP = '获取数据失败 fail'; +const MSG_ERROR_HTTP = '获取数据失败 error'; +const MSG_FALSE_HTTP = '获取数据失败 false'; +const MSG_NONE_HTTP = '暂无数据'; + +const MSG_FALSE_TO = '提交失败,请重试'; +const MSG_ERROR_TO = '提交异常,请重试'; +const MSG_INVALID_USER_TOKEN='登陆信息失效,请重新登陆'; +/****************接口提示信息end**************** + +/****************接口地址start****************/ +//获取openId +const URL_GET_OPENID=`${URL_PREFIX}/wechat/codeLogin`; +// 获取手机号解密接口 +const URL_POST_DECRYPTEDWXDATA = `${URL_PREFIX}/wechat/decryptedWXData`; +// 微信绑定手机号 +const URL_POST_USERBAND = `${URL_PREFIX}/register/wechat/band`; +//获取用户信息 +const URL_GET_GETINFO = `${URL_PREFIX}/getInfo`; + +/****************接口地址end****************/ + +export { + USER_LOGIN_PAGE_PATH, + SUCCESS_CODE, + INVALID_USER_TOKEN_CODE, + MSG_FAIL_HTTP, + MSG_ERROR_HTTP, + MSG_FALSE_HTTP, + MSG_NONE_HTTP, + MSG_FALSE_TO, + MSG_ERROR_TO, + MSG_INVALID_USER_TOKEN, + URL_GET_OPENID, + URL_POST_DECRYPTEDWXDATA, + URL_POST_USERBAND, + URL_GET_GETINFO +} \ No newline at end of file diff --git a/utils/storage.js b/utils/storage.js new file mode 100644 index 0000000..57b5a46 --- /dev/null +++ b/utils/storage.js @@ -0,0 +1,51 @@ + +/** + * 获取当前登录用户的 token + */ +function getToken() { + return wx.getStorageSync('token'); +} +/** + * 设置用户token + * @param {用户token} token + */ +function setToken(token) { + wx.setStorageSync('token', token); +} +/** + * 获取当前登录用户的 openId + */ +function getOpenId() { + return wx.getStorageSync('openId'); +} +/** + * 设置用户openId + * @param {用户openId} openId + */ +function setOpenId(openId) { + wx.setStorageSync('openId', openId); +} + +/** + * 获取当前登录用户的 sessionKey + */ +function getSessionKey() { + return wx.getStorageSync('sessionKey'); +} +/** + * 设置用户openId + * @param {用户openId} sessionKey + */ +function setSessionKey(sessionKey) { + wx.setStorageSync('sessionKey', sessionKey); +} + + +export { + getToken, + setToken, + getOpenId, + setOpenId, + getSessionKey, + setSessionKey +} diff --git a/utils/util.js b/utils/util.js new file mode 100644 index 0000000..16f7783 --- /dev/null +++ b/utils/util.js @@ -0,0 +1,364 @@ +import * as API from './API'; + +let APP = getApp(); +let FUNCTION_TEXT = 'function'; +/*判断是否iphonex*/ +function isIPhoneX() { + let screenHeight = wx.getSystemInfoSync().screenHeight + let bottom = wx.getSystemInfoSync().safeArea.bottom + return screenHeight !== bottom +} + +/*获取当前页url*/ +function getCurrentPageUrl() { + var pages = getCurrentPages() + var currentPage = pages[pages.length - 1] + var url = currentPage.route + return url +} + +/*获取当前页带参数的url*/ +function getCurrentPageUrlWithArgs() { + var pages = getCurrentPages() + var currentPage = pages[pages.length - 1] + var url = currentPage.route + var options = currentPage.options + var urlWithArgs = url + '?' + for (var key in options) { + var value = options[key] + urlWithArgs += key + '=' + value + '&' + } + urlWithArgs = urlWithArgs.substring(0, urlWithArgs.length - 1) + return urlWithArgs +} + +/** + * 无图标,纯文本Toast提示 + */ +function showToastNoneIcon(title) { + if (title == undefined || title == '') { + title = ''; + } + return wx.showToast({ + title: title, + icon: 'none', + }); +} +/** + * 显示Modal弹框(无取消按钮,只显示) + * @param {标题} title + * @param {内容} content + * @param {按钮文字,默认确定} confirmText + */ +function showModalNoneCancel(title, content, confirmText) { + wx.showModal({ + title: title, + showCancel: false, + content: content, + confirmText: (typeof confirmText == 'undefined' || confirmText == '') ? '确定' : confirmText, + success: function (e) { + + } + }) +} +/** + * 显示完整的Modal弹框提示 + * @param {标题} title + * @param {内容} content + * @param {确认} confirmText + * @param {取消} cancelText + * @param {回调} param4 + */ +function showModalOnClick(title, content, confirmText, cancelText, { confirm, cancel }) { + wx.showModal({ + title: title, + content: content, + confirmText: (typeof confirmText == 'undefined' || confirmText == '') ? '确定' : confirmText, + cancelText: (typeof cancelText == 'undefined' || cancelText == '') ? '取消' : cancelText, + success: function (e) { + if (e.confirm) { + confirm(); + } else if (e.cancel) { + cancel(); + } + + } + }) +} +/** + * 有背景图层的loading + * * @param {内容} content + */ +function showLoadingHaveMask(content) { + wx.showLoading({ + title: (typeof content == "undefined" || content == '') ? '加载中...' : content, + mask: true + }) +} +/** + * 隐藏loading + */ +function hideLoadingHaveMask() { + wx.hideLoading(); +} + +/** + * 全局通用网络请求方法,默认post传输 + */ +function httpRequest(url, data, { + success, + fail, + complete +}) { + wx.showNavigationBarLoading(); + let finalData = {}; + Object.assign(finalData, data); + // finalData.token = getApp().globalData.userInfo.token; + wx.request({ + url, + data: finalData, + method: data.method || 'POST', + timeout: 60000, + header: { + 'Authorization':'Bearer '+getApp().globalData.userInfo.token + }, + success: function (response) { + if (response.data && response.data._code == API.INVALID_USER_TOKEN_CODE) { + //微信登陆失效 + showToastNoneIcon(API.MSG_INVALID_USER_TOKEN); + wx.navigateTo({ + url: API.USER_LOGIN_PAGE_PATH, + }) + + } else if (typeof success === FUNCTION_TEXT) { + success(response.data); + } + }, + fail: function (response) { + if (typeof fail === FUNCTION_TEXT) { + fail(handleFail(response)); + } else { + showToastNoneIcon(API.MSG_FAIL_HTTP); + } + }, + complete: function (response) { + if (typeof complete === FUNCTION_TEXT) { + if (response.data && response.data._code == API.SUCCESS_CODE) { + complete(response.data); + } else { + complete(handleFail(response.data)); + } + } + wx.hideNavigationBarLoading(); + } + }) +} +/** + * 网络访问(无其他处理) + * @param {地址} url + * @param {参数} data + * @param {方法 get or post} method + * @param {回调} param3 + */ +function httpRequestNoneDetal(url, data, method, { + success, + fail, + complete +}) { + wx.showNavigationBarLoading(); + wx.request({ + url, + data: data, + method: method, + success: function (response) { + + if (typeof success === FUNCTION_TEXT) { + success(response.data); + } + }, + fail: function (response) { + if (typeof fail === FUNCTION_TEXT) { + fail(handleFail(response)); + } else { + showToastNoneIcon(API.MSG_FAIL_HTTP); + } + }, + complete: function (response) { + if (typeof complete === FUNCTION_TEXT) { + if (response.data && response.data._code == API.SUCCESS_CODE) { + complete(response.data); + } else { + complete(handleFail(response.data)); + } + } + wx.hideNavigationBarLoading(); + } + }) + +} +/** + * 调用失败 + */ +function handleFail(data = '') { + let { _msg = API.MSG_FAIL_HTTP, _code = 10001, _data = '', } = data; + return { + _code, + _data, + _msg + } +} +/** + * 微信授权 获取信息 + */ +// function initSQFromWX() { +// let that = this; +// wx.getSetting({ +// success(res) { + +// // if (res.authSetting['scope.userInfo']) { +// // console.log('个人信息:authSetting 已授权'); +// // } else { +// // console.log('个人信息:authSetting 未授权'); +// // } +// if (res.authSetting['scope.userLocation']) { +// //定位已开启,暂不做功能处理 +// console.log('定位:authSetting 已授权'); +// getApp().globalData.setInfo.locationOpenIdWX = true; +// } else { +// //定位未开启,申请授权 +// wx.authorize({ +// scope: 'scope.userLocation', +// success() { +// //定位已开启,暂不做功能处理 +// console.log('定位:wx.authorize success'); +// getApp().globalData.setInfo.locationOpenIdWX = true; +// } +// , +// fail() { +// //如果之前已经拒绝过,直接返回fail 不弹窗 +// console.log('定位:wx.authorize fail'); +// getApp().globalData.setInfo.locationOpenIdWX = false; +// wx.navigateTo({ +// url: '/pages/wxAuth/wxAuth', +// }) + +// } + +// }) + +// } +// }, +// fail(e) { +// }, +// complete() { +// } +// }); +// } + +/** + * 获取微信Code + */ +function getCOdeFromWX({ complate }) { + showLoadingHaveMask('正在加载数据..'); + wx.login({ + success: function (data) { + console.log(data) + complate(data.code); + hideLoadingHaveMask() + }, + fail: function (err) { + hideLoadingHaveMask(); + showModalNoneCancel("温馨提示", "登陆失败,建议请重新打开小程序") + } + }) +} +/** + * ,获取到的微信用户信息(昵称、头像、省市 赋值给globalData.wxUserInfo) + */ +function getUserInfoFomWX({ success }) { + wx.getUserProfile({ + desc: '用于完善会员资料', + success: res => { + getApp().globalData.wxUserInfo.nickName = res.userInfo.nickName; + getApp().globalData.wxUserInfo.avatarUrl = res.userInfo.avatarUrl; + //不再返回 强制返回“” + // getApp().globalData.wxUserInfo.province = res.userInfo.province; + // getApp().globalData.wxUserInfo.city = res.userInfo.city; + console.log("获取到个人信息:" + res.userInfo.nickName); + success(res); + + }, + complete: res => { + } + + }) +} +/** + * 获取地理位置 + * @param {回调} param0 + */ +function getLocationFromWX({ success, fail }) { + wx.getLocation({ + type: 'wgs84', + success(res) { + getApp().globalData.setInfo.latitude = res.latitude; + getApp().globalData.setInfo.longitude = res.longitude; + success(); + } + , fail(res) { + showToastNoneIcon('获取地理信息失败'); + fail(res); + } + }) + +} + + +function convert_length(length) { + return Math.round(wx.getSystemInfoSync().windowWidth * length / 750); +} +/** + * 比较版本号(参数'1.11.0', '1.9.9',返回1) + * @param {*} v1 + * @param {*} v2 + */ +function compareVersion(v1, v2) { + v1 = v1.split('.') + v2 = v2.split('.') + const len = Math.max(v1.length, v2.length) + + while (v1.length < len) { + v1.push('0') + } + while (v2.length < len) { + v2.push('0') + } + + for (let i = 0; i < len; i++) { + const num1 = parseInt(v1[i]) + const num2 = parseInt(v2[i]) + + if (num1 > num2) { + return 1 + } else if (num1 < num2) { + return -1 + } + } + return 0 + } +export { + getCurrentPageUrl, + getCurrentPageUrlWithArgs, + showToastNoneIcon, + showModalNoneCancel, + showModalOnClick, + showLoadingHaveMask, + hideLoadingHaveMask, + httpRequest, + httpRequestNoneDetal, + getCOdeFromWX, + getLocationFromWX, + getUserInfoFomWX, + convert_length, + isIPhoneX +}