From 337d7bda1b445db0b39c1df2551c060954e2426d Mon Sep 17 00:00:00 2001 From: jyt <1592211625@qq.com> Date: Fri, 11 Mar 2022 17:33:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E8=AE=B0=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mine/registerCode.vue | 117 +++++++++++++++++++++++++----------- utils/domain.js | 5 +- 2 files changed, 86 insertions(+), 36 deletions(-) diff --git a/pages/mine/registerCode.vue b/pages/mine/registerCode.vue index 82411b8..39265d1 100644 --- a/pages/mine/registerCode.vue +++ b/pages/mine/registerCode.vue @@ -23,40 +23,89 @@ }, methods: { down() { - let url = this.qrCodeUrl + '/customer/getQrCode?pageUrl=pages/mine/registerForm' - console.log(url) - uni.downloadFile({ - url, - success: (res) => { - console.log(res) - uni.downloadFile({ - url, //图片地址 - success: (res) => { - console.log('downloadFile success', res) - if (res.statusCode === 200) { - console.log('downloadFile res.statusCode === 200', res) - uni.saveImageToPhotosAlbum({ - filePath: res.tempFilePath, - success: function() { - uni.showToast({ - title: "保存成功", - icon: "none" - }) - }, - fail: function() { - uni.showToast({ - title: "保存失败", - icon: "none" - }) - } - }) - } else { - console.log('downloadFile res.statusCode !== 200', res) - } - } - }) - } - }); + let url = this.qrCodeUrl+'/customer/getQrCode?page=pages/mine/registerForm&scene='+this.projectId + console.log(url) + uni.getImageInfo({ + src:url, + success: (res) => { + console.log(res) + uni.saveImageToPhotosAlbum({ + filePath:res.path, + success: () => { + uni.showToast({ + title: "保存成功", + icon: "none" + }) + }, + fail: () => { + uni.showToast({ + title: "保存失败", + icon: "none" + }) + } + }) + } + }) + + // uni.getSetting({ + // success:(res)=> { + // if(Object.keys(res.authSetting).length>0){ + // if(res.authSetting['scope.writePhotosAlbum']==undefined){ + // uni.openSetting({ + // success: (res) => { + // console.log("设置权限1",res.authSetting) + // } + // }) + // }else{ + // if(!res.authSetting['scope.writePhotosAlbum']){ + // uni.openSetting({ + // success: (res) => { + // console.log("设置权限1",res.authSetting) + // } + // }) + + // } + // } + // }else{ + // return + // } + // } + // }) + + + // uni.downloadFile({ + // url, + // success: (res) => { + // console.log(res) + // uni.downloadFile({ + // url, //图片地址 + // success: (res) => { + // console.log('downloadFile success', res) + // if (res.statusCode === 200) { + // console.log('downloadFile res.statusCode === 200', res) + // uni.saveImageToPhotosAlbum({ + // filePath: res.tempFilePath, + // success: function() { + // uni.showToast({ + // title: "保存成功", + // icon: "none" + // }) + // }, + // fail: function() { + // uni.showToast({ + // title: "保存失败", + // icon: "none" + // }) + // } + // }) + // } else { + // console.log('downloadFile res.statusCode !== 200', res) + // } + // } + // }) + // } + // }); + } }, onLoad() { diff --git a/utils/domain.js b/utils/domain.js index 280f0e4..71a17d3 100644 --- a/utils/domain.js +++ b/utils/domain.js @@ -1,11 +1,12 @@ // http.js使用域名 // const baseUrl = 'http://192.168.31.57:8080/autoSR/api';// 本地 -// const baseUrl = 'http://121.42.63.138:9091/autoSR/api';// 测试站/ +// const baseUrl = 'http://121.42.63.138:9091/autoSR/api';// 测试站 // const baseUrl = 'http://192.168.31.92:8080/api';// sh +const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// sh // const baseUrl = 'http://192.168.31.167:8080/autoSR/api'; // 长龙 // const baseUrl = 'http://192.168.31.134:8080/autoSR/api'; // 佳豪 // const baseUrl = 'http://10.2.1.104:8081/autoSR/api'; // 刘敏 -const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式 +// const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式 // const baseUrl = 'https://hfju.com/api'; // 数智正式