This commit is contained in:
2025-05-21 15:45:10 +08:00
parent f6ed5b04de
commit 5d96054c0c
44 changed files with 2460 additions and 2126 deletions

View File

@@ -6,6 +6,7 @@ import PlatformENUM from "../enum/PlatformENUM";
import Api from "../api/index";
import {showToast} from "../utils/uils";
const emits = defineEmits(['success']);
const {details} = defineProps({
details: {
type: Object,
@@ -70,12 +71,17 @@ watch(
)
const success = async () => {
if (!selected.value) {
showToast('请选择帐号');
return;
}
const {msg} = await Api.system.acceptTask({
id: details.id,
account: selected.value,
});
showToast(msg);
show.value = false;
emits('success');
}
</script>
@@ -106,10 +112,10 @@ const success = async () => {
<template v-if="vo.length > 0">
<view
:key="index"
@click="v.is_use !== 0 ? selected = v.id : null"
@click="v.is_use !== 0 && po.status === 0 ? selected = v.id : null"
v-for="(v, index) in vo"
class="!flex items-center py-[22rpx]">
<radio :checked="selected === v.id" :disabled="v.is_use === 0"></radio>
<radio :checked="selected === v.id" :disabled="v.is_use === 0 || po.status>0"></radio>
<image class="!size-[80rpx] rounded-[50%] overflow-hidden !ml-[34rpx]"
:src="PlatformENUM[v.platform_id]"></image>
<view class="!flex flex-col !ml-[16rpx]">

View File

@@ -1,4 +1,5 @@
import {toPage} from "../utils/uils.js";
import useXFunModal from "../hooks/useXFunModal.js";
const OpenTypeFun = async (options) => {
console.log('OpenTypeFun打开', options);
@@ -23,7 +24,8 @@ const OpenTypeFun = async (options) => {
break;
}
case 5: { // 弹窗
console.log('弹窗');
console.log('弹窗', options);
useXFunModal(options);
break;
}
}

View File

@@ -19,6 +19,10 @@ const props = defineProps({
});
const sendMsg = async () => {
if (!/^1[3-9]\d{9}$/.test(props.mobile)) {
showToast('手机号不正确');
return;
}
const {msg} = await Api.system.sendSms({
mobile: props.mobile,
type: props.type,

View File

@@ -4,6 +4,7 @@ import {ref} from "vue";
const modalValue = defineModel();
const DateTimeRef = ref();
const emits = defineEmits(['success']);
const {placeholder, fields, type} = defineProps({
placeholder: {
type: String,
@@ -25,12 +26,13 @@ const open = () => {
const success = ({result}) => {
modalValue.value = result;
emits('success');
}
</script>
<template>
<view :class="[!$slots.default ? 'x-date-input' : '']">
<view v-if="!$slots.default" class="!flex items-center justify-center gap-[20rpx]" @click="open">
<view :class="[!$slots.default ? 'x-date-input' : '']" @click="open">
<view v-if="!$slots.default" class="!flex items-center justify-center gap-[20rpx]">
<image class="!size-[24rpx]" :src="timeIcon"></image>
<text v-if="!modalValue" class="text-[#666]">{{ placeholder }}</text>
<text class="test-24r" v-else>{{ modalValue }}</text>
@@ -42,6 +44,11 @@ const success = ({result}) => {
</template>
<style lang="scss" scoped>
.x-date-input-picker {
flex-grow: 1;
border-radius: 4rpx;
}
.x-date-input {
background-color: #F2F3F5;
padding: 14rpx 0;

View File

@@ -15,7 +15,7 @@ const {model, rules} = defineProps({
const verify = () => {
Object.entries(model).forEach(([key, value]) => {
console.log(rules[key], key)
if (!rules[key].reg.test(value)) {
if (rules[key] && !rules[key].reg.test(value)) {
showToast({
icon: 'error',
mask: true,

View File

@@ -21,18 +21,22 @@ const {src, list, imageClass} = defineProps({
});
const show = ref(false);
const preview = () => {
const open = () => {
show.value = true;
}
defineExpose({
open
});
</script>
<template>
<!-- #ifndef MP-WEIXIN -->
<image @click="preview" v-bind="$attrs" :src="src" mode="aspectFill"></image>
<image @click="open" v-bind="$attrs" :src="src" mode="aspectFill"></image>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<image @click="preview" :class="imageClass" :src="src" mode="aspectFill"></image>
<image @click="open" :class="imageClass" :src="src" mode="aspectFill"></image>
<!-- #endif -->
<view

View File

@@ -14,11 +14,15 @@ const STATUS = {
},
};
const {text, status, tile} = defineProps({
const {text, status, tile, textColor} = defineProps({
text: {
type: String,
default: '提示请在规定时间内按要求提交回填1。以免影响收益。哈哈哈哈哈哈哈哈哈哈'
},
textColor: {
type: String,
default: '#000'
},
status: {
type: String,
default: 'error'
@@ -52,8 +56,8 @@ onMounted(() => {
:style="{alignItems: tile ? 'start' : 'center'}">
<image v-if="status==='error'" class="!size-[26rpx] flex-shrink-0" :src="warn"></image>
<image v-else class="!size-[26rpx] flex-shrink-0" :src="success"></image>
<text v-if="!tile" class="!whitespace-nowrap flex-shrink-0">{{ text }}</text>
<text v-else>
<text v-if="!tile" class="!whitespace-nowrap flex-shrink-0" :style="{color: textColor}">{{ text }}</text>
<text v-else :style="{color: textColor}">
{{ text }}
</text>
</view>

43
src/components/XTY.vue Normal file
View File

@@ -0,0 +1,43 @@
<script setup>
import ICON from "../static/icons/dd.png";
const {size} = defineProps({
size: {
type: String,
default: '30rpx',
}
});
const modelValue = defineModel();
</script>
<template>
<view class="!flex" @click="modelValue=!modelValue">
<view :class="['x-t-y', modelValue ? 'cur' : '']">
<image v-if="modelValue" class="!size-[17rpx]" :src="ICON"></image>
</view>
<view>
<slot></slot>
</view>
</view>
</template>
<style scoped lang="scss">
.x-t-y {
$size: v-bind(size);
width: $size;
height: $size;
border: 1px solid #666;
border-radius: 50%;
display: inline-flex;
flex-shrink: 0;
margin-top: 5rpx;
margin-right: 10rpx;
justify-content: center;
align-items: center;
}
.cur {
border: 1px solid var(--primary-color);
}
</style>

View File

@@ -34,4 +34,9 @@ const {type} = defineProps({
background-color: #FFF7E8;
color: #FF7D00;
}
.error {
background-color: #FFECE8;
color: #F53F3F;
}
</style>

View File

@@ -4,45 +4,85 @@ import XModal from "./XModal.vue";
import fmt from '../static/images/fmt.png';
import play from '../static/icons/play.png';
const {options} = defineProps({
options: {
type: Object,
default: {},
}
});
const show = ref(false);
const playVideo = ref(false);
const current = ref(0);
const open = () => {
show.value = true;
}
defineExpose({
open
});
const changeSwiper = ({detail}) => {
current.value = detail.current;
}
</script>
<template>
<view @click="show=true">
<slot></slot>
</view>
<x-modal
backgroundColor="rgba(255,255,255,0)"
class="x-video-modal"
v-model:show="show">
<view class="!p-[20rpx] relative">
<image
@click="show=false"
class="!w-[52rpx] !h-[52rpx] !absolute left-1/2 -translate-x-1/2 bottom-[-100rpx]"
src="/static/icons/close.png">
</image>
<template v-if="options.pop_type === 1">
<view class="relative h-[800rpx]">
<swiper class="!size-full" @change="changeSwiper">
<swiper-item v-for="src in options.pop_images" class="!flex flex-col justify-center px-[24rpx]">
<view
class="w-full bg-[#fff] h-fit !flex items-center p-[24rpx] rounded-[24rpx] relative">
<image class="!w-full" :src="src" mode="widthFix"></image>
</view>
</swiper-item>
</swiper>
<view class="!w-full relative rounded-[16rpx] overflow-hidden">
<image v-if="!playVideo" class="!w-full" mode="widthFix" :src="fmt"></image>
<view @click="playVideo=!playVideo" v-if="!playVideo"
class="absolute left-0 top-0 w-full h-full bg-[rgba(0,0,0,.4)] z-10 !flex justify-center items-center">
<image class="!w-[94rpx] !h-[94rpx]" :src="play"></image>
<view class="absolute left-1/2 -translate-x-1/2 bottom-[-80rpx] text-white test-36r">
{{ current + 1 }} / {{ options.pop_images.length }}
</view>
<video
autoplay
@pause="playVideo=!playVideo"
class="!w-full"
v-else
src="https://shopyunlng.oss-cn-beijing.aliyuncs.com/upload/2025/03-18/15-31-150289-429952696.m4v">
</video>
<image
@click="show=false"
class="!w-[52rpx] !h-[52rpx] !absolute left-1/2 -translate-x-1/2 bottom-[-150rpx]"
src="/static/icons/close.png">
</image>
</view>
</view>
</template>
<template v-else>
<view class="!p-[20rpx] relative bg-white rounded-[24rpx]">
<image
@click="show=false"
class="!w-[52rpx] !h-[52rpx] !absolute left-1/2 -translate-x-1/2 bottom-[-100rpx]"
src="/static/icons/close.png">
</image>
<view class="!w-full relative rounded-[16rpx] overflow-hidden">
<image v-if="!playVideo" class="!w-full" mode="widthFix" :src="fmt"></image>
<view @click="playVideo=!playVideo" v-if="!playVideo"
class="absolute left-0 top-0 w-full h-full bg-[rgba(0,0,0,.4)] z-10 !flex justify-center items-center">
<image class="!w-[94rpx] !h-[94rpx]" :src="play"></image>
</view>
<video
autoplay
@pause="playVideo=!playVideo"
class="!w-full"
v-else
src="https://shopyunlng.oss-cn-beijing.aliyuncs.com/upload/2025/03-18/15-31-150289-429952696.m4v">
</video>
</view>
</view>
</template>
</x-modal>
</template>
<style lang="scss">
.x-video-modal {
.tui-modal-box {
margin-bottom: 200rpx;