diff --git a/miniprogram/app.js b/miniprogram/app.js index 50a8a54..a039298 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -19,6 +19,8 @@ }, globalData: { httpsUrl: "https://logapi.smartlog.work/", + // httpsUrl: "http:/111.198.10.15:11413/", + // httpsUrl: "http://139.198.18.188:8083/", // url: "http://127.0.0.1:8083/", //httpsUrl: "http://127.0.0.1:8083/", diff --git a/miniprogram/app.js b/miniprogram/app.js index 50a8a54..a039298 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -19,6 +19,8 @@ }, globalData: { httpsUrl: "https://logapi.smartlog.work/", + // httpsUrl: "http:/111.198.10.15:11413/", + // httpsUrl: "http://139.198.18.188:8083/", // url: "http://127.0.0.1:8083/", //httpsUrl: "http://127.0.0.1:8083/", diff --git a/miniprogram/pages/login/login.js b/miniprogram/pages/login/login.js index cb0542a..e1fa434 100644 --- a/miniprogram/pages/login/login.js +++ b/miniprogram/pages/login/login.js @@ -96,7 +96,11 @@ wx.hideToast(); } }, - + //登录 +// loginCheck: async function() { +// await this.loginClick(); +// await this.loginValidate(); +// }, //注册 loginClick: function () { var that = this @@ -122,18 +126,25 @@ attr: nickname, openid: app.globalData.openid }, - success: function (res) { + success: function (res) {//注册成功 that.hideLoading(); - wx.showToast({ - title: res.data.data+",\r\n请从正式版入口登录!", - icon: 'none', - duration: 2000 - }) - + // wx.showToast({ + // title: res.data.data+",\r\n请从正式版入口登录!", + // icon: 'none', + // duration: 2000 + // }) + that.loginValidate() // //授权成功后跳转 // wx.switchTab({ // url: '../indexapp/indexapp' // }) + }, + fail: function() {//注册失败 + wx.showToast({ + icon: 'none', + title: '请联系管理员授权', + duration: 2000 + }) } }) }, @@ -172,6 +183,7 @@ }, success: function (res) { app.globalData.openid = res.data.data + console.log('openid', app.globalData.openid, res.data.data); wx.request({ url: app.globalData.httpsUrl + "appUserOpenid/validate", data: { @@ -187,11 +199,12 @@ url: '../notice/notice' }) } else { - wx.showToast({ - icon: 'none', - title: '请联系管理员授权', - duration: 2000 - }) + that.loginClick();//注册 + // wx.showToast({ + // icon: 'none', + // title: '请联系管理员授权', + // duration: 2000 + // }) } }, fail: function (err) { diff --git a/miniprogram/app.js b/miniprogram/app.js index 50a8a54..a039298 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -19,6 +19,8 @@ }, globalData: { httpsUrl: "https://logapi.smartlog.work/", + // httpsUrl: "http:/111.198.10.15:11413/", + // httpsUrl: "http://139.198.18.188:8083/", // url: "http://127.0.0.1:8083/", //httpsUrl: "http://127.0.0.1:8083/", diff --git a/miniprogram/pages/login/login.js b/miniprogram/pages/login/login.js index cb0542a..e1fa434 100644 --- a/miniprogram/pages/login/login.js +++ b/miniprogram/pages/login/login.js @@ -96,7 +96,11 @@ wx.hideToast(); } }, - + //登录 +// loginCheck: async function() { +// await this.loginClick(); +// await this.loginValidate(); +// }, //注册 loginClick: function () { var that = this @@ -122,18 +126,25 @@ attr: nickname, openid: app.globalData.openid }, - success: function (res) { + success: function (res) {//注册成功 that.hideLoading(); - wx.showToast({ - title: res.data.data+",\r\n请从正式版入口登录!", - icon: 'none', - duration: 2000 - }) - + // wx.showToast({ + // title: res.data.data+",\r\n请从正式版入口登录!", + // icon: 'none', + // duration: 2000 + // }) + that.loginValidate() // //授权成功后跳转 // wx.switchTab({ // url: '../indexapp/indexapp' // }) + }, + fail: function() {//注册失败 + wx.showToast({ + icon: 'none', + title: '请联系管理员授权', + duration: 2000 + }) } }) }, @@ -172,6 +183,7 @@ }, success: function (res) { app.globalData.openid = res.data.data + console.log('openid', app.globalData.openid, res.data.data); wx.request({ url: app.globalData.httpsUrl + "appUserOpenid/validate", data: { @@ -187,11 +199,12 @@ url: '../notice/notice' }) } else { - wx.showToast({ - icon: 'none', - title: '请联系管理员授权', - duration: 2000 - }) + that.loginClick();//注册 + // wx.showToast({ + // icon: 'none', + // title: '请联系管理员授权', + // duration: 2000 + // }) } }, fail: function (err) { diff --git a/miniprogram/project.config.json b/miniprogram/project.config.json index 4a797a9..e6caf64 100644 --- a/miniprogram/project.config.json +++ b/miniprogram/project.config.json @@ -1,5 +1,5 @@ { - "appid": "wx79419f886f8c77ef", + "appid": "wx8f4b331065a9ac2e", "compileType": "miniprogram", "libVersion": "2.27.3", "packOptions": { diff --git a/miniprogram/app.js b/miniprogram/app.js index 50a8a54..a039298 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -19,6 +19,8 @@ }, globalData: { httpsUrl: "https://logapi.smartlog.work/", + // httpsUrl: "http:/111.198.10.15:11413/", + // httpsUrl: "http://139.198.18.188:8083/", // url: "http://127.0.0.1:8083/", //httpsUrl: "http://127.0.0.1:8083/", diff --git a/miniprogram/pages/login/login.js b/miniprogram/pages/login/login.js index cb0542a..e1fa434 100644 --- a/miniprogram/pages/login/login.js +++ b/miniprogram/pages/login/login.js @@ -96,7 +96,11 @@ wx.hideToast(); } }, - + //登录 +// loginCheck: async function() { +// await this.loginClick(); +// await this.loginValidate(); +// }, //注册 loginClick: function () { var that = this @@ -122,18 +126,25 @@ attr: nickname, openid: app.globalData.openid }, - success: function (res) { + success: function (res) {//注册成功 that.hideLoading(); - wx.showToast({ - title: res.data.data+",\r\n请从正式版入口登录!", - icon: 'none', - duration: 2000 - }) - + // wx.showToast({ + // title: res.data.data+",\r\n请从正式版入口登录!", + // icon: 'none', + // duration: 2000 + // }) + that.loginValidate() // //授权成功后跳转 // wx.switchTab({ // url: '../indexapp/indexapp' // }) + }, + fail: function() {//注册失败 + wx.showToast({ + icon: 'none', + title: '请联系管理员授权', + duration: 2000 + }) } }) }, @@ -172,6 +183,7 @@ }, success: function (res) { app.globalData.openid = res.data.data + console.log('openid', app.globalData.openid, res.data.data); wx.request({ url: app.globalData.httpsUrl + "appUserOpenid/validate", data: { @@ -187,11 +199,12 @@ url: '../notice/notice' }) } else { - wx.showToast({ - icon: 'none', - title: '请联系管理员授权', - duration: 2000 - }) + that.loginClick();//注册 + // wx.showToast({ + // icon: 'none', + // title: '请联系管理员授权', + // duration: 2000 + // }) } }, fail: function (err) { diff --git a/miniprogram/project.config.json b/miniprogram/project.config.json index 4a797a9..e6caf64 100644 --- a/miniprogram/project.config.json +++ b/miniprogram/project.config.json @@ -1,5 +1,5 @@ { - "appid": "wx79419f886f8c77ef", + "appid": "wx8f4b331065a9ac2e", "compileType": "miniprogram", "libVersion": "2.27.3", "packOptions": { diff --git a/miniprogram/project.private.config.json b/miniprogram/project.private.config.json index 7bbb91d..52f59e5 100644 --- a/miniprogram/project.private.config.json +++ b/miniprogram/project.private.config.json @@ -1,7 +1,7 @@ { "projectname": "miniprogram", "setting": { - "compileHotReLoad": true, + "compileHotReLoad": false, "urlCheck": true }, "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", diff --git a/miniprogram/app.js b/miniprogram/app.js index 50a8a54..a039298 100644 --- a/miniprogram/app.js +++ b/miniprogram/app.js @@ -19,6 +19,8 @@ }, globalData: { httpsUrl: "https://logapi.smartlog.work/", + // httpsUrl: "http:/111.198.10.15:11413/", + // httpsUrl: "http://139.198.18.188:8083/", // url: "http://127.0.0.1:8083/", //httpsUrl: "http://127.0.0.1:8083/", diff --git a/miniprogram/pages/login/login.js b/miniprogram/pages/login/login.js index cb0542a..e1fa434 100644 --- a/miniprogram/pages/login/login.js +++ b/miniprogram/pages/login/login.js @@ -96,7 +96,11 @@ wx.hideToast(); } }, - + //登录 +// loginCheck: async function() { +// await this.loginClick(); +// await this.loginValidate(); +// }, //注册 loginClick: function () { var that = this @@ -122,18 +126,25 @@ attr: nickname, openid: app.globalData.openid }, - success: function (res) { + success: function (res) {//注册成功 that.hideLoading(); - wx.showToast({ - title: res.data.data+",\r\n请从正式版入口登录!", - icon: 'none', - duration: 2000 - }) - + // wx.showToast({ + // title: res.data.data+",\r\n请从正式版入口登录!", + // icon: 'none', + // duration: 2000 + // }) + that.loginValidate() // //授权成功后跳转 // wx.switchTab({ // url: '../indexapp/indexapp' // }) + }, + fail: function() {//注册失败 + wx.showToast({ + icon: 'none', + title: '请联系管理员授权', + duration: 2000 + }) } }) }, @@ -172,6 +183,7 @@ }, success: function (res) { app.globalData.openid = res.data.data + console.log('openid', app.globalData.openid, res.data.data); wx.request({ url: app.globalData.httpsUrl + "appUserOpenid/validate", data: { @@ -187,11 +199,12 @@ url: '../notice/notice' }) } else { - wx.showToast({ - icon: 'none', - title: '请联系管理员授权', - duration: 2000 - }) + that.loginClick();//注册 + // wx.showToast({ + // icon: 'none', + // title: '请联系管理员授权', + // duration: 2000 + // }) } }, fail: function (err) { diff --git a/miniprogram/project.config.json b/miniprogram/project.config.json index 4a797a9..e6caf64 100644 --- a/miniprogram/project.config.json +++ b/miniprogram/project.config.json @@ -1,5 +1,5 @@ { - "appid": "wx79419f886f8c77ef", + "appid": "wx8f4b331065a9ac2e", "compileType": "miniprogram", "libVersion": "2.27.3", "packOptions": { diff --git a/miniprogram/project.private.config.json b/miniprogram/project.private.config.json index 7bbb91d..52f59e5 100644 --- a/miniprogram/project.private.config.json +++ b/miniprogram/project.private.config.json @@ -1,7 +1,7 @@ { "projectname": "miniprogram", "setting": { - "compileHotReLoad": true, + "compileHotReLoad": false, "urlCheck": true }, "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", diff --git a/project.config.json b/project.config.json index c3a97f8..9eab201 100644 --- a/project.config.json +++ b/project.config.json @@ -25,7 +25,7 @@ "useCompilerModule": false, "userConfirmedUseCompilerModuleSwitch": false }, - "appid": "wx2cef527a000f87c9", + "appid": "wx8f4b331065a9ac2e", "projectname": "constructionApp", "libVersion": "2.8.1", "simulatorType": "wechat",