Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
offical_web
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangjie
offical_web
Commits
484fbabc
Commit
484fbabc
authored
Nov 02, 2023
by
qinjianhui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://47.99.244.21:9999/zhangjie/offical_web
parents
f66f38fc
6981d9e9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
12 deletions
+47
-12
src/components/head.vue
+14
-2
src/store/index.js
+4
-0
src/views/contact.vue
+26
-8
src/views/login.vue
+2
-2
src/views/register.vue
+1
-0
No files found.
src/components/head.vue
View file @
484fbabc
...
@@ -65,16 +65,25 @@ export default {
...
@@ -65,16 +65,25 @@ export default {
{
name
:
'关于我们'
,
path
:
'/about_us'
},
{
name
:
'关于我们'
,
path
:
'/about_us'
},
{
name
:
'帮助'
,
path
:
'/help'
},
{
name
:
'帮助'
,
path
:
'/help'
},
],
],
userInfo
:
JSON
.
parse
(
localStorage
.
getItem
(
'userInfo'
))
}
}
},
},
computed
:
{
computed
:
{
...
mapState
([
'userInfo'
]),
//
...mapState(['userInfo']),
active
()
{
active
()
{
return
this
.
$route
.
path
return
this
.
$route
.
path
},
},
},
},
mounted
()
{
if
(
this
.
$route
.
query
.
shopKey
){
localStorage
.
setItem
(
'shopifyObj'
,
JSON
.
stringify
(
this
.
$route
.
query
))
}
if
(
this
.
userInfo
){
this
.
$router
.
push
(
'/contact'
)
}
},
methods
:
{
methods
:
{
...
mapMutations
([
'setUserInfo'
]),
...
mapMutations
([
'setUserInfo'
,
'setShopKey'
]),
changePath
()
{
changePath
()
{
this
.
scrollParent
().
scrollTo
({
this
.
scrollParent
().
scrollTo
({
behavior
:
'smooth'
,
behavior
:
'smooth'
,
...
@@ -82,6 +91,9 @@ export default {
...
@@ -82,6 +91,9 @@ export default {
})
})
},
},
login
()
{
login
()
{
// if(this.$route.query&&this.$route.query.shopKey){
// this.setShopKey(this.$route.query.shopKey)
// }
this
.
$router
.
push
(
'/login'
)
this
.
$router
.
push
(
'/login'
)
},
},
register
()
{
register
()
{
...
...
src/store/index.js
View file @
484fbabc
...
@@ -7,10 +7,14 @@ export default new Vuex.Store({
...
@@ -7,10 +7,14 @@ export default new Vuex.Store({
},
},
state
:
{
state
:
{
userInfo
:
JSON
.
parse
(
JSON
.
stringify
(
localStorage
.
getItem
(
'userInfo'
)))
||
undefined
,
userInfo
:
JSON
.
parse
(
JSON
.
stringify
(
localStorage
.
getItem
(
'userInfo'
)))
||
undefined
,
shopifyObj
:{}
},
},
mutations
:
{
mutations
:
{
setUserInfo
(
state
,
profile
)
{
setUserInfo
(
state
,
profile
)
{
state
.
userInfo
=
profile
state
.
userInfo
=
profile
},
setShopKey
(
state
,
data
){
state
.
shopifyObj
=
data
}
}
},
},
actions
:
{
actions
:
{
...
...
src/views/contact.vue
View file @
484fbabc
...
@@ -24,7 +24,8 @@
...
@@ -24,7 +24,8 @@
line-height: 100px;
line-height: 100px;
font-family: '微软雅黑';
font-family: '微软雅黑';
"
v-if=
"userInfo.erpKey"
>
"
v-if=
"userInfo.erpKey"
>
<a
:href=
"'https://'+userInfo.erpKey+'.jomalls.com'"
target=
"_blank"
style=
"text-decoration: none"
>
{{
userInfo
.
erpKey
+
'.jomalls.com'
}}
</a>
<a
:href=
"'https://'+userInfo.erpKey+'.jomalls.com'"
target=
"_blank"
style=
"text-decoration: none"
>
{{
userInfo
.
erpKey
+
'.jomalls.com'
}}
</a>
</div>
</div>
<h1
<h1
style=
"
style=
"
...
@@ -33,11 +34,11 @@
...
@@ -33,11 +34,11 @@
font-size: 50px;
font-size: 50px;
line-height: 100px;
line-height: 100px;
font-family: '微软雅黑';
font-family: '微软雅黑';
"
v-else
>
"
v-else
>
您尚未开通erp权限,请联系您的商务经理
您尚未开通erp权限,请联系您的商务经理
</h1>
</h1>
<h2
<h2
style=
"
style=
"
text-align: center;
text-align: center;
color: #fff;
color: #fff;
font-size: 36px;
font-size: 36px;
...
@@ -47,7 +48,7 @@
...
@@ -47,7 +48,7 @@
联系电话:15399065167
联系电话:15399065167
</h2>
</h2>
<h2
<h2
style=
"
style=
"
text-align: center;
text-align: center;
color: #fff;
color: #fff;
font-size: 36px;
font-size: 36px;
...
@@ -77,24 +78,41 @@
...
@@ -77,24 +78,41 @@
</
template
>
</
template
>
<
script
>
<
script
>
// import {mapState} from 'vuex'
import
{
mapState
}
from
'vuex'
import
{
post
}
from
'../utils/axios'
export
default
{
export
default
{
name
:
'contact'
,
name
:
'contact'
,
components
:
{},
components
:
{},
data
()
{
data
()
{
return
{
return
{
userInfo
:
JSON
.
parse
(
localStorage
.
getItem
(
'userInfo'
))
userInfo
:
JSON
.
parse
(
localStorage
.
getItem
(
'userInfo'
)),
shopifyObj
:
JSON
.
parse
(
localStorage
.
getItem
(
'shopifyObj'
))
}
}
},
},
computed
:
{
computed
:
{
// ...mapState(['userInfo']),
...
mapState
([
'shopifyObj'
]),
},
mounted
()
{
if
(
this
.
userInfo
&&
this
.
shopifyObj
)
{
this
.
getShopifyInfo
()
}
},
},
methods
:
{
methods
:
{
goBack
()
{
goBack
()
{
this
.
$router
.
push
(
'/home'
)
this
.
$router
.
push
(
'/home'
)
},
},
logout
()
{},
getShopifyInfo
()
{
post
(
'business/shop/bind'
,
{
shopKey
:
this
.
shopifyObj
.
shopKey
,
platform
:
this
.
shopifyObj
.
platform
,
companyCode
:
this
.
userInfo
.
erpKey
}).
then
(
res
=>
{
console
.
log
(
res
)
})
},
logout
()
{
},
},
},
}
}
</
script
>
</
script
>
...
...
src/views/login.vue
View file @
484fbabc
...
@@ -173,7 +173,7 @@
...
@@ -173,7 +173,7 @@
<
script
>
<
script
>
import
{
post
,
get
}
from
'../utils/axios'
import
{
post
,
get
}
from
'../utils/axios'
import
md5
from
'js-md5'
import
md5
from
'js-md5'
import
{
mapMutations
}
from
'vuex'
import
{
mapMutations
,
mapState
}
from
'vuex'
export
default
{
export
default
{
name
:
'login'
,
name
:
'login'
,
components
:
{
}
,
components
:
{
}
,
...
@@ -290,7 +290,7 @@ export default {
...
@@ -290,7 +290,7 @@ export default {
let
url
=
`business/user/login`
let
url
=
`business/user/login`
post
(
url
,
{
post
(
url
,
{
email
:
this
.
ruleForm
.
email
,
email
:
this
.
ruleForm
.
email
,
password
:
passwordHash
,
password
:
passwordHash
}
).
then
((
res
)
=>
{
}
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
localStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
res
.
data
))
localStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
res
.
data
))
...
...
src/views/register.vue
View file @
484fbabc
...
@@ -106,6 +106,7 @@
...
@@ -106,6 +106,7 @@
<
script
>
<
script
>
import
{
get
,
post
}
from
'../utils/axios'
import
{
get
,
post
}
from
'../utils/axios'
import
md5
from
'js-md5'
import
md5
from
'js-md5'
import
{
mapState
}
from
"vuex"
;
export
default
{
export
default
{
name
:
'register'
,
name
:
'register'
,
components
:
{
}
,
components
:
{
}
,
...
...
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