Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
7398e903
Commit
7398e903
authored
Dec 18, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
2a55e048
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
40 deletions
+6
-40
paymentDetail.vue
src/pages/course/paymentDetail.vue
+5
-1
index.js
src/utils/index.js
+1
-39
No files found.
src/pages/course/paymentDetail.vue
View file @
7398e903
...
...
@@ -473,7 +473,11 @@
},
//减法 得实收
getShiShou
(
num1
,
num2
)
{
if
(
num1
&&
num2
){
return
parseInt
(
num1
)
-
parseInt
(
num2
);
}
else
{
return
0
;
}
},
//跳转到订单详情
goOrderDetail
(
path
,
item
)
{
...
...
src/utils/index.js
View file @
7398e903
...
...
@@ -518,41 +518,3 @@ export function apipost(cmd, msg, successCall, faildCall, isOnline){
}
},
faildCall
)
}
\ No newline at end of file
//文件下载
export
function
GetLocalFile
(
cmd
,
msg
,
fileName
,
newCmd
,
successCall
){
var
apiurl
=
this
.
domainManager
().
DomainUrl
+
cmd
;
var
postData
=
this
.
GetPostData
(
cmd
,
msg
,
newCmd
);
this
.
$http
.
post
(
apiurl
,
postData
,
{
responseType
:
'arraybuffer'
}).
then
((
res
)
=>
{
let
blob
=
new
Blob
([
res
.
data
],
{
type
:
"application/vnd.ms-excel"
})
let
url
=
URL
.
createObjectURL
(
blob
);
let
link
=
document
.
createElement
(
'a'
);
link
.
href
=
url
;
link
.
setAttribute
(
"download"
,
fileName
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
successCall
(
res
);
}).
catch
(
function
(
res
)
{});
}
// export function GetLocalFile = function (cmd, msg, fileName, newCmd, successCall) {
// var apiurl = this.domainManager().DomainUrl + cmd;
// var postData = this.GetPostData(cmd, msg, newCmd);
// this.$http.post(apiurl, postData, {
// responseType: 'arraybuffer'
// }).then((res) => {
// let blob = new Blob([res.data], {
// type: "application/vnd.ms-excel"
// })
// let url = URL.createObjectURL(blob);
// let link = document.createElement('a');
// link.href = url;
// link.setAttribute("download", fileName);
// document.body.appendChild(link);
// link.click();
// successCall(res);
// }).catch(function (res) {});
// }
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment