htc 2 일 전
부모
커밋
5d17943618
3개의 변경된 파일8개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      manifest.json
  2. 5 2
      pages/support.vue
  3. 2 1
      pagesMy/forward.vue

+ 1 - 1
manifest.json

@@ -102,7 +102,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wxb0ecfcf0c3e50402",
+        "appid" : "wxe6afb089695f90e7",
         "setting" : {
             "urlCheck" : false,
             "es6" : false,

+ 5 - 2
pages/support.vue

@@ -2,7 +2,7 @@
 	<view class="default_page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
 		<cus-header title='专业支持'></cus-header>
 		<image style="width: 100%;" :src="imgBase+'support.png'" mode="widthFix" @click="handleTurn"></image>
-		<div class="code" :style="{'top':(mt*2+1278)+'rpx'}">
+		<div class="code" :style="{'top':codetop+'px'}">
 			<canvas canvas-id="qrcode" style="width:216rpx;height:216rpx;border-radius: 16rpx; position: fixed;left: -9999px;top: -9999px;"></canvas>
 			<image v-if="qrCodeDataURL" :src="qrCodeDataURL" mode="scaleToFill" show-menu-by-longpress></image>
 		</div>
@@ -17,9 +17,11 @@
 				imgBase:this.$imgBase,
 				qrCodeDataURL:'',
 				qrVal:'https://wxapp.transcend-intl.cn',
+				codetop:0,
 			}
 		},
 		onLoad() {
+			this.codetop = uni.upx2px(this.mt*2+1278);
 			this.generateQRCode();
 			if(uni.getStorageSync('userInfo')){
 				this.qrVal = `https://wxapp.transcend-intl.cn?shareUserId=${JSON.parse(uni.getStorageSync('userInfo'))?.id||''}`;
@@ -34,13 +36,14 @@
 			async generateQRCode(){
 				try {
 					let that = this;
+					const canvasSizePx = uni.upx2px(216);
 					// 确保DOM已经更新,canvas元素已准备好
 					this.$nextTick(() => { 
 						UQrcode.make({
 							canvasId: 'qrcode',
 							componentInstance: this,
 							text: that.qrVal,
-							size: 103, // 对应 216rpx 的物理像素大小
+							size: canvasSizePx, // 对应 216rpx 的物理像素大小
 							margin: 5,
 							backgroundColor: '#ffffff',
 							foregroundColor: '#000000',

+ 2 - 1
pagesMy/forward.vue

@@ -46,13 +46,14 @@
 			async generateQRCode(){
 				try {
 					let that = this;
+					const canvasSizePx = uni.upx2px(266);
 					// 确保DOM已经更新,canvas元素已准备好
 					this.$nextTick(() => { 
 						UQrcode.make({
 							canvasId: 'qrcode',
 							componentInstance: this,
 							text: that.qrVal,
-							size: 133, // 对应 266rpx 的物理像素大小
+							size: canvasSizePx, // 对应 266rpx 的物理像素大小
 							margin: 0,
 							backgroundColor: '#ffffff',
 							foregroundColor: '#000000',