From 5b2fbef1b7ae799042b9cb0af1d63e954083e9f5 Mon Sep 17 00:00:00 2001 From: guoxing <1369478551@qq.com> Date: Sat, 5 Aug 2023 17:23:50 +0800 Subject: [PATCH] 2023-8-5 --- supervise-uniapp/App.vue | 64 +- supervise-uniapp/common/TextUtils.js | 11 + supervise-uniapp/common/Toast.js | 8 + supervise-uniapp/common/config.js | 4 +- supervise-uniapp/common/request.api.js | 28 +- .../common/wxAuthLogin - 副本.js | 174 +++++ supervise-uniapp/common/wxAuthLogin.js | 106 +++ supervise-uniapp/common/wxSilentLogin.js | 94 +++ .../components/SendCodeItem/SendCodeItem.vue | 132 ++++ supervise-uniapp/main.js | 6 + supervise-uniapp/manifest.json | 11 +- supervise-uniapp/pages.json | 32 +- supervise-uniapp/pages/home/WorkFragment.vue | 30 +- supervise-uniapp/pages/index/BindPhone.vue | 176 +++++ .../pages/index/WarehouseManagement.vue | 14 - supervise-uniapp/pages/index/demoReportKc.vue | 4 +- supervise-uniapp/pages/login/login.vue | 33 +- supervise-uniapp/static/baseIcon/code.png | Bin 0 -> 1868 bytes supervise-uniapp/static/baseIcon/username.png | Bin 0 -> 1586 bytes .../src/api/system/userManage/index.js | 112 +-- .../src/views/userManage/userManageList.vue | 653 +++++++++--------- 21 files changed, 1270 insertions(+), 422 deletions(-) create mode 100644 supervise-uniapp/common/TextUtils.js create mode 100644 supervise-uniapp/common/Toast.js create mode 100644 supervise-uniapp/common/wxAuthLogin - 副本.js create mode 100644 supervise-uniapp/common/wxAuthLogin.js create mode 100644 supervise-uniapp/common/wxSilentLogin.js create mode 100644 supervise-uniapp/components/SendCodeItem/SendCodeItem.vue create mode 100644 supervise-uniapp/pages/index/BindPhone.vue create mode 100644 supervise-uniapp/static/baseIcon/code.png create mode 100644 supervise-uniapp/static/baseIcon/username.png diff --git a/supervise-uniapp/App.vue b/supervise-uniapp/App.vue index f073a238..7631e996 100644 --- a/supervise-uniapp/App.vue +++ b/supervise-uniapp/App.vue @@ -1,16 +1,76 @@ diff --git a/supervise-uniapp/common/TextUtils.js b/supervise-uniapp/common/TextUtils.js new file mode 100644 index 00000000..0efe36b3 --- /dev/null +++ b/supervise-uniapp/common/TextUtils.js @@ -0,0 +1,11 @@ +const isEmpty = (obj) => { + if (obj == undefined || obj == null || obj === "" || obj === "null") { + return true; + } else { + return false; + } +} + +export { + isEmpty +} \ No newline at end of file diff --git a/supervise-uniapp/common/Toast.js b/supervise-uniapp/common/Toast.js new file mode 100644 index 00000000..232e7b16 --- /dev/null +++ b/supervise-uniapp/common/Toast.js @@ -0,0 +1,8 @@ +const toast = (msg) => { + uni.showToast({ + title: msg, + icon: 'none' + }) +} + +export default toast diff --git a/supervise-uniapp/common/config.js b/supervise-uniapp/common/config.js index 557825b9..5b3780be 100644 --- a/supervise-uniapp/common/config.js +++ b/supervise-uniapp/common/config.js @@ -7,8 +7,8 @@ */ module.exports = { // baseUrl: 'https://jianguan.yyundong.com/api', - baseUrl: 'https://supervise.yxtsoft.com', - // baseUrl: 'http://192.168.1.193:8112', + // baseUrl: 'https://supervise.yxtsoft.com', + baseUrl: 'http://192.168.1.193:8112', tokenName: "Authorization", // 请求头中token的名字,与服务器端对应 loginTimeoutCode: "5001", // 登录超时或失效的情况下,服务器端返回的错误码 loginTimeoutPage: "/pages/login/index", // 登录超时或失效的情况下,跳转到的登录页面 diff --git a/supervise-uniapp/common/request.api.js b/supervise-uniapp/common/request.api.js index 6a638fdb..1c365da2 100644 --- a/supervise-uniapp/common/request.api.js +++ b/supervise-uniapp/common/request.api.js @@ -1,11 +1,17 @@ import request from '@/utils/requester.js' export default { - login: (params = {}) => request.post("/api/portal/v1/sysuser/login", params), + login: (params = {}) => request.post("/portal/v1/sysuser/login", params), sayhello: (params = {}) => request.get("/sayb", params), getSalesReport: (params = {}) => request.get("/system/reportCenter/getSalesReport", params), getGoodsOnWay: (params = {}) => request.get("/system/reportCenter/getGoodsOnWay", params), getThresholdAnalysis: (params = {}) => request.get("/system/risk/getThresholdAnalysis", params), + // 获取 验证码 + sendVerificationCode: (params = {}) => request.get("/portal/v1/wxuser/sendVerificationCode/" + params.phone + "/" + + params.type, params), + + // 绑定手机号 + wxBindMobile: (params = {}) => request.post("/portal/v1/wxuser/wxBindMobile",params), // 查看预警信息 selectBusinessRiskInfo: (params = {}) => request.post("/wxmpapi/v1/businessData/selectBusinessRiskInfo", params), @@ -15,7 +21,7 @@ export default { params), // 获取今日回款明细 getCsmReportTodayByComSid: (params = {}) => request.post( - "/reportwxmpapi/reportwxmpapi/v1/csmcashreportsales/getCsmReportYesterdayByComSid", + "/reportwxmpapi/reportwxmpapi/v1/csmcashreportcashed/getCsmReportTodayByComSid", params), // 获取昨日销售报表 getCsmReportYesterdayByComSid: (params = {}) => request.post( @@ -35,36 +41,36 @@ export default { // 质物库存汇总-表头 getDayGather: (params = {}) => request.get( "/reportwxmpapi/reportstock/getDayGather/" + params.projectSid + "/" + params.orderDate, params), - // "/report/reportstock/getDayGather/" + params.projectSid + "/" + params.orderDate, params), + // "/report/reportstock/getDayGather/" + params.projectSid + "/" + params.orderDate, params), // 质物库存汇总-仓库列表 getDayStore: (params = {}) => request.get( "/reportwxmpapi/reportstock/getDayStore/" + params.projectSid + "/" + params.orderDate, params), - // "/report/reportstock/getDayStore/" + params.projectSid + "/" + params.orderDate, params), + // "/report/reportstock/getDayStore/" + params.projectSid + "/" + params.orderDate, params), // 质物库存汇总-明细 getDayProduct: (params = {}) => request.get( "/reportwxmpapi/reportstock/getDayProduct/" + params, params), - // "/report/reportstock/getDayProduct/" + params, params), + // "/report/reportstock/getDayProduct/" + params, params), // 获取首页面数据 - getWorkData: (params = {}) => request.get("/api/portal/v1/flow/task/" + params, params), + getWorkData: (params = {}) => request.get("/portal/v1/flow/task/" + params, params), // 获取云仓列表 - storeHouseListPage: (params = {}) => request.post("/api/portal/v1/flow/storeHouseListPage", params), + storeHouseListPage: (params = {}) => request.post("/portal/v1/flow/storeHouseListPage", params), // 获取云仓详情 - storeHouseDetail: (params = {}) => request.get("/api/portal/v1/flow/fetchDetailsBySid/" + params, params), + storeHouseDetail: (params = {}) => request.get("/portal/v1/flow/fetchDetailsBySid/" + params, params), // 获取我的项目 - getProjectByUserSid: (params = {}) => request.get("/api/crm/v1/projectinformation/getProjectByUserSid/" + params, + getProjectByUserSid: (params = {}) => request.get("/crm/v1/projectinformation/getProjectByUserSid/" + params, params), // 获取我的项目详情 - getProjectBySid: (params = {}) => request.get("/api/crm/v1/projectinformation/getProjectBySid/" + params, + getProjectBySid: (params = {}) => request.get("/crm/v1/projectinformation/getProjectBySid/" + params, params), // 获取我的项目-仓库详情 - getStorehouseBySid: (params = {}) => request.get("/api/crm/v1/projectinformation/getStorehouseBySid/" + params, + getStorehouseBySid: (params = {}) => request.get("/crm/v1/projectinformation/getStorehouseBySid/" + params, params), } \ No newline at end of file diff --git a/supervise-uniapp/common/wxAuthLogin - 副本.js b/supervise-uniapp/common/wxAuthLogin - 副本.js new file mode 100644 index 00000000..7a3115a1 --- /dev/null +++ b/supervise-uniapp/common/wxAuthLogin - 副本.js @@ -0,0 +1,174 @@ +import { + isEmpty +} from './TextUtils.js' + +const wxAuthLogin = () => { + // 判断是否已经登陆 + if (getApp().globalData.isLogin) { + return new Promise((resolve, reject) => { + resolve(getApp().globalData.sysUserSid) + }) + } + + return new Promise((resolve, reject) => { + // 授权登录 + wx.login({ + // 未配置 onlyAuthorize 的情况下调用此接口,code 值不返回,用以换取 authResult 。 + // 配置 onlyAuthorize 会把未使用过的 code 值返回, + onlyAuthorize:true, + success: function(res) { + console.log('Http网络请求res',res) + if (res.code) { + + if (getApp().globalData.isDebug) { + console.log('Http网络请求info', { + "wxCode": res.code + }) + } + uni.showLoading({ + title: '加载中...', + mask: true + }); + + uni.request({ + // 组装请求地址 + url: getApp().globalData.wxAuthLoginURL, + // 请求方式 GET POST + method: "GET", + header: { + // 传参方式 + 'content-type': "application/x-www-form-urlencoded" + }, + // 具体参数 + data: { + "wxCode": res.code + }, + + success: res => { + + // 关闭显示框 + uni.hideLoading(); + + console.log(res) + + if (getApp().globalData.isDebug) { + console.log('Http网络路径', getApp().globalData.wxAuthLoginURL) + console.log('Http网络请求结果', JSON.parse(JSON.stringify( + res.data))) + } + + + if (res.statusCode == 200) { + // 下面是接口返回的数据 + if (!res.data.success) { + if ("A01001" == res.data.code || "A01002" == res.data.code ) { + // 绑定手机号 + uni.navigateTo({ + url: '../index/BindPhone?sysUserWxAuthSid=' + res.data.data + }) + // reject("绑定手机号") + } + else { + // 错误提示 + if (isEmpty(res.data)) { + // 未成功获取到服务器返回的json + uni.showToast({ + // 不能超过7个字 + title: "服务器响应为空", + icon: "error" + }) + reject("服务器响应为空") + } else { + + let errorMsg = res.data.msg + + if (isEmpty(errorMsg)) { + errorMsg = url+"服务器未返回错误信息" + } + + uni.showToast({ + title: errorMsg, + // 保证文字长度 + icon: "none", + duration: 3000 + }) + } + + reject(errorMsg) + } + return + } + + // 保存 + uni.setStorageSync("sysUserSid", res.data.data.sysUserSid); + uni.setStorageSync("isLogin", res.data.data.isLogin); + getApp().globalData.isLogin = res.data.data.isLogin + getApp().globalData.sysUserSid = res.data.data.sysUserSid + getApp().globalData.token = res.data.data.token + + // 直接返回Response + resolve(getApp().globalData.sysUserSid) + + + } else { + + uni.showToast({ + title: res.statusCode + ":" + res + .errMsg, + // 保证文字长度 + icon: "none", + duration: 3000 + }) + + reject(res.errMsg) + } + + }, + fail: (err) => { + // 关闭显示框 + uni.hideLoading(); + + if (getApp().globalData.isDebug) { + console.log("Http网络请求fail", err) + } + + + uni.showToast({ + title: '请检查网络', + icon: 'error' + }) + + reject(err) + + }, + complete: () => { + + } + }); + + + } else { + + uni.showToast({ + title: "授权登录获取code失败:" + res.errMsg, + icon: 'none' + }) + + reject(res.errMsg) + } + }, + fail: function(res) { + uni.showToast({ + title: "授权登录失败:" + res.errMsg, + icon: 'none' + }) + + reject(res.errMsg) + } + }); + + }) + +} + +export default wxAuthLogin diff --git a/supervise-uniapp/common/wxAuthLogin.js b/supervise-uniapp/common/wxAuthLogin.js new file mode 100644 index 00000000..899c6090 --- /dev/null +++ b/supervise-uniapp/common/wxAuthLogin.js @@ -0,0 +1,106 @@ +import { + isEmpty +} from './TextUtils.js' + +const wxAuthLogin = () => { + // 判断是否已经登陆 + if (getApp().globalData.isLogin) { + return new Promise((resolve, reject) => { + resolve(getApp().globalData.sysUserSid) + }) + } + + return new Promise((resolve, reject) => { + // 获取信息 + // 获取用户信息 + uni.getUserProfile({ + desc: '获取基本信息', + success: function(infoRes) { + + _this.data.nickName = infoRes.userInfo.nickName; + _this.data.gender = infoRes.userInfo.gender == 1 ? "男" : "女"; + _this.data.oauthHeadImg = infoRes.userInfo.avatarUrl; + _this.data.fromkey = "WeiXin"; + + uni.login({ + provider: 'weixin', + success: function(loginRes) { + + uni.request({ + url: getApp().globalData.wxAuthLoginURL + + "?wxCode=" + loginRes + .code, + method: "GET", + header: { + // 传参方式 + 'content-type': "application/x-www-form-urlencoded" + }, + // 具体参数 + data: { + "wxCode": loginRes.code + }, + }).then((res) => { + console.log(res) + + _this.data.openid = res.data.openid; + _this.data.unionId = res.data.unionid; + + // _this.HTTP({ + // url: "oauth/afterlogin", + // data: { + // "openid": _this.data.openid, + // "unionId": _this.data.unionId, + // "nickName": _this.data.nickName, + // "gender": _this.data.gender, + // "oauthHeadImg": _this.data + // .oauthHeadImg, + // "fromkey": _this.data.fromkey + // }, + // loading: true + // }).then((res) => { + // // 保存 + // _this.WritePreference("memberSid", + // res.data + // .memberSid) + // getApp().globalData.isLogin = true + // getApp().globalData.memberSid = res + // .data + // .memberSid + // // $emit 触发事件 (主要返回给webviwew页面) + // uni.$emit('login', res.data + // .memberSid) + // _this.Back() + // }, (err) => { + // if (err.data != null) { + // err.data.cookie = _this + // .ReplaceAll(err.data.cookie, + // "=", "-") + // uni.redirectTo({ + // url: "./BdtelephoneActivity?cookie=" + + // err.data.cookie + // }) + // } + // }) + + }, (err) => { + // 错误提示 + _this.Toast("出错了:" + err.data.errmsg) + }) + + }, + fail: function(err) { + _this.Toast(err) + } + }); + }, + fail: function(err) { + // 用户拒绝 + _this.Toast(err.errMsg) + } + }); + + }) + +} + +export default wxAuthLogin \ No newline at end of file diff --git a/supervise-uniapp/common/wxSilentLogin.js b/supervise-uniapp/common/wxSilentLogin.js new file mode 100644 index 00000000..48dac231 --- /dev/null +++ b/supervise-uniapp/common/wxSilentLogin.js @@ -0,0 +1,94 @@ +// 静默登录 +import { + isEmpty +} from './TextUtils.js' +const wxSilentLogin = () => { + return new Promise((resolve, reject) => { + wx.login({ + success: function(res) { + if (res.code) { + if (getApp().globalData.isDebug) { + console.log('Http网络请求信息', { + "wxCode": res.code + }) + } + uni.request({ + // 组装请求地址 + url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res + .code, + // 请求方式 GET POST + method: "GET", + header: { + // 传参方式 + 'content-type': "application/x-www-form-urlencoded" + }, + // 具体参数 + data: { + "wxCode": res.code + }, + success: res => { + console.log(res) + // if (getApp().globalData.isDebug) { + // console.log('Http网络路径', getApp().globalData + // .wxSilentLoginURL) + // } + if (res.statusCode == 200) { + if (!res.data.success) { + + if (res.data.code == 500) { + // 未关注小程序 首次登录 也无账号 + uni.showToast({ + title: "您的平台应用未被授权,请联系工作人员。", + icon: 'none', + duration: 3000, + }) + wx.exitMiniProgram({ + success: function() {}, + fail: function() {} + }) + return + } + + if (res.data.code == 100) { + // 有账号 未绑定用户 + uni.redirectTo({ + url: '../index/BindPhone?sysUserWxAuthSid=' + + res.data.data + }) + } + + } else { + console.log("Http网络请求res", res) + console.log("Global-Auth-Token", res.data.data.token) + uni.setStorageSync("Global-Auth-Token", res.data.data.token) + getApp().globalData.username = res.data.data.userName + getApp().globalData.token = res.data.data.token + getApp().globalData.sid = res.data.data.sid + getApp().globalData.mobile = res.data.data.mobile + getApp().globalData.isLogin= true + } + } else { + getApp().globalData.isLogin = false + } + }, + fail: (err) => { + if (getApp().globalData.isDebug) { + console.log("Http网络请求fail", err) + } + }, + complete: () => {} + }); + } + }, + fail: function(res) { + uni.showToast({ + title: "静默登录失败:" + res.errMsg, + icon: 'none' + }) + + reject(res.errMsg) + } + }); + }) +} +export default wxSilentLogin \ No newline at end of file diff --git a/supervise-uniapp/components/SendCodeItem/SendCodeItem.vue b/supervise-uniapp/components/SendCodeItem/SendCodeItem.vue new file mode 100644 index 00000000..81797f35 --- /dev/null +++ b/supervise-uniapp/components/SendCodeItem/SendCodeItem.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/supervise-uniapp/main.js b/supervise-uniapp/main.js index 5e452b16..ce2c43ec 100644 --- a/supervise-uniapp/main.js +++ b/supervise-uniapp/main.js @@ -1,5 +1,8 @@ import Vue from 'vue' import App from './App' +import toast from './common/Toast.js' +import wxAuthLogin from './common/wxAuthLogin.js' +import wxSilentLogin from './common/wxSilentLogin.js' // vuex import store from './store' // 引入全局uView @@ -17,6 +20,9 @@ Vue.mixin(mixin) import api from '@/common/request.api.js' Vue.prototype.$api = api +Vue.prototype.WxSilentLogin = wxSilentLogin +Vue.prototype.WxAuthLogin = wxAuthLogin +Vue.prototype.Toast = toast Vue.config.productionTip = false App.mpType = 'app' diff --git a/supervise-uniapp/manifest.json b/supervise-uniapp/manifest.json index 64e1581c..c7e6e491 100644 --- a/supervise-uniapp/manifest.json +++ b/supervise-uniapp/manifest.json @@ -28,7 +28,8 @@ "Camera" : {}, "Barcode" : {}, "Contacts" : {}, - "Push" : {} + "Push" : {}, + "OAuth" : {} }, "distribute" : { "android" : { @@ -73,7 +74,13 @@ "appkey_android" : "" } }, - "push" : {} + "push" : {}, + "oauth" : { + "weixin" : { + "appid" : "__UNI__DD73AA7", + "UniversalLinks" : "" + } + } }, "icons" : { "android" : { diff --git a/supervise-uniapp/pages.json b/supervise-uniapp/pages.json index 703cebea..5ff64daa 100644 --- a/supervise-uniapp/pages.json +++ b/supervise-uniapp/pages.json @@ -10,7 +10,13 @@ "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages - +{ + "path": "pages/index/InventorySummary", + "style": { + "navigationBarTitleText": "质物库存汇总" + } + }, + /* #ifdef APP-PLUS */ { "path": "pages/login/login", "style": { @@ -19,11 +25,22 @@ "scrollIndicator": false //禁用原生导航栏, } } - },{ - "path": "pages/index/InventorySummary", + }, + /* #endif */ + + { + "path": "pages/home/WorkFragment", "style": { - "navigationBarTitleText": "质物库存汇总" + "navigationBarTitleText": "工作台" } + }, + + { + "path": "pages/index/BindPhone", + "style": { + "navigationBarTitleText": "绑定手机号" + } + }, { "path": "pages/index/WaitingProcessed", "style": { @@ -38,7 +55,7 @@ "enablePullDownRefresh": true } - }, + }, { "path": "pages/index/InventorySummaryDetail", "style": { @@ -85,11 +102,6 @@ "navigationBarTitleText": "个人中心" } - }, { - "path": "pages/home/WorkFragment", - "style": { - "navigationBarTitleText": "工作台" - } }, { "path": "pages/index/WarehouseManagement", "style": { diff --git a/supervise-uniapp/pages/home/WorkFragment.vue b/supervise-uniapp/pages/home/WorkFragment.vue index e6e2de19..279db8ac 100644 --- a/supervise-uniapp/pages/home/WorkFragment.vue +++ b/supervise-uniapp/pages/home/WorkFragment.vue @@ -145,10 +145,10 @@ export default { data() { return { - dbNum: 1, - ybNum: 1, - dyNum: 1, - yyNum: 1, + dbNum: 0, + ybNum: 0, + dyNum: 0, + yyNum: 0, animateUp: false, timer: null, textArr: [ @@ -184,14 +184,17 @@ // }, onShow() { - var userSid = getApp().globalData.sid - console.log(">>>>>", userSid) - this.getData(userSid) - - uni.setTabBarBadge({ //显示数字 - index: 0, //tabbar下标 - text: '100' //数字 - }) + setTimeout(() => { + if (getApp().globalData.isLogin) { + var userSid = getApp().globalData.sid + console.log(">>>>>", userSid) + this.getData(userSid) + uni.setTabBarBadge({ //显示数字 + index: 0, //tabbar下标 + text: '100' //数字 + }) + } + }, 1000) // uni.removeTabBarBadge({ //隐藏数字标 // index:2 // }) @@ -217,6 +220,9 @@ }, getData(userSid) { + + // let data = await axios.get('/api/portal/v1/flow/task/'+userSid) + // console.log('data', data) var _this = this console.log("getData>>>>>", userSid) this.$api.getWorkData(userSid).then((resp) => { diff --git a/supervise-uniapp/pages/index/BindPhone.vue b/supervise-uniapp/pages/index/BindPhone.vue new file mode 100644 index 00000000..7e382623 --- /dev/null +++ b/supervise-uniapp/pages/index/BindPhone.vue @@ -0,0 +1,176 @@ + + + + + \ No newline at end of file diff --git a/supervise-uniapp/pages/index/WarehouseManagement.vue b/supervise-uniapp/pages/index/WarehouseManagement.vue index 58e561da..56ab4579 100644 --- a/supervise-uniapp/pages/index/WarehouseManagement.vue +++ b/supervise-uniapp/pages/index/WarehouseManagement.vue @@ -61,24 +61,10 @@ export default { data() { return { - // href: '', - // gv: {}, // resinfo: '' } }, - onLoad() { - this.initData() - }, methods: { - initData() { - this.gv = getApp().globalData - console.log('hasLogin', this.$store.getters.hasLogin) - console.log('token', this.$store.getters.token) - console.log('uinfo', this.$store.getters.userinfo) - console.log('uinfo-id', this.$store.getters.userinfo.userid) - console.log('uinfo-name', this.$store.getters.userinfo.name) - getApp().globalData.uinfo = this.$store.getters.userinfo - }, // sayhello() { // this.$api.sayhello({name:'mynameislll'}).then(res => { // this.resinfo = res diff --git a/supervise-uniapp/pages/index/demoReportKc.vue b/supervise-uniapp/pages/index/demoReportKc.vue index 6311a034..630fbed4 100644 --- a/supervise-uniapp/pages/index/demoReportKc.vue +++ b/supervise-uniapp/pages/index/demoReportKc.vue @@ -204,7 +204,7 @@ components: {}, data() { return { - date: "2023-06-25", + date: "", tableData1: [], logInfo: { title: "", @@ -227,7 +227,7 @@ }, onLoad(option) { - // this.date = option.orderDate + this.date = option.orderDate this.getData() diff --git a/supervise-uniapp/pages/login/login.vue b/supervise-uniapp/pages/login/login.vue index 35c8b0a7..26a94d61 100644 --- a/supervise-uniapp/pages/login/login.vue +++ b/supervise-uniapp/pages/login/login.vue @@ -98,11 +98,11 @@ - ───── 第三方登录方式 ───── + @@ -210,15 +210,17 @@ } console.log('MMMM:', resp) - getApp().globalData = resp - // getApp().globalData.username = uinfo.name - // getApp().globalData.token = uinfo.token - // getApp().globalData.sid = uinfo.sid - // getApp().globalData.mobile = uinfo.mobile - // getApp().globalData.name = uinfo.name - // getApp().globalData.isAdmin = uinfo.isAdmin - // getApp().globalData.roleName = uinfo.roleName - // getApp().globalData.staffSid = uinfo.staffSid + // getApp().globalData = resp + uni.setStorageSync("Global-Auth-Token", uinfo.token) + getApp().globalData.username = uinfo.name + getApp().globalData.token = uinfo.token + getApp().globalData.sysUserSid = uinfo.sid + getApp().globalData.mobile = uinfo.mobile + getApp().globalData.name = uinfo.name + getApp().globalData.isAdmin = uinfo.isAdmin + getApp().globalData.roleName = uinfo.roleName + getApp().globalData.staffSid = uinfo.staffSid + getApp().globalData.isLogin= true console.log('gd--:', getApp().globalData) // uni.redirectTo({ // url: '/pages/index/index', @@ -314,6 +316,14 @@ icon: 'none', title: '暂不支持' }); + // if(!this.selectType){ + // uni.showToast({ + // icon: 'none', + // title: '请阅读并同意勾选"用户协议"和"隐私政策"' + // }); + // return false; + // } + // this.WxAuthLogin(); }, }, @@ -430,6 +440,7 @@ } .btn { + margin-bottom: 50px; width: 70%; margin-top: 35px; border-radius: 5px; diff --git a/supervise-uniapp/static/baseIcon/code.png b/supervise-uniapp/static/baseIcon/code.png new file mode 100644 index 0000000000000000000000000000000000000000..559c9844815b346ac1f284f8f2e887ee52b039de GIT binary patch literal 1868 zcmV-S2ebHzP)2!r>Cb+c6N5& zNhwd8YZKAcdcA&qb#-+&=bmN-0H-d5cqfF|^9Xq>gm^tC8)gCE{QUe-O8G`gc^GrL zM08C=Z!a$|uVdaH^3J3Hgajv|_iO`Rd4yP%W%+(eASMAoYyEDR7~oFMiKxo zU%uQc%knu9!KlHY`A)jpOSItj=3{~2ako$tDdlyRW#3ZR;ROJvOGMAIEW>XI3q5@j zi86G2X^eqh4}O$VuqR-I(?-|}5D{VtFyy){OZ@)jW62f(tcPz>cTGgUgb=I6VzEp) zfs}Q?z=wwi0C6m(e3mkn-+gP_pB4a2yWa^D-#}<0S`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