Commit 653e1bbf by 杨翰文

fix: 修复问题

parent 28e05bff
......@@ -768,7 +768,7 @@ var vueInstance = new Vue({
var userInfo = await getUserInfo();
// console.log(userInfo);
var shareName = `快跟着${userInfo.nickname} 一起分享丹寨`
var shareName = `快跟着${userInfo.nickname.length > 4 ? userInfo.nickname.substr(0, 4) : userInfo.nickname} 一起分享丹寨`
var canvas = document.getElementById("canvasEle");
var ctx = canvas.getContext("2d");
......
......@@ -12,9 +12,6 @@
<script src="./libs/vue/vue.js"></script>
<script src="./libs/axios.min.js"></script>
<style>
html,body{
background:#000 ;
}
#canvasEle{
position: fixed;
left: 200%;
......@@ -433,7 +430,7 @@ var vueInstance = new Vue({
title: shareTitle, // 分享标题
desc: shareDesc, // 分享描述
link: FRONT_URL, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: currentInfo.small_image||shareImg(), // 分享图标
imgUrl: currentInfo.small_image, // 分享图标
success: function () {
// 设置成功
}
......@@ -442,7 +439,7 @@ var vueInstance = new Vue({
wx.updateTimelineShareData({
title: shareTitle, // 分享标题
link: FRONT_URL, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: currentInfo.small_image||shareImg(), // 分享图标
imgUrl: currentInfo.small_image, // 分享图标
success: function () {
// 设置成功
}
......@@ -517,7 +514,7 @@ var vueInstance = new Vue({
var userInfo = await getUserInfo();
console.log(userInfo);
var shareUserName = `快跟着${userInfo.nickname} 一起分享丹寨`
var shareUserName = `快跟着${userInfo.nickname.length > 4 ? userInfo.nickname.substr(0, 4) : userInfo.nickname} 一起分享丹寨`
var canvas = document.getElementById("canvasEle");
......@@ -535,7 +532,7 @@ var vueInstance = new Vue({
//userInfo.qrcode = 'https://qingclouds-server.oss-cn-shanghai.aliyuncs.com/da43bbbbc9dd8c82/59a3da8c0f33cd98.png'//替换下
let qr_image = await createImgByAsync(userInfo.qrcode);
console.log(qr_image)
ctx.drawImage(qr_image, dpr * 45, dpr * 923, dpr * 110, dpr * 110);
......@@ -633,7 +630,7 @@ function createImgByAsync(url) {
return new Promise((resolve, reject) => {
let img = new Image();
img.setAttribute("crossOrigin", 'Anonymous');
img.src = url //+ '?time=' + new Date().valueOf();
img.src = url + '?time=' + new Date().valueOf();
img.onload = function () {
resolve(img)
}
......
......@@ -588,7 +588,7 @@ var vueInstance = new Vue({
var userInfo = await getUserInfo();
// console.log(userInfo);
var shareName = `快跟着${userInfo.nickname} 一起分享丹寨`
var shareName = `快跟着${userInfo.nickname.length > 4 ? userInfo.nickname.substr(0, 4) : userInfo.nickname} 一起分享丹寨`
var canvas = document.getElementById("canvasEle");
var ctx = canvas.getContext("2d");
......
<!DOCTYPE html>
<html>
<head>
<title>度假到丹寨</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
</head>
<body id="app">
<script src="../../libs/helper.js"></script>
<script>
async function init_applcation() {
var code = getQueryByString(location.href,'code')
if(code){
location.href = `../../index.html?code=${code}`
}
}
init_applcation()
</script>
</body>
</html>
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 sign in to comment