Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
account
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 907e6df3
authored
Nov 20, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
处理失败模板
1 parent
6a6376f7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletions
html/merchant/index.html
html/merchant/index.html
View file @
907e6df
...
@@ -802,14 +802,24 @@
...
@@ -802,14 +802,24 @@
// 关闭loading效果
// 关闭loading效果
layer
.
close
(
loadingIndex
);
layer
.
close
(
loadingIndex
);
if
(
res
.
code
==
0
){
if
(
res
.
code
==
0
){
if
(
!
res
.
data
){
layer
.
msg
(
'处理成功,系统已自动创建商户,可返回列表查看'
);
layer
.
msg
(
'处理成功,系统已自动创建商户,可返回列表查看'
);
layer
.
close
(
index
);
// 可以选择是否关闭弹出层
layer
.
close
(
index
);
// 可以选择是否关闭弹出层
}
else
{
}
else
{
// 如果返回的code不是0,表示出错,可以给出错误提示
layer
.
msg
(
'处理失败,可点击 下载失败模版 查看失败原因'
);
layer
.
msg
(
'处理失败,可点击 下载失败模版 查看失败原因'
);
$
(
layero
).
find
(
'#loadingText'
).
hide
();
updateTemplateLink
(
res
.
data
,
'下载失败模版'
,
true
);
//var failureTemplateUrl = res.data
//$('#templateLink').attr('href', failureTemplateUrl)
//.text('下载失败模版').css('color','red');
}
}
}
}
}
)
)
$
(
layero
).
find
(
'#fileInput'
).
on
(
'change'
,
function
(){
var
originalTemplateUrl
=
'https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/批量创建商户导入模版.xlsx'
;
updateTemplateLink
(
originalTemplateUrl
,
'下载模板'
,
false
);
});
},
},
btn2
:
function
(
index
,
layero
){
btn2
:
function
(
index
,
layero
){
layer
.
close
(
index
);
layer
.
close
(
index
);
...
@@ -820,6 +830,14 @@
...
@@ -820,6 +830,14 @@
});
});
});
});
function
updateTemplateLink
(
url
,
text
,
isError
)
{
$
(
'#templateLink'
).
attr
(
'href'
,
url
).
text
(
text
);
if
(
isError
)
{
$
(
'#templateLink'
).
css
(
'color'
,
'red'
);
}
else
{
$
(
'#templateLink'
).
css
(
'color'
,
''
);
// Reset to default color
}
}
$
(
'#relevancyBtn'
).
on
(
'click'
,
function
()
{
$
(
'#relevancyBtn'
).
on
(
'click'
,
function
()
{
$messenger
.
emit
(
'route-to'
,
{
path
:
'/settings/baseInfo/relevance'
})
$messenger
.
emit
(
'route-to'
,
{
path
:
'/settings/baseInfo/relevance'
})
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment