ソースを参照

Merge branch 'master' of http://git.zthymaoyi.com/zyw/tourism

高敬炎 1 年間 前
コミット
887662a16a

+ 4 - 1
uni_applet/components/loginPopUp/index.vue

@@ -85,7 +85,7 @@
 	 			border: '2px solid #eaad1a',
 	 			"border-radius": "10px",
 	 			fontSize: "32rpx",
-				padding:'0 5px',
+				padding:'0 20rpx',
 	 			background: "#eaad1a"
 	 		},
 	 	};
@@ -199,4 +199,7 @@
 	/deep/.u-button--normal{
 		padding: 0 5px;
 	}
+	.slot-content{
+		width: 100%;
+	}
 </style>

+ 28 - 1
uni_applet/pageA/cxTable.vue

@@ -20,8 +20,17 @@
 					{{item.val4}}
 				</view>
 			</view>
-
+			<view class="bottom">
+				<view class="title">
+					热门赶海地点推荐
+				</view>
+				<view class="text">
+					白沙湾黄金海岸、仙人岛海域、金沙滩、望海寨龟石滩、山海广场
+				</view>
+				
+			</view>
 		</view>
+		
 	</view>
 </template>
 
@@ -350,5 +359,23 @@
 		.row-active{
 			background: #92b8f1!important;
 		}
+		.bottom{
+			margin-top: 50rpx;
+			background: rgba(255, 255, 255, 0.7);
+			    padding: 20rpx;
+			    border: 1px solid #92b8f1;
+			    border-radius: 20rpx;
+			.title{
+				font-size: 36rpx;
+				    font-size: 36rpx;
+				    margin-bottom: 10rpx;
+				    font-weight: bold;
+				
+			}
+			.text{
+				font-size: 32rpx;
+			}
+		}
+		
 	}
 </style>

+ 1 - 1
uni_applet/pageA/login/index.vue

@@ -82,7 +82,7 @@
 	 			// border: '2px solid #eaad1a',
 	 			"border-radius": "10px",
 	 			fontSize: "32rpx",
-				padding:'0 5px',
+				padding:'40rpx',
 	 			background: " linear-gradient(to right,#FED41E,#FDC21D);"
 	 		},
 	 	};

+ 14 - 14
uni_applet/pages/my/my.vue

@@ -8,21 +8,21 @@
 					</view>
 					<view>
 						<view class='flex'>
-							<view @click='login' v-if='!edit'>{{userInfo.nickname?userInfo.nickname:'请点击登录'}}</view>
+							<view @click='login' v-if='!edit' style="font-weight: bold;font-size: 32rpx;">{{userInfo.nickname?userInfo.nickname:'请点击登录'}}</view>
 							<view v-else> <u--input
 								placeholder="请输入内容"
 								border="bottom"
 								v-model='userInfo.nickname'
 								clearable
 							  ></u--input></view>
-							<u-icon  v-if='!edit&&userInfo.phone' @click='edit = true' name="edit-pen-fill" color="#2979ff" size="24"></u-icon>
-							<u-icon  v-if='edit&&userInfo.phone' @click='editNickName' name="checkbox-mark" color="#2979ff" size="24"></u-icon>
+							<u-icon  v-if='!edit&&userInfo.phone' @click='edit = true' name="edit-pen-fill" color="#eaad1a" size="24"></u-icon>
+							<u-icon  v-if='edit&&userInfo.phone' @click='editNickName' name="checkbox-mark" color="#eaad1a" size="24"></u-icon>
 						</view>
 						<view>{{userInfo.phone1}}</view>
 					</view>
 				</view>	
 				<view>
-					<u-icon name="bell" color="#2979ff" size="28"></u-icon>
+					<u-icon name="bell" color="#eaad1a" size="28"></u-icon>
 				</view>
 			</view>
 			
@@ -61,36 +61,36 @@
 			</view> -->
 			<view style='width:100%;'>
 				<u-cell-group :border='false'>
-					<u-cell
+					<!-- <u-cell
 					    title="收货地址"
 					    isLink
 					    url="/pages/componentsB/tag/tag"
-					></u-cell>
+					></u-cell> -->
 					<u-cell
 					    title="我的发布"
 					    isLink
 					    url="/pageA/my/mypublish"
 					></u-cell>
-					<u-cell
+					<!-- <u-cell
 					    title="房源发布"
 					    isLink
 					    url="/pages/componentsB/badge/badge"
-					></u-cell>
-					<u-cell
+					></u-cell> -->
+					<!-- <u-cell
 					    title="商家入驻"
 					    isLink
 					    url="/pages/componentsB/badge/badge"
-					></u-cell>
-					<u-cell
+					></u-cell> -->
+					<!-- <u-cell
 					    title="业务合作"
 					    isLink
 					    url="/pages/componentsB/badge/badge"
-					></u-cell>
-					<u-cell
+					></u-cell> -->
+					<!-- <u-cell
 					    title="广告推广"
 					    isLink
 					    url="/pages/componentsB/badge/badge"
-					></u-cell>
+					></u-cell> -->
 					<u-cell
 					    title="联系客服"
 					    isLink

+ 1 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/IProductManagementService.java

@@ -46,6 +46,7 @@ public interface IProductManagementService{
 							@HttpParam(name = "userLongitude", type = HttpParamType.COMMON, description = "用户经度") String userLongitude,
 							@HttpParam(name = "userLatitude", type = HttpParamType.COMMON, description = "用户纬度") String userLatitude,
 							@HttpParam(name = "place", type = HttpParamType.COMMON, description = "用户定位的地址") String place,
+							@HttpParam(name = "myFlag", type = HttpParamType.COMMON, description = "") String myFlag,
 							@HttpParam(name = "searchKeyWord", type = HttpParamType.COMMON, description = "") String searchKeyWord,
 							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
 							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,

+ 61 - 59
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/tourism/impl/ProductManagementServiceImpl.java

@@ -57,7 +57,7 @@ public class ProductManagementServiceImpl implements IProductManagementService{
 	}
 
 	@Override
-	public Page<ProductManagement> list(Long commonId,String mainBody,String shopNames,String coverImage,String province,String city,String area,String location,String detailedAddress,String serviceDescription,String nickname,String phone,String realname,String personNo,String personImageFront,String personImageBack,String businessLicense,String status,String userLongitude,String userLatitude,String place,String searchKeyWord,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
+	public Page<ProductManagement> list(Long commonId,String mainBody,String shopNames,String coverImage,String province,String city,String area,String location,String detailedAddress,String serviceDescription,String nickname,String phone,String realname,String personNo,String personImageFront,String personImageBack,String businessLicense,String status,String userLongitude,String userLatitude,String place,String myFlag,String searchKeyWord,Date gmtCreate,Date gmtUpdate,Long deleteFlag, Integer page, Integer limit)throws ServiceException {
 		Wrapper<ProductManagement> wrapper = new EntityWrapper<ProductManagement>();
 														if (!StringUtils.isEmpty(commonId)) {
 					wrapper.eq("common_id", commonId);
@@ -125,70 +125,72 @@ public class ProductManagementServiceImpl implements IProductManagementService{
 				}
 					wrapper.eq("delete_flag", 0);
 		List<ProductManagement> list = productManagementMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
-		if (!CollectionUtils.isEmpty(list)){
-			for (ProductManagement productManagement:list){
-				String[] parts=productManagement.getLocation().split(",");
-				String latitude=parts[0];
-				String longitude=parts[1];
-				//根据用户经纬度求距离
-				if (!StringUtils.isEmpty(userLatitude) && !StringUtils.isEmpty(userLongitude)) {
-					// 参数解释:lng:经度,lat:维度。KEY:高德地图key
-					String urlString = "https://restapi.amap.com/v3/direction/driving?origin=" + userLongitude + "," +userLatitude + "&destination=" + longitude + "," + latitude  + "&key=" + KEY ;
-					//输入流的缓冲
-					StringBuffer sb = new StringBuffer();
-					try {
-						URL url = new URL(urlString);
-						BufferedReader in =  new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8"));
-						String line;
-						// 获取地址解析结果
-						while ((line = in.readLine()) != null) {
-							sb.append(line);
+		if (!"1".equals(myFlag)) {
+			if (!CollectionUtils.isEmpty(list)) {
+				for (ProductManagement productManagement : list) {
+					String[] parts = productManagement.getLocation().split(",");
+					String latitude = parts[0];
+					String longitude = parts[1];
+					//根据用户经纬度求距离
+					if (!StringUtils.isEmpty(userLatitude) && !StringUtils.isEmpty(userLongitude)) {
+						// 参数解释:lng:经度,lat:维度。KEY:高德地图key
+						String urlString = "https://restapi.amap.com/v3/direction/driving?origin=" + userLongitude + "," + userLatitude + "&destination=" + longitude + "," + latitude + "&key=" + KEY;
+						//输入流的缓冲
+						StringBuffer sb = new StringBuffer();
+						try {
+							URL url = new URL(urlString);
+							BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8"));
+							String line;
+							// 获取地址解析结果
+							while ((line = in.readLine()) != null) {
+								sb.append(line);
+							}
+							in.close();
+						} catch (Exception e) {
+							e.getMessage();
 						}
-						in.close();
-					} catch (Exception e) {
-						e.getMessage();
-					}
-					String result = sb.toString();
-					JSONObject jsonObj = JSONObject.parseObject(result);
-					JSONObject obj = jsonObj.getJSONObject("route");
-					JSONArray jsonArray = obj.getJSONArray("paths");
-					if(jsonArray != null&&jsonArray.size() > 0){
-						String distance=JSONObject.parseObject(jsonArray.get(0).toString()).getString("distance");
-						productManagement.setDistance(Double.valueOf(distance));
-					}
-				}
-				//根据用户定位的位置求距离
-				else if (!StringUtils.isEmpty(place)) {
-					//根据装货城市获取经纬度
-					String str = EntCoordUtil.getCoordinate(place);
-					// 参数解释:lng:经度,lat:维度。KEY:高德地图key
-					String urlString = "https://restapi.amap.com/v3/direction/driving?origin=" + str + "&destination=" + longitude + "," + latitude  + "&key=" + KEY ;
-					//输入流的缓冲
-					StringBuffer sb = new StringBuffer();
-					try {
-						URL url = new URL(urlString);
-						BufferedReader in =  new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8"));
-						String line;
-						// 获取地址解析结果
-						while ((line = in.readLine()) != null) {
-							sb.append(line);
+						String result = sb.toString();
+						JSONObject jsonObj = JSONObject.parseObject(result);
+						JSONObject obj = jsonObj.getJSONObject("route");
+						JSONArray jsonArray = obj.getJSONArray("paths");
+						if (jsonArray != null && jsonArray.size() > 0) {
+							String distance = JSONObject.parseObject(jsonArray.get(0).toString()).getString("distance");
+							productManagement.setDistance(Double.valueOf(distance));
 						}
-						in.close();
-					} catch (Exception e) {
-						e.getMessage();
 					}
-					String result = sb.toString();
-					JSONObject jsonObj = JSONObject.parseObject(result);
-					JSONObject obj = jsonObj.getJSONObject("route");
-					JSONArray jsonArray = obj.getJSONArray("paths");
-					if(jsonArray != null&&jsonArray.size() > 0){
-						String distance=JSONObject.parseObject(jsonArray.get(0).toString()).getString("distance");
-						productManagement.setDistance(Double.valueOf(distance));
+					//根据用户定位的位置求距离
+					else if (!StringUtils.isEmpty(place)) {
+						//根据装货城市获取经纬度
+						String str = EntCoordUtil.getCoordinate(place);
+						// 参数解释:lng:经度,lat:维度。KEY:高德地图key
+						String urlString = "https://restapi.amap.com/v3/direction/driving?origin=" + str + "&destination=" + longitude + "," + latitude + "&key=" + KEY;
+						//输入流的缓冲
+						StringBuffer sb = new StringBuffer();
+						try {
+							URL url = new URL(urlString);
+							BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8"));
+							String line;
+							// 获取地址解析结果
+							while ((line = in.readLine()) != null) {
+								sb.append(line);
+							}
+							in.close();
+						} catch (Exception e) {
+							e.getMessage();
+						}
+						String result = sb.toString();
+						JSONObject jsonObj = JSONObject.parseObject(result);
+						JSONObject obj = jsonObj.getJSONObject("route");
+						JSONArray jsonArray = obj.getJSONArray("paths");
+						if (jsonArray != null && jsonArray.size() > 0) {
+							String distance = JSONObject.parseObject(jsonArray.get(0).toString()).getString("distance");
+							productManagement.setDistance(Double.valueOf(distance));
+						}
 					}
 				}
+				//按权重降序 距离升序排序
+				list.sort(Comparator.comparing(ProductManagement::getWeightSort).reversed().thenComparing(ProductManagement::getDistance));
 			}
-			//按权重降序 距离升序排序
-			list.sort(Comparator.comparing(ProductManagement::getWeightSort).reversed().thenComparing(ProductManagement::getDistance));
 		}
 		Integer count = productManagementMapper.selectCount(wrapper);
 		return new Page<ProductManagement>(list, page, limit, count);

+ 5 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/ProductManagement.java

@@ -162,6 +162,11 @@ public class ProductManagement extends SuperDO{
     private String place;
     @TableField(exist = false)
     private String searchKeyWord;
+    /**
+     * 我的发布列表标识
+     */
+    @TableField(exist = false)
+    private String myFlag;
 
     @Override
     public String toString() {