修改活动接口参数,报修接口参数,首页活动参数
This commit is contained in:
@@ -77,6 +77,7 @@ const latitude = ref('');
|
||||
|
||||
// 接收活动ID
|
||||
onLoad((option) => {
|
||||
console.log('idiidd',option)
|
||||
activityId.value = option?.id || '';
|
||||
});
|
||||
|
||||
@@ -233,33 +234,36 @@ const submitStatus = async () => {
|
||||
uni.showToast({ title: '请输入实况描述', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
if (!location.value) {
|
||||
uni.showToast({ title: '请先签到', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
// if (!location.value) {
|
||||
// uni.showToast({ title: '请先签到', icon: 'none' });
|
||||
// return;
|
||||
// }
|
||||
|
||||
uni.showLoading({ title: '提交中...', mask: true });
|
||||
|
||||
try {
|
||||
// 先上传图片
|
||||
const imageUrls = await uploadAllImages();
|
||||
|
||||
// 同时签到
|
||||
await signinActivityLive(activityId.value, {
|
||||
location: location.value,
|
||||
longitude: longitude.value,
|
||||
latitude: latitude.value,
|
||||
villageId:uni.getStorageSync('currentVillageId')
|
||||
});
|
||||
// 提交实况
|
||||
const liveData = {
|
||||
content: statusDesc.value.trim(),
|
||||
images: imageUrls,
|
||||
location: location.value,
|
||||
longitude: longitude.value,
|
||||
latitude: latitude.value
|
||||
latitude: latitude.value,
|
||||
villageId:uni.getStorageSync('currentVillageId')
|
||||
};
|
||||
console.log('ssasss',uni.getStorageSync('currentVillageId'))
|
||||
console.log("xxx",activityId.value)
|
||||
await addActivityLive(activityId.value, liveData);
|
||||
|
||||
// 同时签到
|
||||
await signinActivityLive(activityId.value, {
|
||||
location: location.value,
|
||||
longitude: longitude.value,
|
||||
latitude: latitude.value
|
||||
});
|
||||
|
||||
|
||||
uni.hideLoading();
|
||||
uni.showToast({ title: '添加成功', icon: 'success' });
|
||||
|
||||
Reference in New Issue
Block a user