Browse Source

调整入口

zhengkaixin 2 years ago
parent
commit
06ac12433a
3 changed files with 17 additions and 10 deletions
  1. 4 4
      pages/mine/mine.vue
  2. 1 1
      pages/mine/personalPage.vue
  3. 12 5
      pages/staffHome/staffHome.vue

+ 4 - 4
pages/mine/mine.vue

@@ -227,7 +227,7 @@
 				userInfo:{},
 				userInfo:{},
 				userPhone:"",
 				userPhone:"",
 				balance: 0,
 				balance: 0,
-				isCard: true
+				isCard: false
 			}
 			}
 		},
 		},
 		onLoad() {
 		onLoad() {
@@ -236,7 +236,7 @@
 		},
 		},
 		onShow(){
 		onShow(){
 			this.findByOpenId()
 			this.findByOpenId()
-			this.getCardPayAmountList();
+		
 		},
 		},
 		methods: {
 		methods: {
 			getCardPayAmountList() {
 			getCardPayAmountList() {
@@ -260,7 +260,7 @@
 			init(){
 			init(){
 				this.plusInfo=this.carhelp.getPersonInfoPlus();
 				this.plusInfo=this.carhelp.getPersonInfoPlus();
 				this.userInfo=this.carhelp.getPersonInfo();
 				this.userInfo=this.carhelp.getPersonInfo();
-				
+				this.getCardPayAmountList();
 				
 				
 				if(this.userInfo&&this.userInfo.phone){
 				if(this.userInfo&&this.userInfo.phone){
 					var phone = this.userInfo.phone;
 					var phone = this.userInfo.phone;
@@ -275,7 +275,7 @@
 					openId: this.carhelp.getOpenId(),
 					openId: this.carhelp.getOpenId(),
 					
 					
 				}).then((response) => {
 				}).then((response) => {
-					
+					this.carhelp.setToken(response.data.token);
 					this.carhelp.setPersonInfo(response.data.regUser);
 					this.carhelp.setPersonInfo(response.data.regUser);
 					this.carhelp.setPersonInfoPlus(response.data)
 					this.carhelp.setPersonInfoPlus(response.data)
 					this.init();
 					this.init();

+ 1 - 1
pages/mine/personalPage.vue

@@ -229,7 +229,7 @@
 					openId: this.carhelp.getOpenId(),
 					openId: this.carhelp.getOpenId(),
 					
 					
 				}).then((response) => {
 				}).then((response) => {
-					
+					this.carhelp.setToken(response.data.token);
 					this.carhelp.setPersonInfo(response.data.regUser);
 					this.carhelp.setPersonInfo(response.data.regUser);
 					this.carhelp.setPersonInfoPlus(response.data)
 					this.carhelp.setPersonInfoPlus(response.data)
 					this.init();
 					this.init();

+ 12 - 5
pages/staffHome/staffHome.vue

@@ -54,13 +54,13 @@
 					</view>
 					</view>
 					<view class="grid-text">排行榜</view>
 					<view class="grid-text">排行榜</view>
 				</u-grid-item>
 				</u-grid-item>
-				<u-grid-item v-if="false" @click="gotoUrl('pages/mine/points/pointsExchange/pointsExchange')">
+				<u-grid-item v-if="userInfo.canteenPermissions" @click="thisGotoUrl('pages/mine/points/pointsExchange/pointsExchange')">
 					<view class="icon icon5">
 					<view class="icon icon5">
 						<img src="../../assets/img/jfyh.png" alt="">
 						<img src="../../assets/img/jfyh.png" alt="">
 					</view>
 					</view>
-					<view class="grid-text">积分兑换</view>
+					<view class="grid-text">食堂台账</view>
 				</u-grid-item>
 				</u-grid-item>
-				<u-grid-item v-if="isOrderReport" @click="gotoUrl('pages/staffHome/orderReport')">
+				<u-grid-item v-if="userInfo.orderFoodFlag" @click="gotoUrl('pages/staffHome/orderReport')">
 					<view class="icon icon6">
 					<view class="icon icon6">
 						<img src="../../assets/img/dcsb.png" alt="">
 						<img src="../../assets/img/dcsb.png" alt="">
 					</view>
 					</view>
@@ -88,16 +88,23 @@
 					"9dbeddd2-a863-42d0-a145-260fe008bdbb", //	个人荣誉0
 					"9dbeddd2-a863-42d0-a145-260fe008bdbb", //	个人荣誉0
 					"412eff92-a443-42f7-98c6-5c67d9e64ad8", //	集体荣誉1
 					"412eff92-a443-42f7-98c6-5c67d9e64ad8", //	集体荣誉1
 				],
 				],
-				isOrderReport: true
+				
+				userInfo:{}
 			}
 			}
 		},
 		},
 		onReady() {
 		onReady() {
-			this.getLoadUserOrderFlag();
+		
+			//this.getLoadUserOrderFlag();
 		},
 		},
 		onShow() {
 		onShow() {
+			this.userInfo=this.carhelp.getPersonInfo()
 
 
 		},
 		},
 		methods: {
 		methods: {
+			thisGotoUrl(url){
+				var url="http://jsrailway.com.cn/railroad-canteen/#/"
+				window.open(url);
+			},
 			getLoadUserOrderFlag() {
 			getLoadUserOrderFlag() {
 				uni.showLoading({
 				uni.showLoading({
 					title: "加载中",
 					title: "加载中",