Browse Source

bug 修复

lilei 4 years ago
parent
commit
a1bfaba758
2 changed files with 19 additions and 20 deletions
  1. 18 19
      pages/userCenter/index.vue
  2. 1 1
      store/index.js

+ 18 - 19
pages/userCenter/index.vue

@@ -8,7 +8,7 @@
 			</view>
 			</view>
 			<view class="user-info">
 			<view class="user-info">
 				<text v-if="hasLogin"><open-data type="userNickName"></open-data></text>
 				<text v-if="hasLogin"><open-data type="userNickName"></open-data></text>
-				<u-button v-else size="mini" shape="circle" @click="toLoginPage">登录</u-button>
+				<u-button v-else plain size="mini" shape="circle" @click="toLoginPage">登录</u-button>
 			</view>
 			</view>
 			<view v-if="hasLogin">
 			<view v-if="hasLogin">
 				<u-icon name="arrow-right" color="#fff"></u-icon>
 				<u-icon name="arrow-right" color="#fff"></u-icon>
@@ -26,12 +26,12 @@
 		<!-- 列表 -->
 		<!-- 列表 -->
 		<view class="user-list">
 		<view class="user-list">
 			<u-cell-group>
 			<u-cell-group>
-				<u-cell-item icon="order" icon-size="38" :icon-style="{color:'#ff5500'}" index="1" @click="toPage" title="我的订单"></u-cell-item>
-				<u-cell-item icon="gift" icon-size="40" :icon-style="{color:'#00aaff'}" index="0" @click="toPage" title="投递记录"></u-cell-item>
-				<u-cell-item icon="question-circle" icon-size="40" :icon-style="{color:'#19be6b'}" index="0" @click="toPage" title="常见问题"></u-cell-item>
-				<u-cell-item icon="phone" icon-size="40" :icon-style="{color:'#f00'}" index="0" @click="toPage" title="联系客服"></u-cell-item>
-				<u-cell-item icon="file-text" icon-size="40" :icon-style="{color:'#ffaa00'}" index="2" @click="toPage" title="服务协议"></u-cell-item>
-				<!-- <u-cell-item icon="info-circle" icon-size="38" :icon-style="{color:'#55aa00'}" index="3" @click="toPage" title="关于我们"></u-cell-item> -->
+				<u-cell-item v-if="hasLogin" icon="order" icon-size="38" :icon-style="{color:'#ff5500'}" index="0" @click="toPage" title="我的订单"></u-cell-item>
+				<u-cell-item v-if="hasLogin" icon="gift" icon-size="40" :icon-style="{color:'#00aaff'}" index="1" @click="toPage" title="投递记录"></u-cell-item>
+				<u-cell-item icon="question-circle" icon-size="40" :icon-style="{color:'#19be6b'}" index="2" @click="toPage" title="常见问题"></u-cell-item>
+				<u-cell-item icon="phone" icon-size="40" :icon-style="{color:'#f00'}" @click="callPhone" title="联系客服"></u-cell-item>
+				<u-cell-item icon="file-text" icon-size="40" :icon-style="{color:'#ffaa00'}" index="3" @click="toPage" title="服务协议"></u-cell-item>
+				<!-- <u-cell-item icon="info-circle" icon-size="38" :icon-style="{color:'#55aa00'}" index="4" @click="toPage" title="关于我们"></u-cell-item> -->
 			</u-cell-group>
 			</u-cell-group>
 		</view>
 		</view>
 	</view>
 	</view>
@@ -42,11 +42,6 @@
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
-				quitButton: {
-					borderRadius:'100rpx',
-					fontSize:'30rpx',
-					background: '#01c9b2'
-				},
 				hasLogin: false
 				hasLogin: false
 			};
 			};
 		},
 		},
@@ -61,19 +56,23 @@
 		methods:{
 		methods:{
 			// 打开对应的页面
 			// 打开对应的页面
 			toPage(index){
 			toPage(index){
+				console.log(index)
 				let pageUrl=[
 				let pageUrl=[
 					'/pages/userCenter/deliveryRecord',
 					'/pages/userCenter/deliveryRecord',
 					'/pages/order/order',
 					'/pages/order/order',
+					'',
 					'/pages/agreement/agreement?fromPage=usercenter',
 					'/pages/agreement/agreement?fromPage=usercenter',
 					'/pages/userCenter/aboutUs'
 					'/pages/userCenter/aboutUs'
 					]
 					]
-				if(index<2&&this.hasLogin || index>=2){
-					uni.navigateTo({
-						url: pageUrl[index]
-					})
-				}else{
-					this.toLoginPage()
-				}	
+				uni.navigateTo({
+					url: pageUrl[index]
+				})
+			},
+			// 电话客服
+			callPhone () {
+				uni.makePhoneCall({
+				    phoneNumber: this.$store.state.vuex_kfMobile
+				})
 			},
 			},
 			//  跳转
 			//  跳转
 			toUserPage(){
 			toUserPage(){

+ 1 - 1
store/index.js

@@ -118,7 +118,7 @@ const store = new Vuex.Store({
 		// 当前网络连接状态
 		// 当前网络连接状态
 		vuex_netStatus: '',
 		vuex_netStatus: '',
 		// 客服电话
 		// 客服电话
-		vuex_kfMobile: '',
+		vuex_kfMobile: '4008826012',
 		// 垃圾箱类型
 		// 垃圾箱类型
 		vuex_rubbishType: []
 		vuex_rubbishType: []
 	},
 	},