ccj 3 năm trước cách đây
mục cha
commit
ff1e386a7e

+ 2 - 2
config/index.js

@@ -1,8 +1,8 @@
 const dev = {
 	baseUrl: 'https://www.zthymaoyi.com',
 	// baseUrlNew: 'http://192.168.1.120:8090/',
-	baseUrlNew: 'http://192.168.1.103:9100/',
-	// baseUrlNew: 'http://api1.eliangeyun.com/',
+	// baseUrlNew: 'http://192.168.1.103:9100/',
+	baseUrlNew: 'http://api1.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 15 - 6
pages/grain_pulse/details.vue

@@ -133,11 +133,14 @@
 					if(res.data.data.label){
 						that.label=res.data.data.label.split(',')
 					}
+					that.sitePhotoAddress = []
+					if(res.data.data.attachmentAddress){
+						that.sitePhotoAddress.push(res.data.data.attachmentAddress)
+					}
 					if(res.data.data.sitePhotoAddress){
 						var tmp=res.data.data.sitePhotoAddress.split(',')
-						that.sitePhotoAddress = []
 						for(var i=0;i<tmp.length;i++){
-							if(tmp[i]){
+							if(tmp[i] && tmp[i] != res.data.data.attachmentAddress){
 								that.sitePhotoAddress.push(tmp[i])
 							}
 						}
@@ -187,11 +190,14 @@
 									if(res.data.data.label){
 										that.label=res.data.data.label.split(',')
 									}
+									that.sitePhotoAddress = []
+									if(res.data.data.attachmentAddress){
+										that.sitePhotoAddress.push(res.data.data.attachmentAddress)
+									}
 									if(res.data.data.sitePhotoAddress){
 										var tmp=res.data.data.sitePhotoAddress.split(',')
-										that.sitePhotoAddress = []
 										for(var i=0;i<tmp.length;i++){
-											if(tmp[i]){
+											if(tmp[i] && tmp[i] != res.data.data.attachmentAddress){
 												that.sitePhotoAddress.push(tmp[i])
 											}
 										}
@@ -215,11 +221,14 @@
 									if(res.data.data.label){
 										that.label=res.data.data.label.split(',')
 									}
+									that.sitePhotoAddress = []
+									if(res.data.data.attachmentAddress){
+										that.sitePhotoAddress.push(res.data.data.attachmentAddress)
+									}
 									if(res.data.data.sitePhotoAddress){
 										var tmp=res.data.data.sitePhotoAddress.split(',')
-										that.sitePhotoAddress = []
 										for(var i=0;i<tmp.length;i++){
-											if(tmp[i]){
+											if(tmp[i] && tmp[i] != res.data.data.attachmentAddress){
 												that.sitePhotoAddress.push(tmp[i])
 											}
 										}

+ 7 - 1
pages/grain_pulse/dynamic.vue

@@ -29,7 +29,7 @@
 				<view class="title">{{item.title}}</view>
 				<view class="titleText">
 					<!-- {{item.content}} -->
-					<u-read-more show-height="200" :toggle="true" close-text="展开">
+					<u-read-more show-height="200" :shadow-style="shadowStyle" :toggle="true" close-text="展开">
 						<rich-text :nodes="item.content"></rich-text>
 						 <!-- @load="parseLoaded" -->
 						<!-- <u-parse :html="item.content" ></u-parse> -->
@@ -74,6 +74,11 @@
 				isLoadMore: false,
 				loadStatus: "loading",
 				getCompany:{},
+				shadowStyle: {
+					backgroundImage: "none",
+					paddingTop: "0",
+					marginTop: "20rpx"
+				}
 			}
 		},
 		computed: {
@@ -164,6 +169,7 @@
 				this.$api.doRequest('get', '/settledCompanyInfo/companyList', this.getCompany)
 					.then(res => {
 						if (res.data.code == 200) {
+							console.log("companyList",res)
 							if(res.data.data.length > 0){
 								uni.navigateTo({
 									url: `/pages/grain_pulse/release`

+ 33 - 6
pages/grain_pulse/home.vue

@@ -59,12 +59,13 @@
 					<view v-if='position.name!="未设置"' class='distance Regular'>{{item._metre}}</view>
 				</view>
 			</view>
-			<view v-show="isLoadMore">
-				<uni-load-more :status="loadStatus"></uni-load-more>
-			</view>
+			
 			<view style='padding:10px;text-align:center;' v-if='datalist.length==0'>
 				当前暂无数据
 			</view>
+			<view v-else-if="isLoadMore" >
+				<uni-load-more :status="loadStatus"></uni-load-more>
+			</view>
 		</view>
 		<view  class="enter" @click="enterUrl">
 			<image style='width:56.5px;height:28px;' src="../../static/img/liangmai/ruzhu.png" mode=""></image>
@@ -146,7 +147,6 @@
 			}
 		 },
 		onShow(val) {
-			this.getList()
 			uni.hideKeyboard()
 			uni.getStorage({
 				key: 'setLocaltion',
@@ -157,8 +157,35 @@
 					// 	key: 'setLocaltion'
 					// })
 				},
-
 			})
+			if(this.position.name == "未设置"){
+				let that = this;
+				uni.getLocation({
+					type: 'gcj02',
+					geocode: true,
+					success: function(res) {
+						console.log('获取位置数据:', res);
+						console.log('当前位置的经度:' + res.longitude);
+						console.log('当前位置的纬度:' + res.latitude);
+						//拼接当前定位回显地址
+						// #ifdef APP-PLUS
+						that.position.name = res.address.poiName
+						that.position.location = res.longitude + "," +  res.latitude
+						uni.setStorage({
+							key: 'setLocaltion',
+							data: that.position
+						})
+						// #endif
+						that.getList()
+					},
+					fail:function(req){
+						console.log(req)
+					}
+				});
+			}
+			else{
+				this.getList()
+			}
 		},
 		onLoad(option) {
 			if (option.position){
@@ -207,7 +234,7 @@
 							}else{
 								this.notlist=false
 							}
-							console.log(this.datalist)
+							console.log("this.datalist",this.datalist)
 							that.isLoadMore=false
 						}
 						else{

+ 11 - 9
pages/grain_pulse/my_grain_pulse.vue

@@ -31,7 +31,7 @@
 					<view style='flex:2;' class="listitem-right">
 						<view class="flex justify-between">
 							<view class="companyname Medium">{{item.compName}}</view>
-							<image style='width:25rpx;height:25rpx;position:relative;top:5px;' :src="status1?'../../static/img/liangmai/shoucang1.png':'../../static/img/liangmai/my_shoucang.png'" mode=""></image>
+							<image style='width:35rpx;height:25rpx;position:relative;top:5px;' :src="status1?'../../static/img/liangmai/shoucang1.png':'../../static/img/liangmai/my_shoucang.png'" mode=""></image>
 						</view>
 						<view class='Regular introduce'>{{item.companyProfile}}</view>
 					</view>
@@ -124,6 +124,7 @@
 				}else{
 					this.$api.doRequest('get','/settledCompanyInfo/myCollection',{loginPhone:this.userInfo.phone,pageSize:this.pageSize,
 							currentPage: this.currentPage,pcFlag:2}).then(res => {
+					console.log("myCollection",res)	
 					if(res.data.code==200){
 						this.datalist=this.datalist.concat(res.data.data.records)
 						let lat2 =this.position.location.split(',')[1];
@@ -147,16 +148,17 @@
 					}
 				})
 				}else{
-					this.$api.doRequest('get','/settledCompanyInfo/myCollection',{phone:this.userInfo.phone,pageSize:this.pageSize,
+					this.$api.doRequest('get','/settledCompanyInfo/myCollection',{loginPhone:this.userInfo.phone,pageSize:this.pageSize,
 							currentPage: this.currentPage,pcFlag:2}).then(res => {
-					if(res.data.code==200){
-						this.datalist=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)
+						console.log("myCollection",res)	
+						if(res.data.code==200){
+							this.datalist=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)
+							}
 						}
-					}
 					})
 				}
 			},

+ 2 - 2
pages/grain_pulse/record.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="center">
-		<view class="bottom flex">
+		<!-- <view class="bottom flex">
 			<view class="bottonCss" @click="releaseclick">
 				<image src="../../static/img/liangmai/fabu-2@3x.png" mode="" style="width: 40rpx; height: 40rpx;">
 				</image>
@@ -11,7 +11,7 @@
 				</image>
 				<view>记录</view>
 			</view>
-		</view>
+		</view> -->
 		<view class="topCss">
 			<view class="back-btn cuIcon-back" @click="navBack"></view>
 			<view class="introduce">

+ 1 - 1
pages/grain_pulse/release.vue

@@ -77,7 +77,7 @@
 		},
 		onShow() {
 			var city = uni.getStorageSync("nowRegion")
-			if(city.positionName.cityName){
+			if(city.positionName && city.positionName.cityName){
 				this.release.city = city.positionName.cityName
 			}
 			this.companyList()

+ 20 - 20
pages/sale/information.vue

@@ -218,26 +218,26 @@
 				});
 			}
 			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', '/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: () => {}
+			// 		})
+			// 	}
+			// })
 			uni.getSystemInfo({
 				success: function(res) {
 					console.log("statusBarHeight", res.statusBarHeight)