|
|
@@ -155,48 +155,52 @@
|
|
|
*/
|
|
|
login_fail_callback() {
|
|
|
this.userinfo = {};
|
|
|
- uni.showToast({
|
|
|
- icon: 'none',
|
|
|
- title: '授权失败,请先领取校园卡、再激活!',
|
|
|
- duration: 3000,
|
|
|
- success: (res) => {
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '是否将校园卡二维码,保存到相册?',
|
|
|
- cancelText: '手动截图',
|
|
|
- confirmText: '自动保存',
|
|
|
- success: (res1) => {
|
|
|
- if (res1.confirm) {
|
|
|
- // 出现二维码,用户扫描二维码添加校园卡、激活
|
|
|
- uni.downloadFile({
|
|
|
- url: 'https://jtishfw.ncjti.edu.cn/jxch-smartmp/HotWaters/image/1.jpg',
|
|
|
- success: (res2) => {
|
|
|
- // console.log(res2);
|
|
|
- if (res2.statusCode == 200) {
|
|
|
- uni.saveImageToPhotosAlbum({
|
|
|
- filePath: res2.tempFilePath,
|
|
|
- success: function() {
|
|
|
- uni.showToast({
|
|
|
- title: "保存成功!请用微信扫码添加校园卡!",
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- },
|
|
|
- fail: function() {
|
|
|
- uni.showToast({
|
|
|
- title: "保存失败,请手动截图保存,再用微信扫二维码!",
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- } else if (res1.cancel) {
|
|
|
- // console.log('用户点击取消');
|
|
|
- this.showQR_code = true;
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '授权失败,请先扫码领取校园卡、再激活!',
|
|
|
+ cancelText: '取消',
|
|
|
+ confirmText: '手动截图',
|
|
|
+ success: (res1) => {
|
|
|
+ if (res1.confirm) {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '10秒后自动隐藏二维码,可重新授权调起!',
|
|
|
+ duration: 1000,
|
|
|
+ success: (com) => {
|
|
|
+ this.showQR_code = true
|
|
|
+ setTimeout(() => {
|
|
|
+ this.showQR_code = false
|
|
|
+ }, 10000)
|
|
|
}
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
+ // 出现二维码,用户扫描二维码添加校园卡、激活
|
|
|
+ // uni.downloadFile({
|
|
|
+ // url: 'https://jtishfw.ncjti.edu.cn/jxch-smartmp/HotWaters/image/1.jpg',
|
|
|
+ // success: (res2) => {
|
|
|
+ // // console.log(res2);
|
|
|
+ // if (res2.statusCode == 200) {
|
|
|
+ // uni.saveImageToPhotosAlbum({
|
|
|
+ // filePath: res2
|
|
|
+ // .tempFilePath,
|
|
|
+ // success: function() {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: "保存成功!请用微信扫码添加校园卡!",
|
|
|
+ // icon: "none"
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+ // fail: function() {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: "保存失败,请手动截图保存,再用微信扫二维码!",
|
|
|
+ // icon: "none"
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ } else if (res1.cancel) {
|
|
|
+ // console.log('用户点击取消');
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -417,7 +421,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.qr_code {
|
|
|
display: flex;
|
|
|
justify-content: center;
|