标签功能

This commit is contained in:
浅念
2025-03-27 16:13:47 +08:00
parent 8583ff2543
commit 526f934a75
11 changed files with 343 additions and 233 deletions
+66 -20
View File
@@ -99,24 +99,34 @@
<u-steps v-if="followList.length>0" :current="followList.length" direction="column" dot>
<u-steps-item :title="item.type_txt" v-for="(item, index) in followList" :key="index">
<view slot="desc" class="desc">
<view class="" v-if="item.type==0">
<view class="flex" v-if="item.type==0">
<view class="">
<view class="">
<view class="lingh">
{{$t('times')}} :{{item.created_at}}
</view>
<view class="">{{$t('address')}}:{{item.address}}</view>
<view class="">{{$t('customer.Visitcontent')}}:{{item.audio_text}}</view>
<view class="lingh">{{$t('customer.Visitcontent')}}:{{item.audio_text}}</view>
</view>
<view class="">
<image :src="item.oss_picture" mode=""></image>
<!-- <image :src="item.oss_picture" mode=""></image> -->
<u-album
:urls="isurls(item.oss_picture)"
:singleSize="80"
keyName="src"
></u-album>
</view>
</view>
<view class="" v-else>
<view class="">
<view class="lingh">
{{$t('times')}}:{{item.created_at}}
</view>
<view class="">
<image :src="item.oss_picture" mode=""></image>
<!-- <image :src="item.oss_picture" mode=""></image> -->
<u-album
:urls="isurls(item.oss_picture)"
:singleSize="80"
keyName="src"
></u-album>
</view>
</view>
</view>
@@ -200,6 +210,13 @@
leftClick(){
uni.navigateBack({})
},
isurls(url){
var urls=[]
var obj={}
obj.src = url
urls.push(obj)
return urls
},
close(val){
this[val]=false
},
@@ -282,6 +299,25 @@
},
});
},
unigetLocation(){
var that = this
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);
},
complete: function () {
console.log('获取位置完成');
}
});
},
getlocahost() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
@@ -293,11 +329,12 @@
console.log("获取位置成功:", position);
},
(error) => {
this.error = this.getErrorMessage(error);
uni.showToast({
title: this.error,
icon: 'none'
});
this.unigetLocation()
// this.error = this.getErrorMessage(error);
// uni.showToast({
// title: this.error,
// icon: 'none'
// });
console.error("获取位置失败:", error);
},
{
@@ -307,11 +344,12 @@
}
);
} else {
this.error = "浏览器不支持 Geolocation API";
uni.showToast({
title: this.error,
icon: 'none'
});
this.unigetLocation()
// this.error = "浏览器不支持 Geolocation API";
// uni.showToast({
// title: this.error,
// icon: 'none'
// });
console.error("浏览器不支持 Geolocation API");
}
},
@@ -427,14 +465,14 @@
header:{'Authorization': 'Bearer ' + uni.getStorageSync('token')},
success: (uploadFileRes) => {
const path=JSON.parse(uploadFileRes.data)
if(path.code==-1){
if(path.code==0){
that.form[name] = path.data.path
console.log(that.form)
}else{
uni.showToast({
title: path.message,
icon: 'none'
});
}else{
that.form[name] = path.data.path
console.log(that.form)
}
}
});
@@ -722,6 +760,14 @@
justify-content: space-between;
align-items: center;
color: #999999;
.lingh{
line-height: 40px;
}
.flex{
display: flex;
justify-content: space-between;
align-items: center;
}
}
.title{
color: #666666;