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 c4b62188
authored
Sep 22, 2021
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改为上线的配置参数
1 parent
3fd629b7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
31 deletions
src/main.js
src/mixins/pay.js
src/views/cardRoll/opening.vue
src/main.js
View file @
c4b6218
...
@@ -15,9 +15,9 @@ Vue.use(Lazyload);
...
@@ -15,9 +15,9 @@ Vue.use(Lazyload);
Vue
.
use
(
Vant
)
Vue
.
use
(
Vant
)
import
preview
from
'vue-photo-preview'
import
preview
from
'vue-photo-preview'
import
'vue-photo-preview/dist/skin.css'
import
'vue-photo-preview/dist/skin.css'
import
VConsole
from
'vconsole'
//
import VConsole from 'vconsole'
const
vConsole
=
new
VConsole
()
//
const vConsole = new VConsole()
Vue
.
use
(
vConsole
)
//
Vue.use(vConsole)
Vue
.
use
(
preview
)
Vue
.
use
(
preview
)
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
Vue
.
prototype
.
isMiniprogram
=
window
.
__wxjs_environment
===
'miniprogram'
Vue
.
prototype
.
isMiniprogram
=
window
.
__wxjs_environment
===
'miniprogram'
...
@@ -59,7 +59,7 @@ if (!localStorage['sessionId'] || !localStorage['expirationTime'] || (localStora
...
@@ -59,7 +59,7 @@ if (!localStorage['sessionId'] || !localStorage['expirationTime'] || (localStora
"network_type"
:
window
.
navigator
.
connection
?
window
.
navigator
.
connection
.
effectiveType
:
''
,
"network_type"
:
window
.
navigator
.
connection
?
window
.
navigator
.
connection
.
effectiveType
:
''
,
"terminal"
:
terminal
"terminal"
:
terminal
})
})
track
.
getSessionId
(
'/collectdata/login'
,
user
,
function
()
{
track
.
getSessionId
(
'/collectdata/login'
,
user
,
function
()
{
axios
({
axios
({
baseURL
:
process
.
env
.
VUE_APP_REPO
+
'/scrm-equity-mobile-config'
,
baseURL
:
process
.
env
.
VUE_APP_REPO
+
'/scrm-equity-mobile-config'
,
method
:
'get'
method
:
'get'
...
@@ -93,4 +93,3 @@ if (!localStorage['sessionId'] || !localStorage['expirationTime'] || (localStora
...
@@ -93,4 +93,3 @@ if (!localStorage['sessionId'] || !localStorage['expirationTime'] || (localStora
}).
$mount
(
'#app'
)
}).
$mount
(
'#app'
)
})
})
}
}
\ No newline at end of file
\ No newline at end of file
src/mixins/pay.js
View file @
c4b6218
...
@@ -5,8 +5,7 @@ export default {
...
@@ -5,8 +5,7 @@ export default {
data
()
{
data
()
{
return
{}
return
{}
},
},
mounted
()
{
mounted
()
{},
},
methods
:
{
methods
:
{
async
chooseWXPay
()
{
async
chooseWXPay
()
{
if
(
this
.
appearance
==
2
&&
!
/^
[
a-zA-Z0-9
]
+$/
.
test
(
this
.
rechargeNumber
))
{
if
(
this
.
appearance
==
2
&&
!
/^
[
a-zA-Z0-9
]
+$/
.
test
(
this
.
rechargeNumber
))
{
...
@@ -23,10 +22,10 @@ export default {
...
@@ -23,10 +22,10 @@ export default {
pagename
:
"商品详情"
,
pagename
:
"商品详情"
,
event_name
:
'购买'
,
event_name
:
'购买'
,
extra_data
:
{
extra_data
:
{
brandName
:
this
.
selectData
?
this
.
selectData
.
brandName
:
this
.
brandName
,
brandName
:
this
.
selectData
?
this
.
selectData
.
brandName
:
this
.
brandName
,
productName
:
this
.
selectData
?
this
.
selectData
.
productName
:
this
.
businessList
[
this
.
typeSno
].
productName
,
productName
:
this
.
selectData
?
this
.
selectData
.
productName
:
this
.
businessList
[
this
.
typeSno
].
productName
,
rechargeNumber
:
this
.
rechargeNumber
,
rechargeNumber
:
this
.
rechargeNumber
,
denomination
:
this
.
denomination
?
this
.
denomination
.
denomination
:
undefined
denomination
:
this
.
denomination
?
this
.
denomination
.
denomination
:
undefined
}
}
}
}
});
});
...
@@ -50,7 +49,7 @@ export default {
...
@@ -50,7 +49,7 @@ export default {
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'micromessenger'
)
{
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'micromessenger'
)
{
payMannerId
=
4
;
payMannerId
=
4
;
}
else
{
}
else
{
payMannerId
=
7
;
// 5
payMannerId
=
5
;
// 7
}
}
let
para
=
{
let
para
=
{
orderCode
,
orderCode
,
...
@@ -70,7 +69,7 @@ export default {
...
@@ -70,7 +69,7 @@ export default {
}
}
})
})
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'micromessenger'
)
{
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'micromessenger'
)
{
this
.
handlePay
(
payData
,
orderCode
);
this
.
handlePay
(
payData
,
orderCode
);
}
else
{
}
else
{
if
(
this
.
checkPhoneType
()
==
'ios'
)
{
if
(
this
.
checkPhoneType
()
==
'ios'
)
{
if
(
window
[
"payWebOrder"
]
&&
typeof
window
.
payWebOrder
===
"function"
)
{
if
(
window
[
"payWebOrder"
]
&&
typeof
window
.
payWebOrder
===
"function"
)
{
...
@@ -82,12 +81,13 @@ export default {
...
@@ -82,12 +81,13 @@ export default {
window
.
myjs
.
payWebOrder
(
"wxpay"
,
JSON
.
stringify
(
payData
));
window
.
myjs
.
payWebOrder
(
"wxpay"
,
JSON
.
stringify
(
payData
));
}
}
let
self
=
this
;
let
self
=
this
;
window
.
onMessageFromPayBack
=
function
(
result
)
{
window
.
onMessageFromPayBack
=
function
(
result
)
{
if
(
result
==
0
)
{
if
(
result
==
0
)
{
if
(
self
.
appearance
==
2
)
{
if
(
self
.
appearance
==
2
)
{
let
productName
=
self
.
brandName
+
self
.
businessList
[
self
.
typeSno
].
productName
+
self
.
denomination
.
denomination
let
productName
=
self
.
brandName
+
self
.
businessList
[
self
.
typeSno
].
productName
+
self
.
denomination
.
denomination
window
.
vm
.
$router
.
push
({
window
.
vm
.
$router
.
push
({
name
:
'commodity.process'
,
query
:
{
name
:
'commodity.process'
,
query
:
{
rechargeNumber
:
self
.
rechargeNumber
,
rechargeNumber
:
self
.
rechargeNumber
,
productName
productName
}
}
...
@@ -95,26 +95,27 @@ export default {
...
@@ -95,26 +95,27 @@ export default {
}
else
{
}
else
{
window
.
vm
.
$router
.
push
({
name
:
'commodity.success'
,
query
:
{
price
:
self
.
selectData
.
salesPrice
}
})
window
.
vm
.
$router
.
push
({
name
:
'commodity.success'
,
query
:
{
price
:
self
.
selectData
.
salesPrice
}
})
}
}
self
.
payCollect
(
orderCode
,
1
);
self
.
payCollect
(
orderCode
,
1
);
}
else
{
}
else
{
self
.
payCollect
(
orderCode
,
0
);
self
.
payCollect
(
orderCode
,
0
);
window
.
vm
.
showToast
(
result
==
-
1
?
'支付失败'
:
'取消支付'
)
window
.
vm
.
showToast
(
result
==
-
1
?
'支付失败'
:
'取消支付'
)
}
}
}
}
}
}
},
},
handlePay
(
payData
,
orderCode
)
{
handlePay
(
payData
,
orderCode
)
{
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
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
payCollect
(
orderCode
,
1
);
this
.
payCollect
(
orderCode
,
1
);
}
else
{
}
else
{
this
.
payCollect
(
orderCode
,
0
);
this
.
payCollect
(
orderCode
,
0
);
}
}
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
({
name
:
'commodity.process'
,
query
:
{
name
:
'commodity.process'
,
query
:
{
rechargeNumber
:
this
.
rechargeNumber
,
rechargeNumber
:
this
.
rechargeNumber
,
productName
productName
}
}
...
@@ -124,9 +125,9 @@ export default {
...
@@ -124,9 +125,9 @@ export default {
}
}
})
})
},
},
payCollect
(
orderCode
,
status
)
{
payCollect
(
orderCode
,
status
)
{
let
extra_data
;
let
extra_data
;
if
(
this
.
selectData
)
{
if
(
this
.
selectData
)
{
extra_data
=
{
extra_data
=
{
brandName
:
this
.
selectData
.
brandName
,
brandName
:
this
.
selectData
.
brandName
,
productName
:
this
.
selectData
.
productName
,
productName
:
this
.
selectData
.
productName
,
...
@@ -137,12 +138,12 @@ export default {
...
@@ -137,12 +138,12 @@ export default {
goodsPrice
:
this
.
selectData
.
salesPrice
,
goodsPrice
:
this
.
selectData
.
salesPrice
,
goodsStock
:
this
.
selectData
.
stock
,
goodsStock
:
this
.
selectData
.
stock
,
orderCode
,
orderCode
,
result
:
status
?
'成功'
:
'失败'
result
:
status
?
'成功'
:
'失败'
}
}
}
else
{
}
else
{
extra_data
=
{
extra_data
=
{
brandName
:
this
.
brandName
,
brandName
:
this
.
brandName
,
productName
:
this
.
businessList
[
this
.
typeSno
].
productName
,
productName
:
this
.
businessList
[
this
.
typeSno
].
productName
,
goodsID
:
this
.
denomination
.
id
,
goodsID
:
this
.
denomination
.
id
,
account
:
this
.
rechargeNumber
,
account
:
this
.
rechargeNumber
,
denomination
:
this
.
denomination
.
denomination
,
denomination
:
this
.
denomination
.
denomination
,
...
@@ -150,7 +151,7 @@ export default {
...
@@ -150,7 +151,7 @@ export default {
goodsPriceSales
:
this
.
denomination
.
salesPrice
,
goodsPriceSales
:
this
.
denomination
.
salesPrice
,
goodsPrice
:
this
.
denomination
.
salesPrice
,
goodsPrice
:
this
.
denomination
.
salesPrice
,
orderCode
,
orderCode
,
result
:
status
?
'成功'
:
'失败'
result
:
status
?
'成功'
:
'失败'
}
}
}
}
let
logs
=
window
.
vm
.
trackConfig
({
let
logs
=
window
.
vm
.
trackConfig
({
...
...
src/views/cardRoll/opening.vue
View file @
c4b6218
...
@@ -124,17 +124,20 @@ export default {
...
@@ -124,17 +124,20 @@ export default {
async
buyCard
()
{
async
buyCard
()
{
this
.
showLoading
();
this
.
showLoading
();
let
payMannerId
;
let
payMannerId
;
let
orderSource
=
3
const
ua
=
navigator
.
userAgent
.
toLowerCase
();
const
ua
=
navigator
.
userAgent
.
toLowerCase
();
if
(
ua
.
match
(
/MicroMessenger/i
)
==
"micromessenger"
)
{
if
(
ua
.
match
(
/MicroMessenger/i
)
==
"micromessenger"
)
{
payMannerId
=
5
;
//6
payMannerId
=
6
;
//6
orderSource
=
3
}
else
{
}
else
{
payMannerId
=
6
;
//2
payMannerId
=
2
;
//2
orderSource
=
2
}
}
let
para
=
{
let
para
=
{
merchantId
:
this
.
merchantId
,
merchantId
:
this
.
merchantId
,
orderCode
:
this
.
orderCode
,
orderCode
:
this
.
orderCode
,
payMannerId
:
payMannerId
,
payMannerId
:
payMannerId
,
orderSource
:
3
,
orderSource
:
orderSource
,
sessionId
:
this
.
sessionId
,
sessionId
:
this
.
sessionId
,
};
};
let
logs
=
window
.
vm
.
trackConfig
({
let
logs
=
window
.
vm
.
trackConfig
({
...
...
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