去掉打印 和改接口地址

This commit is contained in:
浅念
2025-06-09 17:58:22 +08:00
parent ce95205a7b
commit 7e7858cc8c
30 changed files with 156 additions and 164 deletions
-7
View File
@@ -208,13 +208,11 @@
this.area()
},
onShow() {
console.log(uni.getStorageSync('location'))
if(uni.getStorageSync('location')){
this.location = JSON.parse(uni.getStorageSync('location'))
this.form.address = this.location.address
this.form.lng = this.location.lng
this.form.lat = this.location.lat
console.log(this.location)
}
},
mounted() {
@@ -331,11 +329,9 @@
// 国家搜索处理函数
handleSearch() {
if (this.searchKeyword) {
console.log(this.searchKeyword)
this.filteredOptions = this.areaList.filter((item) =>
item.name.includes(this.searchKeyword)
);
console.log(this.filteredOptions)
} else {
// 如果搜索框为空,显示全部数据
this.filteredOptions = this.areaList;
@@ -345,8 +341,6 @@
handleSelect(item) {
this.selectedLabel = item.name; // 回显选中的值
this.actives = item.id
console.log("选中的值:", item.id);
console.log("选中的值:", item.name);
},
arerfn(){
this.showarea = false; // 关闭弹窗
@@ -368,7 +362,6 @@
});
return false
}
console.log(this.form)
request({
url:'customer/save',
method:'post',
-4
View File
@@ -162,7 +162,6 @@
}
},
onLoad(options) {
console.log(options);
this.id = options.id;
var that = this
this.getGrade()
@@ -176,7 +175,6 @@
this.form.address = this.location.address
this.form.lng = this.location.lng
this.form.lat = this.location.lat
console.log(this.location)
}
this.followlistfn()
},
@@ -234,7 +232,6 @@
}
}).then(res => {
this.followList = res.data.data
console.log(res.data.data)
})
},
//添加跟进
@@ -314,7 +311,6 @@
tagSelect(item) {
// 如果已选中则取消,否则设置选中
this.$set(this.activeMap, item.group_id, this.activeMap[item.group_id] === item.id ? '' : item.id);
console.log(this.activeMap)
request({
url:'tagGroup/updatePivot',
method:'post',
-7
View File
@@ -192,7 +192,6 @@
}
},
onLoad(options) {
console.log(options);
this.id = options.id;
var that = this
this.getChannel()
@@ -208,7 +207,6 @@
this.form.address = this.location.address
this.form.lng = this.location.lng
this.form.lat = this.location.lat
console.log(this.location)
}
this.followlistfn()
},
@@ -276,7 +274,6 @@
}
}).then(res => {
this.followList = res.data.data
console.log(res.data.data)
})
},
//添加跟进
@@ -381,11 +378,9 @@
// 搜索处理函数
handleSearch() {
if (this.searchKeyword) {
console.log(this.searchKeyword)
this.filteredOptions = this.areaList1.filter((item) =>
item.name.includes(this.searchKeyword)
);
console.log(this.filteredOptions)
} else {
// 如果搜索框为空,显示全部数据
this.filteredOptions = this.areaList1;
@@ -397,8 +392,6 @@
// this.searchKeyword = item.name
this.actives = item.id
// this.showPicker = false; // 关闭弹窗
console.log("选中的值:", item.id);
console.log("选中的值:", item.name);
},
arerfn(){
this.showarea = false; // 关闭弹窗
-4
View File
@@ -64,7 +64,6 @@
}
},
onLoad(options) {
console.log(options);
this.id = options.id;
},
methods: {
@@ -72,7 +71,6 @@
uni.navigateBack({})
},
active(item){
console.log(item)
if(item=='auto'){
this.shownexttime = true
}
@@ -100,7 +98,6 @@
this.shownexttime = false
this.nexttime = e.value
this.time = this.result(e.value, e.mode)
console.log(this.nexttime)
},
getLaterDate(dayNum, dateTime = null) {
// 如果为null,则格式化当前时间为时间戳
@@ -138,7 +135,6 @@
if(this.actives==7){
nexttime = this.getLaterDate(7)
}
console.log(nexttime)
request({
url:'customer/followNext',
method:'post',
+17 -24
View File
@@ -199,7 +199,6 @@
}
},
onLoad(options) {
console.log(options);
this.getlocahost()
this.id = options.id;
this.form.customer_id = options.id;
@@ -292,13 +291,13 @@
success: (res) => {
if (res.data.results && res.data.results.length > 0) {
this.form.address = res.data.results[0].formatted_address; // 获取格式化地址
console.log(res.data.results[0].formatted_address)
// console.log(res.data.results[0].formatted_address)
} else {
console.error('未找到地址');
// console.error('未找到地址');
}
},
fail: (err) => {
console.error('请求失败:', err);
// console.error('请求失败:', err);
},
});
},
@@ -307,17 +306,15 @@
uni.getLocation({
type: 'wgs84', // 默认为 wgs84 坐标系,可选 gcj02
success: function (res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
that.getarrd(res.longitude,res.latitude)
// 如果需要将经纬度转换为具体地址,可以使用逆地理编码
// 这里调用 uni.chooseLocation 或第三方地图服务(如高德、腾讯地图)
},
fail: function (err) {
console.log('获取位置失败:', err);
// console.log('获取位置失败:', err);
},
complete: function () {
console.log('获取位置完成');
// console.log('获取位置完成');
}
});
},
@@ -325,11 +322,11 @@
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
(position) => {
console.log('当前位置的经度:' + position.coords.longitude);
console.log('当前位置的纬度:' + position.coords.latitude);
// console.log('当前位置的经度:' + position.coords.longitude);
// console.log('当前位置的纬度:' + position.coords.latitude);
this.getarrd(position.coords.longitude,position.coords.latitude)
this.error = '';
console.log("获取位置成功:", position);
// console.log("获取位置成功:", position);
},
(error) => {
this.unigetLocation()
@@ -338,7 +335,7 @@
// title: this.error,
// icon: 'none'
// });
console.error("获取位置失败:", error);
// console.error("获取位置失败:", error);
},
{
enableHighAccuracy: true,
@@ -353,7 +350,7 @@
// title: this.error,
// icon: 'none'
// });
console.error("浏览器不支持 Geolocation API");
// console.error("浏览器不支持 Geolocation API");
}
},
getErrorMessage(error) {
@@ -379,7 +376,7 @@
}).then(res => {
this.datas = res.data.data
this.followList = res.data.data
console.log(res.data.data)
// console.log(res.data.data)
})
},
//保存跟进
@@ -421,7 +418,6 @@
confirm(e) {
this.show = false
this.form.firstFollowtime = this.result(e.value, e.mode)
console.log(this.result(e.value, e.mode))
},
cancelnext() {
this.shownexttime = false
@@ -429,7 +425,6 @@
confirmnext(e) {
this.shownexttime = false
this.nexttime = this.result(e.value, e.mode)
console.log(this.nexttime)
request({
url:'customer/followNext',
method:'post',
@@ -451,18 +446,17 @@
},
change(e) {
// console.log('change', e)
},
delfn(name){
console.log(name)
that.carinfo[name] =''
},
uploadfn(imgUrl,name){
var that = this;
uni.uploadFile({
// url: 'http://api.crm.hnxinyouhe.com/upload',
url: 'http://219.157.255.213:9007/upload/uploadImage',
// url: 'https://api.fcrm.hnxinyouhe.com/upload/uploadImage',
url: 'https://crm-server.smt.hnxinyouhe.com/upload/uploadImage',
filePath: imgUrl,
name: 'files',
header:{'Authorization': 'Bearer ' + uni.getStorageSync('token')},
@@ -470,7 +464,6 @@
const path=JSON.parse(uploadFileRes.data)
if(path.code==0){
that.form[name] = path.data.path
console.log(that.form)
}else{
uni.showToast({
title: path.message,
@@ -503,10 +496,10 @@
options.engine = 'baidu';
that.form.audio_text = "";
plus.speech.startRecognize(options, function (s) {
console.log(s);
// console.log(s);
that.form.audio_text += s;
}, function (e) {
console.log("语音识别失败:" + e.message);
// console.log("语音识别失败:" + e.message);
});
},
async startRecognize () {
@@ -524,12 +517,12 @@
options.punctuation = false; // 是否需要标点符号
options.timeout = 10 * 1000; //语音录入持续时长
plus.speech.startRecognize(options, function(s) {
console.log(s);
// console.log(s);
that.form.remark += s;
// 关闭语音
plus.speech.stopRecognize();
}, function (e) {
console.log("语音识别失败:" + e.message);
// console.log("语音识别失败:" + e.message);
});
},
// #ifdef APP-PLUS
+4 -4
View File
@@ -21,7 +21,7 @@ export default {
postMessagefn(e){
uni.setStorageSync('location', e.detail.data);
uni.navigateBack({})
console.log(JSON.parse(e.detail.data))
// console.log(JSON.parse(e.detail.data))
},
leftClick(){
uni.navigateBack({})
@@ -37,16 +37,16 @@ export default {
obj.lat=res.latitude
var arr=[]
arr.push(obj)
console.log(arr)
// console.log(arr)
// that.src = 'http://dap?arr='+encodeURIComponent(JSON.stringify(arr))
that.src = 'http://219.157.255.213:8082?arr='+encodeURIComponent(JSON.stringify(arr))
},
fail: function (err) {
console.log('获取位置失败:', err);
// console.log('获取位置失败:', err);
},
complete: function () {
console.log('获取位置完成');
// console.log('获取位置完成');
}
})
},
+17 -17
View File
@@ -50,7 +50,7 @@ export default {
this.center.lat = e.lat
this.center.lng = e.lng
}
console.log(e)
// console.log(e)
this.initMap()
},
methods:{
@@ -76,15 +76,15 @@ export default {
confirm(item){
var that = this
// var latlng = JSON.parse(JSON.stringify(place.geometry.location))
console.log("place===", item.description)
// console.log("place===", item.description)
that.value = item.description
that.cityInfo.address=item.description
var geocoder = new google.maps.Geocoder();
// var address = document.getElementById("address").value;
geocoder.geocode( { 'address': item.description}, function(results, status) {
console.log(results)
// console.log(results)
var latlng = JSON.parse(JSON.stringify(results[0].geometry.location))
console.log(latlng)
// console.log(latlng)
// // 将地图中心点指向用户所选位置,并设置标记
that.map.setCenter(latlng);
that.cityInfo.lat=latlng.lat
@@ -140,13 +140,13 @@ export default {
const geocoder = new google.maps.Geocoder();
geocoder.geocode({ location: position }, (results, status) => {
if (status === 'OK' && results[0]) {
console.log(results)
console.log(position)
// console.log(results)
// console.log(position)
that.cityInfo.address = results[0].formatted_address;
that.cityInfo.lat = position.lat();
that.cityInfo.lng = position.lng();
that.value = results[0].formatted_address;
console.log(that.cityInfo)
// console.log(that.cityInfo)
} else {
alert('无法获取地址信息');
}
@@ -158,17 +158,17 @@ export default {
uni.getLocation({
type: 'wgs84', // 默认为 wgs84 坐标系,可选 gcj02
success: function (res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
// console.log('当前位置的经度:' + res.longitude);
// console.log('当前位置的纬度:' + res.latitude);
that.addmapmarkfn(res.latitude,res.longitude)
// 如果需要将经纬度转换为具体地址,可以使用逆地理编码
// 这里调用 uni.chooseLocation 或第三方地图服务(如高德、腾讯地图)
},
fail: function (err) {
console.log('获取位置失败:', err);
// console.log('获取位置失败:', err);
},
complete: function () {
console.log('获取位置完成');
// console.log('获取位置完成');
}
});
},
@@ -183,11 +183,11 @@ export default {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
(position) => {
console.log('当前位置的经度:' + position.coords.longitude);
console.log('当前位置的纬度:' + position.coords.latitude);
// console.log('当前位置的经度:' + position.coords.longitude);
// console.log('当前位置的纬度:' + position.coords.latitude);
that.addmapmarkfn(position.coords.latitude,position.coords.longitude)
this.error = '';
console.log("获取位置成功:", position);
// console.log("获取位置成功:", position);
},
(error) => {
that.unigetLocation()
@@ -196,7 +196,7 @@ export default {
// title: this.error,
// icon: 'none'
// });
console.error("获取位置失败:", error);
// console.error("获取位置失败:", error);
},
{
enableHighAccuracy: true,
@@ -211,14 +211,14 @@ export default {
// title: this.error,
// icon: 'none'
// });
console.error("浏览器不支持 Geolocation API");
// console.error("浏览器不支持 Geolocation API");
}
}
})
.catch((e) => {
console.log(e)
// console.log(e)
})
}
},
+21 -13
View File
@@ -49,7 +49,6 @@
}
},
onLoad(e) {
console.log(e)
this.tag_id = e.tag_id
this.tag_name = e.name
},
@@ -69,7 +68,6 @@
per_page:10,
}
}).then(res => {
console.log(res.data)
if(res.data.code ==0){
var datas = res.data.data.list;
this.$refs.paging.complete(datas);
@@ -81,7 +79,6 @@
})
},
godetile(item){
console.log(item)
uni.navigateTo({
url: '/pages/customer/detile?id='+item.id
});
@@ -96,16 +93,27 @@
});
return;
}
uni.makePhoneCall({
phoneNumber: phoneNumber,
success: () => {
console.log('拨打电话成功');
},
fail: (err) => {
console.log('拨打电话失败', err);
},
});
uni.showModal ({
title: this.$t('prompt'),
content: this.$t('callmsg'),
cancelText: this.$t('cancel'),
confirmText: this.$t('confirm'),
success: function (res) {
if (res.confirm) {
uni.makePhoneCall({
phoneNumber: phoneNumber,
success: () => {
// console.log('拨打电话成功');
},
fail: (err) => {
// console.log('拨打电话失败', err);
},
});
} else if (res.cancel) {
// console.log('用户点击取消');
}
}
});
},
editClick(item){
uni.navigateTo({