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
d8fe7c27
Commit
d8fe7c27
authored
Oct 12, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/mallapp
parents
fe4407fb
56c5a29f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1532 additions
and
1723 deletions
+1532
-1723
index.vue
pages/index/index.vue
+1487
-1719
api.js
plugin/api.js
+45
-4
No files found.
pages/index/index.vue
View file @
d8fe7c27
This diff is collapsed.
Click to expand it.
plugin/api.js
View file @
d8fe7c27
...
...
@@ -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