Commit 7e6ee66d authored by beisir's avatar beisir

feat:更改打开小程序方式

parent fdde41eb
...@@ -60,5 +60,13 @@ export default { ...@@ -60,5 +60,13 @@ export default {
}, },
getGroupShareInfo(orderNo) { getGroupShareInfo(orderNo) {
return http.get(`${talosHost}/api/kdsp/groupShareInfo?orderNo=${orderNo}`); return http.get(`${talosHost}/api/kdsp/groupShareInfo?orderNo=${orderNo}`);
},
getPlayBillUrl(m) {
return http.get(`http://192.168.25.122/api/kdsp/playBill/getPlayBillUrl?m=${m}`);
},
makePlayBillPicUrl(activityInfoId) {
return http.get(
`http://192.168.25.122/api/kdsp/activity/activity-info/makePlayBillPicUrl?activityInfoId=${activityInfoId}`
);
} }
}; };
...@@ -4,6 +4,7 @@ const jsBridge = new Bridge(); ...@@ -4,6 +4,7 @@ const jsBridge = new Bridge();
import Vue from 'vue'; import Vue from 'vue';
import config from '@/config'; import config from '@/config';
export const EventBus = new Vue(); export const EventBus = new Vue();
import qs from 'qs';
/** /**
* 替换邮箱字符 * 替换邮箱字符
* @param {String} email 输入字符串 * @param {String} email 输入字符串
...@@ -366,15 +367,15 @@ export function setAppTitleColor(bgcolor = '#fff') { ...@@ -366,15 +367,15 @@ export function setAppTitleColor(bgcolor = '#fff') {
} }
export function paramsParentheses(pointer) { export function paramsParentheses(pointer) {
const params = pointer.$route.query; let params = pointer.$route.query;
const path = pointer.$route.path; const path = pointer.$route.path;
let tempString = ''; const paramsString = qs.stringify(params);
for (let key in params) { // for (let key in params) {
let option = `${key}=${params[key]}`; // let option = `${key}=${params[key]}`;
tempString += `$${option}`; // tempString += `$${option}`;
} // }
if (tempString.length) { // if (tempString.length) {
tempString = `${config.localHost}${path}!` + tempString.slice(1); // tempString = `${config.localHost}${path}!` + tempString.slice(1);
} // }
return tempString; return `${config.localHost}${path}?` + paramsString;
} }
...@@ -104,10 +104,10 @@ const mutations = { ...@@ -104,10 +104,10 @@ const mutations = {
// 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',
// miniUrl: 'pages/product/goodDetail', miniUrl: 'pages/product/goodDetail',
params: `from=groupBuy&url=${encodeURIComponent( params: `from=groupBuy&url=${encodeURIComponent(
JSON.stringify(paramsParentheses(pointer)) JSON.stringify(paramsParentheses(pointer) + '&vccToken={token}')
)}` )}`
}); });
const url = res; const url = res;
......
...@@ -164,7 +164,9 @@ export default { ...@@ -164,7 +164,9 @@ export default {
else if (isWxMp) this.nativeBridge = new MpBridge(); else if (isWxMp) this.nativeBridge = new MpBridge();
}, },
methods: { methods: {
finishTimeChange() {}, finishTimeChange() {
this.$emit('finish-time');
},
goGroupBuyList(itemInfo) { goGroupBuyList(itemInfo) {
this.$router.replace({ this.$router.replace({
path: '/groupBuy/list', path: '/groupBuy/list',
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
:finished="item.finished" :finished="item.finished"
@load="handleLoad" @load="handleLoad"
@option-click="handleOptionClick" @option-click="handleOptionClick"
@finish-time="finishTimeChange"
/> />
</cr-tab> </cr-tab>
</cr-tabs> </cr-tabs>
...@@ -68,6 +69,11 @@ export default { ...@@ -68,6 +69,11 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
finishTimeChange() {
// 倒计时结束之后刷新
window.location.reload();
// this.getList();
},
getstatusQuery() { getstatusQuery() {
const { status } = this.$route.params || {}; const { status } = this.$route.params || {};
status && (this.currentTab = Number(status)); status && (this.currentTab = Number(status));
......
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