Commit e35b52ea authored by beisir's avatar beisir

faet:app整个流程颜色

parent 3b8bbf81
...@@ -22,7 +22,6 @@ import { isApp, isWxMp, isWechat } from '@/service/validation.service'; ...@@ -22,7 +22,6 @@ import { isApp, isWxMp, isWechat } from '@/service/validation.service';
import store from '@/store'; import store from '@/store';
import Weapp from '@/components/weapp'; import Weapp from '@/components/weapp';
import goodsShare from '@/components/groupShare'; import goodsShare from '@/components/groupShare';
// import { setAppTitleColor } from '@/service/utils.service';
export default { export default {
name: 'App', name: 'App',
components: { components: {
...@@ -52,7 +51,6 @@ export default { ...@@ -52,7 +51,6 @@ export default {
} }
}, },
$route() { $route() {
// to.name !== 'groupBuyList' && alert(setAppTitleColor('#fff'));
store.dispatch('change_show_mini_app_guide', { store.dispatch('change_show_mini_app_guide', {
bool: !isApp && !isWxMp && !isWechat ? true : false, bool: !isApp && !isWxMp && !isWechat ? true : false,
pointer: this pointer: this
......
...@@ -51,6 +51,9 @@ export default { ...@@ -51,6 +51,9 @@ export default {
}; };
}, },
created() { created() {
// this.nativeBridge.openNewUrl({
// newUrl: `http://orderDetail?orderNo=111111111 `
// });
if (isWxMp) { if (isWxMp) {
this.nativeBridge = new MpBridge(); this.nativeBridge = new MpBridge();
return; return;
......
...@@ -101,12 +101,16 @@ const mutations = { ...@@ -101,12 +101,16 @@ const mutations = {
showCancelButton: false, showCancelButton: false,
confirmButtonText: '打开微信小程序', confirmButtonText: '打开微信小程序',
onConfirm: () => { onConfirm: () => {
alert(`from=groupBuy&url=${paramsParentheses(pointer)}`);
debugger;
// todo 跳转到小程序 // todo 跳转到小程序
let getScheme = async function() { let getScheme = async function() {
const [res] = await groupBuy.getScheme({ const [res] = await groupBuy.getScheme({
miniUrl: 'pages/groupbuy/webview', miniUrl: 'pages/groupbuy/webview',
// params: `url=${window.location.href}` // miniUrl: 'pages/product/goodDetail',
params: `from=groupBuy&url=${paramsParentheses(pointer)}` params: `from=groupBuy&url=${encodeURIComponent(
JSON.stringify(paramsParentheses(pointer))
)}`
}); });
const url = res; const url = res;
window.location.href = url; // todo 需要验证 window.location.href = url; // todo 需要验证
......
...@@ -129,6 +129,15 @@ export default { ...@@ -129,6 +129,15 @@ export default {
return +new Date(endTime || 0); return +new Date(endTime || 0);
} }
}, },
watch: {
$route(to) {
if (to.name !== 'groupBuyList') {
this.setTitleColor();
return;
}
this.setTitleColor(this.goodsTemp.bgcolor);
}
},
created() { created() {
this.reload = true; this.reload = true;
}, },
...@@ -211,8 +220,7 @@ export default { ...@@ -211,8 +220,7 @@ export default {
activityId activityId
}); });
}, },
setTitleColor(bgcolor = '#fff') { setTitleColor(bgcolor = '#ffffff') {
// alert('not color');
setAppTitleColor(bgcolor); setAppTitleColor(bgcolor);
}, },
handleBtnClick(item) { handleBtnClick(item) {
......
...@@ -175,9 +175,16 @@ export default { ...@@ -175,9 +175,16 @@ export default {
}); });
}, },
goGroupDetails(skuInfo) { goGroupDetails(skuInfo) {
this.nativeBridge.openNewUrl({ if (isWxMp) {
newUrl: `/pages/order/orderDetail?orderNo=${skuInfo.orderNo}` this.nativeBridge.openNewUrl({
}); newUrl: `/pages/order/orderDetail?orderNo=${skuInfo.orderNo}`
});
} else if (isApp) {
// alert(JSON)
this.nativeBridge.openNewUrl({
newUrl: `http://orderDetail?orderNo=111111111 `
});
}
}, },
goGroupPayPages(skuInfo) { goGroupPayPages(skuInfo) {
this.$router.push(`/pay?orderNo=${skuInfo.orderNo}`); this.$router.push(`/pay?orderNo=${skuInfo.orderNo}`);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment