Browse Source

扫码文件提交

master
unknown 10 months ago
parent
commit
7f6ac0b509
  1. 2
      config/site.config.js
  2. BIN
      pages/userCenter/scanCode/coach.png
  3. 10
      pages/userCenter/scanCode/scanCode.vue

2
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/'

BIN
pages/userCenter/scanCode/coach.png

After

Width: 72  |  Height: 72  |  Size: 3.3 KiB

10
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
// uQRCodecanvas

Loading…
Cancel
Save