cmy před 2 roky
rodič
revize
f49d72e510
4 změnil soubory, kde provedl 59 přidání a 2 odebrání
  1. 6 0
      pages.json
  2. 5 0
      pages/user/model/model.vue
  3. 40 0
      pages/user/model/phb.vue
  4. 8 2
      pages/user/shareQrCode.vue

+ 6 - 0
pages.json

@@ -164,6 +164,12 @@
 				"style": {
 					"navigationBarTitleText": "平台认证"
 				}
+			},
+			{
+				"path": "model/phb",
+				"style": {
+					"navigationBarTitleText": "排行榜"
+				}
 			}
 			
 		]

+ 5 - 0
pages/user/model/model.vue

@@ -699,7 +699,12 @@
 			padding: 0;
 			border-radius: 0;
 			flex-grow: 1;
+<<<<<<< HEAD
 
+=======
+			background-color: $base-color;
+			color: #fff;
+>>>>>>> 42b0f2d4a99933a348671f4f0ae2be3891df035a
 			&::after {
 				border: none;
 			}

+ 40 - 0
pages/user/model/phb.vue

@@ -0,0 +1,40 @@
+<template>
+	<view class="content" >
+		<image :src="top_bg" mode="" class="top-bg"></image>
+		<view class="">
+			
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				top_bg: this.$store.state.baseURL + '/resource/icon/base/phb-bg.png',
+			}
+		},
+		onLoad() {
+
+		},
+		onShow() {
+			console.log(this.$store.state.baseURL)
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.top-bg {
+		width: 750rpx;
+		height: 742rpx;
+	}
+</style>

+ 8 - 2
pages/user/shareQrCode.vue

@@ -1,5 +1,8 @@
 <template>
 	<view class="container">
+		<view class="" style="height: 80rpx;">
+			
+		</view>
 		<canvas :style="{ width:  canvasW + 'px', height: canvasH + 'px',}" canvas-id="myCanvas" id="myCanvas" class="hb"></canvas>
 		<!-- #ifndef MP -->
 		<div class="preserve">
@@ -47,6 +50,7 @@
 		// #endif
 		data() {
 			return {
+				bl: 0.95,//画布比例
 				canvasW: '',
 				canvasH: '',
 				bgimg: '',
@@ -226,11 +230,11 @@
 				// 获取商品主图,二维码信息,APP端会返回图片的本地路径(H5端只能返回原路径)
 				this.goodsImg = await this.getImageInfo(that.bgimg);
 				this.ewmImg = await this.getImageInfo(that.qrcode);
-				this.canvasW = this.SystemInfo.windowWidth; // 画布宽度
+				this.canvasW = this.SystemInfo.windowWidth * that.bl; // 画布宽度
 				this.ratio = this.SystemInfo.windowWidth / 750;
 				let x = 750*this.goodsImg.height/this.goodsImg.width
 				// this.canvasW =750 * this.ratio;
-				this.canvasH = x * this.ratio;
+				this.canvasH = x * this.ratio * that.bl;
 
 				this.ewmW = 220 * this.ratio;
 	
@@ -431,5 +435,7 @@
 	}
 	.hb {
 		margin: auto;
+		border-radius: 20rpx;
+		overflow: hidden;
 	}
 </style>