diff --git a/src/manifest.json b/src/manifest.json
index cd7bd170..e84c20f1 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -122,9 +122,9 @@
"iosStyle" : "common",
"useOriginalMsgbox" : true,
"android" : {
- "hdpi" : "unpackage/res/icons/20x20.png",
- "xhdpi" : "unpackage/res/icons/20x20.png",
- "xxhdpi" : "unpackage/res/icons/20x20.png"
+ "hdpi" : "unpackage/res/icons/1024x1024.png",
+ "xhdpi" : "unpackage/res/icons/1024x1024.png",
+ "xxhdpi" : "unpackage/res/icons/1024x1024.png"
}
},
"icons" : {
@@ -195,7 +195,7 @@
"versionCode" : 100
},
"mp-weixin" : {
- "appid" : "wx2b4e4d3feff8267f",
+ "appid" : "wx66186af0759f47c9",
"setting" : {
"urlCheck" : false,
"minified" : true,
diff --git a/src/pages/home/detail.vue b/src/pages/home/detail.vue
index cabb3001..73e4be90 100644
--- a/src/pages/home/detail.vue
+++ b/src/pages/home/detail.vue
@@ -58,16 +58,25 @@
- {{ getGender(userDetail.member?.memberSex) }}·{{ userDetail.member?.memberAge }}岁
+ {{ getGender(userDetail.member.memberSex) }}·{{ userDetail.member?.memberAge }}岁
-
- {{ userDetail.member?.memberHeight || '' }}cm
+
+ {{ userDetail.member.memberHeight }}cm
-
- {{ userDetail.member?.memberWeight || '' }}kg
+
+ {{ userDetail.member.memberWeight }}kg
-
- {{ userDetail.member?.memberOcc || '' }}
+
+ {{ userDetail.member.memberOcc }}
diff --git a/src/pages/moments/publish.vue b/src/pages/moments/publish.vue
index 17c4bdbb..e6c77fb8 100644
--- a/src/pages/moments/publish.vue
+++ b/src/pages/moments/publish.vue
@@ -5,14 +5,12 @@
-
-
- 发布
-
-
+
+ 发布
+
@@ -21,15 +19,16 @@
-
@@ -49,7 +48,7 @@
-
+ /> -->
+
@@ -71,25 +71,24 @@
import { baseUrl, apiPath, tenantId } from '@/sheep/config';
// @ts-ignore
import { getAccessToken } from '@/sheep/request';
- import { onLoad } from '@dcloudio/uni-app';
+ import { useToast } from '@/uni_modules/wot-design-uni';
+ const toast = useToast();
const { colPickerData, findChildrenByCode } = useColPickerData();
const activeTab = ref<0 | 1>(0);
- const addressValue = ref([]);
+ // const addressValue = ref([]);
const params = reactive({
coverPic: [],
coverVideo: [],
description: '',
- issueLong: '0',
- issueLat: '0',
+ issueLong: '',
+ issueLat: '',
issueProvince: '',
issueCity: '',
issueDistrict: '',
});
- const coverPic = computed(() => {
- return params.coverPic.map((item: any) => JSON.parse(item.response).data);
- });
+ const coverPic = computed(() => params.coverPic?.join(',') || []);
const coverVideo = computed(() => {
return params.coverVideo.map((item: any) => JSON.parse(item.response).data);
});
@@ -131,43 +130,56 @@
params.issueDistrict = selectedItems[2].label;
};
- // 获取经纬度位置信息
- const getLocation = () => {
- uni.getLocation({
- success: (res) => {
- params.issueLat = String(res.latitude);
- params.issueLong = String(res.longitude);
- },
- fail: (err) => {
- uni.showToast({ title: '位置信息获取失败,请打开系统定位', icon: 'none' });
- },
- });
- };
-
const header = {
Accept: '*/*',
'tenant-id': tenantId,
Authorization: 'Bearer ' + getAccessToken(),
};
- onLoad(() => {
- getLocation();
- });
-
// 发布朋友圈
const publishMoments = async () => {
- if (!params.description || !params.issueProvince)
- return uni.showToast({ title: '请填写内容', icon: 'error' });
+ if (!params.description) return uni.showToast({ title: '请填写内容', icon: 'error' });
if (!params.coverPic || !params.coverPic.length)
return uni.showToast({ title: '请上传图片', icon: 'error' });
- getLocation();
- await RecentApi.createMoment({
- ...params,
- coverPic: coverPic.value.join(','),
- coverVideo: coverVideo.value.join(','),
+ // 获取经纬度位置信息
+ uni.getLocation({
+ success: async (res) => {
+ params.issueLat = String(res.latitude);
+ params.issueLong = String(res.longitude);
+
+ const { code, msg } = await RecentApi.createMoment({
+ ...params,
+ coverPic: coverPic.value,
+ coverVideo: coverVideo.value.join(','),
+ });
+ if (code !== 0)
+ return toast.error({
+ msg,
+ duration: 5000,
+ direction: 'vertical',
+ position: 'middle',
+ });
+
+ toast.success({
+ msg: '发布成功',
+ duration: 5000,
+ direction: 'vertical',
+ position: 'middle',
+ });
+ setTimeout(() => {
+ back();
+ }, 800);
+ },
+ fail: (err) => {
+ toast.error({
+ msg: '发布失败,位置信息获取失败,请打开手机系统定位',
+ duration: 5000,
+ direction: 'vertical',
+ position: 'middle',
+ });
+ },
});
- back();
};
// 返回
diff --git a/src/pages/profile/face-verify.vue b/src/pages/profile/face-verify.vue
index 219a23c5..7ed7e2a4 100644
--- a/src/pages/profile/face-verify.vue
+++ b/src/pages/profile/face-verify.vue
@@ -302,6 +302,7 @@
.then(async () => {
const { code } = await RecentApi.deleteUserAlbum(file.id);
if (code === 0) {
+ await getUserAlbum();
resolve(true);
}
});
diff --git a/src/pages/profile/upload-album.vue b/src/pages/profile/upload-album.vue
index b63f0cd2..8e524854 100644
--- a/src/pages/profile/upload-album.vue
+++ b/src/pages/profile/upload-album.vue
@@ -83,6 +83,7 @@
const { code } = await RecentApi.deleteUserAlbum(file.id);
if (code === 0) {
resolve(true);
+ await getUserAlbum();
return toast.success('移除成功');
}
toast.error('移除失败');
diff --git a/src/pages/profile/use-ablum.ts b/src/pages/profile/use-ablum.ts
index 44a42de1..c09261e2 100644
--- a/src/pages/profile/use-ablum.ts
+++ b/src/pages/profile/use-ablum.ts
@@ -1,9 +1,9 @@
import { onMounted, ref } from 'vue';
import RecentApi from '@/sheep/api/member/recent';
-export default function useAblum() {
- const ablumList = ref([]); // 用户相册
+const ablumList = ref([]); // 用户相册列表
+export default function useAblum() {
// 获取用户相册
const getUserAlbum = async () => {
const { data = null } = await RecentApi.getUserAlbum({
diff --git a/src/pages/tabbar/components/user-ablum.vue b/src/pages/tabbar/components/user-ablum.vue
index f246bceb..3e6bdf91 100644
--- a/src/pages/tabbar/components/user-ablum.vue
+++ b/src/pages/tabbar/components/user-ablum.vue
@@ -22,8 +22,6 @@