shish пре 10 месеци
родитељ
комит
e8b7464830
2 измењених фајлова са 30 додато и 11 уклоњено
  1. 3 1
      ghsApp/src/pagesClient/member/detail.vue
  2. 27 10
      ghsApp/src/pagesClient/member/modify.vue

+ 3 - 1
ghsApp/src/pagesClient/member/detail.vue

@@ -100,6 +100,7 @@
             
             
             <!-- 操作按钮区域 -->
             <!-- 操作按钮区域 -->
             <view class="action-buttons" style="display: flex; gap: 32upx; padding-top: 24upx; border-top: 1upx solid #f0f0f0;">
             <view class="action-buttons" style="display: flex; gap: 32upx; padding-top: 24upx; border-top: 1upx solid #f0f0f0;">
+
               <view class="action-item" style="display: flex; flex-direction: column; align-items: center; flex: 1;" @click="callUp">
               <view class="action-item" style="display: flex; flex-direction: column; align-items: center; flex: 1;" @click="callUp">
                 <view class="icon-wrapper" style="width: 72upx; height: 72upx; border-radius: 50%; background: linear-gradient(135deg, #28a745, #20c997); display: flex; align-items: center; justify-content: center; margin-bottom: 10upx; box-shadow: 0 3upx 10upx rgba(40, 167, 69, 0.3);">
                 <view class="icon-wrapper" style="width: 72upx; height: 72upx; border-radius: 50%; background: linear-gradient(135deg, #28a745, #20c997); display: flex; align-items: center; justify-content: center; margin-bottom: 10upx; box-shadow: 0 3upx 10upx rgba(40, 167, 69, 0.3);">
                   <i class="iconfont icondianhua1" style="font-size: 36upx; color: #fff;"></i>
                   <i class="iconfont icondianhua1" style="font-size: 36upx; color: #fff;"></i>
@@ -107,13 +108,14 @@
                 <text style="font-size: 22upx; color: #666;">拨打电话</text>
                 <text style="font-size: 22upx; color: #666;">拨打电话</text>
               </view>
               </view>
               
               
-              <view class="action-item" style="display: flex; flex-direction: column; align-items: center; flex: 1;" 
+              <view class="action-item" style="display: flex; flex-direction: column; align-items: center; flex: 1;" v-if="!$util.isEmpty(userInfo.lat) && !$util.isEmpty(userInfo.long)"
                     @click.stop="navigate(userInfo.lat,userInfo.long,userInfo.address)">
                     @click.stop="navigate(userInfo.lat,userInfo.long,userInfo.address)">
                 <view class="icon-wrapper" style="width: 72upx; height: 72upx; border-radius: 50%; background: linear-gradient(135deg, #3385ff, #0056b3); display: flex; align-items: center; justify-content: center; margin-bottom: 10upx; box-shadow: 0 3upx 10upx rgba(51, 133, 255, 0.3);">
                 <view class="icon-wrapper" style="width: 72upx; height: 72upx; border-radius: 50%; background: linear-gradient(135deg, #3385ff, #0056b3); display: flex; align-items: center; justify-content: center; margin-bottom: 10upx; box-shadow: 0 3upx 10upx rgba(51, 133, 255, 0.3);">
                   <i class="iconfont icondianhua" style="font-size: 36upx; color: #fff;"></i>
                   <i class="iconfont icondianhua" style="font-size: 36upx; color: #fff;"></i>
                 </view>
                 </view>
                 <text style="font-size: 22upx; color: #666;">导航到达</text>
                 <text style="font-size: 22upx; color: #666;">导航到达</text>
               </view>
               </view>
+
             </view>
             </view>
           </view>
           </view>
       </view>
       </view>

+ 27 - 10
ghsApp/src/pagesClient/member/modify.vue

@@ -2,26 +2,34 @@
 	<view class="app-content">
 	<view class="app-content">
 		<form @submit="formSubmit">
 		<form @submit="formSubmit">
 			<view class="module-com input-line-wrap">
 			<view class="module-com input-line-wrap">
+
+				<tui-list-cell class="line-cell" :hover="false" v-if="hasMap == 1">
+					<view class="tui-title">地址类型</view>
+					<button :class="[couldNavigation==1?'blue':'default']" class="admin-button-com middle" @click.stop="setStyle(1)" style="width:180upx;">支持导航</button>
+					<button :class="[couldNavigation==0?'blue':'default']" class="admin-button-com middle" style="width:180upx;margin-left:70upx;" @click.stop="setStyle(0)">不用导航</button>
+				</tui-list-cell>
+
 				<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
 				<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
 					<view class="tui-title">城市</view>
 					<view class="tui-title">城市</view>
-					<view class="tui-input" style="width:280upx;" v-if="form.province || form.city">{{ form.province + '-' + form.city }}</view>
-					<view class="tui-placeholder" style="width:280upx;" v-else>请选择</view>
+					<view class="tui-input" style="width:270upx;" v-if="form.province || form.city">{{ form.province + '-' + form.city }}</view>
+					<view class="tui-placeholder" style="width:270upx;" v-else>请选择</view>
 					<input v-model="form.province" name="province" hidden />
 					<input v-model="form.province" name="province" hidden />
 					<button class="admin-button-com blue small" @click.stop="onHere">我在昆明</button>
 					<button class="admin-button-com blue small" @click.stop="onHere">我在昆明</button>
 				</tui-list-cell>
 				</tui-list-cell>
-				<tui-list-cell v-if="hasMap == 0" class="line-cell" :hover="false">
-					<view class="tui-title">地址</view>
-					<input v-model="form.address" placeholder-class="phcolor" class="tui-input" name="address" placeholder="请填写地址" />
-				</tui-list-cell>
-				<tui-list-cell v-else class="line-cell" :hover="false" :arrow="true" @click="selectRegion">
+
+				<tui-list-cell v-if="couldNavigation == 1" class="line-cell" :hover="false" :arrow="true" @click="selectRegion">
 					<view class="tui-title">地址</view>
 					<view class="tui-title">地址</view>
 					<view v-if="form.address" class="tui-input">{{ form.address }}</view>
 					<view v-if="form.address" class="tui-input">{{ form.address }}</view>
 					<view v-else class="tui-placeholder">请填写地址</view>
 					<view v-else class="tui-placeholder">请填写地址</view>
 					<input v-model="form.address" name="address" hidden />
 					<input v-model="form.address" name="address" hidden />
 				</tui-list-cell>
 				</tui-list-cell>
+				<tui-list-cell v-else class="line-cell" :hover="false">
+					<view class="tui-title">地址</view>
+					<input v-model="form.address" placeholder-class="phcolor" class="tui-input" name="address" placeholder="请填写地址" />
+				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 				<tui-list-cell class="line-cell" :hover="false">
 					<view class="tui-title ">门牌</view>
 					<view class="tui-title ">门牌</view>
-					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(建议填写,方便查找)"/>
+					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号,建议填写,方便查找"/>
 				</tui-list-cell>
 				</tui-list-cell>
 			</view>
 			</view>
 			<view class="confirm-btn">
 			<view class="confirm-btn">
@@ -42,7 +50,6 @@ import AppAreaSel from '@/components/app-area-sel'
 const form = require('@/utils/formValidation.js')
 const form = require('@/utils/formValidation.js')
 import { modifyAddress } from '@/api/custom'
 import { modifyAddress } from '@/api/custom'
 import {getHasMap} from "@/api/express"
 import {getHasMap} from "@/api/express"
-
 export default {
 export default {
 	name: 'modify',
 	name: 'modify',
 	components: {
 	components: {
@@ -67,7 +74,8 @@ export default {
 			},
 			},
 			cityPickerValueDefault: [0, 0],
 			cityPickerValueDefault: [0, 0],
 			showRegion: false,
 			showRegion: false,
-			hasMap: 0
+			hasMap: 0,
+			couldNavigation:1
 		}
 		}
 	},
 	},
 	onLoad() {
 	onLoad() {
@@ -84,6 +92,10 @@ export default {
 		}
 		}
 	},
 	},
 	methods: {
 	methods: {
+		setStyle(flag){
+			this.couldNavigation = flag
+			this.form.address = ''
+		},
 		onHere(){
 		onHere(){
 			this.form.province = '云南省'
 			this.form.province = '云南省'
 			this.form.city = '昆明市'
 			this.form.city = '昆明市'
@@ -91,6 +103,11 @@ export default {
 		init() {
 		init() {
 			getHasMap().then(res=>{
 			getHasMap().then(res=>{
 				this.hasMap = res.data.hasMap
 				this.hasMap = res.data.hasMap
+				if(this.hasMap == 0){
+					this.couldNavigation = 0
+				}else{
+					this.couldNavigation = 1
+				}
 			})
 			})
 		},
 		},
 		//省市联动
 		//省市联动