Bläddra i källkod

feat: 增加客服二维码

zhaofeiyue 1 år sedan
förälder
incheckning
be46b7d2f6
3 ändrade filer med 19 tillägg och 9 borttagningar
  1. 5 0
      pages/index/index.vue
  2. 10 9
      pages/index/methods.js
  3. 4 0
      pages/index/style.scss

+ 5 - 0
pages/index/index.vue

@@ -220,6 +220,11 @@
 				</div>
 			</div>
 		</uni-popup>
+		<uni-popup ref="popupKfShow" type="center">
+			<div class="popup-content" v-if="imgUrl">
+				<img class="kf-img" :src="imgUrl + 'hysn_kf.png'" />
+			</div>
+		</uni-popup>
 	</div>
 </template>
 

+ 10 - 9
pages/index/methods.js

@@ -147,14 +147,15 @@ export default {
 		}
 	},
 	bindContact() {
-		wx.openCustomerServiceChat({
-			extInfo: {
-				url: 'https://work.weixin.qq.com/kfid/kfc68fd21608ac5e9d0'
-			},
-			corpId: 'ww7975bc6b305b44e9',
-			complete(res) {
-				console.log(res)
-			}
-		})
+		this.$refs.popupKfShow.open()
+		// wx.openCustomerServiceChat({
+		// 	extInfo: {
+		// 		url: 'https://work.weixin.qq.com/kfid/kfce39316a3339975af'
+		// 	},
+		// 	corpId: 'wwb7c792b57c03f17b',
+		// 	complete(res) {
+		// 		console.log(res)
+		// 	}
+		// })
 	}
 }

+ 4 - 0
pages/index/style.scss

@@ -297,6 +297,10 @@
 	width: 270px;
 	background: #ffffff;
 	border-radius: 12px;
+	.kf-img {
+		width: 100%;
+		height: 200px;
+	}
 	.close-btn {
 		width: 40px;
 		height: 40px;