兼容app,修改海报生成的问题

This commit is contained in:
gaoxs
2020-05-01 17:48:23 +08:00
parent 1f3fbde86e
commit 9ae2a1d223
39 changed files with 703 additions and 589 deletions

View File

@ -27,9 +27,9 @@ const dialog = {
// notify,
loading: {
open: () => {
uni.showLoading({
title: '加载中'
})
// uni.showLoading({
// title: '加载中'
// })
},
close: () => {
uni.hideLoading()

View File

@ -459,19 +459,23 @@ export function handleQrCode() {
try {
var urlSpread = parseQuery()["q"];
if (urlSpread) {
// 通过海报二维码进来
urlSpread = urlSpread
.split("%3F")[1]
.replace(/%3D/g, ":")
.replace(/%26/g, ",")
.split(",")
.map((item, index) => {
item = item.split(":");
return `"${item[0]}":"${item[1]}"`;
})
.join(",");
urlSpread = JSON.parse("{" + urlSpread + "}");
return urlSpread
if (urlSpread.indexOf('%3F') != -1) {
// 通过海报二维码进来
urlSpread = urlSpread
.split("%3F")[1]
.replace(/%3D/g, ":")
.replace(/%26/g, ",")
.split(",")
.map((item, index) => {
item = item.split(":");
return `"${item[0]}":"${item[1]}"`;
})
.join(",");
urlSpread = JSON.parse("{" + urlSpread + "}");
return urlSpread
} else {
return handleUrlParam(urlSpread)
}
}
return null
} catch {
@ -480,6 +484,19 @@ export function handleQrCode() {
}
export function handleUrlParam(path) {
console.log(path)
var url = path.split("?")[1]; //获取url中"?"符后的字串
console.log(url)
var theRequest = new Object();
let strs = url.split("&");
for (var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
}
return theRequest;
}
const getImageInfo = (images) => {
return new Promise((resolve, reject) => {
let imageAry = {}