|
@@ -57,14 +57,18 @@
|
|
dataType: 'json',
|
|
dataType: 'json',
|
|
cache: false,
|
|
cache: false,
|
|
success: function (res) {
|
|
success: function (res) {
|
|
- console.log(res)
|
|
|
|
|
|
+ if(accessType === 1){
|
|
|
|
+ getAppDownload();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- $('.btn-content')[0].addEventListener('click',getAppDownload,false);
|
|
|
|
//点击下载APP
|
|
//点击下载APP
|
|
|
|
+ $('.btn-content')[0].addEventListener('click',()=>{
|
|
|
|
+ operate(1)
|
|
|
|
+ },false);
|
|
|
|
+ //调用下载接口
|
|
function getAppDownload(){
|
|
function getAppDownload(){
|
|
- operate(1);
|
|
|
|
$.ajax({
|
|
$.ajax({
|
|
url: baseUrl + '/api/user/v1/ditchClient/addChannelAppDownload',
|
|
url: baseUrl + '/api/user/v1/ditchClient/addChannelAppDownload',
|
|
type: 'post',
|
|
type: 'post',
|
|
@@ -78,7 +82,7 @@
|
|
cache: false,
|
|
cache: false,
|
|
success: function (res) {
|
|
success: function (res) {
|
|
if(res.status === 0){
|
|
if(res.status === 0){
|
|
-
|
|
|
|
|
|
+ downloadApp();
|
|
}else{
|
|
}else{
|
|
stopManyClick(() =>{
|
|
stopManyClick(() =>{
|
|
toastr.error(res.msg)
|
|
toastr.error(res.msg)
|
|
@@ -87,6 +91,23 @@
|
|
},
|
|
},
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ //下载文件
|
|
|
|
+ function downloadApp(){
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: baseUrl + '/file-center/fileOperate/downloadFile?id=169403',
|
|
|
|
+ type: 'get',
|
|
|
|
+ contentType: "application/json",
|
|
|
|
+ dataType: 'json',
|
|
|
|
+ cache: false,
|
|
|
|
+ success: function (res) {
|
|
|
|
+ if(res.status !== 0){
|
|
|
|
+ stopManyClick(() =>{
|
|
|
|
+ toastr.error(res.msg)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ })
|
|
|
|
+ }
|
|
//防止提示一秒内重复显示
|
|
//防止提示一秒内重复显示
|
|
function stopManyClick(fn) {
|
|
function stopManyClick(fn) {
|
|
if (flag) {
|
|
if (flag) {
|