Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
scrm-equity
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 ac5edd5c
authored
Sep 02, 2021
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复头像显示问题
1 parent
319ec225
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
10 deletions
src/router/index.js
src/views/common/appTip.vue
src/views/equity/index.vue
src/views/oilStation/detail.vue
src/views/oilStation/index.vue
src/router/index.js
View file @
ac5edd5
...
@@ -6,7 +6,7 @@ import {
...
@@ -6,7 +6,7 @@ import {
Notify
Notify
}
from
'vant'
}
from
'vant'
import
store
from
'@/store'
import
store
from
'@/store'
import
{
common
,
equity
}
from
'../api/api'
import
{
common
}
from
'../api/api'
Vue
.
use
(
VueRouter
)
Vue
.
use
(
VueRouter
)
const
router
=
new
VueRouter
({
const
router
=
new
VueRouter
({
routes
,
routes
,
...
@@ -75,14 +75,15 @@ const getSessionAppId = (sid,status) => {
...
@@ -75,14 +75,15 @@ const getSessionAppId = (sid,status) => {
setUserInfo
(
data
);
setUserInfo
(
data
);
if
(
status
)
{
if
(
status
)
{
store
.
commit
(
'reload'
);
store
.
commit
(
'reload'
);
}
else
{
equity
.
getCardInfo
().
then
(
res
=>
{
let
{
code
}
=
res
;
if
(
code
==
0
)
{
router
.
push
({
name
:
'equity.index'
})
}
})
}
}
// else {
// equity.getCardInfo().then(res => {
// let { code } = res;
// if (code == 0) {
// router.push({name: 'equity.index'})
// }
// })
// }
}
}
})
})
}
}
...
...
src/views/common/appTip.vue
View file @
ac5edd5
...
@@ -21,6 +21,15 @@ export default {
...
@@ -21,6 +21,15 @@ export default {
center
:
false
center
:
false
};
};
},
},
created
(){
if
(
window
.
history
&&
window
.
history
.
pushState
)
{
history
.
pushState
(
null
,
null
,
document
.
URL
);
window
.
addEventListener
(
'popstate'
,
this
.
watchReturn
,
false
);
//false阻止默认事件
}
},
destroyed
()
{
window
.
removeEventListener
(
'popstate'
,
this
.
watchReturn
,
false
);
//false阻止默认事件
},
mounted
()
{
mounted
()
{
let
result
=
this
.
getLocalStorage
(
"bindinfo"
);
let
result
=
this
.
getLocalStorage
(
"bindinfo"
);
const
{
code
,
errId
,
message
}
=
result
const
{
code
,
errId
,
message
}
=
result
...
@@ -41,6 +50,11 @@ export default {
...
@@ -41,6 +50,11 @@ export default {
methods
:
{
methods
:
{
copyName
(){
copyName
(){
this
.
cloneText
(
'嘀加智享车生活'
)
this
.
cloneText
(
'嘀加智享车生活'
)
},
watchReturn
(){
// this.$router.replace({ name: "common.expcard"});
window
.
history
.
back
();
history
.
pushState
(
null
,
null
,
document
.
URL
);
}
}
},
},
};
};
...
...
src/views/equity/index.vue
View file @
ac5edd5
...
@@ -245,6 +245,10 @@ export default {
...
@@ -245,6 +245,10 @@ export default {
this
.
isOpen
=
0
;
this
.
isOpen
=
0
;
}
}
// 重新获取头像,避免头像拿不到
// 重新获取头像,避免头像拿不到
//app那边可能拿不到头像---写这个重新获取一下
let
{
nickName
,
logo
}
=
this
.
$store
.
state
;
this
.
userInfo
.
nickName
=
nickName
;
this
.
userInfo
.
logo
=
logo
;
this
.
getUserInfoBySession
();
this
.
getUserInfoBySession
();
// 试用期到期。弹框提示
// 试用期到期。弹框提示
let
showMydialog1
=
this
.
getLocalStorage
(
"showMydialog1"
);
let
showMydialog1
=
this
.
getLocalStorage
(
"showMydialog1"
);
...
@@ -266,7 +270,6 @@ export default {
...
@@ -266,7 +270,6 @@ export default {
this
.
isConcernFn
();
this
.
isConcernFn
();
//app那边可能拿不到头像---写这个重新获取一下
//app那边可能拿不到头像---写这个重新获取一下
let
{
nickName
,
logo
}
=
this
.
$store
.
state
;
let
{
nickName
,
logo
}
=
this
.
$store
.
state
;
console
.
log
(
'store'
,
this
.
$store
.
state
);
this
.
userInfo
.
nickName
=
nickName
;
this
.
userInfo
.
nickName
=
nickName
;
this
.
userInfo
.
logo
=
logo
;
this
.
userInfo
.
logo
=
logo
;
},
},
...
...
src/views/oilStation/detail.vue
View file @
ac5edd5
This diff is collapsed.
Click to expand it.
src/views/oilStation/index.vue
View file @
ac5edd5
...
@@ -258,7 +258,9 @@ export default {
...
@@ -258,7 +258,9 @@ export default {
},
},
//详情
//详情
jumpDetail
(
val
)
{
jumpDetail
(
val
)
{
window
.
vm
.
$router
.
push
({
name
:
'oilStation.detail'
,
query
:{
const
ua
=
navigator
.
userAgent
.
toLowerCase
()
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'micromessenger'
)
{
window
.
vm
.
$router
.
push
({
name
:
'oilStation.detail'
,
query
:{
oilId
:
val
.
id
,
oilId
:
val
.
id
,
oilNo
:
val
.
oilNo
,
oilNo
:
val
.
oilNo
,
longitude
:
val
.
gasAddressLongitude
,
longitude
:
val
.
gasAddressLongitude
,
...
@@ -266,6 +268,28 @@ export default {
...
@@ -266,6 +268,28 @@ export default {
distance
:
val
.
distance
distance
:
val
.
distance
}
}
})
})
}
else
{
let
{
sessionId
}
=
this
.
$store
.
state
;
let
[
href
]
=
window
.
location
.
href
.
split
(
'/#/'
);
let
url
=
`
${
href
}
/#/oilStation/detail?sessionId=
${
sessionId
}
&oilId=
${
val
.
id
}
&&oilNo=
${
val
.
oilNo
}
&longitude=
${
val
.
gasAddressLongitude
}
&latitude=
${
val
.
gasAddressLatitude
}
&distance=
${
val
.
distance
}
`
;
this
.
openWindows
(
url
,
'oilStation.detail'
)
}
// const ua = navigator.userAgent.toLowerCase()
// if (ua.match(/MicroMessenger/i) == 'micromessenger') {
// window.vm.$router.push({ name: 'oilStation.detail',query:{
// oilId: val.id,
// oilNo: val.oilNo,
// longitude: val.gasAddressLongitude,
// latitude: val.gasAddressLatitude,
// distance: val.distance
// }
// })
// }else{
// let [href] = window.location.href.split('/#/');
// let url = `${href}/#/cardRoll/detail?sessionId=${sessionId}&oilId=${val.id}&&oilNo=${val.oilNo}&longitude=${val.gasAddressLongitude}&latitude=${val.gasAddressLatitude}&distance=${distance}`;
// this.openWindows(url, 'cardRoll.detail')
// }
},
},
change
()
{
change
()
{
this
.
pageNum
=
1
;
this
.
pageNum
=
1
;
...
...
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