diff --git a/config/site.config.js b/config/site.config.js index b35fde8..8efd251 100644 --- a/config/site.config.js +++ b/config/site.config.js @@ -2,7 +2,7 @@ const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM; // localIp = false module.exports = { H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理 - WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.39:48080/',//非代理地址 + WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.36:48080/',//非代理地址 TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.39:48082/', httpPrefix: 'admin-api/', imgUrl: 'http://jxtemp.oss-cn-hangzhou.aliyuncs.com/defaultImages/admin/bigImg/' diff --git a/pages/userCenter/scanCode/coach.png b/pages/userCenter/scanCode/coach.png new file mode 100644 index 0000000..d14ebbe Binary files /dev/null and b/pages/userCenter/scanCode/coach.png differ diff --git a/pages/userCenter/scanCode/scanCode.vue b/pages/userCenter/scanCode/scanCode.vue index 0f467d2..cca4bd5 100644 --- a/pages/userCenter/scanCode/scanCode.vue +++ b/pages/userCenter/scanCode/scanCode.vue @@ -26,13 +26,17 @@ qr.data = JSON.stringify({ coachId, schoolId, - nickname: encodeURIComponent(nickname) + nickname: encodeURIComponent(nickname), + schoolName: encodeURIComponent('必须与canvas设置的宽高一致/设置二维码大小') }) + // 设置二维码大小,必须与canvas设置的宽高一致 qr.size = 200; - qr.margin = 20; + qr.margin = 10; + qr.errorCorrectLevel = UQRCode.errorCorrectLevel.L // 调用制作二维码方法 - qr.make(); + qr.make() + qr.foregroundImageSrc = require('./coach.png') // 获取canvas上下文 var canvasContext = uni.createCanvasContext('qrcode', this); // 如果是组件,this必须传入 // 设置uQRCode实例的canvas上下文