diff --git a/src/pages.json b/src/pages.json index b9bfcdd3..58628cb4 100644 --- a/src/pages.json +++ b/src/pages.json @@ -257,6 +257,13 @@ "navigationStyle": "custom" } }, + { + "path": "userinfo-simple", + "style": { + "navigationBarTitleText": "我的账号", + "navigationStyle": "custom" + } + }, { "path": "userinfo", "style": { diff --git a/src/pages/components/user-appraise.vue b/src/pages/components/user-appraise.vue new file mode 100644 index 00000000..e69de29b diff --git a/src/pages/home/detail.vue b/src/pages/home/detail.vue index 86a792a8..07e4beca 100644 --- a/src/pages/home/detail.vue +++ b/src/pages/home/detail.vue @@ -75,11 +75,17 @@ - - 评价 - {{ userDetail.operationTotal?.recentShieldTotal || 0 }} + + + 评价 + {{ userDetail.operationTotal?.recentShieldTotal || 0 }} + 综合评分:3.2 + + + 评价Ta + - + 身材 diff --git a/src/pages/message/chat-box.vue b/src/pages/message/chat-box.vue index 3a445ded..4e51845c 100644 --- a/src/pages/message/chat-box.vue +++ b/src/pages/message/chat-box.vue @@ -56,7 +56,7 @@ - + diff --git a/src/pages/profile/feedback.vue b/src/pages/profile/feedback.vue index 8d33c586..ea6530c5 100644 --- a/src/pages/profile/feedback.vue +++ b/src/pages/profile/feedback.vue @@ -14,45 +14,43 @@ 图片 - + - + @click="submitFeedback"> 提交反馈 diff --git a/src/pages/profile/like.vue b/src/pages/profile/like.vue index 5feb83e5..c4e03c94 100644 --- a/src/pages/profile/like.vue +++ b/src/pages/profile/like.vue @@ -11,31 +11,17 @@ - + - + - + @@ -44,52 +30,52 @@ diff --git a/src/pages/profile/setting.vue b/src/pages/profile/setting.vue index 16b41d26..737ab86a 100644 --- a/src/pages/profile/setting.vue +++ b/src/pages/profile/setting.vue @@ -9,8 +9,9 @@ - - + + + diff --git a/src/pages/profile/userinfo-simple.vue b/src/pages/profile/userinfo-simple.vue new file mode 100644 index 00000000..f2eb2bd5 --- /dev/null +++ b/src/pages/profile/userinfo-simple.vue @@ -0,0 +1,47 @@ + + + \ No newline at end of file diff --git a/src/pages/tabbar/profile.vue b/src/pages/tabbar/profile.vue index 2a017e3d..f1c9648d 100644 --- a/src/pages/tabbar/profile.vue +++ b/src/pages/tabbar/profile.vue @@ -3,10 +3,10 @@ @@ -14,41 +14,43 @@ - - - - - {{ userInfo.nickname }} - - - - ID: {{ userInfo.id }} - - - VIP + + + + + + {{ userInfo.nickname }} + + + ID: {{ userInfo.id }} + + + VIP + + + + {{ userCity?.t || '' }} + - - {{ userCity?.t || '' }} - - + - + {{ recentTotal.userLikeItTotal || 0 }} - 我喜欢 + 我的关注 {{ recentTotal.userLikeMeTotal || 0 }} - 喜欢我 + 我的粉丝 @@ -103,8 +105,13 @@ - + + + + {{ item.value }} + + @@ -141,9 +148,12 @@ - + + + 使用微信扫码,第一时间获取活动信息。 + + + @@ -159,9 +169,13 @@ import { onShow } from '@dcloudio/uni-app'; import { formatDate } from '@/sheep/helper/utils'; // @ts-ignore import { fen2yuanSimple } from '@/sheep/hooks/useGoods'; +import { useMessage } from '@/uni_modules/wot-design-uni'; +import { gotoAppPermissionSetting, requestPermission } from '@/sheep/util/permission'; const { ablumList } = useAblum(); +const gzhMessage = useMessage('gzh') + // 统计信息 const recentTotal = ref({ memberRecentId: null, @@ -186,7 +200,6 @@ const myEvaluation = reactive({ evaluateCount: 0, }); const myEvaluationShow = ref(false); // 我的评价弹窗 -const curtainShow = ref(false); // 关注公众号弹窗 const userInfo = computed(() => sheep.$store('user').userInfo); const userCity = computed(() => sheep.$store('user').userCity); @@ -224,7 +237,32 @@ const lookMyEvaluation = async () => { // 关注公众号 const subOfficial = () => { - curtainShow.value = true; + gzhMessage + .alert({ + title: '领取福利', + msg: "使用微信扫码,第一时间获取活动信息。", + confirmButtonText: "保存图片", + }) + .then(async () => { + // 首先请求存储权限 + // #ifdef APP-PLUS || MP-WEIXIN + const permissionStatus = await requestPermission("location") + // 已拒绝|受限 + if (permissionStatus === 'denied') { + gotoAppPermissionSetting() + } + // #endif + uni.saveImageToPhotosAlbum({ + filePath: "/src/static/gzh/gzh.jpg", + success: () => { + uni.showToast({ title: '保存成功', icon: 'success' }); + }, + fail: (err) => { + uni.showToast({ title: '保存失败', icon: 'none' }); + console.error('|保存海报|,意外的错误:', err); + }, + }); + }) }; // 问题反馈 @@ -239,11 +277,12 @@ const MenuCellList = [ { title: '我的收益', value: '', icon: 'wallet', to: '/pages/wechat-tabbar/index' }, { title: '访客记录', value: '', icon: 'browse', to: '/pages/profile/view-record' }, { title: '认证中心', value: '', icon: 'user', to: '/pages/profile/verify-status' }, + { title: '联系方式', value: '修改微信需客服核实', icon: 'user', to: '/pages/profile/set-wechat' }, { title: '我的动态', value: '', icon: 'star', to: '/pages/profile/my-moment' }, { title: '我的评价', value: '', icon: 'view-module', to: '', onClick: lookMyEvaluation }, { title: '问题反馈', value: '', icon: 'backtop-rectangle', to: '', onClick: goFeedback }, - // { title: '客服助手', value: '', icon: 'service', to: '' }, - // { title: '关注公众号', value: '获取最新消息', icon: 'qrcode', to: '', onClick: subOfficial }, - { title: '设置', value: '', icon: 'setting1', to: '/pages/profile/setting' }, + { title: '客服助手', value: '遇到问题点击这里', icon: 'service', to: '' }, + { title: '关注公众号', value: '领取福利、获取最新下载地址', icon: 'qrcode', to: '', onClick: subOfficial }, + // { title: '设置', value: '', icon: 'setting1', to: '/pages/profile/setting' }, ]; diff --git a/src/sheep/components/segmented/segmented.vue b/src/sheep/components/segmented/segmented.vue index f67122ef..e8ced203 100644 --- a/src/sheep/components/segmented/segmented.vue +++ b/src/sheep/components/segmented/segmented.vue @@ -1,58 +1,50 @@ diff --git a/src/sheep/util/permission.ts b/src/sheep/util/permission.ts index df0d8937..78413d97 100644 --- a/src/sheep/util/permission.ts +++ b/src/sheep/util/permission.ts @@ -1,4 +1,4 @@ -type PermissionId = 'location'; +type PermissionId = 'location' | 'storage'; /** * 权限请求状态 * - none: 未请求 @@ -62,6 +62,9 @@ const requestIos = (permissionId: PermissionId): Promise => { case 'location': resolve(iosLocation()); break; + case 'storage': + resolve(iosStorage()); + break; default: resolve('denied'); break; @@ -92,6 +95,26 @@ const iosLocation = (): RequestStatus => { return result; }; +/** + * 请求ios存储权限 + * @returns 权限请求状态 + */ +const iosStorage = (): RequestStatus => { + let result: RequestStatus = 'denied'; + // @ts-ignore + const NSPhotoLibraryUsageDescription = plus.ios.import('NSPhotoLibraryUsageDescription'); + const status = NSPhotoLibraryUsageDescription.authorizationStatus(); + if (status === 0) { + result = 'prompt'; + } else if (status === 3 || status === 4) { + result = 'granted'; + } else { + result = 'denied'; + } + plus.ios.deleteObject(NSPhotoLibraryUsageDescription); + return result; +}; + /******************************** andorid相关 ********************************/ /** @@ -104,6 +127,9 @@ const requestAndroid = (permissionID: PermissionId): Promise => { case 'location': androidPermissionKey = 'android.permission.ACCESS_FINE_LOCATION'; break; + case 'storage': + androidPermissionKey = 'android.permission.WRITE_EXTERNAL_STORAGE'; + break; } if (!androidPermissionKey) { resolve('denied'); diff --git a/src/static/gzh/gzh.jpg b/src/static/gzh/gzh.jpg new file mode 100644 index 00000000..c05f2794 Binary files /dev/null and b/src/static/gzh/gzh.jpg differ