lilei 2 anos atrás
pai
commit
e831f1c466
4 arquivos alterados com 26 adições e 6 exclusões
  1. 2 2
      App.vue
  2. 8 0
      api/data.js
  3. 15 3
      pages/index/index.vue
  4. 1 1
      pages/morePage/morePage.vue

+ 2 - 2
App.vue

@@ -1,8 +1,8 @@
 <script>
 <script>
 	export default {
 	export default {
 		globalData: {
 		globalData: {
-			// baseUrl: 'http://192.168.0.215:9110/saas/clz/', // 本地
-			baseUrl: 'https://md.test.zyucgj.com/saas/clz/', // 预发布
+			baseUrl: 'http://192.168.0.215:9110/saas/clz/', // 本地
+			// baseUrl: 'https://md.test.zyucgj.com/saas/clz/', // 预发布
 			// baseUrl: 'https://car.zyucgj.com/saas/clz/' // 生产
 			// baseUrl: 'https://car.zyucgj.com/saas/clz/' // 生产
 		},
 		},
 		onLaunch: function() {
 		onLaunch: function() {

+ 8 - 0
api/data.js

@@ -39,6 +39,14 @@ export const wxUserUpdate = (params) => {
 	data:params
 	data:params
   }).then(res=>res.data)
   }).then(res=>res.data)
 }
 }
+// 获取用户信息
+export const getCurrUserInfo = (params) => {
+  return request({
+    url: 'employee/findCurrent',
+	data:params,
+    method: 'get'
+  })
+}
 
 
 // 根据字典code查询选项
 // 根据字典code查询选项
 export const getLookUpDatas = (params) => {
 export const getLookUpDatas = (params) => {

+ 15 - 3
pages/index/index.vue

@@ -122,7 +122,7 @@
 	import { shelfBondRecordWaitPayRecord, findStoreShelf, shelfGetTotalWaitQty, getProductfindByScanCode, findPriceShow,findPriceShowType,findPriceShowEmployee } from '@/api/shelf.js'
 	import { shelfBondRecordWaitPayRecord, findStoreShelf, shelfGetTotalWaitQty, getProductfindByScanCode, findPriceShow,findPriceShowType,findPriceShowEmployee } from '@/api/shelf.js'
 	import { xprhStoreApplyRead } from '@/api/xprh.js'
 	import { xprhStoreApplyRead } from '@/api/xprh.js'
 	import { findCurrentRewardRule } from '@/api/rewardRule.js'
 	import { findCurrentRewardRule } from '@/api/rewardRule.js'
-	import { listLookUp, getLookUpDatas } from '@/api/data.js';
+	import { listLookUp, getLookUpDatas, getCurrUserInfo } from '@/api/data.js';
 	import { scanVinLogQueryRoll, getScanVinLogList, getScanGetMaxQty }from '@/api/car.js'
 	import { scanVinLogQueryRoll, getScanVinLogList, getScanGetMaxQty }from '@/api/car.js'
 	import { getRewardRollList } from '@/api/rewardRule.js'
 	import { getRewardRollList } from '@/api/rewardRule.js'
 	export default {
 	export default {
@@ -171,7 +171,7 @@
 				return rule&&rule.ruleStatus == 'release'
 				return rule&&rule.ruleStatus == 'release'
 			},
 			},
 			imgList(){
 			imgList(){
-				if(this.hasRedPacket){
+				if(this.hasRedPacket&&this.hasShelf){
 					return [{
 					return [{
 						image: '/static/banner1.png'
 						image: '/static/banner1.png'
 					},{
 					},{
@@ -274,7 +274,8 @@
 				if(this.hasLogin){
 				if(this.hasLogin){
 					// 获取扫描记录
 					// 获取扫描记录
 					this.getVinLog()
 					this.getVinLog()
-					
+					// 更新用户信息
+					this.getCurrUserInfo()
 					// 非游客
 					// 非游客
 					if(this.userInfo.sysUserFlag == '1'){
 					if(this.userInfo.sysUserFlag == '1'){
 						// 查询是否有数字货架
 						// 查询是否有数字货架
@@ -313,6 +314,17 @@
 					}
 					}
 				});
 				});
 			},
 			},
+			// 最新用户信息
+			getCurrUserInfo(){
+				getCurrUserInfo().then(res => {
+					if(res.data){
+						this.$store.state.vuex_userInfo.userNameCN = res.data.name;
+						this.$store.state.vuex_userInfo.mobile = res.data.mobile;
+						this.$store.state.vuex_userPhoto = res.data.photo;
+						uni.setStorageSync('userPhoto', res.data.photo);
+					}
+				})
+			},
 			// 获取最大扫描数
 			// 获取最大扫描数
 			getMaxQty(){
 			getMaxQty(){
 				getScanGetMaxQty().then(res => {
 				getScanGetMaxQty().then(res => {

+ 1 - 1
pages/morePage/morePage.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
 	<view>
 	<view>
 	<view class="morePages">
 	<view class="morePages">
-		<view class="list-box" v-if="hasRedPacket">
+		<view class="list-box" v-if="hasRedPacket&&hasShelf">
 			<view class="list-title flex align_center justify_between" @click="toPage('/pages/morePage/redPacket')">
 			<view class="list-title flex align_center justify_between" @click="toPage('/pages/morePage/redPacket')">
 				<view><u-icon size="34" color="#f10000" name="red-packet-fill"></u-icon> <text style="color: #ff0000;margin-left: 10rpx;">红包奖励</text></view>
 				<view><u-icon size="34" color="#f10000" name="red-packet-fill"></u-icon> <text style="color: #ff0000;margin-left: 10rpx;">红包奖励</text></view>
 				<view>
 				<view>