瀏覽代碼

bug 修复

lilei 3 年之前
父節點
當前提交
849b524cd0
共有 1 個文件被更改,包括 9 次插入2 次删除
  1. 9 2
      pages/morePage/morePage.vue

+ 9 - 2
pages/morePage/morePage.vue

@@ -40,7 +40,7 @@
 			</u-cell-group>
 		</view>
 		<view class="list-box">
-			<view class="list-title flex justify_center phone">
+			<view class="list-title flex justify_center phone" @click="call">
 				<u-icon size="36" name="phone"></u-icon> <text>联系汽配商</text>
 			</view>
 		</view>
@@ -55,12 +55,16 @@
 	export default {
 		data() {
 			return {
-				
+				dealerPhone: null
 			}
 		},
 		computed: {
 			...mapState(['hasLogin'])
 		},
+		onShow() {
+			const shelfInfo = this.$store.state.vuex_storeShelf
+			this.dealerPhone = shelfInfo&&shelfInfo.contactMobile ? shelfInfo.contactMobile : ''
+		},
 		methods: {
 			toPage(path){
 				if(this.hasLogin){
@@ -72,6 +76,9 @@
 						url: '/pages/login/login'
 					})
 				}
+			},
+			call(){
+				this.callPhone(this.dealerPhone)
 			}
 		}
 	}