Browse Source

Merge branch 'master' of http://121.40.40.223:3000/zizhong.wang/mini_rabot

tangqiang 6 years ago
parent
commit
2db0ab168d
3 changed files with 28 additions and 14 deletions
  1. 18 7
      App.vue
  2. 5 3
      pages/index/index.vue
  3. 5 4
      pages/selfInfo/selfInfo.vue

+ 18 - 7
App.vue

@@ -16,16 +16,27 @@
 			pageSize: 5, // 列表加载的pageSize
 			isSetPassword: '',
 			times:'',
-			total_times:''
+			total_times:'',
+			isAndroid:Boolean,
+			isIos:false
 		},
 		onLaunch: function() {
 			console.log('App Launch')
-			// 用户登录状态判断
-			// uni.login({
-			// 	success: (res) => {
-			//         this.getCodeRabot(res)
-			// 	}
-			// });
+		    let equType = uni.getSystemInfoSync().platform;
+			 switch(equType){
+			    case 'android':
+			       console.log('运行Android上')
+			       break;
+			    case 'ios':
+			       console.log('运行iOS上');
+			       setTimeout(()=>{
+					  getApp().globalData.isIos = true 
+				   },100)
+			       break;
+			    default:
+			       console.log('运行在开发者工具上')
+			       break;
+			}
 		},
 		onShow: function() {
 			console.log('App Show')

+ 5 - 3
pages/index/index.vue

@@ -32,7 +32,7 @@
 					<view class="talk-head-box">
 						<image :src='rabotHeadImg' mode="" class="talk-head"></image>
 					</view>
-					<view class="talk-content">{{chat.reply}}<text class="goRechargeText" v-if='chat.isRecharge' @click.stop="goRecharge">去充值</text></view>
+					<view class="talk-content">{{chat.reply}}<text class="goRechargeText" v-if='chat.isRecharge && !isIos' @click.stop="goRecharge">去充值</text></view>
 				</view>
 
 			</view>
@@ -56,7 +56,7 @@
 		 			<view class="uni-share-content-text">个人中心</view>
 		 	      </view>
 				  
-				  <view  class="uni-share-content-box" @click.stop='goRecharge' >
+				  <view  class="uni-share-content-box" @click.stop='goRecharge'  v-if="!isIos">
 				  			<view class="uni-share-content-image">
 				  				 <image src="/static/icon/recharge.png" class="image" />
 				  			</view>
@@ -95,6 +95,7 @@
 				scrollTop:0,
 				scrollRequestEnable: true, 
 				pageSize:10,
+				isIos:Boolean,
 				style: {
 					pageHeight: 0,
 					contentViewHeight: 0,
@@ -280,7 +281,8 @@
 								pageSize: 10,
 							},
 							success: res => {
-                                uni.hideLoading()								
+                                uni.hideLoading()
+				                that.isIos = getApp().globalData.isIos;
 								if(isShow){
 									res.data.msg[0].isRecharge = 1
 								}

+ 5 - 4
pages/selfInfo/selfInfo.vue

@@ -20,7 +20,7 @@
 			</view>
 		</view>
 		
-		<view class="self-pay-box">
+		<view class="self-pay-box" v-if='!isIos'>
 			<view class="search-content">
 				<view class="search-content-value" style="color:#000;font-size: 38upx;margin-left: -11%;">查询套餐</view>
 				<view class="search-content-text">限时优惠进行中</view>
@@ -32,7 +32,7 @@
 		</view>
 		
 		<view class="self-setting-box" @click.stop="goRechargePage()">
-			<view class="setting-content-box" style="border-bottom: 1upx solid #d9d9d9">
+			<view class="setting-content-box" style="border-bottom: 1upx solid #d9d9d9" v-if='!isIos'>
 				<view class="setting-content-text">
 					<image src="../../static/icon/moneyIcon.png" mode=""></image>
 				    <text>充值记录</text>
@@ -66,7 +66,8 @@
 				userName:getApp().globalData.user_name,
 				userHeadUrl:getApp().globalData.user_headUrl,
 				userTime:getApp().globalData.times,
-				userTotalTime:getApp().globalData.total_times
+				userTotalTime:getApp().globalData.total_times,
+				isIos:getApp().globalData.isIos
 			}
 		},
 		onLoad() {
@@ -262,7 +263,7 @@
 	}
 	
 	.self-setting-box {
-		height: 200upx;
+		/* height: 200upx; */
 		width: 90%;
 		background: #fff;
 		margin-top: 5%;