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 b1d094b1
authored
Sep 15, 2021
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改我的卡包/首页加油列表/精选
1 parent
7e982c66
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
34 additions
and
17 deletions
src/assets/images/equity/scrm_vip_package_icon.png
src/mixins/pay.js
src/router/index.js
src/utils/WxConfig.js
src/utils/util.js
src/views/equity/allEquity.vue
src/views/equity/index.vue
src/views/oilStation/index.vue
src/views/oilStation/location.vue
src/assets/images/equity/scrm_vip_package_icon.png
0 → 100644
View file @
b1d094b
27.3 KB
src/mixins/pay.js
View file @
b1d094b
...
@@ -89,8 +89,7 @@ export default {
...
@@ -89,8 +89,7 @@ export default {
},
},
handlePay
(
payData
)
{
handlePay
(
payData
)
{
const
{
timeStamp
,
nonceStr
,
packages
,
signType
,
paySign
}
=
payData
;
const
{
timeStamp
,
nonceStr
,
packages
,
signType
,
paySign
}
=
payData
;
WX
.
chooseWXPay
(
timeStamp
,
nonceStr
,
packages
,
signType
,
paySign
).
then
(
res
=>
{
WX
.
chooseWXPay
(
timeStamp
,
nonceStr
,
packages
,
signType
,
paySign
).
then
(()
=>
{
console
.
log
(
res
)
if
(
this
.
appearance
==
2
)
{
if
(
this
.
appearance
==
2
)
{
let
productName
=
this
.
brandName
+
this
.
businessList
[
this
.
typeSno
].
productName
+
this
.
denomination
.
denomination
let
productName
=
this
.
brandName
+
this
.
businessList
[
this
.
typeSno
].
productName
+
this
.
denomination
.
denomination
window
.
vm
.
$router
.
push
({
window
.
vm
.
$router
.
push
({
...
...
src/router/index.js
View file @
b1d094b
...
@@ -88,7 +88,6 @@ const getSessionAppId = (sid,status) => {
...
@@ -88,7 +88,6 @@ const getSessionAppId = (sid,status) => {
}
}
const
getSessionId
=
(
redirectUrl
,
state
)
=>
{
const
getSessionId
=
(
redirectUrl
,
state
)
=>
{
const
params
=
getParams
(
window
.
location
.
href
)
const
params
=
getParams
(
window
.
location
.
href
)
console
.
log
(
params
)
if
(
params
.
code
)
{
if
(
params
.
code
)
{
const
appId
=
sessionStorage
.
getItem
(
'GL_WX_APPID'
)
const
appId
=
sessionStorage
.
getItem
(
'GL_WX_APPID'
)
common
.
getSessionId
({
code
:
params
.
code
,
state
,
appId
}).
then
(
res
=>
{
common
.
getSessionId
({
code
:
params
.
code
,
state
,
appId
}).
then
(
res
=>
{
...
...
src/utils/WxConfig.js
View file @
b1d094b
...
@@ -88,7 +88,6 @@ class WxConfig {
...
@@ -88,7 +88,6 @@ class WxConfig {
scale
,
scale
,
infoUrl
,
infoUrl
,
success
(
res
)
{
success
(
res
)
{
console
.
log
(
res
)
resolve
(
res
)
resolve
(
res
)
}
}
})
})
...
...
src/utils/util.js
View file @
b1d094b
...
@@ -233,6 +233,21 @@ const myDialog = (message,confirmText,cancelText,comfirmFn,cancelFn)=>{
...
@@ -233,6 +233,21 @@ const myDialog = (message,confirmText,cancelText,comfirmFn,cancelFn)=>{
}
}
})
})
}
}
// 导航 (微信环境需要传WX过来,如果在这里直接导入会报错)
const
openNavigation
=
(
val
,
WX
)
=>
{
const
ua
=
navigator
.
userAgent
.
toLowerCase
()
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'micromessenger'
)
{
WX
.
openLocation
(
Number
(
val
.
gasAddressLatitude
),
Number
(
val
.
gasAddressLongitude
),
val
.
gasName
,
val
.
gasAddress
,
18
).
then
(()
=>
{
// console.log(res)
})
}
else
{
if
(
checkPhoneType
()
==
'ios'
)
{
window
.
webkit
.
messageHandlers
.
jumpNativeApp
.
postMessage
(
JSON
.
stringify
({
type
:
8
,
address
:
val
.
gasAddress
,
latitude
:
Number
(
val
.
gasAddressLatitude
),
longitude
:
Number
(
val
.
gasAddressLongitude
)}))
}
else
{
window
.
myjs
.
jumpNativeApp
(
JSON
.
stringify
({
type
:
8
,
address
:
val
.
gasAddress
,
latitude
:
Number
(
val
.
gasAddressLatitude
),
longitude
:
Number
(
val
.
gasAddressLongitude
)}))
}
}
}
const
utils
=
{
const
utils
=
{
removeLocalStorage
,
removeLocalStorage
,
setLocalStorage
,
setLocalStorage
,
...
@@ -253,7 +268,8 @@ const utils = {
...
@@ -253,7 +268,8 @@ const utils = {
alert
,
alert
,
cloneText
,
cloneText
,
getParams
,
getParams
,
myDialog
myDialog
,
openNavigation
}
}
Object
.
keys
(
utils
).
map
(
key
=>
{
Object
.
keys
(
utils
).
map
(
key
=>
{
...
...
src/views/equity/allEquity.vue
View file @
b1d094b
...
@@ -73,7 +73,7 @@ export default {
...
@@ -73,7 +73,7 @@ export default {
self
.
getTwoHeightArr
();
self
.
getTwoHeightArr
();
});
});
self
.
hideLoading
()
self
.
hideLoading
()
},
15
00
);
},
20
00
);
},
},
methods
:
{
methods
:
{
// 点击跳转商品详情
// 点击跳转商品详情
...
@@ -172,6 +172,9 @@ export default {
...
@@ -172,6 +172,9 @@ export default {
};
};
},
},
},
},
destroyed
(){
window
.
removeEventListener
(
'scroll'
,
this
.
bindScrollEvent
,
false
);
},
};
};
</
script
>
</
script
>
...
...
src/views/equity/index.vue
View file @
b1d094b
This diff is collapsed.
Click to expand it.
src/views/oilStation/index.vue
View file @
b1d094b
...
@@ -94,7 +94,7 @@ export default {
...
@@ -94,7 +94,7 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
listeningBack
();
//
this.listeningBack();
this
.
getOilNoList
();
this
.
getOilNoList
();
let
longitude
,
latitude
;
let
longitude
,
latitude
;
if
(
this
.
$store
.
state
.
address
.
longitude
)
{
if
(
this
.
$store
.
state
.
address
.
longitude
)
{
...
@@ -121,11 +121,12 @@ export default {
...
@@ -121,11 +121,12 @@ export default {
history
.
pushState
({},
null
,
window
.
location
.
href
);
history
.
pushState
({},
null
,
window
.
location
.
href
);
if
(
path
==
'oilStation.location'
||
path
==
'oilStation.detail'
||
path
==
'oilStation.record'
)
{
if
(
path
==
'oilStation.location'
||
path
==
'oilStation.detail'
||
path
==
'oilStation.record'
)
{
window
.
vm
.
$router
.
replace
({
name
:
window
.
vm
.
$store
.
state
.
prevPath
})
window
.
vm
.
$router
.
replace
({
name
:
window
.
vm
.
$store
.
state
.
prevPath
})
if
(
sessionStorage
.
getItem
(
'common'
)
==
1
)
{
window
.
vm
.
$router
.
replace
({
name
:
'equity.index'
})
window
.
vm
.
$router
.
replace
({
name
:
'equity.index'
})
// if(sessionStorage.getItem('common') == 1) {
}
else
{
// window.vm.$router.replace({name:'equity.index'})
window
.
vm
.
$router
.
replace
({
name
:
'common.index'
})
// }else {
}
// window.vm.$router.replace({name:'common.index'})
// }
}
}
}
}
},
},
...
@@ -255,11 +256,11 @@ export default {
...
@@ -255,11 +256,11 @@ export default {
},
},
//更新定位
//更新定位
jumpLocation
()
{
jumpLocation
()
{
window
.
vm
.
$router
.
push
({
name
:
'oilStation.location'
})
window
.
vm
.
$router
.
replace
({
name
:
'oilStation.location'
})
},
},
//加油记录
//加油记录
jumpRecord
()
{
jumpRecord
()
{
window
.
vm
.
$router
.
push
({
name
:
'oilStation.record'
})
window
.
vm
.
$router
.
replace
({
name
:
'oilStation.record'
})
},
},
//详情
//详情
jumpDetail
(
val
)
{
jumpDetail
(
val
)
{
...
...
src/views/oilStation/location.vue
View file @
b1d094b
...
@@ -181,10 +181,10 @@ export default {
...
@@ -181,10 +181,10 @@ export default {
},
},
selectItem
(
val
)
{
selectItem
(
val
)
{
this
.
$store
.
commit
(
'setAddress'
,
val
)
this
.
$store
.
commit
(
'setAddress'
,
val
)
window
.
vm
.
$router
.
push
({
path
:
'/oilStation/index'
})
window
.
vm
.
$router
.
replace
({
path
:
'/oilStation/index'
})
},
},
selectAddress
()
{
selectAddress
()
{
window
.
vm
.
$router
.
push
({
path
:
'/oilStation/index'
})
window
.
vm
.
$router
.
replace
({
path
:
'/oilStation/index'
})
},
},
selectLocation
(
value
)
{
selectLocation
(
value
)
{
let
para
=
{
let
para
=
{
...
@@ -197,7 +197,7 @@ export default {
...
@@ -197,7 +197,7 @@ export default {
let
{
code
,
message
}
=
res
let
{
code
,
message
}
=
res
if
(
code
==
0
)
{
if
(
code
==
0
)
{
this
.
$store
.
commit
(
'setAddress'
,
para
)
this
.
$store
.
commit
(
'setAddress'
,
para
)
window
.
vm
.
$router
.
push
({
path
:
'/oilStation/index'
})
window
.
vm
.
$router
.
replace
({
path
:
'/oilStation/index'
})
}
else
{
}
else
{
this
.
showToast
(
message
)
this
.
showToast
(
message
)
}
}
...
...
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