From 274dab15bfc890c9c18544edd53a63130bc7fb5e Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Mon, 03 Nov 2025 16:10:34 +0800
Subject: [PATCH] 修复名片订单不跳转半屏小程序问题 修复地图点击进去定位问题 修复少了一个上传的按钮图标
---
mobile/pages/plus/business/add.vue | 63 ++++++++++++++++++++++++-------
1 files changed, 48 insertions(+), 15 deletions(-)
diff --git a/mobile/pages/plus/business/add.vue b/mobile/pages/plus/business/add.vue
index 29be055..18d77d9 100644
--- a/mobile/pages/plus/business/add.vue
+++ b/mobile/pages/plus/business/add.vue
@@ -89,7 +89,7 @@
头像
</view>
<view class="tx" style="margin-left: 30rpx;">
- <image class="logo" :src="file_path" mode="heightFix"></image>
+ <image class="logo" :src="file_path||'@/static/shop/login/qietu_1054.png'" mode="heightFix"></image>
<Upload v-if="is_avatar" @getImgs="handleAvatarUpload" :imageList="[file_path]"></Upload>
</view>
</view>
@@ -98,7 +98,7 @@
logo
</view>
<view class="logo" style="overflow: hidden;">
- <image class="logo" :src="logo_path" mode="heightFix"></image>
+ <image class="logo" :src="logo_path||'@/static/shop/login/qietu_1054.png'" mode="heightFix"></image>
<Upload v-if="is_logo" @getImgs="handleLogoUpload" :imageList="[logo_path]"></Upload>
</view>
</view>
@@ -117,7 +117,7 @@
<view class="lxfx">
<view class="lxfxbiaoti"><text style="color: #fa3534;">*</text>手机:</view>
<view class="lxfxnrr">
- <input @input="sjh" placeholder="输入手机号,多个手机号用/隔开" v-model="mobile" class="lxfxneirong"
+ <input @input="sjh" placeholder="输入手机号" v-model="mobile" class="lxfxneirong"
type="text">
<input style="display: none;" name="mobile" v-model="business.mobile"
class="lxfxneirong" type="text">
@@ -175,11 +175,11 @@
v-model="business.industry_id">
</view>
</view>
- <view class="lxfx">
+ <view class="lxfx" >
<view class="lxfxbiaoti">所在地区:</view>
<view class="lxfxnrr">
<input class="lxfxneirong" :value="selectCity" disabled="true"
- @click="showMulLinkageThreePicker" placeholder="请选择省市区">
+ @click="chooseLocation" placeholder="请选择省市区">
<input style="display: none;" type="hidden" name="province_id"
v-model="business.province_id">
<input style="display: none;" type="hidden" name="city_id" v-model="business.city_id">
@@ -187,7 +187,7 @@
v-model="business.region_id">
</view>
</view>
- <view class="lxfx">
+ <view class="lxfx" >
<view class="lxfxbiaoti"><text style="color: #fa3534;">*</text>地址:</view>
<view class="lxfxnrr">
<input placeholder="请输入详细地址" name="address[0]" v-model="business.address[0]"
@@ -209,6 +209,8 @@
<input type="text" style="display: none;" name="logo" :value="logo_id">
<input type="text" style="display: none;" name="logo_height" :value="logo_height">
<input type="text" style="display: none;" name="logo_width" :value="logo_width">
+ <input type="text" style="display: none;" name="longitude" :value="business.longitude">
+ <input type="text" style="display: none;" name="latitude" :value="business.latitude">
</view>
<Popup :show="industryShow" :width="screenWidth" type="bottom" :closeable="true" @close="industryClose">
<view class="industry-popup">
@@ -273,7 +275,9 @@
city_id: 0, // 城市ID
region_id: 0, // 区域ID
Introduction: '', // 简介
- ilk: '' // 名片类型
+ ilk: '' ,// 名片类型
+ latitude:0,
+ longitude:0
},
// 名片类型
ilkList: [], // 类型列表
@@ -284,9 +288,9 @@
business_card_id: 0, // 名片ID(用于编辑)
// 图片相关
file_id: 0, // 头像文件ID
- file_path: "https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132", // 头像路径
+ file_path: "", // 头像路径
logo_id: 0, // Logo文件ID
- logo_path: "http://lblmh.com/image/diy/logo_top.png", // Logo路径
+ logo_path: "", // Logo路径
// 布局相关
unit: [], // 单位信息数组
logo_height: 0, // Logo高度
@@ -331,6 +335,35 @@
this.initRegionData();
},
methods: {
+ // 打开地图选择地址 by lyzflash
+ chooseLocation(n) {
+ let self=this;
+ uni.chooseLocation({
+ success: function (res) {
+ console.log(res);
+ self.business.longitude=res.longitude;
+ self.business.latitude=res.latitude;
+ self.location_address=res.address;
+ self.business.address[0]=res.name;
+ // 获取省市区
+ self.setLocationAddress();
+ }
+ });
+ },
+
+ // 获取掉省市区 by lyzflash
+ setLocationAddress() {
+ let self = this;
+ self._get('user.address/setLocationAddress', {
+ address: self.location_address
+ }, function(res) {
+ /* self.address.location_address = res.data.short_address; */
+ self.business.province_id = res.data.cityCode[0];
+ self.business.city_id = res.data.cityCode[1];
+ self.business.region_id = res.data.cityCode[2];
+ self.selectCity = res.data.region;
+ });
+ },
templateClose() {
this.templateShow = !this.templateShow
},
@@ -499,8 +532,8 @@
})
this.file_id = res.data.file_id;
this.logo_id = res.data.logo
- res.data.file_path ? this.file_path = res.data.file_path : "";
- res.data.logo ? this.logo_path = res.data.logo_image.file_path : "";
+ res.data.file_id ? this.file_path = res.data.file_path : "";
+ res.data.logo ? this.logo_path = res.data.logoImage.file_path : "";
res.data.logo_width ? this.logo_width = res.data.logo_width : 0;
res.data.logo_height ? this.logo_height = res.data.logo_height : 0;
@@ -666,7 +699,7 @@
}
.biaoti {
- color: #37bde6;
+ color: #D41003;
font-size: 40rpx;
padding: 20rpx 0rpx;
}
@@ -734,7 +767,7 @@
.tijiao {
width: 30%;
- background-color: #37bde6;
+ background-color: #D41003;
margin-left: 35%;
color: #fff;
}
@@ -748,7 +781,7 @@
font-size: 36rpx;
font-weight: bold;
margin-bottom: 20rpx;
- color: #37bde6;
+ color: #D41003;
}
.industry-item {
@@ -758,7 +791,7 @@
}
.industry-item.selected {
- color: #37bde6;
+ color: #D41003;
}
.industry-item:active {
--
Gitblit v1.9.2