Просмотр исходного кода

Merge branch 'master' of git.huaml.com:zhh/front-end

shizhongqi 11 месяцев назад
Родитель
Сommit
6169f871a3

+ 2 - 6
ghsApp/src/admin/shop/add.vue

@@ -80,7 +80,7 @@
 				</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" @input="modifyShow" placeholder="请填写地址" />
+					<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">
 					<view class="tui-title">地址</view>
@@ -90,7 +90,7 @@
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 					<view class="tui-title ">门牌</view>
-					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(建议填写,方便找你)" @input="modifyShow" />
+					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(建议填写,方便找你)" />
 				</tui-list-cell>
 
 				<tui-list-cell class="line-cell" :hover="false">
@@ -442,15 +442,11 @@ export default {
 			const cityIndex = districtStr.indexOf('市');
 			this.form.dist = cityIndex !== -1 ? districtStr.substring(cityIndex + 1) : districtStr;
 		},
-		modifyShow(){
-			this.form.showAddress = this.form.city+this.form.address+this.form.floor
-		},
 		confirmFn() {
 			let hostFn = this.option.id ? update : add
 			if (this.option.id) {
 				this.form.id = this.option.id
 			}
-			this.form.showAddress = this.form.city+this.form.address+this.form.floor
 			this.form = {...this.form,...this.region}
 			uni.showLoading({mask:true})
 			hostFn(this.form)

+ 9 - 4
ghsApp/src/pagesClient/member/detail.vue

@@ -68,10 +68,15 @@
                   {{userInfo.name}}
                 </view>
                 <view style="margin-bottom:20upx;color:#333333">{{userInfo.superInfo && userInfo.superInfo.name ? userInfo.superInfo.name : ''}} {{userInfo.mobile}}</view>
-                <view>
-                  <text v-if="!$util.isEmpty(userInfo.city)" style="margin-right:15upx;">{{userInfo.city}}</text>
-                  {{userInfo.dist}}{{userInfo.address}}{{userInfo.floor}}<block v-if="userInfo.fullAddress!=userInfo.showAddress && userInfo.showAddress!=''">({{ userInfo.showAddress }})</block>
-                  <i class="iconfont iconbianji" style="font-size:25upx;margin-left:20upx;"></i>
+                <view style="position: relative;">
+                  <view style="margin-bottom: 10upx;">
+                    <text v-if="!$util.isEmpty(userInfo.city) || !$util.isEmpty(userInfo.dist)" style="margin-right:15upx;">{{userInfo.city}}{{userInfo.dist}}</text>
+                    {{userInfo.address}}{{userInfo.floor}}
+                  </view>
+                  <view v-if="userInfo.fullAddress!=userInfo.showAddress && userInfo.showAddress!=''" style="color:#5f5b5b;">
+                    {{ userInfo.showAddress }}
+                  </view>
+                  <i class="iconfont iconbianji" style="font-size:30upx; position: absolute; right: -97upx; top: 50%; transform: translateY(-50%);"></i>
                 </view>
             </view>
             <view style="line-height:150upx;">

+ 14 - 18
ghsApp/src/pagesClient/member/modify.vue

@@ -10,7 +10,7 @@
 				</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" @input="modifyShow" placeholder="请填写地址" />
+					<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">
 					<view class="tui-title">地址</view>
@@ -20,7 +20,7 @@
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 					<view class="tui-title ">门牌</view>
-					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(建议填写,方便查找)" @input="modifyShow" />
+					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(建议填写,方便查找)"/>
 				</tui-list-cell>
 			</view>
 			<view class="confirm-btn">
@@ -75,6 +75,8 @@ export default {
 		let prevPage = pages[ pages.length - 2 ];
 		//订单列表页修改客户地址,返回时不刷新
 		prevPage.$vm.fromDetail = {status:1}
+		//返回到客户详情页需要刷新
+		prevPage.$vm.needRefresh = 1
 
 		if(this.option.name){
 			uni.setNavigationBarTitle({ title: this.option.name })
@@ -98,9 +100,6 @@ export default {
 			this.region.lat = ''
 			this.region.long = ''
 		},
-		modifyShow(){
-			this.form.showAddress = this.form.city+this.form.address+this.form.floor
-		},
 		selectRegion() {
 			if (!this.form.city) {
 				this.$msg('请先选择城市!')
@@ -124,19 +123,16 @@ export default {
 		},
 		confirmFn() {
 			let that = this
-			this.form.showAddress = this.form.city+this.form.address+this.form.floor
-			that.$util.confirmModal({content:'确认修改?'},() => {
-				this.form.id = this.option.id ? this.option.id : 0
-				this.form = {...this.form, ...this.region}
-				uni.showLoading({mask:true})
-				modifyAddress(this.form).then(res=>{
-					if(res.code == 1){
-						that.$msg('修改成功')
-						setTimeout(() => {
-							uni.navigateBack({})
-						}, 1200)
-					}
-				})
+			this.form.id = this.option.id ? this.option.id : 0
+			this.form = {...this.form, ...this.region}
+			uni.showLoading({mask:true})
+			modifyAddress(this.form).then(res=>{
+				if(res.code == 1){
+					that.$msg('修改成功')
+					setTimeout(() => {
+						uni.navigateBack({})
+					}, 1200)
+				}
 			})
 		},
 		formSubmit(e) {

+ 4 - 8
ghsApp/src/pagesClient/official/apply.vue

@@ -22,7 +22,7 @@
         <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"
-          placeholder-style="color:#CCCCCC" class="tui-input" name="address" @input="modifyShow" placeholder="请填写" />
+          placeholder-style="color:#CCCCCC" class="tui-input" name="address" placeholder="请填写" />
 				</tui-list-cell>
 				<tui-list-cell v-else class="line-cell" :hover="false" :arrow="true" @click="selectRegion">
 					<view class="tui-title">所在地址</view>
@@ -32,7 +32,7 @@
 				</tui-list-cell>
         <tui-list-cell class="line-cell" :hover="false" >
           <div class="tui-title">楼号门牌</div>
-          <input v-model="form.floor" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="floor" placeholder="选填" @input="modifyShow"  />
+          <input v-model="form.floor" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="floor" placeholder="选填" />
         </tui-list-cell>
       </view>
 
@@ -252,9 +252,6 @@ export default {
 			}
 			this.showRegion = true
 		},
-    modifyShow(){
-			this.form.showAddress = this.form.city+this.form.address+this.form.floor
-		},
     changeAreaFn(e) {
 			let locationStr = e.location
 			let fruits = locationStr.split(",").map(fruit => fruit.trim())
@@ -262,9 +259,9 @@ export default {
 			this.form.latitude = fruits[1]
 			this.form.longitude = fruits[0]
 			this.form.showAddress = e.address
-      this.form.address = e.name
+			this.form.address = e.name
 
-      // 提取地区信息,按遇到第一个"市"字后,把"市"后面的字符串作为地区
+      		// 提取地区信息,按遇到第一个"市"字后,把"市"后面的字符串作为地区
 			const districtStr = e.district || '';
 			const cityIndex = districtStr.indexOf('市');
 			this.form.dist = cityIndex !== -1 ? districtStr.substring(cityIndex + 1) : districtStr;
@@ -304,7 +301,6 @@ export default {
     },
     confirmFn () {
       let currentMiniOpenId = uni.getStorageSync('currentMiniOpenId')
-      this.form.showAddress = this.form.city+this.form.address+this.form.floor
       uni.showLoading({mask:true})
       applyRegister({
         hdShopAdminId: this.option.hdShopAdminId,

+ 5 - 4
hdApp/src/admin/home/member.vue

@@ -49,7 +49,7 @@
                         <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 365" style="margin-left:20upx;color:green;">超1年未下单</text>
                       </block>
                       <block v-else>
-                        <text style="font-size:28upx;margin-left:20upx;color:#3385FF;font-weight:bold;">待审核</text>
+                        <text style="font-size:25upx;margin-left:20upx;color:#3385FF;font-weight:bold;">待审核</text>
                       </block>
 
                     </view>
@@ -262,7 +262,7 @@ export default {
 
   .user-name {
     flex: 1;
-    font-size: 34upx;
+    font-size: 32upx;
     color: #333;
     overflow: hidden;
     text-overflow: ellipsis;
@@ -299,16 +299,17 @@ export default {
   .user-meta {
     display: flex;
     align-items: center;
-    font-size: 22upx;
+    font-size: 25upx;
     color: #9397a4;
     width:495upx;
+    margin-top: 8upx;
   }
 
   .visit-time {
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
-    font-size:28upx;
+    font-size:25upx;
     width:495upx;
   }
 

+ 119 - 2
hdApp/src/admin/home/workbench.vue

@@ -73,7 +73,7 @@
             <view class="header-line"></view>
           </view>
           <view class="icon-grid">
-            <view class="icon-item" @click="goPage({url: '/admin/cg/mall'})">
+            <view class="icon-item" @click="showMallOptions">
               <view class="icon-wrapper">
                 <image class="icon-image" :src="`${constant.hostUrl}/image/ghs/home/shop2.png`" mode="aspectFit"></image>
               </view>
@@ -418,6 +418,26 @@
       </view>
     </view>
   </uni-popup>
+  
+  <!-- 商城选项弹框 -->
+  <uni-popup ref="mallOptionsPopup" type="center" mask-background-color="rgba(0,0,0,0.4)">
+    <view class="mall-options-container">
+      <view class="mall-options-header">
+        <text class="mall-options-title">商城</text>
+      </view>
+      <view class="mall-options-buttons">
+        <view class="mall-option-btn" @click="copyMallLink">
+          <view class="option-icon">📋</view>
+          <text class="option-text">复制链接</text>
+        </view>
+        <view class="mall-option-btn" @click="openMallDirect">
+          <view class="option-icon">🚀</view>
+          <text class="option-text">直接打开</text>
+        </view>
+      </view>
+    </view>
+  </uni-popup>
+
 </view>
 </template>
 <script>
@@ -838,6 +858,34 @@ export default {
           success (res) {
           }
         })
+    },
+    // 显示商城选项弹框
+    showMallOptions() {
+      this.$refs.mallOptionsPopup.open('center')
+    },
+    // 关闭商城选项弹框
+    closeMallOptions() {
+      this.$refs.mallOptionsPopup.close()
+    },
+    // 直接打开商城
+    openMallDirect() {
+      this.closeMallOptions()
+      this.goPage({url: '/admin/cg/mall'})
+    },
+    // 复制商城链接
+    copyMallLink() {
+      this.closeMallOptions()
+      // 这里生成商城链接,您可以根据实际情况修改链接格式
+      const mallLink = `${this.$constant.hostUrl}/admin/cg/mall`
+      uni.setClipboardData({
+        data: mallLink,
+        success: () => {
+          this.$msg('商城链接已复制到剪贴板')
+        },
+        fail: () => {
+          this.$msg('复制失败,请重试')
+        }
+      })
     }
   }
 };
@@ -1124,7 +1172,7 @@ export default {
       .item-value {
         font-size: 36upx;
         font-weight: 600;
-        color: #22C55E;
+        color: #1b9046;
         margin-bottom: 10upx;
         line-height: 1;
       }
@@ -1401,6 +1449,75 @@ export default {
 }
 }
 
+/* 商城选项弹框样式 */
+.mall-options-container {
+  width: 600upx;
+  background-color: #fff;
+  border-radius: 24upx;
+  overflow: hidden;
+  animation: popup-in 0.3s ease-out;
+  
+  .mall-options-header {
+    padding: 50upx 30upx 30upx;
+    text-align: center;
+    background-color: #f8f9fa;
+    
+    .mall-options-title {
+      font-size: 44upx;
+      font-weight: 600;
+      color: #333;
+    }
+  }
+  
+  .mall-options-buttons {
+    padding: 40upx 40upx 50upx;
+    display: flex;
+    flex-direction: column;
+    gap: 40upx;
+    align-items: center;
+
+    .mall-option-btn {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      padding: 32upx 40upx;
+      background-color: #f8f9fa;
+      border-radius: 20upx;
+      transition: all 0.2s ease;
+      width: 100%;
+      
+      &:active {
+        background-color: #e9ecef;
+        transform: scale(0.98);
+      }
+      
+      .option-icon {
+        font-size: 56upx;
+        margin-right: 30upx;
+        width: 70upx;
+        text-align: center;
+      }
+      
+      .option-text {
+        font-size: 42upx;
+        color: #333;
+        font-weight: 500;
+      }
+    }
+  }
+}
+
+@keyframes popup-in {
+  0% {
+    opacity: 0;
+    transform: scale(0.8) translateY(20upx);
+  }
+  100% {
+    opacity: 1;
+    transform: scale(1) translateY(0);
+  }
+}
+
 /* 供货商提示弹框样式 */
 .supplier-notice-popup {
   .supplier-notice-container {

+ 4 - 3
hdApp/src/admin/member/detail.vue

@@ -75,10 +75,10 @@
             <text class="contact-label">地址</text>
             <view class="contact-value address-text">
               <text class="address-main">
-                <text v-if="!$util.isEmpty(data.city)" class="city-name">{{data.city}} </text>
-                {{data.dist}}{{data.address}}{{data.floor}}
+                <text v-if="!$util.isEmpty(data.city) || !$util.isEmpty(data.dist)" class="city-name">{{data.city}}{{data.dist}}</text>
+                {{data.address}}{{data.floor}}
               </text>
-              <text v-if="data.showAddress && !$util.isEmpty(data.showAddress)" class="show-address">{{data.showAddress}}</text>
+              <text v-if="!$util.isEmpty(data.showAddress) && data.showAddress!=data.fullAddress" class="show-address">{{data.showAddress}}</text>
             </view>
           </view>
 
@@ -1176,6 +1176,7 @@ export default {
           .address-main {
             .city-name {
               color: #666;
+              margin-right:10upx;
             }
           }
           

+ 20 - 23
hdApp/src/admin/member/modify.vue

@@ -10,7 +10,7 @@
 				</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" @input="modifyShow" placeholder="请填写地址" />
+					<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">
 					<view class="tui-title">地址</view>
@@ -20,7 +20,7 @@
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :hover="false">
 					<view class="tui-title ">门牌</view>
-					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(建议填写,方便查找)" @input="modifyShow" />
+					<input v-model="form.floor" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="楼号门牌号(建议填写,方便查找)" />
 				</tui-list-cell>
 			</view>
 			<view class="confirm-btn">
@@ -73,7 +73,6 @@ export default {
 		}
 	},
 	methods: {
-		//...mapActions(['setUserShopAll']),
 		init() {
 			getHasMap().then(res=>{
 				this.hasMap = res.data.hasMap
@@ -89,12 +88,9 @@ export default {
 			this.region.lat = 0
 			this.region.long = 0
 		},
-		modifyShow(){
-			this.form.showAddress = this.form.city+this.form.address+this.form.floor
-		},
 		selectRegion() {
 			if (!this.form.city) {
-				this.$msg('请选择城市')
+				this.$msg('请选择城市')
 				return false
 			}
 			this.showRegion = true
@@ -103,26 +99,27 @@ export default {
 			this.form.address = e.name
 			let locationStr = e.location
 			let fruits = locationStr.split(",").map(fruit => fruit.trim())
+			this.region.lat = fruits[1]||''
+			this.region.long = fruits[0]||''
+			this.form.showAddress = e.address||''
 
-			this.region.lat = fruits[1]
-			this.region.long = fruits[0]
-			this.form.showAddress = e.address
+			// 提取地区信息,按遇到第一个"市"字后,把"市"后面的字符串作为地区
+			const districtStr = e.district || '';
+			const cityIndex = districtStr.indexOf('市');
+			this.form.dist = cityIndex !== -1 ? districtStr.substring(cityIndex + 1) : districtStr;
 		},
 		confirmFn() {
 			let that = this
-			this.form.showAddress = this.form.city+this.form.address+this.form.floor
-			that.$util.confirmModal({content:'确认修改?'},() => {
-				this.form.id = this.option.id ? this.option.id : 0
-				this.form = {...this.form,...this.region}
-				uni.showLoading({mask:true})
-				modifyAddress(this.form).then(res=>{
-					if(res.code == 1){
-						that.$msg('修改成功')
-						setTimeout(() => {
-							uni.navigateBack({})
-						}, 1200)
-					}
-				})
+			this.form.id = this.option.id ? this.option.id : 0
+			this.form = {...this.form,...this.region}
+			uni.showLoading({mask:true})
+			modifyAddress(this.form).then(res=>{
+				if(res.code == 1){
+					that.$msg('修改成功')
+					setTimeout(() => {
+						uni.navigateBack({})
+					}, 1200)
+				}
 			})
 		},
 		formSubmit(e) {