Przeglądaj źródła

feat: 增加企微客服

zhaofeiyue 1 rok temu
rodzic
commit
b6baa30399
3 zmienionych plików z 9 dodań i 9 usunięć
  1. 2 6
      pages/index/index.vue
  2. 3 2
      pages/index/methods.js
  3. 4 1
      pages/index/style.scss

+ 2 - 6
pages/index/index.vue

@@ -176,7 +176,8 @@
 		<movable-area class="custom-movable-area">
 			<movable-view class="custom-movable-view" :style="{ right: scrollBottom ? '-32px' : '5px' }" direction="vertical" inertia @change="onMovableChange">
 				<div class="contact-box">
-					<div class="contact-btn" @click="bindContact"><i class="font_family icon-rexianicon"></i></div>
+					<!-- <div class="contact-btn" @click="handleContact"><i class="font_family icon-rexianicon"></i></div> -->
+					<button class="contact-btn" open-type="contact" bindcontact="handleContact" :session-from="userInfo"><i class="font_family icon-rexianicon"></i></button>
 				</div>
 			</movable-view>
 		</movable-area>
@@ -220,11 +221,6 @@
 				</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>
 

+ 3 - 2
pages/index/methods.js

@@ -146,8 +146,9 @@ export default {
 			this.scrollBottom = false
 		}
 	},
-	bindContact() {
-		this.$refs.popupKfShow.open()
+	handleContact(e) {
+        console.log(e.detail.path)
+        console.log(e.detail.query)
 		// wx.openCustomerServiceChat({
 		// 	extInfo: {
 		// 		url: 'https://work.weixin.qq.com/kfid/kfce39316a3339975af'

+ 4 - 1
pages/index/style.scss

@@ -299,7 +299,7 @@
 	border-radius: 12px;
 	.kf-img {
 		width: 100%;
-		height: 200px;
+		height: 300px;
 	}
 	.close-btn {
 		width: 40px;
@@ -455,6 +455,9 @@
 		z-index: 999;
 		transition: all 0.3s;
 		.contact-box {
+			button::after {
+				border: 0;
+			}
 			.contact-btn {
 				border: 0;
 				padding: 0;