ccj 3 lat temu
rodzic
commit
26cdbc52ad

+ 8 - 8
pages/grain_pulse/editcompany.vue

@@ -510,14 +510,14 @@
 							return
 						}
 					}
-					if(!re.test(this.deptList.email)){
-						this.$api.msg('邮箱输入错误')
-						return
-					}
-					if(this.deptList.fax && (this.deptList.fax.length<6||this.deptList.fax.length>20)){
-						this.$api.msg('传真输入错误')
-						return
-					}
+					// if(!re.test(this.deptList.email)){
+					// 	this.$api.msg('邮箱输入错误')
+					// 	return
+					// }
+					// if(this.deptList.fax && (this.deptList.fax.length<6||this.deptList.fax.length>20)){
+					// 	this.$api.msg('传真输入错误')
+					// 	return
+					// }
 					this.deptList.label=this.label.toString()
 					this.deptList.sitePhotoAddress=this.imgList.toString()
 					this.deptList.settledCompanyContacts=this.Persons

+ 29 - 5
pages/grain_pulse/home.vue

@@ -119,6 +119,9 @@
 				datalist: []
 			}
 		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
 		onPullDownRefresh() {
 		    this.getList()
 		     setTimeout(function () {
@@ -169,7 +172,8 @@
 					mainBusinessType: this.mainBusinessType,
 					pageSize: this.pageSize,
 					currentPage: this.currentPage,
-					pcFlag: 2
+					pcFlag: 2,
+					searchType: 2
 				}).then(res => {
 					if (res.data.code == 200) {
 						this.datalist = res.data.data.records
@@ -202,10 +206,30 @@
 				this.mainBusinessTypeKey = item.value
 			},
 			enterUrl() {
-				//入驻
-				uni.navigateTo({
-					url: '/pages/grain_pulse/enter'
-				})
+				if (!this.hasLogin) {
+					uni.showModal({
+						title: '登录提示',
+						content: '您尚未登录,是否立即登录?',
+						showCancel: true,
+						confirmText: '登录',
+						success: (e) => {
+							if (e.confirm) {
+								uni.navigateTo({
+									url: '/pages/public/login'
+								})
+							}
+						},
+						fail: () => {},
+						complete: () => {}
+					})
+				}
+				else{
+					//入驻
+					uni.navigateTo({
+						url: '/pages/grain_pulse/enter'
+					})
+				}
+				
 			},
 			friendcircle() {
 				uni.navigateTo({

+ 25 - 1
pages/grain_pulse/my_grain_pulse.vue

@@ -104,13 +104,37 @@
 			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
 				this.currentPage += 1
 			}
-				this.getList()
+			this.getData()
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		
 		methods: {
+			getData(){
+				this.isLoadMore=true
+				if(this.mainBusinessType=='我的企业'){
+					this.$api.doRequest('get','/settledCompanyInfo/selectSettledCompanyInfo',{mainBusinessType:'',pageSize: this.pageSize,
+							currentPage: this.currentPage,pcFlag:2,createPhone:this.userInfo.phone}).then(res => {
+					if(res.data.code==200){
+						this.isLoadMore=false
+						this.datalist=this.datalist.concat(res.data.data.records)
+					}
+				})
+				}else{
+					this.$api.doRequest('get','/settledCompanyInfo/myCollection',{phone:this.userInfo.phone,pageSize:this.pageSize,
+							currentPage: this.currentPage,pcFlag:2}).then(res => {
+					if(res.data.code==200){
+						this.datalist=this.datalist.concat(res.data.data.records)
+						let lat2 =this.position.location.split(',')[1];
+						let lng2 = this.position.location.split(',')[0];
+						for(var i=0;i<this.datalist.length;i++){
+							this.datalist[i]._metre=this.utils.getDistance(this.datalist[i].latitude,this.datalist[i].longitude,lat2,lng2)
+						}
+					}
+					})
+				}
+			},
 			getList(){
 				this.isLoadMore=true
 				if(this.mainBusinessType=='我的企业'){

+ 13 - 0
pages/grain_pulse/perfect.vue

@@ -186,6 +186,9 @@
 						confirmText: '提交',
 						success: function(res) {
 							if (res.confirm) {
+								uni.showLoading({
+									title:"正在提交"
+								})
 								that.$api.doRequest('post', '/settledCompanyInfo/api/addSettledCompanyInfo', that.deptList).then(res => {
 									if (res.data.code == 200) {
 										var data={
@@ -201,6 +204,16 @@
 									}else{
 										this.$api.msg(res.data.message)
 									}
+									uni.hideLoading()
+								})
+								.catch(res => {
+									console.log("系统异常",res)
+									uni.hideLoading()
+									uni.showToast({
+										title: "系统异常,请联系管理员",
+										icon: 'none',
+										duration: 2000
+									})
 								})
 							}
 						}

+ 22 - 21
pages/sale/information.vue

@@ -178,8 +178,28 @@
 			this.loadData()
 			var userInfo = uni.getStorageSync("userInfo")
 			var that = this
-			
+			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
+				console.log("checkSession",res)
+				if (res.data.data == "INVALID") {
+					uni.showModal({
+						title: '登录提示',
+						content: 'Session过期需要重新登录,是否立即登录?',
+						showCancel: true,
+						confirmText: '登录',
+						success: (e) => {
+							if (e.confirm) {
+								uni.navigateTo({
+									url: '/pages/public/login'
+								})
+							}
+						},
+						fail: () => {},
+						complete: () => {}
+					})
+				}
+			})
 			this.$api.doRequest('get', '/notice/query/noticeNumber').then(res => {
+				console.log("noticeNumber",res)
 				if (res.data.data) {
 					let name = 'myTip';
 					let value = res.data.data.task;
@@ -223,26 +243,7 @@
 					that.statusBarHeight += res.statusBarHeight + "px"; //这就是状态栏的高度
 				},
 			});
-			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
-				console.log("checkSession",res)
-				if (res.data.data == "INVALID") {
-					uni.showModal({
-						title: '登录提示',
-						content: 'Session过期需要重新登录,是否立即登录?',
-						showCancel: true,
-						confirmText: '登录',
-						success: (e) => {
-							if (e.confirm) {
-								uni.navigateTo({
-									url: '/pages/public/login'
-								})
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					})
-				}
-			})
+			
 			var infoList = [];
 			uni.request({
 				url: "https://hq.sinajs.cn/list=C0,C2109,C2111,C2201,C2203,C2205,C2207,A0,A2109,A2111,A2201,A2203,A2205,A2207",

BIN
static/img/liangmai/ruzhu.png