Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
group-buy-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
group-buy-ui
Commits
83be6c24
Commit
83be6c24
authored
Sep 27, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 处理bug
parent
e4f57835
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
34 additions
and
68 deletions
+34
-68
App.vue
src/App.vue
+15
-3
groupShare.vue
src/components/groupShare.vue
+2
-2
env.config.js
src/config/env.config.js
+1
-1
prod.config.js
src/config/prod.config.js
+1
-1
goodsCheck.mixin.js
src/mixins/goodsCheck.mixin.js
+3
-7
index.js
src/router/index.js
+0
-1
init.service.js
src/service/init.service.js
+5
-0
index.vue
src/views/goodsDetail/index.vue
+2
-47
goodsCard.vue
src/views/goodsList/components/goodsCard.vue
+0
-1
index.vue
src/views/goodsList/index.vue
+5
-3
List.vue
src/views/orderList/components/List.vue
+0
-2
No files found.
src/App.vue
View file @
83be6c24
...
...
@@ -2,7 +2,6 @@
<div
id=
"app"
>
<cr-nav-bar
v-if=
"header"
:title=
"title"
left-text=
""
@
click-left=
"backFun"
/>
<div
class=
"app"
>
<Weapp
v-if=
"isWeixinBrowser"
jump-url=
"/pages/user/login"
/>
<keep-alive>
<router-view
v-if=
"$route.meta.keepLive"
/>
</keep-alive>
...
...
@@ -20,13 +19,13 @@ import { mapState } from 'vuex';
import
NetError
from
'
@/components/NetError
'
;
import
{
isApp
,
isWxMp
,
isWechat
}
from
'
@/service/validation.service
'
;
import
store
from
'
@/store
'
;
import
Weapp
from
'
@/components/weapp
'
;
import
goodsShare
from
'
@/components/groupShare
'
;
import
qs
from
'
qs
'
;
export
default
{
name
:
'
App
'
,
components
:
{
NetError
,
Weapp
,
//
Weapp,
goodsShare
},
data
()
{
...
...
@@ -58,6 +57,19 @@ export default {
store
.
dispatch
(
'
change_is_weixin_browser
'
,
!
isApp
&&
!
isWxMp
&&
isWechat
?
true
:
false
);
}
},
created
()
{
if
(
isWechat
&&
!
isWxMp
)
{
const
params
=
{
jumpUrl
:
'
pages/groupbuy/webview
'
,
terminal
:
1
,
extraInfo
:
JSON
.
stringify
({
url
:
window
.
location
.
href
})
};
const
url
=
qs
.
stringify
(
params
);
window
.
location
.
href
=
`https://mall.q-gp.com/common/launch?
${
url
}
`
;
}
},
methods
:
{
backFun
()
{
this
.
$router
.
go
(
-
1
);
...
...
src/components/groupShare.vue
View file @
83be6c24
...
...
@@ -137,7 +137,7 @@ export default {
};
switch
(
type
)
{
case
0
:
linkPath
=
`
${
config
.
localHost
}
/groupBuy/list?
h=0&
activityId=
${
shareInfo
.
activityId
}
`
;
linkPath
=
`
${
config
.
localHost
}
/groupBuy/list?activityId=
${
shareInfo
.
activityId
}
`
;
break
;
case
1
:
case
2
:
...
...
@@ -146,7 +146,7 @@ export default {
detailData
.
groupBuyGroupId
=
shareInfo
.
groupBuyGroupId
;
}
linkPath
=
qs
.
stringify
(
detailData
);
linkPath
=
`
${
config
.
localHost
}
/groupBuy/skuInfo?
h=0&
${
linkPath
}
`
;
linkPath
=
`
${
config
.
localHost
}
/groupBuy/skuInfo?
${
linkPath
}
`
;
break
;
}
shareInfo
.
linkPath
=
this
.
weixinHandleLink
(
linkPath
);
...
...
src/config/env.config.js
View file @
83be6c24
...
...
@@ -10,7 +10,7 @@ const shenceHost = 'https://bn.xyqb.com/sa?project=default'; // 测试地址
const
talosHost
=
'
https://talos-test1.liangkebang.net
'
;
const
faceHost
=
'
https://auth-test1.liangkebang.net
'
;
const
kdspHost
=
'
https://kdsp-api-test1.liangkebang.net
'
;
const
localHost
=
'
https://group-buy-test1.liangkebang.net
/group-buying
'
;
// 测试环境页面地址
const
localHost
=
'
https://group-buy-test1.liangkebang.net
'
;
// 测试环境页面地址
// const talosHost = 'http://192.168.29.89:8098'; // 唐峰
// const talosHost = 'http://192.168.25.210:8080'; // 张超
// const talosHost = 'http://192.168.28.83:80'; // 董彪
...
...
src/config/prod.config.js
View file @
83be6c24
...
...
@@ -9,7 +9,7 @@ const VERSION = '7.9.00';
const
kdspHost
=
'
https://kdsp-api.q-gp.com
'
;
const
opapiHost
=
`
${
protocol
}
//opapi.xyqb.com`
;
// const localHost = 'https://mall.q-gp.com/group-buying'; // 正式环境页面地址
const
localHost
=
'
https://group-buy-test1.liangkebang.net
/group-buying
'
;
// 正式环境页面地址
const
localHost
=
'
https://group-buy-test1.liangkebang.net
'
;
// 正式环境页面地址
const
shenceUrl
=
protocol
+
'
//bn.xyqb.com/sa?project=production
'
;
export
default
{
localHost
,
...
...
src/mixins/goodsCheck.mixin.js
View file @
83be6c24
...
...
@@ -10,18 +10,15 @@ export default {
},
methods
:
{
getToken
()
{
// const that
= this;
const
_this
=
this
;
window
.
xyqbNativeEvent
=
function
(
res
)
{
const
json
=
typeof
res
===
'
string
'
?
JSON
.
parse
(
res
)
:
res
;
if
(
json
.
event
===
'
getTokenSuccess
'
)
{
const
appData
=
json
.
data
||
{};
if
(
appData
&&
appData
.
token
)
{
localStorage
.
set
(
'
vccToken
'
,
appData
.
token
);
this
.
nativeBridge
.
openNewUrl
({
event
:
'
openNewUrl
'
,
data
:
{
newUrl
:
window
.
location
.
href
//需要打开的新链接
}
_this
.
$nextTick
(()
=>
{
window
.
location
.
reload
();
});
}
}
...
...
@@ -56,7 +53,6 @@ export default {
}
});
}
return
needLogin
;
}
}
};
src/router/index.js
View file @
83be6c24
...
...
@@ -28,7 +28,6 @@ const scrollBehavior = (to, from, savedPosition) => {
const
router
=
new
VueRouter
({
mode
:
'
history
'
,
base
:
'
/group-buying
'
,
routes
,
scrollBehavior
});
...
...
src/service/init.service.js
View file @
83be6c24
...
...
@@ -10,6 +10,11 @@ export default {
// token校验,整个流程都是登陆后的
init
:
router
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
if
(
to
.
name
==
'
groupBuyList
'
&&
from
.
name
==
'
groupBuySkuInfo
'
)
{
// 这是为了详情页登录,把登录信息带回列表页所做的处理
to
.
query
.
vccToken
=
'
{token}
'
;
}
Cookies
.
set
(
'
h
'
,
0
);
// 所有自定义路由字段在此处理
const
{
meta
}
=
to
;
isWechat
&&
localStorage
.
set
(
'
vccChannel
'
,
'
159913
'
);
...
...
src/views/goodsDetail/index.vue
View file @
83be6c24
...
...
@@ -202,10 +202,7 @@ import rules from '@/components/rules';
import
groupDescInfo
from
'
./components/groupDescInfo
'
;
import
{
mapState
}
from
'
vuex
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
// import goodsCheckMixin from '@/mixins/goodsCheck.mixin';
import
Bridge
from
'
@qg/js-bridge
'
;
import
MpBridge
from
'
@/service/mp
'
;
import
{
isWxMp
,
isApp
}
from
'
@/service/validation.service
'
;
import
goodsCheckMixin
from
'
@/mixins/goodsCheck.mixin
'
;
import
{
EventBus
}
from
'
@/service/utils.service
'
;
import
{
saTrackEvent
}
from
'
@/service/sa.service
'
;
export
default
{
...
...
@@ -224,7 +221,7 @@ export default {
filters
:
{
Img2Thumb
},
//
mixins: [goodsCheckMixin],
mixins
:
[
goodsCheckMixin
],
data
()
{
return
{
timestemp
:
''
,
// 大活动结束时间
...
...
@@ -324,48 +321,6 @@ export default {
type
:
2
});
},
getToken
()
{
window
.
xyqbNativeEvent
=
function
(
res
)
{
const
json
=
typeof
res
===
'
string
'
?
JSON
.
parse
(
res
)
:
res
;
if
(
json
.
event
===
'
getTokenSuccess
'
)
{
const
appData
=
json
.
data
||
{};
if
(
appData
&&
appData
.
token
)
{
localStorage
.
set
(
'
vccToken
'
,
appData
.
token
);
window
.
location
.
reload
();
}
}
};
this
.
nativeBridge
.
getToken
();
},
checkLogin
()
{
const
vccToken
=
localStorage
.
get
(
'
vccToken
'
);
const
needLogin
=
vccToken
?
false
:
true
;
if
(
needLogin
)
{
if
(
isApp
)
this
.
nativeBridge
=
new
Bridge
();
else
if
(
isWxMp
)
this
.
nativeBridge
=
new
MpBridge
();
this
.
$dialog
({
message
:
'
参与拼团活动需要您先进行登录哦~
'
,
title
:
''
,
showCancelButton
:
false
,
confirmButtonText
:
'
登录
'
,
onConfirm
:
()
=>
{
if
(
isWxMp
)
{
this
.
nativeBridge
.
getToken
();
}
else
if
(
isApp
)
{
// native调用getToken
this
.
getToken
();
}
else
{
this
.
$dialog
({
message
:
'
请在App或小程序中参与活动~
'
,
title
:
''
,
showCancelButton
:
false
,
confirmButtonText
:
'
我知道了
'
});
}
}
});
}
},
onChange
(
index
)
{
this
.
swiperCurrent
=
index
;
},
...
...
src/views/goodsList/components/goodsCard.vue
View file @
83be6c24
...
...
@@ -111,7 +111,6 @@ export default {
this
.
$router
.
push
({
path
:
'
/groupBuy/skuInfo
'
,
query
:
{
h
:
0
,
skuNo
,
goodsSpecialId
,
activityId
:
activityInfoId
,
...
...
src/views/goodsList/index.vue
View file @
83be6c24
...
...
@@ -188,10 +188,12 @@ export default {
this
.
goodsTemp
=
await
computedTemplate
(
info
);
},
async
goToMyorder
()
{
const
isLogin
=
this
.
checkLogin
();
if
(
!
isLogin
)
{
this
.
$router
.
push
(
'
/orderList/0
'
);
const
hasLogin
=
localStorage
.
get
(
'
vccToken
'
)
?
true
:
false
;
if
(
!
hasLogin
)
{
this
.
checkLogin
();
return
;
}
this
.
$router
.
push
(
'
/orderList/0
'
);
},
async
openShareEvent
()
{
const
shareInfo
=
await
this
.
getShareData
();
...
...
src/views/orderList/components/List.vue
View file @
83be6c24
...
...
@@ -171,7 +171,6 @@ export default {
this
.
$router
.
replace
({
path
:
'
/groupBuy/list
'
,
query
:
{
h
:
0
,
activityId
:
itemInfo
.
activityInfoId
}
});
...
...
@@ -230,7 +229,6 @@ export default {
this
.
$router
.
push
({
path
:
'
/groupBuy/skuInfoSmallPic
'
,
query
:
{
h
:
0
,
skuNo
:
skuList
[
0
].
skuNo
,
groupBuyGroupId
:
activityHundredGroupId
,
goodsSpecialId
:
skuList
[
0
].
goodsSpecialId
,
...
...
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