feat:聊天赠送礼物;调色
No files matched your search
@@ -562,11 +562,11 @@
|
||||
color: #ffffff;
|
||||
font-size: 14px;
|
||||
height: 100%;
|
||||
--wot-color-theme: #ffcd32;
|
||||
--wot-backtop-bg: #ffcd32;
|
||||
--wot-color-theme: #d29e52;
|
||||
--wot-backtop-bg: #d29e52;
|
||||
--wot-dark-background: #222;
|
||||
--wot-dark-background2: #222;
|
||||
--wot-dark-color: #ffcd32;
|
||||
--wot-dark-color: #d29e52;
|
||||
--wot-picker-toolbar-title-color: #fff;
|
||||
// background-image: url(./static/page-bg.png);
|
||||
// background-repeat: no-repeat;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view class="arrow-bar">
|
||||
<text class="icon iconfont" :class="icon" :style="{ color: textColor }"></text>
|
||||
<text class="title">{{ title }}</text>
|
||||
<uni-icons class="arrow" color="#ffcd32" type="right" size="16"></uni-icons>
|
||||
<uni-icons class="arrow" color="#D29E52" type="right" size="16"></uni-icons>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
color = '#f14747';
|
||||
break;
|
||||
case 'primary':
|
||||
color = '#ffcd32';
|
||||
color = '#D29E52';
|
||||
break;
|
||||
}
|
||||
return `color: ${color};`;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// 颜色
|
||||
$im-color-primary: #ffcd32;
|
||||
$im-color-primary: #d29e52;
|
||||
$im-color-primary-light-1: mix(#000, $im-color-primary, 10%);
|
||||
$im-color-primary-light-2: mix(#000, $im-color-primary, 20%);
|
||||
$im-color-primary-light-3: mix(#000, $im-color-primary, 30%);
|
||||
|
||||
@@ -897,7 +897,7 @@
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#fff",
|
||||
"selectedColor": "#ffcd32",
|
||||
"selectedColor": "#D29E52",
|
||||
"backgroundColor": "#222222",
|
||||
"borderStyle": "black",
|
||||
"list": [
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<wd-config-provider theme="dark">
|
||||
<wd-navbar title="城市" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<uni-icons type="back" size="30" color="#ffcd32" @click="back"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52" @click="back"></uni-icons>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<wd-config-provider theme="dark">
|
||||
<wd-navbar title="" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<uni-icons type="back" size="30" color="#ffcd32" @click="back"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52" @click="back"></uni-icons>
|
||||
<view class="flex items-center" :style="navUserInfoStyle">
|
||||
<image
|
||||
class="size-70rpx bg-#333 rounded-full mr-1"
|
||||
@@ -21,7 +21,7 @@
|
||||
<uni-icons
|
||||
type="more-filled"
|
||||
size="28"
|
||||
color="#ffcd32"
|
||||
color="#D29E52"
|
||||
@click="actionShow = true"
|
||||
></uni-icons>
|
||||
</view>
|
||||
@@ -29,6 +29,7 @@
|
||||
</wd-navbar>
|
||||
|
||||
<scroll-list
|
||||
v-if="userDetail?.member?.memberId"
|
||||
style="height: calc(100dvh - 88px)"
|
||||
:loadMoreStatus="loadMoreStatus"
|
||||
@refresh="refreshList"
|
||||
@@ -142,9 +143,10 @@
|
||||
|
||||
<wd-action-sheet
|
||||
v-model="actionShow"
|
||||
:actions="actionList"
|
||||
:actions="[{ name: '拉黑' }, { name: '举报' }]"
|
||||
@select="actionSelect"
|
||||
cancel-text="取消"
|
||||
:z-index="100"
|
||||
/>
|
||||
</wd-config-provider>
|
||||
</template>
|
||||
@@ -174,15 +176,6 @@
|
||||
const scrollTop = ref(0);
|
||||
const userDetail = ref<any>({});
|
||||
const actionShow = ref(false);
|
||||
const actionList = ref([
|
||||
{
|
||||
name: '选项1',
|
||||
},
|
||||
{
|
||||
name: '选项2',
|
||||
color: '#0083ff',
|
||||
},
|
||||
]);
|
||||
|
||||
onLoad((options: any) => {
|
||||
const { memberId } = options;
|
||||
@@ -293,10 +286,25 @@
|
||||
});
|
||||
};
|
||||
|
||||
function actionSelect({ item, index }) {
|
||||
console.log(item, index);
|
||||
async function actionSelect({ item, index }) {
|
||||
if (index === 0) {
|
||||
await RecentApi.recentOperate({
|
||||
memberId: userDetail.value.member.memberId,
|
||||
memberRecentId: userDetail.value.id,
|
||||
action: 'MEMBER_SHIELD',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// toast.show(`当前选中项: ${item.title}, 下标: ${index}`);
|
||||
if (index === 1) {
|
||||
await RecentApi.recentOperate({
|
||||
memberId: userDetail.value.member.memberId,
|
||||
memberRecentId: userDetail.value.id,
|
||||
action: 'RECENT_REPORT',
|
||||
reportType: '1',
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 喜欢
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<wd-navbar title="" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<view class="flex items-center w-200rpx" @click="goSelectAddress">
|
||||
<uni-icons type="location" size="22" color="#ffcd32"></uni-icons>
|
||||
<uni-icons type="location" size="22" color="#D29E52"></uni-icons>
|
||||
<text class="truncate text-xs">{{ userCity?.t || '未选择' }}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<image class="absolute inset-0 h-full w-full" src="/static/login-bg.png" mode="aspectFill" />
|
||||
<view class="relative z-10 flex flex-col items-center px-40rpx">
|
||||
<view class="mt-300rpx mb-200rpx text-center">
|
||||
<view class="mb-30rpx text-40px font-bold c-amber/80">荷塘月色</view>
|
||||
<view class="text-16px tracking-4rpx text-amber/80">• 高端社交圈 •</view>
|
||||
<view class="mb-30rpx text-40px font-bold text-color-theme-dark">荷塘月色</view>
|
||||
<view class="text-16px tracking-4rpx text-color-theme-dark">• 高端社交圈 •</view>
|
||||
</view>
|
||||
|
||||
<view class="flex w-full flex-col items-center gap-40rpx">
|
||||
@@ -28,7 +28,7 @@
|
||||
maxlength="6"
|
||||
/>
|
||||
<view
|
||||
class="absolute right-20rpx rounded-16rpx bg-color-theme-dark px-20rpx py-16rpx text-12px"
|
||||
class="absolute right-20rpx rounded-16rpx bg-color-theme-dark active:bg-color-theme px-20rpx py-16rpx text-12px"
|
||||
@click="handleGetCode"
|
||||
>
|
||||
获取验证码
|
||||
@@ -36,7 +36,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="mt-40rpx w-full rounded-full bg-color-theme text-lg text-center py-2"
|
||||
class="mt-40rpx w-full rounded-full bg-color-theme-dark active:bg-color-theme text-lg text-center py-2"
|
||||
@click="handleLogin"
|
||||
>
|
||||
登 录 / 注 册
|
||||
@@ -82,14 +82,14 @@
|
||||
<view class="absolute bottom-40rpx w-full text-center text-14px text-white">
|
||||
登录即同意《
|
||||
<text
|
||||
class="text-#ffcd32 underline underline-1 underline-solid underline-amber"
|
||||
class="text-#D29E52 underline underline-1 underline-solid underline-amber"
|
||||
@click="alert(2, '用户协议')"
|
||||
>
|
||||
用户协议
|
||||
</text>
|
||||
》和《
|
||||
<text
|
||||
class="text-#ffcd32 underline underline-1 underline-solid underline-amber"
|
||||
class="text-#D29E52 underline underline-1 underline-solid underline-amber"
|
||||
@click="alert(3, '隐私政策')"
|
||||
>
|
||||
隐私政策
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
<wd-navbar :title="title" fixed safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#ffcd32"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52"></uni-icons>
|
||||
</navigator>
|
||||
</template>
|
||||
<template #right>
|
||||
<uni-icons type="more-filled" color="#ffcd32" size="24" @click="onShowMore" />
|
||||
<uni-icons type="more-filled" color="#D29E52" size="24" @click="onShowMore" />
|
||||
</template>
|
||||
</wd-navbar>
|
||||
</wd-config-provider>
|
||||
@@ -100,8 +100,9 @@
|
||||
type="primary"
|
||||
@touchend.prevent="sendTextMessage()"
|
||||
size="mini"
|
||||
>发送</button
|
||||
>
|
||||
发送
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="chat-tab-bar">
|
||||
@@ -149,6 +150,10 @@
|
||||
<view class="tool-icon iconfont icon-microphone"></view>
|
||||
<view class="tool-name">语音消息</view>
|
||||
</view>
|
||||
<view class="chat-tools-item" @click="onGiveGift">
|
||||
<view class="tool-icon iconfont icon-girl"></view>
|
||||
<view class="tool-name">送礼物</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="chat && chat.type == 'GROUP' && memberSize <= 500"
|
||||
class="chat-tools-item"
|
||||
@@ -211,11 +216,55 @@
|
||||
></group-member-selector>
|
||||
<group-rtc-join ref="rtcJoin" :groupId="group.id"></group-rtc-join>
|
||||
<!-- #endif -->
|
||||
|
||||
<wd-config-provider theme="dark">
|
||||
<wd-popup
|
||||
v-model="giftShow"
|
||||
position="bottom"
|
||||
closable
|
||||
custom-style="height: 600rpx;overflow: hidden;"
|
||||
safe-area-inset-bottom
|
||||
>
|
||||
<view class="h-110rpx flex items-center justify-between px-3">
|
||||
<view>礼物</view>
|
||||
<view class="mr-8 flex-row-center text-30rpx">
|
||||
<view class="flex-row-center bg-color rounded-full px-3 py-1 mr-4">
|
||||
<image class="size-36rpx mr-2" src="@/static/diamond.png" mode="aspectFill" />
|
||||
<text>{{ (userWallet.balance / 100.0).toFixed(2).replace(/\.?0+$/, '') }}</text>
|
||||
</view>
|
||||
<navigator
|
||||
url="/pages/profile/recharge"
|
||||
open-type="navigate"
|
||||
hover-class="navigator-hover"
|
||||
>
|
||||
<view class="px-4 py-1 rounded-full text-24rpx bg-color-theme">充值</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="h-490rpx mx-4 flex flex-wrap overflow-scroll">
|
||||
<view
|
||||
v-for="(item, index) in giftList"
|
||||
:key="index"
|
||||
class="w-1/4 mb-2 flex-col items-center rounded-2"
|
||||
@click="giveGift(item)"
|
||||
>
|
||||
<image class="size-100rpx rounded-2" :src="item.image" mode="aspectFill" />
|
||||
<view class="text-xs mt-1">{{ item.title }}</view>
|
||||
<view class="text-20rpx c-#eee">
|
||||
{{ (item.price / 100.0).toFixed(2).replace(/\.?0+$/, '') }}钻石
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</wd-popup>
|
||||
<wd-message-box />
|
||||
</wd-config-provider>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CHAT_ENV from '@/chat-env.js';
|
||||
import RecentApi from '@/sheep/api/member/recent';
|
||||
import sheep from '@/sheep';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -248,6 +297,9 @@
|
||||
scrollTop: 0, // 用于ios h5定位滚动条
|
||||
scrollViewHeight: 0, // 滚动条总长度
|
||||
maxTmpId: 0, // 最后生成的临时id
|
||||
|
||||
giftShow: false, // 礼物弹窗显示
|
||||
giftList: [], // 礼物列表
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -930,6 +982,22 @@
|
||||
if (this.reqQueue.length && !this.isSending) {
|
||||
this.isSending = true;
|
||||
const reqData = this.reqQueue.shift();
|
||||
|
||||
// RecentApi.sendPrivateMsg(reqData.msgInfo)
|
||||
// .then((res) => {
|
||||
// if (res.code === 0) {
|
||||
// reqData.resolve(res);
|
||||
// }
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// reqData.reject(e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// this.isSending = false;
|
||||
// // 发送下一条请求
|
||||
// this.processReqQueue();
|
||||
// });
|
||||
|
||||
this.$http({
|
||||
url: this.messageAction,
|
||||
method: 'post',
|
||||
@@ -1105,6 +1173,34 @@
|
||||
this.maxTmpId = id;
|
||||
return id;
|
||||
},
|
||||
// 获取礼物列表
|
||||
async onGiveGift() {
|
||||
if (!this.giftList.length) {
|
||||
const { data = null } = await RecentApi.getGiftList();
|
||||
this.giftList = data?.filter((i) => i.status == '2') ?? [];
|
||||
}
|
||||
this.giftShow = true;
|
||||
},
|
||||
// 赠送礼物
|
||||
giveGift(item) {
|
||||
console.log(this.userInfo);
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `赠送礼物 ${item.title} 给 ${this.userInfo.userName} 吗?`,
|
||||
success: async (res) => {
|
||||
if (!res.confirm) return;
|
||||
if (!this.userInfo.id) return uni.showToast({ title: '用户不存在' });
|
||||
const { code } = await RecentApi.giveGift({
|
||||
targetMemberId: this.userInfo.id,
|
||||
giftId: item.id,
|
||||
});
|
||||
if (code !== 0) return;
|
||||
uni.showToast({ title: '赠送成功' });
|
||||
sheep.$store('user').getWallet();
|
||||
this.giftShow = false;
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
mine() {
|
||||
@@ -1171,6 +1267,9 @@
|
||||
loading() {
|
||||
return this.chatStore.loading;
|
||||
},
|
||||
userWallet() {
|
||||
return sheep.$store('user').userWallet;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
messageSize: function (newSize, oldSize) {
|
||||
@@ -1413,7 +1512,6 @@
|
||||
.chat-tools-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
|
||||
.chat-tools-item {
|
||||
width: 25%;
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
<wd-navbar title="友友" fixed safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#ffcd32"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52"></uni-icons>
|
||||
</navigator>
|
||||
</template>
|
||||
<template #right>
|
||||
<uni-icons type="search" color="#ffcd32" size="24" @click="showSearch = !showSearch" />
|
||||
<uni-icons type="search" color="#D29E52" size="24" @click="showSearch = !showSearch" />
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<wd-navbar title="消息" fixed safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<view class="flex items-center text-base">
|
||||
<text class="mr-4 c-#FFCD32">消息</text>
|
||||
<text class="mr-4 c-#D29E52">消息</text>
|
||||
<navigator
|
||||
url="/pages/message/friend"
|
||||
open-type="navigate"
|
||||
@@ -15,7 +15,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<template #right>
|
||||
<uni-icons type="search" color="#ffcd32" size="24" @click="onSearch()" />
|
||||
<uni-icons type="search" color="#D29E52" size="24" @click="onSearch()" />
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<wd-navbar title="用户信息" fixed safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#ffcd32"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52"></uni-icons>
|
||||
</navigator>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
class="h-300rpx mx-4"
|
||||
indicator-dots
|
||||
indicator-color="#fff"
|
||||
indicator-active-color="#ffcd32"
|
||||
indicator-active-color="#D29E52"
|
||||
autoplay
|
||||
circular
|
||||
>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</template>
|
||||
<template #right>
|
||||
<navigator url="/pages/moments/publish" open-type="navigate" hover-class="navigator-hover">
|
||||
<uni-icons type="camera" size="28" color="#ffcd32" />
|
||||
<uni-icons type="camera" size="28" color="#D29E52" />
|
||||
</navigator>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<wd-config-provider theme="dark">
|
||||
<wd-navbar title="发布动态" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<uni-icons type="back" size="30" color="#ffcd32" @click="back"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52" @click="back"></uni-icons>
|
||||
</template>
|
||||
<template #right>
|
||||
<navigator hover-class="navigator-hover">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<wd-navbar title="关于" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#ffcd32"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52"></uni-icons>
|
||||
</navigator>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
<wd-navbar title="开通VIP" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#ffcd32"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52"></uni-icons>
|
||||
</navigator>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
<scroll-view style="height: calc(100dvh - 88px)" scroll-y>
|
||||
<view
|
||||
class="mx-4 p-4 rounded-2 bg-gradient-to-b from-#111 to-#222 b-4 b-solid b-t-#ffcd32/60 b-l-#ffcd32/40 b-r-#ffcd32/40 b-b-#ffcd32/20"
|
||||
class="mx-4 p-4 rounded-2 bg-gradient-to-b from-#111 to-#222 b-4 b-solid b-t-#D29E52/60 b-l-#D29E52/40 b-r-#D29E52/40 b-b-#D29E52/20"
|
||||
>
|
||||
<view class="text-color-theme-dark font-900 font-italic text-xl mb-1">VIP</view>
|
||||
<view class="flex-col-center mb-4">
|
||||
@@ -35,7 +35,7 @@
|
||||
class="w-220rpx rounded-3 flex-col-center transition-all duration-200"
|
||||
:class="[
|
||||
curOpenTypeId === item.id
|
||||
? 'bg-#111 text-white b-3 b-solid b-#ffcd32/60'
|
||||
? 'bg-#111 text-white b-3 b-solid b-#D29E52/60'
|
||||
: 'b-3 b-solid b-#333',
|
||||
]"
|
||||
>
|
||||
@@ -59,7 +59,7 @@
|
||||
<view class="flex justify-between gap-3">
|
||||
<view
|
||||
class="flex-1 rounded-full flex-row-center px-4 py-2 b-3 b-solid b-#222 bg-#333 transition-all duration-200"
|
||||
:style="{ borderColor: payMethod === 'alipay' ? '#ffcd32' : '' }"
|
||||
:style="{ borderColor: payMethod === 'alipay' ? '#D29E52' : '' }"
|
||||
@click="payMethod = 'alipay'"
|
||||
>
|
||||
<image class="size-40rpx mr-2" src="@/static/alipay.png" mode="aspectFill" />
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
<view
|
||||
class="flex-1 rounded-full flex-row-center px-4 py-2 b-3 b-solid b-#222 bg-#333 transition-all duration-200"
|
||||
:style="{ borderColor: payMethod === 'wechat' ? '#ffcd32' : '' }"
|
||||
:style="{ borderColor: payMethod === 'wechat' ? '#D29E52' : '' }"
|
||||
@click="payMethod = 'wechat'"
|
||||
>
|
||||
<image class="size-40rpx mr-2" src="@/static/weixin.png" mode="aspectFill" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<wd-navbar title="实人认证" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="22" color="#ffcd32" />
|
||||
<uni-icons type="back" size="22" color="#D29E52" />
|
||||
</navigator>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<wd-navbar title="问题反馈" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#ffcd32"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52"></uni-icons>
|
||||
</navigator>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<wd-config-provider theme="dark">
|
||||
<wd-navbar title="" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<uni-icons type="back" size="30" color="#ffcd32" @click="back"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52" @click="back"></uni-icons>
|
||||
</template>
|
||||
<template #title>
|
||||
<view class="flex items-center h-full">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<wd-navbar title="我的动态" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#ffcd32"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52"></uni-icons>
|
||||
</navigator>
|
||||
</template>
|
||||
<template #right>
|
||||
|
||||
@@ -47,7 +47,9 @@
|
||||
</view>
|
||||
<navigator url="/pages/profile/recharge" open-type="navigate" hover-class="navigator-hover">
|
||||
<view class="flex flex-col items-center">
|
||||
<text class="text-color-theme font-600 text-lg">{{ fen2yuan(wallet.balance) }}</text>
|
||||
<text class="text-color-theme font-600 text-lg">
|
||||
{{ fen2yuan(userWallet.balance) }}
|
||||
</text>
|
||||
<text class="text-color-theme text-sm">钱包</text>
|
||||
</view>
|
||||
</navigator>
|
||||
@@ -55,7 +57,7 @@
|
||||
|
||||
<!-- 开通vip -->
|
||||
<view
|
||||
class="text-color-theme-dark mx-4 p-4 rounded-2 bg-gradient-to-b from-#111 to-#222 b-4 b-solid b-t-#ffcd32/60 b-l-#ffcd32/40 b-r-#ffcd32/40 b-b-#ffcd32/20 flex justify-between"
|
||||
class="text-color-theme-dark mx-4 p-4 rounded-2 bg-gradient-to-b from-#111 to-#222 b-4 b-solid b-t-#D29E52/60 b-l-#D29E52/40 b-r-#D29E52/40 b-b-#D29E52/20 flex justify-between"
|
||||
>
|
||||
<view class="font-900 font-italic text-xl">VIP</view>
|
||||
<view class="flex items-center">
|
||||
@@ -149,12 +151,6 @@
|
||||
|
||||
const { ablumList } = useAblum();
|
||||
|
||||
// 钱包信息
|
||||
const wallet = ref({
|
||||
balance: 0,
|
||||
totalExpense: 0,
|
||||
totalRecharge: 0,
|
||||
});
|
||||
// 统计信息
|
||||
const recentTotal = ref({
|
||||
memberRecentId: null,
|
||||
@@ -174,11 +170,9 @@
|
||||
const curtainShow = ref(false); // 关注公众号弹窗
|
||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||
const userCity = computed(() => sheep.$store('user').userCity);
|
||||
const userWallet = computed(() => sheep.$store('user').userWallet);
|
||||
|
||||
onLoad(async () => {
|
||||
const { data: walletData } = await RecentApi.getWallet();
|
||||
wallet.value = walletData ?? {};
|
||||
|
||||
const { data: totalData } = await RecentApi.recentTotal();
|
||||
recentTotal.value = totalData ?? {};
|
||||
});
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
<wd-navbar title="充值" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#ffcd32"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52"></uni-icons>
|
||||
</navigator>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
<scroll-view style="height: calc(100dvh - 88px)" scroll-y>
|
||||
<view
|
||||
class="mx-4 p-4 rounded-2 bg-gradient-to-b from-#111 to-#222 b-4 b-solid b-t-#ffcd32/60 b-l-#ffcd32/40 b-r-#ffcd32/40 b-b-#ffcd32/20"
|
||||
class="mx-4 p-4 rounded-2 bg-gradient-to-b from-#111 to-#222 b-4 b-solid b-t-#D29E52/60 b-l-#D29E52/40 b-r-#D29E52/40 b-b-#D29E52/20"
|
||||
>
|
||||
<view class="text-color-theme-dark font-900 font-italic text-xl mb-1">VIP</view>
|
||||
<view class="flex-col-center mb-4">
|
||||
@@ -25,12 +25,12 @@
|
||||
<uni-icons
|
||||
class="absolute right-80 -top-10"
|
||||
type="reload"
|
||||
color="#ffcd32"
|
||||
color="#D29E52"
|
||||
size="24"
|
||||
@click="getWallet"
|
||||
/>
|
||||
<view>余额(宝石)</view>
|
||||
<view class="font-bold text-xl">{{ fen2yuan(wallet.balance) }}</view>
|
||||
<view class="font-bold text-xl">{{ fen2yuan(userWallet.balance) }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 支付方式切换 -->
|
||||
@@ -39,7 +39,7 @@
|
||||
<view class="flex justify-between gap-3">
|
||||
<view
|
||||
class="flex-1 rounded-full flex-row-center px-4 py-2 b-3 b-solid b-#222 bg-#333 transition-all duration-200"
|
||||
:style="{ borderColor: payMethod === 'alipay' ? '#ffcd32' : '' }"
|
||||
:style="{ borderColor: payMethod === 'alipay' ? '#D29E52' : '' }"
|
||||
@click="payMethod = 'alipay'"
|
||||
>
|
||||
<image class="size-40rpx mr-2" src="@/static/alipay.png" mode="aspectFill" />
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<view
|
||||
class="flex-1 rounded-full flex-row-center px-4 py-2 b-3 b-solid b-#222 bg-#333 transition-all duration-200"
|
||||
:style="{ borderColor: payMethod === 'wechat' ? '#ffcd32' : '' }"
|
||||
:style="{ borderColor: payMethod === 'wechat' ? '#D29E52' : '' }"
|
||||
@click="payMethod = 'wechat'"
|
||||
>
|
||||
<image class="size-40rpx mr-2" src="@/static/weixin.png" mode="aspectFill" />
|
||||
@@ -76,7 +76,7 @@
|
||||
¥{{ fen2yuanSimple(item.payPrice) }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="h-1 bg-#ffcd3277"></view>
|
||||
<view class="h-1 bg-#D29E5277"></view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<wd-message-box />
|
||||
@@ -84,12 +84,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
// @ts-ignore
|
||||
import { fen2yuan, fen2yuanSimple } from '@/sheep/hooks/useGoods';
|
||||
import RecentApi from '@/sheep/api/member/recent';
|
||||
import { useMessage } from '@/uni_modules/wot-design-uni';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
// @ts-ignore
|
||||
import sheep from '@/sheep';
|
||||
|
||||
const messageBox = useMessage();
|
||||
|
||||
@@ -98,26 +100,17 @@
|
||||
const rechargePackag = ref<{ id: number; name: string; payPrice: number; bonusPrice: number }[]>(
|
||||
[],
|
||||
);
|
||||
// 钱包信息
|
||||
const wallet = ref({
|
||||
balance: 0,
|
||||
totalExpense: 0,
|
||||
totalRecharge: 0,
|
||||
});
|
||||
|
||||
// 获取钱包余额
|
||||
const getWallet = async () => {
|
||||
const { data } = await RecentApi.getWallet();
|
||||
wallet.value = data ?? {};
|
||||
};
|
||||
const userWallet = computed(() => sheep.$store('user').userWallet);
|
||||
|
||||
onLoad(async () => {
|
||||
await getWallet();
|
||||
|
||||
const { data } = await RecentApi.getWalletRechargePackage();
|
||||
rechargePackag.value = data ?? [];
|
||||
});
|
||||
|
||||
const getWallet = () => {
|
||||
sheep.$store('user').getWallet();
|
||||
};
|
||||
|
||||
const handleRecharge = (item: any) => {
|
||||
if (!item.id) return uni.showToast({ title: '请选择会员类型', icon: 'none' });
|
||||
messageBox
|
||||
@@ -129,7 +122,7 @@
|
||||
const { code } = await RecentApi.walletRecharge({ packageId: item.id });
|
||||
if (code !== 0) return uni.showToast({ title: '购买失败', icon: 'fail' });
|
||||
uni.showToast({ title: '购买成功', icon: 'success' });
|
||||
await getWallet();
|
||||
getWallet();
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<wd-navbar title="设置微信" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#ffcd32"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52"></uni-icons>
|
||||
</navigator>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<wd-navbar title="设置" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#ffcd32"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52"></uni-icons>
|
||||
</navigator>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<wd-navbar title="上传相册" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#ffcd32"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52"></uni-icons>
|
||||
</navigator>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
:bordered="false"
|
||||
>
|
||||
<template #left>
|
||||
<uni-icons type="back" size="30" color="#ffcd32" @click="back"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52" @click="back"></uni-icons>
|
||||
</template>
|
||||
<template #right>
|
||||
<navigator hover-class="navigator-hover">
|
||||
@@ -38,7 +38,7 @@
|
||||
<wd-cell title="单元格" value="去录制" is-link>
|
||||
<template #title>
|
||||
<view class="flex items-center">
|
||||
<uni-icons type="mic" size="30" color="#ffcd32"></uni-icons>
|
||||
<uni-icons type="mic" size="30" color="#D29E52"></uni-icons>
|
||||
<text class="truncate">添加语音签名,让你更受关注</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<wd-navbar title="访客记录" safeAreaInsetTop :bordered="false">
|
||||
<template #left>
|
||||
<navigator open-type="navigateBack" hover-class="navigator-hover">
|
||||
<uni-icons type="back" size="30" color="#ffcd32"></uni-icons>
|
||||
<uni-icons type="back" size="30" color="#D29E52"></uni-icons>
|
||||
</navigator>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
@@ -302,6 +302,39 @@ const RecentApi = {
|
||||
},
|
||||
});
|
||||
},
|
||||
// 获取礼物列表
|
||||
getGiftList: () => {
|
||||
return request({
|
||||
url: '/trade/gift/list',
|
||||
method: 'GET',
|
||||
custom: {
|
||||
showLoading: true,
|
||||
},
|
||||
});
|
||||
},
|
||||
// 赠送礼物给某人
|
||||
giveGift: (data: { targetMemberId: number; giftId: number }) => {
|
||||
return request({
|
||||
url: '/pay/wallet-recharge/send-gift',
|
||||
method: 'POST',
|
||||
data,
|
||||
custom: {
|
||||
showLoading: true,
|
||||
loadingMsg: '赠送中',
|
||||
},
|
||||
});
|
||||
},
|
||||
// 私聊有会员次数限制
|
||||
sendPrivateMsg: (data: any) => {
|
||||
return request({
|
||||
url: '/chat/send-private-msg',
|
||||
method: 'POST',
|
||||
data,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default RecentApi;
|
||||
@@ -61,7 +61,7 @@
|
||||
v-if="isLike"
|
||||
type="heart-filled"
|
||||
size="22"
|
||||
color="#ffcd32"
|
||||
color="#D29E52"
|
||||
@click="handleunLike"
|
||||
/>
|
||||
<uni-icons v-else type="heart" size="22" color="#B5B4BC" @click="handleLike" />
|
||||
@@ -105,21 +105,20 @@
|
||||
memberId: member.value.memberId, // 被操作的用户id
|
||||
memberRecentId: props.data.id, // 当前朋友圈的编号,不能为空
|
||||
// 朋友圈操作类型,不能为空
|
||||
action: '',
|
||||
// RECENT_LIKE-朋友圈-点赞
|
||||
|
||||
// RECENT_REPORT-朋友圈-举报
|
||||
// RECENT_SHIELD-朋友圈-屏蔽
|
||||
// RECENT_REPORT-朋友圈-举报
|
||||
// reportType: '1', // 举报类型
|
||||
|
||||
// MEMBER_COLLECT-用户-收藏
|
||||
// MEMBER_SHIELD-用户-屏蔽
|
||||
// MEMBER_REPORT-用户-举报
|
||||
// MEMBER_RATING-用户-评价
|
||||
action: '',
|
||||
reportType: '1', // 举报类型
|
||||
scoreSc: 0, // 身材评分
|
||||
scoreNx: 0, // 耐心评分
|
||||
scoreSk: 0, // 爽快评分
|
||||
scoreYq: 0, // 有趣评分
|
||||
// scoreSc: 0, // 身材评分
|
||||
// scoreNx: 0, // 耐心评分
|
||||
// scoreSk: 0, // 爽快评分
|
||||
// scoreYq: 0, // 有趣评分
|
||||
});
|
||||
|
||||
// 图片预览
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
:style="segmentedWidth"
|
||||
>
|
||||
<view
|
||||
class="relative z-10 flex-1 h-40rpx line-height-40rpx text-center text-xs font-500 active:text-color-theme"
|
||||
class="relative z-10 flex-1 h-40rpx line-height-40rpx text-center text-xs font-500 c-#fff active:text-color-theme"
|
||||
v-for="(item, index) in items"
|
||||
:key="index"
|
||||
:class="{ active: modelValue === index }"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.8 KiB |
@@ -22,48 +22,48 @@ export default {
|
||||
'flex-row': 'flex flex-row',
|
||||
},
|
||||
],
|
||||
theme: {
|
||||
colors: {
|
||||
blue: {
|
||||
DEFAULT: '#0094ff',
|
||||
},
|
||||
red: {
|
||||
DEFAULT: '#f63a36',
|
||||
},
|
||||
yellow: {
|
||||
DEFAULT: '#F2A817',
|
||||
},
|
||||
},
|
||||
},
|
||||
// theme: {
|
||||
// colors: {
|
||||
// blue: {
|
||||
// DEFAULT: '#0094ff',
|
||||
// },
|
||||
// red: {
|
||||
// DEFAULT: '#f63a36',
|
||||
// },
|
||||
// yellow: {
|
||||
// DEFAULT: '#F2A817',
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
rules: [
|
||||
[
|
||||
'bg-color-theme',
|
||||
{
|
||||
'background-color': '#ffcd32',
|
||||
'background-color': '#D29E52',
|
||||
},
|
||||
],
|
||||
[
|
||||
'bg-color-theme-dark',
|
||||
{
|
||||
'background-color': 'rgba(255, 205, 49, 0.5)',
|
||||
'background-color': '#B37B2E',
|
||||
},
|
||||
],
|
||||
[
|
||||
'text-color-theme',
|
||||
{
|
||||
color: '#ffcd32',
|
||||
color: '#F9C26F',
|
||||
},
|
||||
],
|
||||
[
|
||||
'text-color-theme-dark',
|
||||
{
|
||||
color: 'rgba(255, 205, 49, 0.8)',
|
||||
color: '#D29E52',
|
||||
},
|
||||
],
|
||||
[
|
||||
'bg-color',
|
||||
{
|
||||
'background-color': '#222222',
|
||||
'background-color': '#333',
|
||||
},
|
||||
],
|
||||
[
|
||||
@@ -75,7 +75,7 @@ export default {
|
||||
[
|
||||
'bg-color-light',
|
||||
{
|
||||
'background-color': '#333333',
|
||||
'background-color': '#444',
|
||||
},
|
||||
],
|
||||
[
|
||||
|
||||