Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
161c999e
Commit
161c999e
authored
Oct 12, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
b2245a18
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
5 deletions
+62
-5
index.vue
pages/index/index.vue
+17
-1
api.js
plugin/api.js
+45
-4
No files found.
pages/index/index.vue
View file @
161c999e
...
...
@@ -648,6 +648,8 @@ export default {
this
.
getstartModel
(
nowtime
);
}
}
//测试方法
this
.
testJJSWApi
();
uni
.
showNavigationBarLoading
();
},
created
()
{
...
...
@@ -882,7 +884,6 @@ export default {
console
.
log
(
e
);
uni
.
checkSession
({
//检查登录状态是否过期
success
:
(
x
)
=>
{
if
(
x
.
errMsg
==
"checkSession:ok"
)
{
//没有过期
...
...
@@ -1355,7 +1356,22 @@ export default {
},
(
error
)
=>
{}
);
},
//测试进阶后台方法
testJJSWApi
()
{
var
that
=
this
;
var
testCmd
=
"/api/WeChatPublic/GetStuSchoolClass"
;
var
postMsg
=
{
Type
:
1
};
//这里请求接口
that
.
requestJJSWAdmin
(
testCmd
,
postMsg
,
(
res
)
=>
{
console
.
log
(
"testJJSWApi"
,
res
)
});
},
getstore
()
{
let
that
=
this
;
uni
.
getLocation
({
...
...
plugin/api.js
View file @
161c999e
...
...
@@ -2,9 +2,11 @@ export default {
install
(
Vue
,
options
)
{
Vue
.
prototype
.
host
=
"https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
Vue
.
prototype
.
host2
=
"http://
192.168.10.128:82
00"
Vue
.
prototype
.
host2
=
"http://
localhost:50
00"
// Vue.prototype.host2 = "http://192.168.10.46:8200"
// Vue.prototype.host2 = "https://mallApi.oytour.com"
//进阶思维后台地址
Vue
.
prototype
.
host3
=
"http://192.168.10.128:8900"
Vue
.
prototype
.
UploadConfig
=
function
()
{
//本地上传配置
return
{
...
...
@@ -60,7 +62,7 @@ export default {
this
.
getLogin_t
(
u
)
}
}
else
if
(
res
.
data
.
resultCode
!=
1
)
{
if
(
res
.
data
.
message
)
{
uni
.
showToast
({
title
:
res
.
data
.
message
,
...
...
@@ -125,6 +127,45 @@ export default {
});
}
//进阶思维后台接口
Vue
.
prototype
.
requestJJSWAdmin
=
function
(
cmd
,
postMsg
,
success
,
failed
)
{
uni
.
request
({
url
:
this
.
host3
+
cmd
,
method
:
"Post"
,
header
:
{
'content-type'
:
"application/json"
},
data
:
{
msg
:
postMsg
},
success
:
res
=>
{
if
(
res
.
Code
==
10000
)
{
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
u
)
{
this
.
getLogin_t
(
u
)
}
}
else
if
(
res
.
Code
!=
1
)
{
if
(
res
.
Message
!=
''
)
{
uni
.
showToast
({
title
:
res
.
Message
,
icon
:
"none"
,
});
}
typeof
failed
==
"function"
&&
failed
(
res
.
Data
);
}
else
{
typeof
success
==
"function"
&&
success
(
res
.
Data
);
}
},
fail
:
(
e
)
=>
{
console
.
log
(
"网络请求fail:"
+
JSON
.
stringify
(
e
));
uni
.
showModal
({
content
:
""
+
res
.
Message
});
typeof
failed
==
"function"
&&
failed
(
res
.
data
);
}
});
}
// token失效再次登录接口
Vue
.
prototype
.
getLogin_t
=
function
(
obj
)
{
let
pid
=
uni
.
getStorageSync
(
"pid"
)
?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
;
...
...
@@ -133,7 +174,7 @@ export default {
let
CounponPassword
=
uni
.
getStorageSync
(
"CounponPassword"
)
?
uni
.
getStorageSync
(
"CounponPassword"
).
CounponPassword
:
0
;
let
KeyWord
=
uni
.
getStorageSync
(
"KeyWord"
)
?
uni
.
getStorageSync
(
"KeyWord"
).
KeyWord
:
''
;
let
EduId
=
uni
.
getStorageSync
(
"jxhData"
)
?
uni
.
getStorageSync
(
"jxhData"
).
Id
:
0
;
let
EduId
=
uni
.
getStorageSync
(
"jxhData"
)
?
uni
.
getStorageSync
(
"jxhData"
).
Id
:
0
;
this
.
request2
({
url
:
'/api/AppletLogin/Login'
,
data
:
{
...
...
@@ -147,7 +188,7 @@ export default {
UserPageType
:
Up
,
CounponPassword
:
CounponPassword
,
KeyWord
:
KeyWord
,
EduId
:
EduId
,
EduId
:
EduId
,
}
},
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