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
536b25df
Commit
536b25df
authored
Sep 15, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理线上右上角分享标题、主图的问题
parent
83f37962
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
50 additions
and
14 deletions
+50
-14
index.html
public/index.html
+6
-0
App.vue
src/App.vue
+10
-5
groupBuy.js
src/api/groupBuy.js
+5
-0
env.config.js
src/config/env.config.js
+3
-3
prod.config.js
src/config/prod.config.js
+1
-0
main.js
src/main.js
+1
-0
module.js
src/store/module.js
+18
-2
type.js
src/store/type.js
+1
-0
index.vue
src/views/goodsDetail/index.vue
+4
-3
createOrder.vue
src/views/order/createOrder.vue
+1
-1
No files found.
public/index.html
View file @
536b25df
...
...
@@ -105,6 +105,12 @@
</script>
</head>
<body>
<script
src=
"https://cdn.bootcdn.net/ajax/libs/vConsole/3.9.0/vconsole.min.js"
></script>
<script>
// init vConsole
var
vConsole
=
new
VConsole
();
console
.
log
(
'
Hello world
'
);
</script>
<noscript>
<strong>
We're sorry but
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
</noscript>
...
...
src/App.vue
View file @
536b25df
...
...
@@ -2,6 +2,7 @@
<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"
/>
<router-view
/>
</div>
<div
v-if=
"loading"
class=
"loading-container"
>
...
...
@@ -13,13 +14,14 @@
<
script
>
import
{
mapState
}
from
'
vuex
'
;
import
NetError
from
'
@/components/NetError
'
;
import
{
isApp
,
isWxMp
}
from
'
@/service/validation.service
'
;
import
{
isApp
,
isWxMp
,
isWechat
}
from
'
@/service/validation.service
'
;
import
store
from
'
@/store
'
;
import
Weapp
from
'
@/components/weapp
'
;
export
default
{
name
:
'
App
'
,
components
:
{
NetError
NetError
,
Weapp
},
data
()
{
return
{};
...
...
@@ -29,7 +31,8 @@ export default {
title
:
state
=>
state
.
pay
.
title
,
header
:
state
=>
state
.
pay
.
header
,
loading
:
state
=>
state
.
pay
.
loading
,
showMiniappGuide
:
state
=>
state
.
pay
.
showMiniappGuide
isPrimordialBrowser
:
state
=>
state
.
pay
.
isPrimordialBrowser
,
isWeixinBrowser
:
state
=>
state
.
pay
.
isWeixinBrowser
})
},
watch
:
{
...
...
@@ -42,10 +45,12 @@ export default {
}
},
$route
()
{
console
.
log
(
isApp
,
isWxMp
,
isWechat
);
store
.
dispatch
(
'
change_show_mini_app_guide
'
,
{
bool
:
!
isApp
&&
!
isWxMp
?
true
:
false
,
bool
:
!
isApp
&&
!
isWxMp
&&
!
isWechat
?
true
:
false
,
pointer
:
this
});
store
.
dispatch
(
'
change_is_weixin_browser
'
,
!
isApp
&&
!
isWxMp
&&
isWechat
?
true
:
false
);
}
},
methods
:
{
...
...
src/api/groupBuy.js
View file @
536b25df
...
...
@@ -33,5 +33,10 @@ export default {
url
:
url
,
appId
:
'
wx2f44c7fe7b08458d
'
});
},
getScheme
(
data
)
{
return
http
.
get
(
`
${
talosHost
}
/api/kdsp/ka/info/getShareMiniUrl`
,
data
,
{
hideLoading
:
true
});
}
};
src/config/env.config.js
View file @
536b25df
...
...
@@ -7,9 +7,9 @@
const
protocol
=
window
.
location
.
protocol
;
const
qiniuHost
=
protocol
+
'
//kdspstatic.q-gp.com/
'
;
const
shenceHost
=
'
https://bn.xyqb.com/sa?project=default
'
;
// 测试地址
const
talosHost
=
'
https://talos-vcc
2
.liangkebang.net
'
;
const
faceHost
=
'
https://auth-vcc
2
.liangkebang.net
'
;
const
kdspHost
=
'
https://kdsp-api-vcc
2
.liangkebang.net
'
;
const
talosHost
=
'
https://talos-vcc
3
.liangkebang.net
'
;
const
faceHost
=
'
https://auth-vcc
3
.liangkebang.net
'
;
const
kdspHost
=
'
https://kdsp-api-vcc
3
.liangkebang.net
'
;
const
VCC_CHANNEL
=
''
;
const
TERMINAL
=
'
H5
'
;
const
VERSION
=
'
7.9.00
'
;
...
...
src/config/prod.config.js
View file @
536b25df
...
...
@@ -7,6 +7,7 @@ const VCC_CHANNEL = '';
const
TERMINAL
=
'
H5
'
;
const
VERSION
=
'
7.9.00
'
;
const
kdspHost
=
'
https://kdsp-api.q-gp.com
'
;
export
default
{
// apiHost,
faceHost
,
...
...
src/main.js
View file @
536b25df
...
...
@@ -25,6 +25,7 @@ Vue.prototype.util = new Bridge();
saService
.
init
(
router
);
Vue
.
use
(
lazyload
);
Vue
.
config
.
productionTip
=
false
;
Vue
.
config
.
ignoredElements
=
[
'
wx-open-launch-weapp
'
];
new
Vue
({
router
,
...
...
src/store/module.js
View file @
536b25df
import
*
as
types
from
'
./type
'
;
import
groupBuy
from
'
@/api/groupBuy
'
;
const
state
=
{
header
:
true
,
title
:
'
支付中心
'
,
loading
:
false
,
meta
:
{},
keepAliveMap
:
[],
showMiniappGuide
:
false
isPrimordialBrowser
:
false
,
// 是否是原生浏览器
isWeixinBrowser
:
false
// 是否是微信浏览器
};
// getters
...
...
@@ -30,6 +32,9 @@ const actions = {
},
change_show_mini_app_guide
({
commit
},
obj
)
{
commit
(
types
.
CHANGE_SHOW_MINI_APP_GUIDE
,
obj
);
},
change_is_weixin_browser
({
commit
},
bool
)
{
commit
(
types
.
CHANGE_IS_WEIXIN_BROWSER
,
bool
);
}
};
...
...
@@ -68,8 +73,11 @@ const mutations = {
[
types
.
CLEAR_KEEP_ALIVE
](
state
)
{
state
.
keepAliveMap
=
[];
},
[
types
.
CHANGE_IS_WEIXIN_BROWSER
](
state
,
bool
)
{
state
.
isWeixinBrowser
=
bool
;
},
[
types
.
CHANGE_SHOW_MINI_APP_GUIDE
](
state
,
{
bool
,
pointer
})
{
state
.
showMiniappGuide
=
bool
;
state
.
isPrimordialBrowser
=
bool
;
if
(
bool
)
{
// 如果非app webview并且非小程序webview,直接拦截提示,到小程序操作
pointer
.
$dialog
({
...
...
@@ -78,6 +86,14 @@ const mutations = {
confirmButtonText
:
'
打开微信小程序
'
,
onConfirm
:
()
=>
{
// todo 跳转到小程序
const
getScheme
=
async
function
()
{
const
[
res
]
=
await
groupBuy
.
getScheme
({
miniUrl
:
'
pages/user/login
'
});
const
url
=
res
;
window
.
location
.
href
=
url
;
};
getScheme
();
}
});
}
...
...
src/store/type.js
View file @
536b25df
...
...
@@ -3,6 +3,7 @@ export const CHANGE_TITLE = 'CHANGE_TITLE';
export
const
CHANGE_META
=
'
CHANGE_META
'
;
export
const
CHANGE_LOADING
=
'
CHANGE_LOADING
'
;
export
const
CHANGE_SHOW_MINI_APP_GUIDE
=
'
CHANGE_SHOW_MINI_APP_GUIDE
'
;
export
const
CHANGE_IS_WEIXIN_BROWSER
=
'
CHANGE_IS_WEIXIN_BROWSER
'
;
export
const
ADD_KEEP_ALIVE
=
'
ADD_KEEP_ALIVE
'
;
export
const
DEL_KEEP_ALIVE
=
'
DEL_KEEP_ALIVE
'
;
export
const
CLEAR_KEEP_ALIVE
=
'
CLEAR_KEEP_ALIVE
'
;
src/views/goodsDetail/index.vue
View file @
536b25df
...
...
@@ -164,7 +164,7 @@
</div>
</cr-popup>
<bottom-nav
v-if=
"!
showMiniappGuide
"
v-if=
"!
isPrimordialBrowser && !isWeixinBrowser
"
type=
"shoppingCar"
:disabled=
"false"
@
buy=
"goVccOrDetail"
...
...
@@ -235,7 +235,8 @@ export default {
return
this
.
detailInfo
.
stock
?
1
:
0
;
},
...
mapState
({
showMiniappGuide
:
state
=>
state
.
pay
.
showMiniappGuide
isPrimordialBrowser
:
state
=>
state
.
pay
.
showMiniappGuide
,
isWeixinBrowser
:
state
=>
state
.
pay
.
isWeixinBrowser
})
},
created
()
{
...
...
@@ -439,7 +440,7 @@ export default {
this
.
swiperCurrent
=
e
.
detail
.
current
;
},
handleParamsClick
(
eventType
,
name
)
{
if
(
this
.
showMiniappGuide
)
return
;
if
(
this
.
isPrimordialBrowser
)
return
;
this
.
currentPopupType
=
eventType
;
this
.
currentPopupName
=
name
;
switch
(
eventType
)
{
...
...
src/views/order/createOrder.vue
View file @
536b25df
...
...
@@ -41,7 +41,7 @@
</
template
>
<!-- 底部 -->
<bottom-nav
v-if=
"orderInfo.shopSkuList.length && !
showMiniappGuide
"
v-if=
"orderInfo.shopSkuList.length && !
isPrimordialBrowser && !isWeixinBrowser
"
type=
"submitOrder"
:info=
"orderInfo.calcFeeInfo"
@
buy=
"handleBuy"
...
...
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