lilei 4 vuotta sitten
vanhempi
commit
5992636145
3 muutettua tiedostoa jossa 15 lisäystä ja 2 poistoa
  1. 10 0
      pages/index/index.vue
  2. 2 1
      pages/tdRecord/tdRecord.vue
  3. 3 1
      pages/userAuth/userAuth.vue

+ 10 - 0
pages/index/index.vue

@@ -31,6 +31,7 @@
 
 <script>
 	import {getLookUpDatas} from '@/api/data.js'
+	import { getUserInfo } from '@/api/user.js'
 	export default {
 		data() {
 			return {
@@ -63,11 +64,20 @@
 		onShow() {
 			// 获取订单状态数据字典
 			this.getCodeList('RUBBISH_TYPE','vuex_rubbishType')
+			this.getUserInfo()
 		},
 		onUnload() {
 			uni.$off('blueReConnect')
 		},
 		methods: {
+			//  获取用户信息
+			getUserInfo(){
+				getUserInfo().then(res => {
+					if(res.status == 200){
+						this.$u.vuex('vuex_userData', res.data);
+					}
+				})
+			},
 			// 获取数据字典
 			getCodeList(code,key) {
 				getLookUpDatas({

+ 2 - 1
pages/tdRecord/tdRecord.vue

@@ -86,7 +86,8 @@
 					pageSize: this.pageSize,
 					beginDate: this.searchForm.beginDate,
 					endDate: this.searchForm.endDate,
-					customerMobile: this.searchForm.customerMobile
+					customerMobile: this.searchForm.customerMobile,
+					operatorNo : this.$store.state.vuex_userData.id
 				}).then(res => {
 					if (res.status == 200) {
 						if(this.pageNo>1){

+ 3 - 1
pages/userAuth/userAuth.vue

@@ -101,6 +101,7 @@
 					rubbishType: '', // 投递类型
 					rubbishWeight:0, // 投递重量
 					srcDeviceCode: '',
+					operatorNo: ''
 				},
 				currentGold: 0, // 用户乐豆余额
 				blueConnect: true,
@@ -204,6 +205,7 @@
 						this.rubbishtype = res.data.list
 						this.stationName = res.data.stationEntity.name
 						this.formData.srcDeviceCode = this.deviceId
+						this.formData.operatorNo = this.$store.state.vuex_userData.id
 					}
 				})
 			},
@@ -304,7 +306,7 @@
 			},
 			// 确认提交
 			confirm(){
-				console.log(this.formData,'formData')
+				// console.log(this.formData,'formData')
 				saveDelivery(this.formData).then(res => {
 					if(res.status == 200){
 						setTimeout(()=>{