Merge branch 'master' of https://gitea.zianxin.com/zax/Friendship-and-chat-uniapp
This commit is contained in:
commit
ad50f32ea2
6 files changed
+97
-8
No files matched your search
@@ -104,7 +104,7 @@
|
||||
<view class="flex-col">
|
||||
<view class="flex items-center">
|
||||
<image class="size-44rpx mr-2" src="@/static/weixin-black.png" mode="aspectFill" />
|
||||
<text class="text-black">*************</text>
|
||||
<text class="text-black">{{ userDetail.member.wechatNum || '*************' }}</text>
|
||||
</view>
|
||||
<view class="text-xs c-black tracking-0.2">
|
||||
<text>成为</text>
|
||||
|
||||
@@ -26,9 +26,12 @@
|
||||
|
||||
<navigator url="/pages/profile/face-verify" open-type="navigate" hover-class="navigator-hover">
|
||||
<view class="flex-row-center mt-40">
|
||||
<wd-button size="large" :disabled="authData?.authStatus == '2'">开始认证</wd-button>
|
||||
<wd-button size="large" :disabled="authData?.authStatus == '2'">
|
||||
{{ authData?.authStatus == '3' ? '重新认证' : '开始认证' }}
|
||||
</wd-button>
|
||||
</view>
|
||||
</navigator>
|
||||
<button @click="test">测试按钮</button>
|
||||
</wd-config-provider>
|
||||
</template>
|
||||
|
||||
@@ -37,6 +40,24 @@
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const test = () => {
|
||||
const system = uni.getSystemInfoSync();
|
||||
if (system.platform === 'android') {
|
||||
const context: any = plus.android.importClass('android.content.Context');
|
||||
const locationManager: any = plus.android.importClass('android.location.LocationManager');
|
||||
const main: any = plus.android.runtimeMainActivity();
|
||||
const mainSvr = main.getSystemService(context.LOCATION_SERVICE);
|
||||
if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
|
||||
const Intent: any = plus.android.importClass('android.content.Intent');
|
||||
const Settings: any = plus.android.importClass('android.provider.Settings');
|
||||
const intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
|
||||
main.startActivity(intent); // 打开系统设置GPS服务页面
|
||||
} else {
|
||||
console.log('GPS功能已开启');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const authData = ref<any>({});
|
||||
|
||||
onShow(async () => {
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||
const backdropFilter = computed(() => {
|
||||
const vip = userInfo.value?.memberVip.vip;
|
||||
return props.scene === 'SQUARE_NEW_PERSON' && !vip;
|
||||
return (props.scene === 'SQUARE_NEW_PERSON' || props.scene === 'SQUARE_FEMALE') && !vip;
|
||||
});
|
||||
|
||||
const scrollTop = ref(1);
|
||||
@@ -87,8 +87,27 @@
|
||||
},
|
||||
);
|
||||
|
||||
const detail = (user: any) => {
|
||||
if (props.scene === 'SQUARE_NEW_PERSON' && backdropFilter.value) {
|
||||
// 判断查看用户详情时有无权限
|
||||
const judgeGetByUserRole = async (user: any) => {
|
||||
const { code } = await RecentApi.judgeGetByUserRole({ id: user.memberId });
|
||||
if (code === 2001000007) {
|
||||
message
|
||||
.confirm({
|
||||
title: '魅力女生认证',
|
||||
msg: '请先完成认证',
|
||||
confirmButtonText: '去认证',
|
||||
zIndex: 9999,
|
||||
})
|
||||
.then(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/profile/verify-status',
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
return;
|
||||
}
|
||||
|
||||
if (code === 2001000008) {
|
||||
message
|
||||
.confirm({
|
||||
title: '获取VIP特权',
|
||||
@@ -112,4 +131,36 @@
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const detail = async (user: any) => {
|
||||
// 如果男生 查看‘新人’分类-SQUARE_NEW_PERSON 且 未开通会员
|
||||
if (props.scene === 'SQUARE_NEW_PERSON' && backdropFilter.value) {
|
||||
message
|
||||
.confirm({
|
||||
title: '获取VIP特权',
|
||||
msg: '请先开通VIP会员',
|
||||
confirmButtonText: '获取会员',
|
||||
zIndex: 9999,
|
||||
})
|
||||
.then(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/profile/apply-vip',
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 如果女生 查看‘vip男士’分类-SQUARE_VIP_MALE 或 ‘女生’分类-SQUARE_FEMALE
|
||||
if (props.scene === 'SQUARE_VIP_MALE' || props.scene === 'SQUARE_FEMALE') {
|
||||
await judgeGetByUserRole(user);
|
||||
return;
|
||||
}
|
||||
|
||||
uni.navigateTo({
|
||||
url: `/pages/home/detail?memberId=${user.memberId}`,
|
||||
success: function (res) {
|
||||
res.eventChannel.emit('viewRecordType', 'USER');
|
||||
},
|
||||
});
|
||||
};
|
||||
</script>
|
||||
@@ -13,11 +13,14 @@
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<view class="flex flex-wrap gap-3">
|
||||
<view v-if="ablumList.length" class="flex flex-wrap gap-3">
|
||||
<view v-for="(item, index) in ablumList" :key="index" @click="previewPhoto(index)">
|
||||
<image class="size-150rpx rounded-2" :src="item.address" mode="aspectFill" />
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="text-center">
|
||||
<text class="text-24rpx c-gray">暂无照片</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -70,6 +70,19 @@ const RecentApi = {
|
||||
},
|
||||
});
|
||||
},
|
||||
// 判断查看用户详情时有无权限
|
||||
judgeGetByUserRole: (params: { id: string | number }) => {
|
||||
return request({
|
||||
url: '/member/recent/judgeGetByUserRole',
|
||||
method: 'GET',
|
||||
params,
|
||||
custom: {
|
||||
showLoading: true,
|
||||
loadingMsg: '加载中',
|
||||
showError: false,
|
||||
},
|
||||
});
|
||||
},
|
||||
// 查看我喜欢
|
||||
likeIt: (data: any) => {
|
||||
return request({
|
||||
|
||||
@@ -18,11 +18,12 @@
|
||||
<view class="flex-1 overflow-hidden">
|
||||
<view class="flex justify-between items-center mt-2">
|
||||
<text class="text-sm truncate">
|
||||
{{
|
||||
<!-- {{
|
||||
backdropFilter
|
||||
? '*'.repeat(member.memberNickname === null ? 3 : member.memberNickname.length)
|
||||
: member.memberNickname
|
||||
}}
|
||||
}} -->
|
||||
{{ member.memberNickname }}
|
||||
</text>
|
||||
<text class="py-4rpx px-2 rounded-full text-22rpx bg-color-theme-dark whitespace-nowrap">
|
||||
{{
|
||||
|
||||
Reference in new issue
Block a user