Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
mongo-ui
Commits
61c18dfd
Commit
61c18dfd
authored
Sep 01, 2020
by
郭志伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/goods' into 'master'
fix: 分享测试 See merge request
!186
parents
3dc3d778
35905816
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
7 deletions
+16
-7
http.js
src/service/http.js
+6
-2
wxJsSdk.js
src/service/wxJsSdk.js
+4
-1
detailPay.mixin.js
src/views/Goods/Detail/modules/detailPay.mixin.js
+5
-3
liCalFee.mixin.js
src/views/Goods/Detail/modules/liCalFee.mixin.js
+1
-1
No files found.
src/service/http.js
View file @
61c18dfd
...
@@ -5,6 +5,7 @@ import axios from "axios";
...
@@ -5,6 +5,7 @@ import axios from "axios";
import
cherry
from
"
@qg/cherry-ui
"
;
import
cherry
from
"
@qg/cherry-ui
"
;
import
config
from
"
../config
"
;
import
config
from
"
../config
"
;
import
localStorage
from
"
./localStorage
"
;
import
localStorage
from
"
./localStorage
"
;
import
{
debounce
}
from
"
lodash-es
"
;
const
ERR_MESSAGE_MAP
=
{
const
ERR_MESSAGE_MAP
=
{
status
:
{
status
:
{
...
@@ -31,6 +32,9 @@ axios.defaults.timeout = 30000;
...
@@ -31,6 +32,9 @@ axios.defaults.timeout = 30000;
const
wait
=
async
seconds
=>
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
seconds
));
const
wait
=
async
seconds
=>
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
seconds
));
let
showLoading
=
debounce
(
function
()
{
beforeRequest
();
},
3000
);
function
beforeRequest
()
{
function
beforeRequest
()
{
reqNum
++
;
reqNum
++
;
store
.
dispatch
(
"
setIsLoading
"
,
true
);
store
.
dispatch
(
"
setIsLoading
"
,
true
);
...
@@ -50,7 +54,7 @@ function clearRequest() {
...
@@ -50,7 +54,7 @@ function clearRequest() {
// 请求拦截器
// 请求拦截器
axios
.
interceptors
.
request
.
use
(
axios
.
interceptors
.
request
.
use
(
config
=>
{
config
=>
{
beforeRequest
();
showLoading
();
// 发起请求时,取消掉当前正在进行的相同请求
// 发起请求时,取消掉当前正在进行的相同请求
if
(
pending
[
config
.
url
])
{
if
(
pending
[
config
.
url
])
{
...
@@ -74,7 +78,7 @@ axios.interceptors.request.use(
...
@@ -74,7 +78,7 @@ axios.interceptors.request.use(
axios
.
interceptors
.
response
.
use
(
axios
.
interceptors
.
response
.
use
(
response
=>
{
response
=>
{
afterRequest
();
afterRequest
();
showLoading
.
cancel
();
delete
pending
[
response
.
config
.
url
];
delete
pending
[
response
.
config
.
url
];
if
(
response
.
data
.
code
===
"
0
"
)
return
response
.
data
.
data
;
if
(
response
.
data
.
code
===
"
0
"
)
return
response
.
data
.
data
;
// 特殊处理,下单已存在时,跳转到保单列表
// 特殊处理,下单已存在时,跳转到保单列表
...
...
src/service/wxJsSdk.js
View file @
61c18dfd
...
@@ -2,13 +2,14 @@
...
@@ -2,13 +2,14 @@
* @Description: weixin-js-sdk
* @Description: weixin-js-sdk
* @LastEditors: gzw
* @LastEditors: gzw
* @Date: 20120-08-30 18:40:11
* @Date: 20120-08-30 18:40:11
* @LastEditTime: 2020-09-01 18:
12:00
* @LastEditTime: 2020-09-01 18:
36:05
*/
*/
import
cfg
from
"
@/config/index
"
;
import
cfg
from
"
@/config/index
"
;
import
{
getwxAuth
}
from
"
@/api/user
"
;
import
{
getwxAuth
}
from
"
@/api/user
"
;
import
wx
from
"
weixin-js-sdk
"
;
import
wx
from
"
weixin-js-sdk
"
;
import
{
isWeixinBrower
}
from
"
@/service/validation
"
;
import
{
isWeixinBrower
}
from
"
@/service/validation
"
;
import
localStorage
from
"
@/service/localStorage
"
;
import
localStorage
from
"
@/service/localStorage
"
;
/**
/**
* @description: 微信分享
* @description: 微信分享
*/
*/
...
@@ -69,7 +70,9 @@ export async function setShare({
...
@@ -69,7 +70,9 @@ export async function setShare({
export
function
checkOpenId
()
{
export
function
checkOpenId
()
{
const
openId
=
localStorage
.
get
(
"
openId
"
);
const
openId
=
localStorage
.
get
(
"
openId
"
);
const
local
=
window
.
location
.
href
;
const
local
=
window
.
location
.
href
;
alert
(
!
openId
&&
isWeixinBrower
);
if
(
!
openId
&&
isWeixinBrower
)
{
if
(
!
openId
&&
isWeixinBrower
)
{
alert
(
"
无openid
"
);
var
nextPage
=
document
.
createElement
(
"
a
"
);
var
nextPage
=
document
.
createElement
(
"
a
"
);
nextPage
.
setAttribute
(
nextPage
.
setAttribute
(
"
href
"
,
"
href
"
,
...
...
src/views/Goods/Detail/modules/detailPay.mixin.js
View file @
61c18dfd
...
@@ -87,9 +87,11 @@ export default {
...
@@ -87,9 +87,11 @@ export default {
.
catch
(()
=>
{
.
catch
(()
=>
{
console
.
log
(
"
h5支付
"
);
console
.
log
(
"
h5支付
"
);
// tradeType === "JSAPI" && this.$notify({ type: "warning", message: "支付异常" });
// tradeType === "JSAPI" && this.$notify({ type: "warning", message: "支付异常" });
this
.
$router
.
replace
({
setTimeout
(()
=>
{
path
:
"
/policy
"
this
.
$router
.
replace
({
});
path
:
"
/policy
"
});
},
3000
);
return
;
return
;
});
});
}
else
{
}
else
{
...
...
src/views/Goods/Detail/modules/liCalFee.mixin.js
View file @
61c18dfd
...
@@ -39,7 +39,7 @@ export default {
...
@@ -39,7 +39,7 @@ export default {
}
else
{
}
else
{
this
.
isAgeIndexChange
=
false
;
this
.
isAgeIndexChange
=
false
;
}
}
return
_index
;
return
_index
===
-
1
?
0
:
_index
;
},
},
amountOptions
()
{
amountOptions
()
{
const
{
ageIndex
,
countOptions
}
=
this
;
const
{
ageIndex
,
countOptions
}
=
this
;
...
...
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