Merge branch 'dev-0120' of http://25.13.9.101:9000/K17_AITS/tra-app into dev-0120
This commit is contained in:
+3
-1
@@ -15,7 +15,9 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7003'
|
||||
# VITE_APP_BASE_API_Url = 'http://192.168.108.129'
|
||||
# dev
|
||||
|
||||
# VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
|
||||
|
||||
#VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
|
||||
|
||||
|
||||
# sit
|
||||
|
||||
|
||||
@@ -34,7 +34,16 @@
|
||||
:src="holidayInfo.ossAddr"
|
||||
></image-preview>
|
||||
</view>
|
||||
<view class="festival-text-div">{{ holidayInfo.holidayDesc }}</view>
|
||||
<!-- holidayInfo.holidayDesc -->
|
||||
<view class="festival-text-div">
|
||||
<view class="text-1">
|
||||
{{ text1 }}
|
||||
</view>
|
||||
<view class="text-2">
|
||||
{{ text2 }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<image
|
||||
class="festival-main-img"
|
||||
mode="widthFix"
|
||||
@@ -44,12 +53,10 @@
|
||||
<view class="festival-main-title">
|
||||
{{ done.tipText }}
|
||||
</view>
|
||||
<view class="festival-main-number-div">
|
||||
{{ score }}积分
|
||||
</view>
|
||||
<view class="festival-main-number-div">{{ score }}积分</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="festival-button-div" @click="startLottery()">{{ done.buttonText }}</view>
|
||||
</view>
|
||||
<view class="close-div" @click="close(false)"></view>
|
||||
@@ -60,13 +67,18 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { HolidayInfo, CompleteCallback, StartLotteryCallback,pointsBadges } from './types/holiday';
|
||||
import type { HolidayInfo, CompleteCallback, StartLotteryCallback, pointsBadges } from './types/holiday';
|
||||
import { RewardType, AnimationStatus } from './types/holiday';
|
||||
import { ref, computed, reactive } from 'vue';
|
||||
import { optionErrorIcon, optionSuccessIcon } from '@/common/imgSvg';
|
||||
import { obtainRewardRandom } from '@/api/pointsAndRank';
|
||||
import common from '@/common/common';
|
||||
|
||||
const text = computed(() => holidayInfo.holidayDesc.slice(0, 16));
|
||||
// 单行定义 text1:前半部分
|
||||
const text1 = computed(() => text.value.length<=8?text.value:text.value.slice(0, Math.floor(text.value.length / 2)));
|
||||
// 单行定义 text2:后半部分
|
||||
const text2 = computed(() => text.value.length<=8?'':text.value.slice(Math.floor(text.value.length / 2)));
|
||||
|
||||
const countToRef = ref(null);
|
||||
const popup = ref(null);
|
||||
const animationLoading = ref<AnimationStatus>(AnimationStatus.UNSTARTED);
|
||||
@@ -100,7 +112,7 @@
|
||||
holidayCode: holidayInfo.holidayCode,
|
||||
successCb: (body) => {
|
||||
console.log('badgesList', body.badgesList);
|
||||
holidayInfo.badgesList = body.badgesList
|
||||
holidayInfo.badgesList = body.badgesList;
|
||||
// const { body } = await obtainRewardRandom({ holidayCode: holidayInfo.holidayCode });
|
||||
const finalScore = body.val;
|
||||
// 记录已完成的循环圈数
|
||||
@@ -172,7 +184,7 @@
|
||||
// 背景图片的OSS访问地址(图片完整URL)
|
||||
backgroundOssAddr: '',
|
||||
// 获得的徽章
|
||||
badgesList:[]
|
||||
badgesList: []
|
||||
});
|
||||
let completeCallback: CompleteCallback | undefined; // 关闭弹窗的回调
|
||||
let startLotteryCallback: StartLotteryCallback | undefined; // 抽奖的回调
|
||||
@@ -181,15 +193,15 @@
|
||||
const close = (status: boolean): void => {
|
||||
// 如果是固定积分,就设置一下
|
||||
console.log('如果是固定积分,就设置一下', holidayInfo.rewardType);
|
||||
|
||||
if(holidayInfo.rewardType === RewardType.FIXED_POINT) {
|
||||
|
||||
if (holidayInfo.rewardType === RewardType.FIXED_POINT) {
|
||||
startLotteryCallback({
|
||||
holidayCode: '',
|
||||
failCb: undefined,
|
||||
successCb: () => {
|
||||
console.log('设置成功');
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
uni.showTabBar({
|
||||
success() {
|
||||
@@ -198,7 +210,7 @@
|
||||
typeof completeCallback === 'function' &&
|
||||
completeCallback({
|
||||
status,
|
||||
badgesList:holidayInfo.badgesList
|
||||
badgesList: holidayInfo.badgesList
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -213,9 +225,9 @@
|
||||
console.log('holidayBody', holidayBody);
|
||||
Object.assign(holidayInfo, holidayBody);
|
||||
if (!holidayInfo.rewardFlag || holidayInfo.obtainFlag) {
|
||||
// if (!holidayInfo.rewardFlag) {
|
||||
// if (!holidayInfo.rewardFlag) {
|
||||
// 如果当前没有节日窗口,立刻返回回调函数
|
||||
completeCallback({ status: false });
|
||||
completeCallback({ status: false, badgesList: [] });
|
||||
return;
|
||||
}
|
||||
// 设置初始得分
|
||||
@@ -253,7 +265,7 @@
|
||||
// height: 56rpx;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
.festival-main-div {
|
||||
// margin-top: 8rpx;
|
||||
z-index: 20;
|
||||
@@ -281,7 +293,7 @@
|
||||
.festival-main-title {
|
||||
font-weight: normal;
|
||||
font-size: 30rpx;
|
||||
color: #B24325;
|
||||
color: #b24325;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -291,29 +303,37 @@
|
||||
margin-right: 8rpx;
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
color: #B24325;
|
||||
color: #b24325;
|
||||
line-height: 25rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.festival-text-div {
|
||||
position: relative;
|
||||
z-index: 60;
|
||||
width: 100%;
|
||||
height: 136rpx;
|
||||
padding-top: 0;
|
||||
margin: 0 auto;
|
||||
font-weight: 600;
|
||||
font-size: 42rpx;
|
||||
color: #B24325;
|
||||
line-height: 62rpx;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
z-index: 60;
|
||||
width: 100%;
|
||||
height: 136rpx;
|
||||
padding-top: 0;
|
||||
margin: 0 auto;
|
||||
font-weight: 600;
|
||||
font-size: 42rpx;
|
||||
color: #b24325;
|
||||
line-height: 62rpx;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
.text-1{
|
||||
text-align: center;
|
||||
}
|
||||
.text-2{
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.festival-button-div {
|
||||
position: relative;
|
||||
|
||||
@@ -157,10 +157,15 @@ export default function useCheckIn() {
|
||||
checkInDays: localStatus.checkInDays,
|
||||
popUpStatus: localStatus.popupDay === today
|
||||
}
|
||||
const holidayBody = {
|
||||
let holidayBody = {
|
||||
rewardFlag: localStatus.rewardFlag,
|
||||
obtainFlag: localStatus.obtainFlag
|
||||
}
|
||||
// 如果没有记录获取节日徽章,那么需要重新获取节日徽章信息
|
||||
if(holidayBody.rewardFlag && !holidayBody.obtainFlag) {
|
||||
const {body:holidayData} = await queryHolidayReward()
|
||||
holidayBody = holidayData
|
||||
}
|
||||
complete(checkInInfo, holidayBody)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -955,11 +955,8 @@
|
||||
|
||||
.nav-div {
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
// padding-top:var(--status-bar-height);
|
||||
// padding: 0 30rpx;
|
||||
margin: 0 calc($bg-margin-left + 70rpx);
|
||||
margin: 0 calc($bg-margin-left + 90rpx);
|
||||
height: 70rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
@@ -974,9 +971,7 @@
|
||||
position: absolute;
|
||||
right: $bg-margin-left;
|
||||
top: 0;
|
||||
// width: 70rpx;
|
||||
height: 70rpx;
|
||||
// background-color: red;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
@@ -739,11 +739,8 @@
|
||||
|
||||
.nav-div {
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
// padding-top:var(--status-bar-height);
|
||||
// padding: 0 30rpx;
|
||||
margin: 0 calc($bg-margin-left + 70rpx);
|
||||
margin: 0 calc($bg-margin-left + 90rpx);
|
||||
height: 70rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
|
||||
@@ -28,10 +28,11 @@ export class ProtocolConst {
|
||||
export enum MessageType {
|
||||
PING = 0b0001, // 心跳消息(支持空包体)
|
||||
AUDIO_DATA = 0b0010, // 纯音频数据
|
||||
TEXT_MESSAGE = 0b0011, // 纯文本消息
|
||||
TEXT_MESSAGE = 0b0011, // 大模型回复的文本消息
|
||||
CONTROL_CMD = 0b0100, // 控制指令
|
||||
IDENTITY = 0b0101, // 身份校验包json格式
|
||||
ERROR = 0b0110 // 错误信息json格式
|
||||
ERROR = 0b0110, // 错误信息json格式
|
||||
TIP_MESSAGE = 0b0111 // 大模型生成的回答提示
|
||||
// 预留12种类型用于扩展(0b0100 ~ 0b1111)
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ export default function useWebSocket(aaas = null, options = {}) {
|
||||
}
|
||||
break;
|
||||
case MessageType.TEXT_MESSAGE:
|
||||
|
||||
console.log('TEXT_MESSAGE', body);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user