fix
This commit is contained in:
@@ -7,19 +7,19 @@
|
||||
<div class="content_item_user">
|
||||
<div class="content_item_user_left">
|
||||
<div class="content_item_user_left_detail">
|
||||
<img :src="userInfo?.avatar" alt="">
|
||||
<img :src="userDetail.avatar" alt="">
|
||||
</div>
|
||||
<div class="content_item_user_left_detail">
|
||||
<div class="modal_title_text">
|
||||
<div>{{ cookieUserInfo.userName }}</div>
|
||||
<div class="modal_title_text_assistant"><span>{{$t('account.email')}}: </span>{{ cookieUserInfo?.email }}</div>
|
||||
<div>{{ userDetail.userName }}</div>
|
||||
<div class="modal_title_text_assistant"><span>{{$t('account.email')}}: </span>{{ userDetail.email }}</div>
|
||||
</div>
|
||||
<div class="content_item_user_left_detail_bottom">
|
||||
<div>
|
||||
<span>{{$t('account.Follow')}}:</span>{{ userInfo?.followeeCount }}
|
||||
<span>{{$t('account.Follow')}}:</span>{{ userDetail.followeeCount }}
|
||||
</div>
|
||||
<div>
|
||||
<span>{{$t('account.Fans')}}:</span>{{ userInfo?.followerCount }}
|
||||
<span>{{$t('account.Fans')}}:</span>{{ userDetail.followerCount }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,7 +54,6 @@ import { Https } from "@/tool/https";
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
@@ -63,14 +62,9 @@ export default defineComponent({
|
||||
|
||||
const {t} = useI18n()
|
||||
const store = useStore();
|
||||
let userInfo:any= computed(()=>{
|
||||
return store.state.UserHabit.userInfo
|
||||
let userDetail= computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
let cookieUserInfo = ref(null)
|
||||
if(getCookie('userInfo')){
|
||||
let userInfo:any = getCookie('userInfo')
|
||||
cookieUserInfo.value = JSON.parse(userInfo)
|
||||
}
|
||||
let accountHomeData = reactive({
|
||||
rootSubmenuKeys:[
|
||||
{
|
||||
@@ -96,8 +90,7 @@ export default defineComponent({
|
||||
router.push({path:event.item.route})
|
||||
}
|
||||
return{
|
||||
userInfo,
|
||||
cookieUserInfo,
|
||||
userDetail,
|
||||
...toRefs(accountHomeData),
|
||||
router,
|
||||
handleClick,
|
||||
|
||||
@@ -43,7 +43,6 @@ import { Https } from "@/tool/https";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import follow from '@/component/Account/followFans/follow.vue'
|
||||
import fans from '@/component/Account/followFans/fans.vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
@@ -70,9 +69,6 @@ export default defineComponent({
|
||||
],
|
||||
activeKey: '',
|
||||
})
|
||||
let userInfo= computed(()=>{
|
||||
return store.state.UserHabit.userInfo
|
||||
})
|
||||
let domRefs:any = reactive({
|
||||
follow:ref(null),
|
||||
fans:ref(null),
|
||||
@@ -108,7 +104,6 @@ export default defineComponent({
|
||||
return{
|
||||
...toRefs(accountMessage),
|
||||
...toRefs(domRefs),
|
||||
userInfo,
|
||||
messageSystem,
|
||||
setReadStatus,
|
||||
changeTabs,
|
||||
|
||||
@@ -39,7 +39,6 @@ import { Https } from "@/tool/https";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import system from '@/component/Account/message/system.vue'
|
||||
import privateChat from '@/component/Account/message/privateChat.vue'
|
||||
import newFollow from '@/component/Account/message/newFollow.vue'
|
||||
|
||||
@@ -39,10 +39,7 @@
|
||||
import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMounted} from 'vue'
|
||||
import { Https } from "@/tool/https";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
},
|
||||
|
||||
@@ -46,10 +46,7 @@
|
||||
import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMounted} from 'vue'
|
||||
import { Https } from "@/tool/https";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
},
|
||||
|
||||
@@ -20,7 +20,6 @@ import { Https } from "@/tool/https";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import myInformation from '@/component/Account/frontPage/mylnformation.vue';
|
||||
import bind from '@/component/Account/frontPage/bindPage.vue';
|
||||
import cancelRenewal from '@/component/Account/frontPage/cancelRenewal.vue';
|
||||
@@ -33,7 +32,8 @@ export default defineComponent({
|
||||
},
|
||||
setup() {
|
||||
const {t} = useI18n()
|
||||
const router = useRouter()
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const store = useStore();
|
||||
let accountfrontPage = reactive({
|
||||
frontPageList:[
|
||||
@@ -47,8 +47,8 @@ export default defineComponent({
|
||||
title:t('account.cancel'),
|
||||
key:'cancelRenewal',
|
||||
}
|
||||
|
||||
],
|
||||
loadingShow:false,
|
||||
activeKey: '',
|
||||
})
|
||||
let domRefs:any = reactive({
|
||||
@@ -77,49 +77,35 @@ export default defineComponent({
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
let setAllfrontPage = ()=>{
|
||||
return new Promise((resolve,reject)=>{
|
||||
let data = {
|
||||
type:accountfrontPage.activeKey
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.oneClickRead,'',{params:data}).then((rv)=>{
|
||||
resolve(rv)
|
||||
}).catch((err)=>{
|
||||
reject(err
|
||||
)
|
||||
})
|
||||
})
|
||||
}
|
||||
let getHistory = (data:any)=>{
|
||||
return new Promise((resolve,reject)=>{
|
||||
data.type = accountfrontPage.activeKey
|
||||
let url = Https.httpUrls.getHistoryNotification
|
||||
// if(data.type == 'follow'){
|
||||
// url = Https.httpUrls.porfolioGetFollowerList
|
||||
// }
|
||||
Https.axiosPost(url,data).then((rv)=>{
|
||||
if(rv){
|
||||
// domRefs[data.type][0].setfrontPageList(rv,data)
|
||||
resolve(rv)
|
||||
}
|
||||
}).catch((err)=>{
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
const wechatLogin = (value:any)=> {
|
||||
let data = {
|
||||
code : value.code
|
||||
}
|
||||
accountfrontPage.loadingShow = true
|
||||
Https.axiosGet(Https.httpUrls.bindWeChat, {params:data})
|
||||
.then((rv) => {
|
||||
accountfrontPage.loadingShow = false
|
||||
console.log(rv);
|
||||
|
||||
router.push({ query: {} });
|
||||
})
|
||||
.catch((res) => {accountfrontPage.loadingShow = false});
|
||||
}
|
||||
onMounted(()=>{
|
||||
let key = accountfrontPage.frontPageList[0].key
|
||||
accountfrontPage.activeKey = key
|
||||
const data = route.query
|
||||
if(data?.state == 'weiXin'){
|
||||
accountfrontPage.activeKey = 'bind'
|
||||
wechatLogin(data)
|
||||
}
|
||||
})
|
||||
return{
|
||||
...toRefs(accountfrontPage),
|
||||
...toRefs(domRefs),
|
||||
setReadStatus,
|
||||
changeTabs,
|
||||
setAllfrontPage,
|
||||
getHistory,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
|
||||
@@ -5,43 +5,148 @@
|
||||
<div class="title">Bind Wechat</div>
|
||||
<div class="box">
|
||||
<div class="type">
|
||||
<img src="@/assets/images/loginPage/weiXinIcon.svg" alt="">
|
||||
<div class="text">Unbound</div>
|
||||
<img v-if="!userDetail.accountExtendList?.WeChat" src="@/assets/images/loginPage/weiXinIcon.svg" alt="">
|
||||
<img v-else :src="userDetail.accountExtendList?.WeChat.headImgUrl" alt="">
|
||||
<div class="text">{{ userDetail.accountExtendList?.WeChat?userDetail.accountExtendList?.WeChat.name:'Unbound' }}</div>
|
||||
</div>
|
||||
<div class="gallery_btn">Bind Now</div>
|
||||
<div v-if="!userDetail.accountExtendList?.WeChat" class="gallery_btn" @click="openWeiXinModel">Bind Now</div>
|
||||
<div v-else class="gallery_btn" @click="ungroupWeiXinModel">Ungroup</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bind_item">
|
||||
<div class="title">Bind Gmail</div>
|
||||
<div class="box">
|
||||
<div class="type">
|
||||
<img v-if="!userDetail.accountExtendList?.Google" src="@/assets/images/loginPage/gmailIcon.svg" alt="">
|
||||
<img v-else :src="userDetail.accountExtendList?.Google?.headImgUrl" alt="">
|
||||
<div class="text">{{ userDetail.accountExtendList?.Google?userDetail.accountExtendList?.Google.name:'Unbound' }}</div>
|
||||
</div>
|
||||
<div class="gmail_btn">
|
||||
<div v-if="!userDetail.accountExtendList?.Google" class="gallery_btn">Bind Now</div>
|
||||
<div v-else class="gallery_btn" @click="ungroupGoogleModel">Ungroup</div>
|
||||
<div v-show="!userDetail.accountExtendList?.Google" id="g_id_bind"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
<weiXinModel ref="weiXinModel"></weiXinModel>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMounted} from 'vue'
|
||||
<script>
|
||||
import { defineComponent,computed,ref,reactive,nextTick,toRefs,onBeforeUnmount, onMounted} from 'vue'
|
||||
import { Https } from "@/tool/https";
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import weiXinModel from "@/component/LoginPage/weiXinModel.vue";
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
weiXinModel
|
||||
},
|
||||
setup() {
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const store = useStore();
|
||||
let userInfo:any= computed(()=>{
|
||||
return store.state.UserHabit.userInfo
|
||||
let accountHomeData = reactive({
|
||||
router:null,
|
||||
loadingShow:false,
|
||||
userDetail:computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
})
|
||||
let cookieUserInfo = JSON.parse(getCookie('userInfo') as any)
|
||||
let accountHomeData:any = reactive({
|
||||
cropperFileData:{name:'',uid:''}, //裁剪的原始文件数据
|
||||
uploadUrl:userInfo.value?.avatar,
|
||||
uploadFile:undefined,
|
||||
token:'',
|
||||
fileList:[]
|
||||
let bindPageDom = reactive({
|
||||
weiXinModel:null
|
||||
})
|
||||
let data = reactive({
|
||||
scriptSrc:'https://accounts.google.com/gsi/client',
|
||||
})
|
||||
const openWeiXinModel = ()=>{
|
||||
bindPageDom.weiXinModel.init()
|
||||
}
|
||||
const handleCredentialResponse = (response)=>{
|
||||
let code = response.credential
|
||||
accountHomeData.loadingShow = true
|
||||
let data = {credential : code}
|
||||
Https.axiosGet(Https.httpUrls.bindGoogle, {params:data})
|
||||
.then((rv) => {
|
||||
accountHomeData.loadingShow = false
|
||||
})
|
||||
.catch((res) => {accountHomeData.loadingShow = false});
|
||||
}
|
||||
const ungroupWeiXinModel = ()=>{
|
||||
Https.axiosGet(Https.httpUrls.unbindWeChat,).then((rv)=>{
|
||||
message.success('Successful discharge');
|
||||
let value = {
|
||||
accountExtendList:{
|
||||
WeChat:undefined,
|
||||
Google:accountHomeData.userDetail.accountExtendList?.Google
|
||||
}
|
||||
}
|
||||
store.commit("upUserDetail", value)
|
||||
})
|
||||
}
|
||||
const ungroupGoogleModel = ()=>{
|
||||
Https.axiosGet(Https.httpUrls.unbindGoogle,).then((rv)=>{
|
||||
let value = {
|
||||
accountExtendList:{
|
||||
WeChat:accountHomeData.userDetail.accountExtendList?.WeChat,
|
||||
Google:undefined,
|
||||
}
|
||||
}
|
||||
store.commit("upUserDetail", value)
|
||||
message.success('Successful discharge');
|
||||
})
|
||||
}
|
||||
onMounted(async ()=>{
|
||||
|
||||
let GOOGLE_CLIENT_ID = '194770296147-njd68pm7tnapgonkj2h48mhf63n15n3f.apps.googleusercontent.com'
|
||||
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
|
||||
if(!existingScript){
|
||||
await new Promise((resolve, reject) => {
|
||||
const script = document.createElement("script");
|
||||
script.src = data.scriptSrc
|
||||
script.onload=()=>{
|
||||
resolve()
|
||||
}
|
||||
document.body.appendChild(script);
|
||||
})
|
||||
}
|
||||
window.google.accounts.id.initialize({
|
||||
// 主要就是填写client_id
|
||||
client_id: GOOGLE_CLIENT_ID,
|
||||
auto_select: false,
|
||||
callback: handleCredentialResponse,
|
||||
// context:"signin",
|
||||
ux_mode:"popup",
|
||||
itp_support:true,
|
||||
});
|
||||
window.google.accounts.id.renderButton(
|
||||
document.getElementById("g_id_bind"),
|
||||
{
|
||||
type:"icon",//icon为只有一个icon
|
||||
shape:"circle",
|
||||
theme:"outline",
|
||||
size:"large",
|
||||
logo_alignment:"center",
|
||||
}
|
||||
);
|
||||
})
|
||||
onBeforeUnmount(()=>{
|
||||
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
|
||||
if(existingScript)existingScript.remove()
|
||||
})
|
||||
return{
|
||||
...toRefs(accountHomeData),
|
||||
userInfo,
|
||||
cookieUserInfo,
|
||||
...toRefs(bindPageDom),
|
||||
openWeiXinModel,
|
||||
ungroupGoogleModel,
|
||||
ungroupWeiXinModel,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
@@ -79,9 +184,24 @@ export default defineComponent({
|
||||
>.text{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
}
|
||||
>.gmail_btn{
|
||||
position: relative;
|
||||
#g_id_bind{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
z-index: 2;
|
||||
:deep(.nsm7Bb-HzV7m-LgbsSe.Bz112c-LgbsSe){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.bind_item:last-child{
|
||||
|
||||
@@ -1,38 +1,46 @@
|
||||
<template>
|
||||
<div class="cancelRenewal_page">
|
||||
<div class="cancel_box_item">
|
||||
<div class="modal_title_text">
|
||||
<div>Sorry to see you go</div>
|
||||
<div class="modal_title_text_assistant">What is your reason for cancelling AiDA?</div>
|
||||
<div v-if="userDetail.status != 'canceled'">
|
||||
<div class="cancel_box_item">
|
||||
<div class="modal_title_text">
|
||||
<div>Sorry to see you go</div>
|
||||
<div class="modal_title_text_assistant">What is your reason for cancelling AiDA?</div>
|
||||
</div>
|
||||
<a-select class="gallerySelect" v-model:value="currentState.value" size="large" optionFilterProp="label" :options="state" placeholder="Select a reason" allowClear show-search></a-select>
|
||||
<textarea v-model="textareaValue" placeholder="Share your feedback here..."></textarea>
|
||||
<div class="button_box">
|
||||
<div class="gallery_btn white gallery_btn_radius" @click="subscribe">Styt subscribed</div>
|
||||
<div class="gallery_btn gallery_btn_radius" @click="cancelSubscription">Yes, cancel it</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-select class="gallerySelect" v-model:value="currentState.value" size="large" optionFilterProp="label" :options="state" placeholder="Select a reason" allowClear show-search></a-select>
|
||||
<textarea v-model="searchPictureName" placeholder="Share your feedback here..."></textarea>
|
||||
<div class="button_box">
|
||||
<div class="gallery_btn white gallery_btn_radius" @click="subscribe">Styt subscribed</div>
|
||||
<div class="gallery_btn gallery_btn_radius">Yes, cancel it</div>
|
||||
<div class="cancel_box_item cancel_box_item2">
|
||||
<div class="modal_title_text">
|
||||
<div>You’re about to cancel your subscription</div>
|
||||
<div>
|
||||
<i class="fi fi-sr-circle-xmark"></i>
|
||||
<div class="modal_title_text_assistant">You will loose all your date</div>
|
||||
</div>
|
||||
<div>
|
||||
<i class="fi fi-sr-circle-xmark"></i>
|
||||
<div class="modal_title_text_assistant">You will loose your settings and customizations</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tips">
|
||||
<i class="fi fi-sr-triangle-warning"></i>
|
||||
<div>Don’t worry! The data you have in AiDA will be
|
||||
safe.</div>
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<div class="gallery_btn white gallery_btn_radius" @click="subscribe">Styt subscribed</div>
|
||||
<div class="gallery_btn gallery_btn_radius" @click="cancelSubscription">Yes, cancel it</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cancel_box_item cancel_box_item2">
|
||||
<div class="modal_title_text">
|
||||
<div>You’re about to cancel your subscription</div>
|
||||
<div>
|
||||
<i class="fi fi-sr-circle-xmark"></i>
|
||||
<div class="modal_title_text_assistant">What is your reason for cancelling AiDA?</div>
|
||||
</div>
|
||||
<div>
|
||||
<i class="fi fi-sr-circle-xmark"></i>
|
||||
<div class="modal_title_text_assistant">What is your reason for cancelling AiDA?</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tips">
|
||||
<i class="fi fi-sr-triangle-warning"></i>
|
||||
<div>Don’t worry!The data you have in Notion will be
|
||||
safe.</div>
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<div class="gallery_btn white gallery_btn_radius" @click="subscribe">Styt subscribed</div>
|
||||
<div class="gallery_btn gallery_btn_radius">Yes, cancel it</div>
|
||||
</div>
|
||||
<div v-else class="no_renewal">
|
||||
There are no subscription plans with automatic renewal.
|
||||
</div>
|
||||
<div class="mark_loading" v-show="isShowMark">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
<renew ref="renew"></renew>
|
||||
</div>
|
||||
@@ -42,7 +50,6 @@ import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMo
|
||||
import { Https } from "@/tool/https";
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import renew from "@/component/HomePage/renew.vue";
|
||||
export default defineComponent({
|
||||
@@ -51,12 +58,13 @@ export default defineComponent({
|
||||
},
|
||||
setup() {
|
||||
const store = useStore();
|
||||
let userInfo:any= computed(()=>{
|
||||
return store.state.UserHabit.userInfo
|
||||
let userDetail:any= computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
let cookieUserInfo = JSON.parse(getCookie('userInfo') as any)
|
||||
let accountHomeData:any = reactive({
|
||||
currentState:{value:'income'}, //裁剪的原始文件数据
|
||||
textareaValue:'',
|
||||
isShowMark:false,
|
||||
})
|
||||
let state:any = ref([
|
||||
{
|
||||
@@ -72,13 +80,32 @@ export default defineComponent({
|
||||
const subscribe = ()=>{
|
||||
renew.value.init()
|
||||
}
|
||||
const cancelSubscription = ()=>{
|
||||
let data = {
|
||||
subscriptionId:userDetail.value.subscriptionId,
|
||||
reason:'',
|
||||
}
|
||||
accountHomeData.isShowMark = true
|
||||
Https.axiosGet(Https.httpUrls.cancelSubscription, {params:data})
|
||||
.then((rv: any) => {
|
||||
message.success(rv)
|
||||
let value = {
|
||||
status:'canceled',
|
||||
}
|
||||
accountHomeData.isShowMark = false
|
||||
store.commit("upUserDetail", value)
|
||||
})
|
||||
.catch((res) => {
|
||||
accountHomeData.isShowMark = false
|
||||
});
|
||||
}
|
||||
return{
|
||||
...toRefs(accountHomeData),
|
||||
userInfo,
|
||||
cookieUserInfo,
|
||||
userDetail,
|
||||
state,
|
||||
renew,
|
||||
subscribe,
|
||||
cancelSubscription,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
@@ -90,9 +117,18 @@ export default defineComponent({
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.cancelRenewal_page{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
|
||||
>div{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
height: 45rem;
|
||||
align-items: center;
|
||||
&.no_renewal{
|
||||
font-size: 2rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
.cancel_box_item{
|
||||
border: 2px solid #000;
|
||||
border-radius: 2rem;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
class="upload_tip_block"
|
||||
>
|
||||
<!-- <i class="fi fi-br-upload"></i> -->
|
||||
<img :src="uploadUrl" alt="">
|
||||
<img :src="uploadUrl?uploadUrl:userDetail.avatar" alt="">
|
||||
</div>
|
||||
</a-upload>
|
||||
</div>
|
||||
@@ -27,13 +27,13 @@
|
||||
<div class="accountEdit_page_body_item">
|
||||
<div class="accountEdit_page_body_item_name">{{$t('account.userName')}}:</div>
|
||||
<div class="accountEdit_page_body_item_inut">
|
||||
<input type="text" disabled :value="cookieUserInfo.userName">
|
||||
<input type="text" disabled :value="userDetail.userName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="accountEdit_page_body_item">
|
||||
<div class="accountEdit_page_body_item_name">{{$t('account.email')}}:</div>
|
||||
<div class="accountEdit_page_body_item_inut">
|
||||
<input type="text" disabled :value="cookieUserInfo.email">
|
||||
<input type="text" disabled :value="userDetail.email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="accountEdit_page_body_item">
|
||||
@@ -51,7 +51,6 @@ import { Https } from "@/tool/https";
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import Cropper from '@/component/HomePage/Cropper.vue'
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
@@ -59,13 +58,12 @@ export default defineComponent({
|
||||
},
|
||||
setup() {
|
||||
const store = useStore();
|
||||
let userInfo:any= computed(()=>{
|
||||
return store.state.UserHabit.userInfo
|
||||
let userDetail:any= computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
let cookieUserInfo = JSON.parse(getCookie('userInfo') as any)
|
||||
let accountHomeData:any = reactive({
|
||||
cropperFileData:{name:'',uid:''}, //裁剪的原始文件数据
|
||||
uploadUrl:userInfo.value?.avatar,
|
||||
uploadUrl:'',
|
||||
uploadFile:undefined,
|
||||
token:'',
|
||||
fileList:[]
|
||||
@@ -138,15 +136,14 @@ export default defineComponent({
|
||||
let data = {
|
||||
avatar : rv
|
||||
}
|
||||
store.commit("setUserInfo", data)
|
||||
store.commit("upUserDetail", data)
|
||||
message.success('提交成功')
|
||||
})
|
||||
|
||||
}
|
||||
return{
|
||||
...toRefs(accountHomeData),
|
||||
userInfo,
|
||||
cookieUserInfo,
|
||||
userDetail,
|
||||
Cropper,
|
||||
handleCropperSuccess,
|
||||
beforeUpload,
|
||||
@@ -201,6 +198,7 @@ export default defineComponent({
|
||||
border-radius: 1.6rem;
|
||||
border: 2px solid #D0D0D0;
|
||||
width: 100%;
|
||||
font-size: 2rem;
|
||||
}
|
||||
input{
|
||||
height: 7rem;
|
||||
|
||||
@@ -43,8 +43,6 @@ import { Https } from "@/tool/https";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
},
|
||||
|
||||
@@ -41,8 +41,6 @@ import { Https } from "@/tool/https";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
},
|
||||
|
||||
@@ -37,9 +37,7 @@
|
||||
import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMounted} from 'vue'
|
||||
import { Https } from "@/tool/https";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
|
||||
@@ -73,7 +73,6 @@ import { Https } from "@/tool/https";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
|
||||
@@ -30,9 +30,7 @@
|
||||
import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMounted} from 'vue'
|
||||
import { Https } from "@/tool/https";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
|
||||
@@ -53,7 +53,6 @@ import { Https } from "@/tool/https";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import Works from '@/views/HomeView/Works.vue';
|
||||
export default defineComponent({
|
||||
|
||||
@@ -77,11 +77,13 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, createVNode, computed } from "vue";
|
||||
import { useStore } from "vuex";
|
||||
import { Https } from "@/tool/https";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
},
|
||||
setup() {
|
||||
const store:any = useStore()
|
||||
let rangePickerValue: any = ref([]);
|
||||
let rangeTimeValue: any = ref([]);
|
||||
let renameData: any = ref({}); //修改名字选中的数据
|
||||
@@ -90,9 +92,10 @@ export default defineComponent({
|
||||
{
|
||||
title: 'Email',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "userEmail",
|
||||
key: "userEmail",
|
||||
width:200,
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: 'User Id',
|
||||
@@ -100,6 +103,7 @@ export default defineComponent({
|
||||
ellipsis: true,
|
||||
dataIndex: "accountId",
|
||||
key: "accountId",
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
title: 'User Name',
|
||||
@@ -107,6 +111,7 @@ export default defineComponent({
|
||||
ellipsis: 200,
|
||||
dataIndex: "userName",
|
||||
key: "userName",
|
||||
width:100,
|
||||
// customRender: (record: any) => {
|
||||
// let time = formatTime(
|
||||
// record.text / 1000,
|
||||
@@ -121,6 +126,7 @@ export default defineComponent({
|
||||
ellipsis: true,
|
||||
dataIndex: "isTrial",
|
||||
key: "isTrial",
|
||||
width:100,
|
||||
customRender: (record: any) => {
|
||||
let str
|
||||
if(record.value == 1){
|
||||
@@ -137,6 +143,7 @@ export default defineComponent({
|
||||
ellipsis: true,
|
||||
dataIndex: "designTimes",
|
||||
key: "designTimes",
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
title: 'Country',
|
||||
@@ -144,6 +151,7 @@ export default defineComponent({
|
||||
ellipsis: true,
|
||||
dataIndex: "country",
|
||||
key: "country",
|
||||
width:200,
|
||||
},
|
||||
{
|
||||
title: 'Title',
|
||||
@@ -151,6 +159,7 @@ export default defineComponent({
|
||||
ellipsis: true,
|
||||
dataIndex: "title",
|
||||
key: "title",
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
title: 'Surname',
|
||||
@@ -158,6 +167,7 @@ export default defineComponent({
|
||||
ellipsis: true,
|
||||
dataIndex: "surname",
|
||||
key: "surname",
|
||||
width:150,
|
||||
},
|
||||
{
|
||||
title: 'Given Name',
|
||||
@@ -165,6 +175,7 @@ export default defineComponent({
|
||||
ellipsis: true,
|
||||
dataIndex: "givenName",
|
||||
key: "givenName",
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
title: 'Create Time',
|
||||
@@ -176,6 +187,19 @@ export default defineComponent({
|
||||
// resizable: true,
|
||||
dataIndex: "createTime",
|
||||
key: "createTime",
|
||||
width:200,
|
||||
},
|
||||
{
|
||||
title: 'Credits',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
// width: 150,
|
||||
// minWidth: 100,
|
||||
// maxWidth: 200,
|
||||
// resizable: true,
|
||||
dataIndex: "credits",
|
||||
key: "credits",
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
title: 'Occupation',
|
||||
@@ -187,6 +211,7 @@ export default defineComponent({
|
||||
// resizable: true,
|
||||
dataIndex: "occupation",
|
||||
key: "occupation",
|
||||
width:100,
|
||||
},
|
||||
{
|
||||
title: 'Trial Order Id',
|
||||
@@ -196,11 +221,14 @@ export default defineComponent({
|
||||
// resizable: true,
|
||||
dataIndex: "trialOrderId",
|
||||
key: "trialOrderId",
|
||||
width:100,
|
||||
},
|
||||
];
|
||||
});
|
||||
|
||||
let allUserList: any = ref([]);
|
||||
let allUserList: any = computed(()=>{
|
||||
return store.state.adminPage.allUserList
|
||||
})
|
||||
let ids = ref([])
|
||||
let email = ref('')
|
||||
let dataList: any = ref([]);
|
||||
@@ -237,10 +265,6 @@ export default defineComponent({
|
||||
let historyTable: any = this.$refs.historyTable;
|
||||
this.historyTableHeight = historyTable.clientHeight - 200;
|
||||
this.gettrialList();
|
||||
let allUserList: any = sessionStorage.getItem("allUserList");
|
||||
if (allUserList) {
|
||||
this.allUserList = JSON.parse(allUserList);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//改变页码
|
||||
|
||||
306
src/component/Administrator/affiliate/affiliateAudit.vue
Normal file
306
src/component/Administrator/affiliate/affiliateAudit.vue
Normal file
@@ -0,0 +1,306 @@
|
||||
<template>
|
||||
<div class="admin_page">
|
||||
<div class="admin_table_search">
|
||||
<div class="admin_state">
|
||||
<div class="admin_state_item">
|
||||
<span>Start Time:</span>
|
||||
<a-range-picker
|
||||
style="width:280px"
|
||||
class="range_picker"
|
||||
v-model:value="rangePickerValue"
|
||||
:allowClear="false"
|
||||
:placeholder="[
|
||||
$t('HistoryPage.StartDate'),
|
||||
$t('HistoryPage.EndDate'),
|
||||
]"
|
||||
valueFormat="YYYY-MM-DD"
|
||||
>
|
||||
<template #suffixIcon>
|
||||
<span
|
||||
class="icon iconfont range_picker_icon icon-rili"
|
||||
></span>
|
||||
</template>
|
||||
</a-range-picker>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>State:</span>
|
||||
<a-select v-model:value="currentState.value" size="large" style="width:280px" optionFilterProp="label" :options="state" placeholder="Please select" allowClear show-search></a-select>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>Affiliate Id:</span>
|
||||
<input
|
||||
style="width:280px"
|
||||
v-model="affiliateId"
|
||||
placeholder="Please enter Affiliate Id"
|
||||
@keydown.enter="gettrialList"
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="admin_search">
|
||||
<div class="admin_search_item" @click="searchHistoryList">Search</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin_table_content" ref="historyTable">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="collectionList"
|
||||
:scroll="{ y: historyTableHeight }"
|
||||
@change="changePage"
|
||||
|
||||
>
|
||||
<template
|
||||
#bodyCell="{ column, text, record, index }"
|
||||
>
|
||||
<div
|
||||
class="operate_list"
|
||||
v-if="column?.Operations && record.status == 'Pending'"
|
||||
>
|
||||
<div v-show="status == 0" class="operate_item" @click="setAgree(record, true)">
|
||||
agree
|
||||
</div>
|
||||
<div v-show="status == 0" class="operate_item" @click="setAgree(record, false)" >
|
||||
refuse
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="column?.Operations">
|
||||
{{ record.status }}
|
||||
</div>
|
||||
<div v-else-if="column?.openType" @click="openDetail(record,column?.openType)">
|
||||
{{ text }} HDK
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<itemAffiliateDetail ref="itemAffiliateDetail"></itemAffiliateDetail>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, createVNode, computed } from "vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { Modal, message } from "ant-design-vue";
|
||||
import itemAffiliateDetail from "./itemAffiliateDetail.vue";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
itemAffiliateDetail,
|
||||
},
|
||||
setup() {
|
||||
let renameData: any = ref({}); //修改名字选中的数据
|
||||
const columns: any = computed(() => {
|
||||
return [
|
||||
{
|
||||
title: 'Id',
|
||||
align: "center",
|
||||
width: 50,
|
||||
dataIndex: "id",
|
||||
key: "id",
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: 'Create Time',
|
||||
align: "center",
|
||||
width: 200,
|
||||
dataIndex: "createTime",
|
||||
key: "createTime",
|
||||
sorter: true,
|
||||
},{
|
||||
title: 'State',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
dataIndex: "status",
|
||||
key: "status",
|
||||
|
||||
},{
|
||||
title: 'Updata Time',
|
||||
align: "center",
|
||||
width: 200,
|
||||
dataIndex: "updateTime",
|
||||
key: "updateTime",
|
||||
|
||||
},{
|
||||
title: 'Total income',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
dataIndex: "totalEarnings",
|
||||
key: "totalEarnings",
|
||||
openType:'month',
|
||||
},{
|
||||
title: 'Monthly income',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
dataIndex: "monthlyEarnings",
|
||||
key: "monthlyEarnings",
|
||||
openType:'all',
|
||||
},{
|
||||
title: 'Invitation Link',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
width: 250,
|
||||
dataIndex: "link",
|
||||
key: "link",
|
||||
},{
|
||||
title: 'Unpaid amount',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
dataIndex: "unpaidEarnings",
|
||||
key: "unpaidEarnings",
|
||||
},
|
||||
{
|
||||
title: 'Operations',
|
||||
key: "operation",
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
width: 130,
|
||||
// slots:{customRender:'action'}
|
||||
Operations: true,
|
||||
|
||||
},
|
||||
];
|
||||
});
|
||||
let currentState = ref({
|
||||
label:'All',
|
||||
value:'',
|
||||
state:false,
|
||||
},)
|
||||
let state:any = ref([
|
||||
{
|
||||
label:'All',
|
||||
value:'',
|
||||
},
|
||||
{
|
||||
label:'Pending',
|
||||
value:'Pending',
|
||||
},
|
||||
{
|
||||
label:'Active',
|
||||
value:'Active',
|
||||
},
|
||||
{
|
||||
label:'Inactive',
|
||||
value:'Inactive',
|
||||
},
|
||||
{
|
||||
label:'Refused',
|
||||
value:'Refused',
|
||||
},
|
||||
])
|
||||
const itemAffiliateDetail = ref()
|
||||
let collectionList: any = ref([]);
|
||||
let status: any = ref(0);
|
||||
const openDetail = (value:any,openType:string)=>{
|
||||
console.log(value,openType);
|
||||
let data = {
|
||||
id:value.id,
|
||||
type:openType
|
||||
}
|
||||
itemAffiliateDetail.value.init(data)
|
||||
}
|
||||
return {
|
||||
columns,
|
||||
collectionList,
|
||||
renameData,
|
||||
status,
|
||||
currentState,
|
||||
itemAffiliateDetail,
|
||||
state,
|
||||
openDetail,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
rangePickerValue:[],
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
order:'',
|
||||
affiliateId:'',
|
||||
historyTableHeight: 0,
|
||||
newCollectionName: "",
|
||||
renameVisivle: false, //修改名字弹窗
|
||||
collectionName: "", //选中的名字
|
||||
searchCollectionName: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let historyTable: any = this.$refs.historyTable;
|
||||
this.historyTableHeight = historyTable.clientHeight - 200;
|
||||
this.gettrialList();
|
||||
},
|
||||
methods: {
|
||||
//改变页码
|
||||
changePage(e: any, filters:any, sorter:any) {
|
||||
this.currentPage = e.current;
|
||||
this.pageSize = e.pageSize;
|
||||
this.order = sorter.order == "descend" ? "DESC" : "ASC";
|
||||
this.gettrialList();
|
||||
},
|
||||
//查询列表
|
||||
searchHistoryList() {
|
||||
this.currentPage = 1;
|
||||
this.gettrialList();
|
||||
},
|
||||
//获取列表
|
||||
gettrialList() {
|
||||
let startDate: any = this.rangePickerValue?.[0]
|
||||
? this.rangePickerValue[0]+' '+'00:00:00'
|
||||
: "";
|
||||
let endDate: any = this.rangePickerValue?.[1]
|
||||
? this.rangePickerValue[1]+' '+'00:00:00'
|
||||
: "";
|
||||
let data = {
|
||||
page: this.currentPage,
|
||||
size: this.pageSize,
|
||||
order: this.order,
|
||||
status: this.currentState.value,
|
||||
startTime:startDate,
|
||||
endTime:endDate,
|
||||
affiliateId:this.affiliateId
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.affiliateList, data).then(
|
||||
(rv: any) => {
|
||||
this.collectionList = rv.records;
|
||||
this.total=rv.total
|
||||
}
|
||||
);
|
||||
},
|
||||
setAgree(record: any, boolean: boolean){
|
||||
// const formData = new FormData()
|
||||
// formData.append('id',record.id)
|
||||
// formData.append('isApproved ',boolean+'')
|
||||
let data = {
|
||||
id:record.id,
|
||||
isApproved: boolean,
|
||||
|
||||
}
|
||||
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
|
||||
Https.axiosGet(Https.httpUrls.affiliateApproval, {params:data}).then(
|
||||
(rv: any) => {
|
||||
if(boolean){
|
||||
message.success('同意成功~')
|
||||
}else{
|
||||
message.success('拒绝成功~')
|
||||
}
|
||||
this.gettrialList();
|
||||
}
|
||||
);
|
||||
},
|
||||
setState(){
|
||||
this.currentState.state = true
|
||||
},
|
||||
setStateItem(item:any){
|
||||
this.currentState = item
|
||||
this.currentState.state = false
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.admin_page .admin_table_content .operate_list{
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
228
src/component/Administrator/affiliate/itemAffiliateDetail.vue
Normal file
228
src/component/Administrator/affiliate/itemAffiliateDetail.vue
Normal file
@@ -0,0 +1,228 @@
|
||||
<template>
|
||||
<div class="itemAffiliateDetail" ref="itemAffiliateDetail"></div>
|
||||
<a-modal class="generalModel"
|
||||
v-model:visible="itemAffiliateDetailShow"
|
||||
:footer="null"
|
||||
:get-container="() => $refs.itemAffiliateDetail"
|
||||
width="75%"
|
||||
:maskClosable="false"
|
||||
:centered="true"
|
||||
:closable="false"
|
||||
:mask="true"
|
||||
wrapClassName="#app"
|
||||
>
|
||||
<div class="generalModel_btn">
|
||||
<div class="generalModel_closeIcon" @click.stop="cancelDsign()">
|
||||
<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="23" cy="23" r="23" fill="white" fill-opacity="0.3"/>
|
||||
<rect x="32.5063" y="12" width="3" height="29" rx="1.5" transform="rotate(45 32.5063 12)" fill="white"/>
|
||||
<rect x="34.6274" y="32.5059" width="3" height="29" rx="1.5" transform="rotate(135 34.6274 32.5059)" fill="white"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="admin_page">
|
||||
<div class="admin_state_item">
|
||||
<span>Start Time:</span>
|
||||
<a-range-picker
|
||||
style="width:280px"
|
||||
class="range_picker"
|
||||
v-model:value="rangePickerValue"
|
||||
:allowClear="false"
|
||||
:placeholder="[
|
||||
$t('HistoryPage.StartDate'),
|
||||
$t('HistoryPage.EndDate'),
|
||||
]"
|
||||
valueFormat="YYYY-MM-DD"
|
||||
>
|
||||
<template #suffixIcon>
|
||||
<span
|
||||
class="icon iconfont range_picker_icon icon-rili"
|
||||
></span>
|
||||
</template>
|
||||
</a-range-picker>
|
||||
<div class="gallery_btn" @click="getDetailList" style="margin-left: 2rem;">Search</div>
|
||||
</div>
|
||||
<div class="itemAffiliateDetail_content generalModel_table_content" ref="historyTable">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="collectionList"
|
||||
:scroll="{ y: 200 }"
|
||||
@change="changePage"
|
||||
:pagination="{
|
||||
showSizeChanger: true,
|
||||
current: currentPage,
|
||||
pageSize: pageSize,
|
||||
total: total,
|
||||
showQuickJumper: true,
|
||||
bordered: false,
|
||||
}"
|
||||
>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, createVNode, computed, reactive, toRefs, nextTick } from "vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { Modal, message } from "ant-design-vue";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
},
|
||||
setup() {
|
||||
let renameData: any = ref({}); //修改名字选中的数据
|
||||
const itemAffiliateDom = reactive({
|
||||
historyTable:null as any,
|
||||
})
|
||||
const itemAffiliateDetail = reactive({
|
||||
itemAffiliateDetailShow:false,
|
||||
loadingShow:false,
|
||||
rangePickerValue:[] as any,
|
||||
itemId:-1,
|
||||
collectionList:[],
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
order:'',
|
||||
total: 0,
|
||||
historyTableHeight:0,
|
||||
columns:computed(() => {
|
||||
return [
|
||||
{
|
||||
title: 'Id',
|
||||
align: "center",
|
||||
width: 50,
|
||||
dataIndex: "accountId",
|
||||
key: "accountId",
|
||||
fixed: "left",
|
||||
},{
|
||||
title: 'User Name',
|
||||
key: "username",
|
||||
dataIndex: "username",
|
||||
align: "center",
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: 'Time',
|
||||
align: "center",
|
||||
width: 200,
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
sorter: true,
|
||||
},{
|
||||
title: 'First Subscription Payment Amount',
|
||||
align: "center",
|
||||
width: 200,
|
||||
dataIndex: "firstSubscriptionPaymentAmount",
|
||||
key: "firstSubscriptionPaymentAmount",
|
||||
},{
|
||||
title: 'Commission',
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
width: 150,
|
||||
dataIndex: "commission",
|
||||
key: "commission",
|
||||
fixed: "right",
|
||||
}
|
||||
|
||||
];
|
||||
})
|
||||
})
|
||||
const init = (value:any)=>{
|
||||
itemAffiliateDetail.itemAffiliateDetailShow = true
|
||||
getCurrentMonthStart(value.type)
|
||||
nextTick(()=>{
|
||||
itemAffiliateDetail.historyTableHeight = itemAffiliateDom.historyTable.clientHeight - 40;
|
||||
itemAffiliateDetail.itemId = value.id
|
||||
getDetailList()
|
||||
})
|
||||
|
||||
}
|
||||
const cancelDsign = () =>{
|
||||
itemAffiliateDetail.itemAffiliateDetailShow = false
|
||||
itemAffiliateDetail.loadingShow = false
|
||||
}
|
||||
const getCurrentMonthStart = (type:any) => {
|
||||
const now = new Date(); // 获取当前日期
|
||||
const year = now.getFullYear(); // 获取当前年份
|
||||
const month = now.getMonth(); // 获取当前月份(0 - 11)
|
||||
let startOfPeriod:any, endOfPeriod:any;
|
||||
if (type === 'month') {
|
||||
startOfPeriod = new Date(year, month, 1);
|
||||
endOfPeriod = new Date(year, month + 1, 0); // 下个月的第0天即为当前月的最后一天
|
||||
|
||||
startOfPeriod.setHours(0, 0, 0, 0);
|
||||
endOfPeriod.setHours(23, 59, 59, 999); // 设置为最后一天的23:59:59.999
|
||||
} else if (type === 'year') {
|
||||
startOfPeriod = new Date(year, 0, 1);
|
||||
endOfPeriod = new Date(year, 11, 31);
|
||||
}
|
||||
|
||||
const formatDate = (date:any) => {
|
||||
return date.getFullYear() + '-' +
|
||||
String(date.getMonth() + 1).padStart(2, '0') + '-' +
|
||||
String(date.getDate()).padStart(2, '0') + ' ' +
|
||||
String(date.getHours()).padStart(2, '0') + ':' +
|
||||
String(date.getMinutes()).padStart(2, '0') + ':' +
|
||||
String(date.getSeconds()).padStart(2, '0');
|
||||
};
|
||||
if (type === 'month')itemAffiliateDetail.rangePickerValue = [formatDate(startOfPeriod),formatDate(endOfPeriod)]
|
||||
|
||||
}
|
||||
|
||||
|
||||
const changePage = (e: any, filters:any, sorter:any)=>{
|
||||
itemAffiliateDetail.currentPage = e.current;
|
||||
itemAffiliateDetail.pageSize = e.pageSize;
|
||||
itemAffiliateDetail.order = sorter.order == "descend" ? "DESC" : "ASC";
|
||||
getDetailList();
|
||||
}
|
||||
const getDetailList = ()=>{
|
||||
itemAffiliateDetail.loadingShow = true
|
||||
let startDate: any = itemAffiliateDetail.rangePickerValue?.[0]
|
||||
? itemAffiliateDetail.rangePickerValue[0]+' '+'00:00:00'
|
||||
: "";
|
||||
let endDate: any = itemAffiliateDetail.rangePickerValue?.[1]
|
||||
? itemAffiliateDetail.rangePickerValue[1]+' '+'00:00:00'
|
||||
: "";
|
||||
let data = {
|
||||
affiliateId:itemAffiliateDetail.itemId,
|
||||
endTime:endDate,
|
||||
startTime:startDate,
|
||||
order:itemAffiliateDetail.order,
|
||||
page: itemAffiliateDetail.currentPage,
|
||||
size: itemAffiliateDetail.pageSize,
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.getEachAffiliateGeneratedRevenue,data).then((rv:any)=>{
|
||||
console.log(rv);
|
||||
itemAffiliateDetail.collectionList = rv.records
|
||||
itemAffiliateDetail.loadingShow = false
|
||||
itemAffiliateDetail.total=rv.total
|
||||
}).catch((err:any)=>{
|
||||
itemAffiliateDetail.loadingShow = false
|
||||
})
|
||||
|
||||
}
|
||||
return {
|
||||
...toRefs(itemAffiliateDom),
|
||||
...toRefs(itemAffiliateDetail),
|
||||
init,
|
||||
cancelDsign,
|
||||
changePage,
|
||||
getDetailList,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.itemAffiliateDetail{
|
||||
.itemAffiliateDetail_content{
|
||||
margin-top: 2rem;
|
||||
}
|
||||
.admin_page .admin_table_content .operate_list{
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -88,7 +88,7 @@
|
||||
class="admin_state_list_item"
|
||||
@click="lastGeTrialList('year')"
|
||||
>
|
||||
Last year
|
||||
Nearly a year
|
||||
</div>
|
||||
<div
|
||||
class="admin_state_list_item"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<div class="admin_search_item" @click="searchHistoryList">Search</div>
|
||||
</div>
|
||||
<div class="admin_state_list">
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Last year</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
|
||||
</div>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="admin_search_item" @click="searchHistoryList">Search</div>
|
||||
</div>
|
||||
<div class="admin_state_list">
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Last year</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
|
||||
</div>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<div class="admin_search_item" @click="searchHistoryList">Search</div>
|
||||
</div>
|
||||
<div class="admin_state_list">
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Last year</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="admin_search_item" @click="searchHistoryList">Search</div>
|
||||
</div>
|
||||
<div class="admin_state_list">
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Last year</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="admin_search_item" @click="searchHistoryList">Search</div>
|
||||
</div>
|
||||
<div class="admin_state_list">
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Last year</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
|
||||
</div>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<div class="admin_search_item" @click="searchHistoryList">Search</div>
|
||||
</div>
|
||||
<div class="admin_state_list">
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Last year</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
|
||||
</div>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<div
|
||||
v-show="status == 0"
|
||||
class="operate_item"
|
||||
@click="setAagree(record, index)"
|
||||
@click="setAgree(record, index)"
|
||||
>
|
||||
agree
|
||||
</div>
|
||||
@@ -67,7 +67,6 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, createVNode, computed } from "vue";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { Https } from "@/tool/https";
|
||||
import { Modal, message } from "ant-design-vue";
|
||||
export default defineComponent({
|
||||
@@ -184,14 +183,12 @@ export default defineComponent({
|
||||
},
|
||||
])
|
||||
let collectionList: any = ref([]);
|
||||
let userInfo: any = {};
|
||||
let status: any = ref(0);
|
||||
let voluntarily: any = ref(false);
|
||||
return {
|
||||
columns,
|
||||
collectionList,
|
||||
renameData,
|
||||
userInfo,
|
||||
status,
|
||||
currentState,
|
||||
state,
|
||||
@@ -214,8 +211,6 @@ export default defineComponent({
|
||||
let historyTable: any = this.$refs.historyTable;
|
||||
this.historyTableHeight = historyTable.clientHeight - 200;
|
||||
this.gettrialList();
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
this.userInfo = JSON.parse(userInfo);
|
||||
this.getIsAutoApproval()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -2,10 +2,34 @@
|
||||
<div class="recentNewUserChart admin_page">
|
||||
<div class="admin_table_search">
|
||||
<div class="admin_state">
|
||||
<div class="admin_state_item">
|
||||
<span>Select Time:</span>
|
||||
<a-range-picker
|
||||
style="width:250px"
|
||||
class="range_picker"
|
||||
v-model:value="rangePickerValue"
|
||||
:placeholder="[
|
||||
$t('HistoryPage.StartDate'),
|
||||
$t('HistoryPage.EndDate'),
|
||||
]"
|
||||
valueFormat="YYYY-MM-DD"
|
||||
>
|
||||
<template #suffixIcon>
|
||||
<span
|
||||
class="icon iconfont range_picker_icon icon-rili"
|
||||
></span>
|
||||
</template>
|
||||
</a-range-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="admin_search">
|
||||
|
||||
</div>
|
||||
<div class="admin_search">
|
||||
<div class="admin_search_item" @click="searchHistoryList">Search</div>
|
||||
</div>
|
||||
<div class="admin_state_list">
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin_table_content" ref="pageChartDom"></div>
|
||||
@@ -43,9 +67,34 @@ export default defineComponent({
|
||||
let searchHistoryList = () => {
|
||||
gettrialList();
|
||||
};
|
||||
let lastGeTrialList = (str:string)=>{
|
||||
let currentDate = new Date();
|
||||
let currentTimestamp = Math.floor(currentDate.getTime() / 1000);
|
||||
// 计算30天前的时间戳
|
||||
let thirtyDaysAgoTimestamp
|
||||
if(str == 'year'){
|
||||
thirtyDaysAgoTimestamp = currentTimestamp - (360 * 24 * 60 * 60);
|
||||
}else if(str == 'month'){
|
||||
thirtyDaysAgoTimestamp = currentTimestamp - (30 * 24 * 60 * 60);
|
||||
}else if(str == 'week'){
|
||||
thirtyDaysAgoTimestamp = currentTimestamp - (7 * 24 * 60 * 60);
|
||||
}
|
||||
filterData.rangePickerValue = [formatTime(thirtyDaysAgoTimestamp,'YYYY-MM-DD'),formatTime(currentTimestamp,'YYYY-MM-DD')]
|
||||
gettrialList();
|
||||
}
|
||||
//获取列表
|
||||
let gettrialList = async () => {
|
||||
Https.axiosGet(Https.httpUrls.conversionRate).then((rv: any) => {
|
||||
let startDate: any = filterData.rangePickerValue?.[0]
|
||||
? filterData.rangePickerValue[0]+' '+'00:00:00'
|
||||
: "";
|
||||
let endDate: any = filterData.rangePickerValue?.[1]
|
||||
? filterData.rangePickerValue[1]+' '+'00:00:00'
|
||||
: "";
|
||||
let data = {
|
||||
endTime:endDate,
|
||||
startTime:startDate,
|
||||
}
|
||||
Https.axiosGet(Https.httpUrls.conversionRate,{params:data}).then((rv: any) => {
|
||||
if (rv) {
|
||||
let entries:any = Object.entries(rv);
|
||||
let data: any = [];
|
||||
@@ -99,7 +148,8 @@ export default defineComponent({
|
||||
},
|
||||
legend: {
|
||||
top: '10%',
|
||||
left: 'center'
|
||||
left: 'center',
|
||||
// formatter: '{a} <br/>{b}'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
@@ -120,10 +170,10 @@ export default defineComponent({
|
||||
show: true,
|
||||
fontSize: 30,
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
show: false,
|
||||
},
|
||||
data: data
|
||||
}
|
||||
@@ -141,6 +191,7 @@ export default defineComponent({
|
||||
return {
|
||||
...toRefs(filter),
|
||||
...toRefs(filterData),
|
||||
lastGeTrialList,
|
||||
searchHistoryList,
|
||||
gettrialList,
|
||||
pageChartDom,
|
||||
|
||||
@@ -1,11 +1,35 @@
|
||||
<template>
|
||||
<div class="recentNewUserChart admin_page">
|
||||
<div class="admin_table_search">
|
||||
<div class="admin_state">
|
||||
</div>
|
||||
<div class="admin_search">
|
||||
|
||||
<div class="admin_state">
|
||||
<div class="admin_state_item">
|
||||
<span>Select Time:</span>
|
||||
<a-range-picker
|
||||
style="width:250px"
|
||||
class="range_picker"
|
||||
v-model:value="rangePickerValue"
|
||||
:placeholder="[
|
||||
$t('HistoryPage.StartDate'),
|
||||
$t('HistoryPage.EndDate'),
|
||||
]"
|
||||
valueFormat="YYYY-MM-DD"
|
||||
>
|
||||
<template #suffixIcon>
|
||||
<span
|
||||
class="icon iconfont range_picker_icon icon-rili"
|
||||
></span>
|
||||
</template>
|
||||
</a-range-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="admin_search">
|
||||
<div class="admin_search_item" @click="searchHistoryList">Search</div>
|
||||
</div>
|
||||
<div class="admin_state_list">
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('year')">Nearly a year</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('month')">Last month</div>
|
||||
<div class="admin_state_list_item" @click="lastGeTrialList('week')">Last week</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin_table_content" ref="pageChartDom"></div>
|
||||
@@ -61,9 +85,34 @@ export default defineComponent({
|
||||
let searchHistoryList = () => {
|
||||
gettrialList();
|
||||
};
|
||||
let lastGeTrialList = (str:string)=>{
|
||||
let currentDate = new Date();
|
||||
let currentTimestamp = Math.floor(currentDate.getTime() / 1000);
|
||||
// 计算30天前的时间戳
|
||||
let thirtyDaysAgoTimestamp
|
||||
if(str == 'year'){
|
||||
thirtyDaysAgoTimestamp = currentTimestamp - (360 * 24 * 60 * 60);
|
||||
}else if(str == 'month'){
|
||||
thirtyDaysAgoTimestamp = currentTimestamp - (30 * 24 * 60 * 60);
|
||||
}else if(str == 'week'){
|
||||
thirtyDaysAgoTimestamp = currentTimestamp - (7 * 24 * 60 * 60);
|
||||
}
|
||||
filterData.rangePickerValue = [formatTime(thirtyDaysAgoTimestamp,'YYYY-MM-DD'),formatTime(currentTimestamp,'YYYY-MM-DD')]
|
||||
gettrialList();
|
||||
}
|
||||
//获取列表
|
||||
let gettrialList = async () => {
|
||||
Https.axiosGet(Https.httpUrls.trialUserCountry).then((rv: any) => {
|
||||
let startDate: any = filterData.rangePickerValue?.[0]
|
||||
? filterData.rangePickerValue[0]+' '+'00:00:00'
|
||||
: "";
|
||||
let endDate: any = filterData.rangePickerValue?.[1]
|
||||
? filterData.rangePickerValue[1]+' '+'00:00:00'
|
||||
: "";
|
||||
let data = {
|
||||
endTime:endDate,
|
||||
startTime:startDate,
|
||||
}
|
||||
Https.axiosGet(Https.httpUrls.trialUserCountry,{params:data}).then((rv: any) => {
|
||||
if (rv) {
|
||||
let data: any = [];
|
||||
rv.names.forEach((item: any, index: number) => {
|
||||
@@ -137,6 +186,7 @@ export default defineComponent({
|
||||
return {
|
||||
...toRefs(filter),
|
||||
...toRefs(filterData),
|
||||
lastGeTrialList,
|
||||
state,
|
||||
searchHistoryList,
|
||||
gettrialList,
|
||||
|
||||
@@ -185,7 +185,6 @@ import { Modal,message } from 'ant-design-vue';
|
||||
import {getUploadUrl,isMoible,setGradual} from '@/tool/util'
|
||||
import { useStore } from "vuex";
|
||||
import { openGuide,driverObj__ } from "@/tool/guide";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import addDetails from '@/component/Detail/addDetails.vue'
|
||||
export default defineComponent({
|
||||
@@ -204,6 +203,9 @@ export default defineComponent({
|
||||
let designItemDetail :any = computed(()=>{
|
||||
return store.state.DesignDetailModule.designItemDetail
|
||||
})
|
||||
const userDetail = computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
let parentData:any = ref({
|
||||
design:{},
|
||||
index:0,
|
||||
@@ -224,7 +226,6 @@ export default defineComponent({
|
||||
let body = ref(false)
|
||||
let designItemId = ref()
|
||||
let designOutfitId = ref()
|
||||
let userInfo:any = {}
|
||||
let ifSubmit = ref(false)
|
||||
let designItemDetailUrl = ref({})
|
||||
let setRevocationShow = ref(false)//判断是不是第一次进来和切换下一张
|
||||
@@ -252,6 +253,7 @@ export default defineComponent({
|
||||
|
||||
return{
|
||||
designItemDetail,
|
||||
userDetail,
|
||||
store,
|
||||
parentData,
|
||||
others,
|
||||
@@ -261,7 +263,6 @@ export default defineComponent({
|
||||
body,
|
||||
designItemId,
|
||||
designOutfitId,
|
||||
userInfo,
|
||||
ifSubmit,
|
||||
designItemDetailUrl,
|
||||
setRevocationShow,
|
||||
@@ -386,8 +387,6 @@ export default defineComponent({
|
||||
window.removeEventListener('beforeunload',beforeunload)
|
||||
}
|
||||
window.addEventListener('beforeunload',beforeunload)
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
this.userInfo = JSON.parse(userInfo);
|
||||
// let url = Https.httpUrls.getDesignDetail + `?designItemId=34242&designPythonOutfitId=34004`
|
||||
// this.loadingShow = true
|
||||
// Https.axiosGet(url).then(
|
||||
@@ -783,7 +782,7 @@ export default defineComponent({
|
||||
isPreview:false,
|
||||
sketchString:'',
|
||||
ifSubmit:designItemDetail.isPreview,
|
||||
processId:String(this.userInfo?.userId),
|
||||
processId:this.userDetail.userId,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
}
|
||||
if(str == 'preview'){
|
||||
|
||||
@@ -51,12 +51,10 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent,watch,createVNode, h, ref ,toRefs,computed,reactive,triggerRef, nextTick} from "vue";
|
||||
// import { getCookie } from "@/tool/cookie";
|
||||
import { message,Modal } from "ant-design-vue";
|
||||
import { LoadingOutlined ,ExclamationCircleOutlined} from "@ant-design/icons-vue";
|
||||
|
||||
import { Https } from "@/tool/https";
|
||||
import { getCookie,setCookie } from "@/tool/cookie";
|
||||
// import domTurnImg from '@/tool/domTurnImg'
|
||||
import { downloadIamge } from "@/tool/util";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
@@ -70,9 +70,6 @@ export default defineComponent({
|
||||
isNoData:false,//如果数据为空就不加载
|
||||
loadingShow:{},
|
||||
})
|
||||
let systemUser = computed(()=>{
|
||||
return store.state.UserHabit.systemUser
|
||||
})
|
||||
let likeFile = (item:any,type:string) => {
|
||||
}
|
||||
let setBack = ()=>{
|
||||
@@ -112,7 +109,6 @@ export default defineComponent({
|
||||
})
|
||||
return {
|
||||
...toRefs(filter),
|
||||
systemUser,
|
||||
likeFile,
|
||||
setBack,
|
||||
openButton,
|
||||
|
||||
@@ -166,7 +166,6 @@ import { Https } from "@/tool/https";
|
||||
import GO from "@/tool/GO";
|
||||
import { defineComponent, h,ref,inject, nextTick } from 'vue'
|
||||
import { LoadingOutlined } from '@ant-design/icons-vue';
|
||||
import {getCookie} from '@/tool/cookie'
|
||||
import {getUploadUrl,rgbToHsv,isMoible} from '@/tool/util'
|
||||
import {useStore} from 'vuex'
|
||||
import ColorThief from '@/tool/colorthief/colorthief'
|
||||
@@ -351,7 +350,6 @@ export default defineComponent({
|
||||
level1Type:'Moodboard',
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
},
|
||||
token:'',
|
||||
uploadUrl:'',
|
||||
store:useStore(),
|
||||
colorPickerVisible: true,
|
||||
@@ -361,7 +359,6 @@ export default defineComponent({
|
||||
},
|
||||
mounted(){
|
||||
nextTick(()=>{
|
||||
this.token = getCookie('token') || ''
|
||||
this.uploadUrl = getUploadUrl()
|
||||
|
||||
})
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
<label class="uploadImage">
|
||||
<i class="fi fi-br-upload" ></i>
|
||||
<input type="file" @change="uploadImage">
|
||||
<input type="file" @change="uploadImage" accept="image/*">
|
||||
</label>
|
||||
<i class="icon iconfont" @click="setOperation('text')" :class="{active:operation == 'text'}">T</i>
|
||||
<i class="icon iconfont icon-IC-yehua" @click="setLiquefaction()"></i>
|
||||
@@ -302,7 +302,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {defineComponent, computed, h, ref, nextTick, inject, reactive, onMounted,
|
||||
import {defineComponent, computed, h, ref, nextTick, inject, reactive, onMounted,onBeforeUnmount
|
||||
} from "vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
@@ -734,6 +734,7 @@ export default defineComponent({
|
||||
imgUrl = data.designOutfitUrl;
|
||||
imgWidth[key] = setImageWidth(key,img);
|
||||
}
|
||||
if(key == 'upImgFiles')imgWidth[key] = setImageWidth(key,img);
|
||||
|
||||
let url = imgUrl.split('?')[0]
|
||||
var match = url.match(/:(\d+)\/(.*)/);
|
||||
@@ -1197,8 +1198,10 @@ export default defineComponent({
|
||||
// let brushwork = ref('')
|
||||
// 监听键盘的 keydown 和 keyup 事件
|
||||
let keyDown = []
|
||||
let oldOperation = ''
|
||||
let canvasKeyDown = (event) => {
|
||||
if(keyDown.indexOf(event.key)>-1){
|
||||
event.preventDefault();
|
||||
if(keyDown.indexOf(event.code)>-1){
|
||||
}else{
|
||||
keyDown.push(event.code)
|
||||
if(event.key === 'Enter' && operation.value == 'fold'){
|
||||
@@ -1213,13 +1216,54 @@ export default defineComponent({
|
||||
copy()
|
||||
}else if(keyDown.indexOf('ControlLeft') > -1 && keyDown.indexOf('KeyV') > -1){
|
||||
paste()
|
||||
}else if(keyDown.indexOf('BracketLeft') > -1){
|
||||
let width = canvasPencilWidth.value[operation.value]
|
||||
console.log(width);
|
||||
canvasPencilWidth.value[operation.value] = (width - 5) < 3?3:(width - 5)
|
||||
console.log(canvasPencilWidth.value[operation.value]);
|
||||
setPencilWidth()
|
||||
}else if(keyDown.indexOf('BracketRight') > -1){
|
||||
let width = canvasPencilWidth.value[operation.value]
|
||||
canvasPencilWidth.value[operation.value] = (width + 5) > 50?50:(width + 5)
|
||||
setPencilWidth()
|
||||
}else if(keyDown.indexOf('KeyI') > -1){
|
||||
getColor()//吸色
|
||||
}else if(keyDown.indexOf('ControlLeft') > -1 && keyDown.indexOf('KeyD') > -1){
|
||||
canvas.discardActiveObject().renderAll();
|
||||
}else if(keyDown.indexOf('ControlLeft') > -1 && keyDown.indexOf('KeyO') > -1){
|
||||
let input = document.querySelector('.uploadImage input')
|
||||
input.click()
|
||||
}else if(keyDown.indexOf('Backquote') > -1){
|
||||
if(operation.value == 'pencil' || operation.value == 'texture'){
|
||||
oldOperation = operation.value
|
||||
setOperation('eraser')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let getColor = async ()=>{
|
||||
try {
|
||||
const dropper = new EyeDropper();
|
||||
const result = await dropper.open();
|
||||
let hex = result.sRGBHex.replace("#", "");
|
||||
// 将十六进制颜色码拆分成红、绿、蓝三个部分
|
||||
// const r = parseInt(hex.substring(0, 2), 16);
|
||||
// const g = parseInt(hex.substring(2, 4), 16);
|
||||
// const b = parseInt(hex.substring(4, 6), 16);
|
||||
canvasPencilColor.value = result.sRGBHex;
|
||||
setPencilColor()
|
||||
} catch (e) {
|
||||
message.info(this.t('ColorboardUpload.jsContent1'))
|
||||
}
|
||||
}
|
||||
let canvasKeyUp = (event) =>{
|
||||
keyDown = keyDown.filter(function(item) {
|
||||
return event.code !== item;
|
||||
})
|
||||
if(event.code == 'Backquote' && oldOperation){
|
||||
setOperation(oldOperation)
|
||||
oldOperation = ''
|
||||
}
|
||||
}
|
||||
let setCanvasKeyDown = (event)=>{
|
||||
// let e = event || window.event
|
||||
@@ -1378,6 +1422,7 @@ export default defineComponent({
|
||||
Https.axiosPost(Https.httpUrls.canvasElementUpload, formData,config).then((rv)=>{
|
||||
rv.imgUrl = rv.minioUrl
|
||||
fabric.Image.fromURL(rv.minioUrl,(img) => {
|
||||
console.log(canvas.wrapperEl.parentNode.scrollTop);
|
||||
setCanvasImage(img,"upImgFiles",0,canvas.wrapperEl.parentNode.scrollTop,rv)
|
||||
canvas.add(img);
|
||||
},{ crossOrigin: "Anonymous" })
|
||||
@@ -1570,6 +1615,7 @@ export default defineComponent({
|
||||
setFontFamily()
|
||||
return
|
||||
}
|
||||
console.log(canvasPencilColor.value);
|
||||
// brushIndicator.fill = canvasPencilColor.value;
|
||||
if(canvas.freeDrawingBrush.isEraser){
|
||||
}else{
|
||||
@@ -2061,6 +2107,10 @@ export default defineComponent({
|
||||
fontFamily.value = arr[0].value
|
||||
|
||||
});
|
||||
onBeforeUnmount(()=>{
|
||||
document.removeEventListener("keydown", setCanvasKeyDown);
|
||||
document.removeEventListener("keyup", clearCanvasKeyDown);
|
||||
})
|
||||
return {
|
||||
toSvg,
|
||||
t,
|
||||
|
||||
@@ -127,8 +127,27 @@
|
||||
@click.stop=""
|
||||
v-model="searchPictureName"
|
||||
></textarea>
|
||||
<div v-show="!isGenerate" class="generage_btn started_btn" :class="{Guide_1_2_8:type_.type2 == 'Printboard'}" @click.stop="getgenerate">
|
||||
{{ $t('Generate.Generate') }}
|
||||
<div class="generage_btn_box" v-show="!isGenerate">
|
||||
<div class="generage_btn started_btn">
|
||||
<div :class="{Guide_1_2_8:type_.type2 == 'Printboard'}" @click.stop="getgenerate">
|
||||
<span
|
||||
v-if="
|
||||
type_.type2 == 'Moodboard' ||
|
||||
(type_.type2 == 'Printboard' && scene?.value == 'Pattern') ||
|
||||
(type_.type2 == 'Sketchboard' && scene?.value == 'generate')"
|
||||
>
|
||||
{{ speedData.label }}
|
||||
</span>
|
||||
<span v-else>{{ $t('Generate.Generate') }}</span>
|
||||
</div>
|
||||
<div class="icon iconfont icon-xiala" v-show="
|
||||
type_.type2 == 'Moodboard' ||
|
||||
(type_.type2 == 'Printboard' && scene?.value == 'Pattern') ||
|
||||
(type_.type2 == 'Sketchboard' && scene?.value == 'generate')" :class="{active:speedState}" @click.stop="openSpeed"></div>
|
||||
</div>
|
||||
<div class="content" v-show="speedState">
|
||||
<div v-for="item in speedList" :key="item.value" @click="setSpeed(item)" :title="item.title">{{ item.label }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="isGenerate && !remGenerate" class="generage_btn started_btn" :class="{Guide_1_2_8:type_.type2 == 'Printboard'}" @click="getgenerate">
|
||||
<i class="fi fi-br-loading"></i>
|
||||
@@ -182,7 +201,7 @@
|
||||
<script lang="ts">
|
||||
import { LoadingOutlined } from "@ant-design/icons-vue";
|
||||
import { message, Upload, Modal } from "ant-design-vue";
|
||||
import { defineComponent, computed, createVNode, h, ref,watch, nextTick, inject } from "vue";
|
||||
import { defineComponent, computed, reactive, createVNode, h, ref,watch, nextTick, inject, toRefs } from "vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { useStore } from "vuex";
|
||||
import GO from "@/tool/GO";
|
||||
@@ -206,7 +225,9 @@ export default defineComponent({
|
||||
props: ["msg",'sketchCatecoryList','scene'],
|
||||
setup(props) {
|
||||
// console.log(prop.msg);
|
||||
|
||||
let userDetail:any= computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
let printModelList:any = ref([])
|
||||
let sketchStyleList:any = ref([])
|
||||
let printModel:any = ref({
|
||||
@@ -234,7 +255,6 @@ export default defineComponent({
|
||||
let driver__:any = inject('driver__')
|
||||
let {t} = useI18n()
|
||||
let isTest = ref()
|
||||
let userInfo:any = {}
|
||||
let generateTime:any = ref()
|
||||
let generateProceedList:any = ref([])
|
||||
let remGenerate:any = ref(false)
|
||||
@@ -243,7 +263,39 @@ export default defineComponent({
|
||||
let generateLevel2Type = ''
|
||||
let isSloganHint:any = ref(' ')
|
||||
let loadingShow =ref(false)
|
||||
let speed = reactive({
|
||||
speedList:[
|
||||
{
|
||||
title:'Picture quality is average, speed is fast',
|
||||
label:'Low Quality',
|
||||
value:'fast',
|
||||
|
||||
},{
|
||||
title:'Picture quality is high, speed is slow',
|
||||
label:'High Quality',
|
||||
value:'high',
|
||||
},
|
||||
],
|
||||
speedState:false,
|
||||
speedData:{
|
||||
title:'Picture quality is average, speed is fast',
|
||||
label:'Low Quality',
|
||||
value:'fast',
|
||||
},
|
||||
})
|
||||
const openSpeed = ()=>{
|
||||
speed.speedState = !speed.speedState
|
||||
if(speed.speedState){
|
||||
document.addEventListener('click',openSpeed)
|
||||
}else{
|
||||
document.removeEventListener('click',openSpeed)
|
||||
}
|
||||
}
|
||||
const setSpeed = (item:any)=>{
|
||||
speed.speedData = item
|
||||
}
|
||||
return {
|
||||
userDetail,
|
||||
searchPictureName,
|
||||
searchPictureSeed,
|
||||
store,
|
||||
@@ -264,7 +316,6 @@ export default defineComponent({
|
||||
driver__,
|
||||
t,
|
||||
isTest,
|
||||
userInfo,
|
||||
generateTime,
|
||||
generateProceedList,
|
||||
remGenerate,
|
||||
@@ -273,6 +324,9 @@ export default defineComponent({
|
||||
generateLevel2Type,
|
||||
isSloganHint,
|
||||
loadingShow,
|
||||
...toRefs(speed),
|
||||
openSpeed,
|
||||
setSpeed,
|
||||
};
|
||||
},
|
||||
data(prop) {
|
||||
@@ -309,8 +363,6 @@ export default defineComponent({
|
||||
// item.id_ = GO.id++
|
||||
// })
|
||||
// this.store.commit("addGenerateFils", this.fileList);
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
this.userInfo = JSON.parse(userInfo);
|
||||
this.token = getCookie("token") || "";
|
||||
let isTest:any = getCookie('isTest')
|
||||
this.isTest =JSON.parse(isTest)
|
||||
@@ -322,17 +374,17 @@ export default defineComponent({
|
||||
if(this.type_.type2 == 'Printboard'){
|
||||
this.printModelList = [
|
||||
{
|
||||
num:'',
|
||||
num:1,
|
||||
optype:false,
|
||||
value:'Painting Style',
|
||||
label:useI18n().t('Generate.Model1')
|
||||
},{
|
||||
num:'',
|
||||
num:2,
|
||||
optype:false,
|
||||
value:'Illustration Style',
|
||||
label:useI18n().t('Generate.Model2')
|
||||
},{
|
||||
num:'',
|
||||
num:3,
|
||||
optype:false,
|
||||
value:'Real Style',
|
||||
label:useI18n().t('Generate.Model3')
|
||||
@@ -340,7 +392,7 @@ export default defineComponent({
|
||||
]
|
||||
}else if(this.type_.type2 == 'Sketchboard'){
|
||||
this.printModelList = JSON.parse(JSON.stringify(this.store.state.UserHabit.SketchStyle))
|
||||
let imgList = ['/image/sketch/sketch-fine.jpg','/image/sketch/sketch-medium.jpg','/image/sketch/sketch-thick.jpg']
|
||||
let imgList = ['/image/sketch/sketch-thick.jpg','/image/sketch/sketch-medium.jpg','/image/sketch/sketch-fine.jpg']
|
||||
this.printModelList.forEach((item:any,index:number)=>{
|
||||
item.img = imgList[index]
|
||||
})
|
||||
@@ -536,9 +588,9 @@ export default defineComponent({
|
||||
level2Type:level2Type,
|
||||
text:sloganText,
|
||||
seed:this.searchPictureSeed,
|
||||
userId:this?.userInfo?.userId,
|
||||
userId:this?.userDetail?.userId,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
version:1,//为1就是Print
|
||||
version:this.speedData.value,//为1就是Print
|
||||
isTestUser:this.driver__.driver?false:this.isTest,
|
||||
gender:this.workspace.sexEnum.value,
|
||||
sloganBase64:base64,
|
||||
@@ -649,7 +701,7 @@ export default defineComponent({
|
||||
}
|
||||
let data = {
|
||||
uniqueId:str,
|
||||
userId:this?.userInfo?.userId,
|
||||
userId:this?.userDetail?.userId,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
type: type
|
||||
}
|
||||
|
||||
@@ -420,7 +420,6 @@ export default defineComponent({
|
||||
(rv) => {
|
||||
if (rv) {
|
||||
this.userInfo.email = this.email;
|
||||
setCookie("userInfo", JSON.stringify(this.userInfo));
|
||||
(this.bindEmailVisible = false),
|
||||
(this.bindEmailStep = 1);
|
||||
this.clearTimer();
|
||||
|
||||
@@ -85,7 +85,6 @@ export default defineComponent({
|
||||
let record:any = ref([
|
||||
|
||||
])
|
||||
const userInfo:any = {}
|
||||
let bloodBars:any = ref(0)
|
||||
let {t} = useI18n()
|
||||
let isTest = ref()
|
||||
@@ -95,6 +94,9 @@ export default defineComponent({
|
||||
return store.state.Guide.guide
|
||||
})
|
||||
let driver__Time:any = ref()
|
||||
let userDetail:any= computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
return {
|
||||
robotTop,
|
||||
robotInput,
|
||||
@@ -104,14 +106,14 @@ export default defineComponent({
|
||||
robotChildDom,
|
||||
timeTop,
|
||||
timeInput,
|
||||
userInfo,
|
||||
bloodBars,
|
||||
t,
|
||||
isTest,
|
||||
store,
|
||||
workspace,
|
||||
driver__,
|
||||
driver__Time
|
||||
driver__Time,
|
||||
userDetail
|
||||
};
|
||||
},
|
||||
data() {
|
||||
@@ -171,10 +173,8 @@ export default defineComponent({
|
||||
},
|
||||
mounted() {
|
||||
this.textScroll()
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
let isTest:any = getCookie('isTest')
|
||||
this.isTest =JSON.parse(isTest)
|
||||
this.userInfo = JSON.parse(userInfo);
|
||||
if (sessionStorage.getItem("record") == null) {
|
||||
this.record = []
|
||||
}else{
|
||||
@@ -220,7 +220,7 @@ export default defineComponent({
|
||||
this.createTimer()
|
||||
},
|
||||
getBloodBars(){
|
||||
Https.axiosGet(Https.httpUrls.getBloodBars,{params:{userId:this?.userInfo?.userId}}).then((rv: any) => {
|
||||
Https.axiosGet(Https.httpUrls.getBloodBars,{params:{userId:this?.userDetail?.userId}}).then((rv: any) => {
|
||||
if (rv) {
|
||||
if(rv <= 0){
|
||||
rv = 0
|
||||
@@ -277,7 +277,7 @@ export default defineComponent({
|
||||
// sessionStorage.removeItem
|
||||
let a = true
|
||||
let data = {
|
||||
"user_id" : this.userInfo?.userId,
|
||||
"user_id" : this.userDetail?.userId,
|
||||
"session_id":sessionId,
|
||||
"message" : this.chatCentent,
|
||||
gender:this.workspace.sexEnum.value,
|
||||
@@ -386,7 +386,7 @@ export default defineComponent({
|
||||
likeFile(item:any,imgIndex:number,index:number){
|
||||
let data = {
|
||||
...item,
|
||||
"userId" : this.userInfo?.userId,
|
||||
"userId" : this.userDetail?.userId,
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.pictureLikeOrUnLike, data).then(
|
||||
(rv) => {
|
||||
|
||||
@@ -221,7 +221,6 @@ export default defineComponent({
|
||||
let {t} = useI18n()
|
||||
let driver__:any = inject('driver__')
|
||||
let isTest = ref()
|
||||
let userInfo:any = {}
|
||||
let useGenerate:any = ref({
|
||||
imgId : '',
|
||||
imgUrl:1,
|
||||
@@ -249,7 +248,6 @@ export default defineComponent({
|
||||
t,
|
||||
driver__,
|
||||
isTest,
|
||||
userInfo,
|
||||
useGenerate,
|
||||
scene,
|
||||
openMenu,
|
||||
@@ -347,8 +345,6 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
this.userInfo = JSON.parse(userInfo);
|
||||
this.token = getCookie("token") || "";
|
||||
let isTest:any = getCookie('isTest')
|
||||
this.isTest =JSON.parse(isTest)
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, h, ref ,computed,reactive, nextTick} from "vue";
|
||||
// import { Https } from "@/tool/https";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
// import { getCookie } from "@/tool/cookie";
|
||||
import { openGuide,driverObj__ } from "@/tool/guide";
|
||||
// import domTurnImg from '@/tool/domTurnImg'
|
||||
|
||||
|
||||
@@ -87,8 +87,6 @@
|
||||
<script>
|
||||
import { defineComponent, ref, reactive, watch, onMounted, nextTick, toRefs } from "vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { formatTime } from "@/tool/util";
|
||||
import { setCookie, getCookie } from "@/tool/cookie";
|
||||
import { Modal, message } from "ant-design-vue";
|
||||
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
||||
import allOrder from "@/component/Pay/allOrder.vue";
|
||||
|
||||
@@ -60,7 +60,6 @@ import { useStore } from "vuex";
|
||||
import { Https } from "@/tool/https";
|
||||
import { openGuide,driverObj__ } from "@/tool/guide";
|
||||
import { getUploadUrl } from "@/tool/util";
|
||||
import { getCookie } from "@/tool/cookie";
|
||||
import { message, Upload, Modal } from "ant-design-vue";
|
||||
export default defineComponent({
|
||||
name:'filterComponent',
|
||||
@@ -170,7 +169,6 @@ import { message, Upload, Modal } from "ant-design-vue";
|
||||
level1Type: 'Sketchboard',
|
||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
},
|
||||
token: "",
|
||||
uploadUrl: "",
|
||||
type_: {
|
||||
type1: "generate",
|
||||
@@ -183,7 +181,6 @@ import { message, Upload, Modal } from "ant-design-vue";
|
||||
},
|
||||
mounted() {
|
||||
this.uploadUrl = getUploadUrl();
|
||||
this.token = getCookie("token") || "";
|
||||
this.upload.gender = this.store?.state?.Workspace?.workspace?.sexEnum?.value
|
||||
}
|
||||
});
|
||||
|
||||
@@ -40,7 +40,6 @@ import { Https } from "@/tool/https";
|
||||
import { useRouter,useRoute } from 'vue-router'
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { useStore } from "vuex";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
|
||||
@@ -244,7 +244,6 @@
|
||||
<script lang="ts">
|
||||
import { LoadingOutlined } from "@ant-design/icons-vue";
|
||||
import { defineComponent,watch,createVNode, h, ref ,toRefs,computed,reactive,triggerRef, nextTick} from "vue";
|
||||
// import { getCookie } from "@/tool/cookie";
|
||||
import { Https } from "@/tool/https";
|
||||
import { getCookie,setCookie } from "@/tool/cookie";
|
||||
// import domTurnImg from '@/tool/domTurnImg'
|
||||
@@ -268,6 +267,9 @@ export default defineComponent({
|
||||
props: ['setTask'],
|
||||
setup(props,{emit}) {
|
||||
const store = useStore();
|
||||
let userDetail:any= computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
const {t} = useI18n()
|
||||
const upload:any = ref({})
|
||||
let driver__:any = computed(()=>{
|
||||
@@ -610,12 +612,11 @@ export default defineComponent({
|
||||
productImgData.isProductimg = false
|
||||
productImgData.remProductimg= false
|
||||
clearInterval(prductimgTime)
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
if(generateProceedList){
|
||||
// let str = generateProceedList.map((obj:any) => obj.taskId).join(',');
|
||||
let str = generateProceedList.join(',')
|
||||
let data = {
|
||||
uniqueId:str,userId:JSON.parse(userInfo).userId,
|
||||
uniqueId:str,userId:userDetail.value.userId,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
type:productimgMenu.value.value,
|
||||
}
|
||||
|
||||
@@ -138,12 +138,11 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, h, ref ,toRefs,createVNode,reactive, nextTick} from "vue";
|
||||
import { defineComponent, h, ref ,toRefs,createVNode,reactive, computed} from "vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { Modal } from "ant-design-vue";
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { downloadIamge } from "@/tool/util";
|
||||
import { getCookie,setCookie } from "@/tool/cookie";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useStore } from "vuex";
|
||||
import generalMiniCanvas from "@/component/modules/generalMiniCanvas.vue";
|
||||
@@ -170,6 +169,9 @@ export default defineComponent({
|
||||
},
|
||||
setup(props:any,{emit}) {
|
||||
const store = useStore();
|
||||
let userDetail:any= computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
let {t} = useI18n()
|
||||
let productimg = reactive({
|
||||
isProductimg:false,
|
||||
@@ -292,13 +294,12 @@ export default defineComponent({
|
||||
productimg.productimgIsProductimg = false
|
||||
productimg.productimgRemProductimg= false
|
||||
clearInterval(prductimgTime)
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
if(generateProceedList){
|
||||
// let str = generateProceedList.map((obj:any) => obj.taskId).join(',');
|
||||
let str = generateProceedList.join(',')
|
||||
let data = {
|
||||
uniqueId:str,
|
||||
userId:JSON.parse(userInfo).userId,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
userId:userDetail.value.userId,
|
||||
type:scaleImageList.value[scaleImageIndex.value]?.resultType
|
||||
}
|
||||
Https.axiosGet(Https.httpUrls.generateStopWaiting, {params:data}).then(
|
||||
|
||||
@@ -53,12 +53,10 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent,watch,createVNode, h, ref ,toRefs,computed,reactive,triggerRef, nextTick} from "vue";
|
||||
// import { getCookie } from "@/tool/cookie";
|
||||
import { message,Modal } from "ant-design-vue";
|
||||
import { LoadingOutlined ,ExclamationCircleOutlined} from "@ant-design/icons-vue";
|
||||
|
||||
import { Https } from "@/tool/https";
|
||||
import { getCookie,setCookie } from "@/tool/cookie";
|
||||
// import domTurnImg from '@/tool/domTurnImg'
|
||||
import { downloadIamge } from "@/tool/util";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="plcaement_point_content" v-if="userInfo.userId == 88 || userInfo.userId == 83">
|
||||
<div class="plcaement_point_content" v-if="userDetail.userId == 88 || userDetail.userId == 83">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<input type="checkbox" model="false" @click="()=>{modelType = 'System'}">
|
||||
@@ -62,7 +62,7 @@
|
||||
</a-select> -->
|
||||
<div>{{ sex.label }}</div>
|
||||
</div>
|
||||
<div class="placement_point_item" v-for="(point,index) in pointList" :key="index" @touchmove="touchmove($event)">
|
||||
<div class="placement_point_item" v-for="(point,index) in pointList" :key="index" @mousemove="mouseMove" @touchmove="touchmove($event)">
|
||||
<div class="ponit_title">{{point.title}}</div>
|
||||
<div class="point_list">
|
||||
<div class="point_item" v-for="item in point.pointList" :key="item.color" :style="{borderColor:item.color,visibility:item.show?'inherit':'hidden'}" @mousedown="AddDian(item)" @touchstart="AddDian(item)"><div class="point_block" :style="{background:item.color}"></div></div>
|
||||
@@ -137,10 +137,9 @@
|
||||
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,ref,createVNode,nextTick} from 'vue'
|
||||
import { defineComponent,ref,createVNode,nextTick,computed} from 'vue'
|
||||
import { Https } from "@/tool/https";
|
||||
import {dataURLtoFile,base64toFile} from "@/tool/util"
|
||||
import { getCookie } from "@/tool/cookie";
|
||||
import 'vue-cropper/dist/index.css'
|
||||
import { VueCropper } from "vue-cropper";
|
||||
import { useStore } from "vuex";
|
||||
@@ -154,6 +153,9 @@ export default defineComponent({
|
||||
},
|
||||
setup() {
|
||||
const store = useStore()
|
||||
let userDetail:any= computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
let oldLocationList:any = ref([])
|
||||
let locationList:any = ref([])
|
||||
let printObject:any = ref({})
|
||||
@@ -164,7 +166,6 @@ export default defineComponent({
|
||||
let pointList:any = ref([])
|
||||
let isSubmit:any = ref(false) //判断历史是否有提交过
|
||||
let manager:any = ref(false)
|
||||
let userInfo:any = ref()
|
||||
let sex:any = ref({})
|
||||
let sexList:any = ref([
|
||||
|
||||
@@ -174,6 +175,7 @@ export default defineComponent({
|
||||
let {t} = useI18n()
|
||||
return {
|
||||
store,
|
||||
userDetail,
|
||||
oldLocationList,
|
||||
locationList,
|
||||
printObject,
|
||||
@@ -184,7 +186,6 @@ export default defineComponent({
|
||||
pointList,
|
||||
isSubmit,
|
||||
manager,
|
||||
userInfo,
|
||||
sex,
|
||||
sexList,
|
||||
cropperTime,
|
||||
@@ -239,8 +240,6 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
this.userInfo = JSON.parse(userInfo);
|
||||
// this.getSex()
|
||||
},
|
||||
methods:{
|
||||
@@ -589,7 +588,7 @@ export default defineComponent({
|
||||
// })
|
||||
let cropper:any = this.$refs.cropper,
|
||||
that = this
|
||||
if((this.modelType == 'System' && this.userInfo.userId == 88) || (this.modelType == 'System' &&this.userInfo.userId == 83)){
|
||||
if((this.modelType == 'System' && this.userDetail.userId == 88) || (this.modelType == 'System' &&this.userDetail.userId == 83)){
|
||||
if(this.printObject.templateId){
|
||||
this.printObject.id = this.printObject.relationId
|
||||
this.confrimSubmit()
|
||||
@@ -631,7 +630,7 @@ export default defineComponent({
|
||||
},
|
||||
async confrimSubmit(){
|
||||
let modelType = 'Library'
|
||||
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
|
||||
if(this.userDetail.userId == 88 || this.userDetail.userId == 83){
|
||||
modelType = this.modelType
|
||||
}
|
||||
let param = {
|
||||
@@ -659,7 +658,7 @@ export default defineComponent({
|
||||
|
||||
customRequest(){
|
||||
let modelType = 'Library'
|
||||
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
|
||||
if(this.userDetail.userId == 88 || this.userDetail.userId == 83){
|
||||
modelType = this.modelType
|
||||
}
|
||||
let new_data = {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="plcaement_point_content" v-if="userInfo.userId == 88 || userInfo.userId == 83">
|
||||
<div class="plcaement_point_content" v-if="userDetail.userId == 88 || userDetail.userId == 83">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<input type="checkbox" model="false" @click="()=>{modelType = 'System'}">
|
||||
@@ -137,10 +137,9 @@
|
||||
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,ref,createVNode,nextTick} from 'vue'
|
||||
import { defineComponent,ref,createVNode,nextTick,computed} from 'vue'
|
||||
import { Https } from "@/tool/https";
|
||||
import {dataURLtoFile,base64toFile} from "@/tool/util"
|
||||
import { getCookie } from "@/tool/cookie";
|
||||
import 'vue-cropper/dist/index.css'
|
||||
import { VueCropper } from "vue-cropper";
|
||||
import { useStore } from "vuex";
|
||||
@@ -164,7 +163,6 @@ export default defineComponent({
|
||||
let pointList:any = ref([])
|
||||
let isSubmit:any = ref(false) //判断历史是否有提交过
|
||||
let manager:any = ref(false)
|
||||
let userInfo:any = ref()
|
||||
let sex:any = ref({})
|
||||
let sexList:any = ref([
|
||||
|
||||
@@ -172,6 +170,9 @@ export default defineComponent({
|
||||
let cropperTime:any = ref()
|
||||
|
||||
let {t} = useI18n()
|
||||
let userDetail:any= computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
return {
|
||||
store,
|
||||
oldLocationList,
|
||||
@@ -184,13 +185,13 @@ export default defineComponent({
|
||||
pointList,
|
||||
isSubmit,
|
||||
manager,
|
||||
userInfo,
|
||||
sex,
|
||||
sexList,
|
||||
cropperTime,
|
||||
|
||||
t,
|
||||
getMousePosition
|
||||
getMousePosition,
|
||||
userDetail
|
||||
}
|
||||
},
|
||||
data(){
|
||||
@@ -236,8 +237,6 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
this.userInfo = JSON.parse(userInfo);
|
||||
// this.getSex()
|
||||
},
|
||||
methods:{
|
||||
@@ -586,7 +585,7 @@ export default defineComponent({
|
||||
// })
|
||||
let cropper:any = this.$refs.cropper,
|
||||
that = this
|
||||
if((this.modelType == 'System' && this.userInfo.userId == 88) || (this.modelType == 'System' &&this.userInfo.userId == 83)){
|
||||
if((this.modelType == 'System' && this.userDetail.userId == 88) || (this.modelType == 'System' &&this.userDetail.userId == 83)){
|
||||
if(this.printObject.templateId){
|
||||
this.printObject.id = this.printObject.relationId
|
||||
this.confrimSubmit()
|
||||
@@ -628,7 +627,7 @@ export default defineComponent({
|
||||
},
|
||||
async confrimSubmit(){
|
||||
let modelType = 'Library'
|
||||
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
|
||||
if(this.userDetail.userId == 88 || this.userDetail.userId == 83){
|
||||
modelType = this.modelType
|
||||
}
|
||||
let param = {
|
||||
@@ -656,7 +655,7 @@ export default defineComponent({
|
||||
|
||||
customRequest(){
|
||||
let modelType = 'Library'
|
||||
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
|
||||
if(this.userDetail.userId == 88 || this.userDetail.userId == 83){
|
||||
modelType = this.modelType
|
||||
}
|
||||
let new_data = {
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="plcaement_point_content" v-if="userInfo.userId == 88 || userInfo.userId == 83">
|
||||
<div class="plcaement_point_content" v-if="userDetail.userId == 88 || userDetail.userId == 83">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<input type="checkbox" model="false" @click="()=>{modelType = 'System'}">
|
||||
@@ -107,10 +107,9 @@
|
||||
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent,ref,createVNode} from 'vue'
|
||||
import { defineComponent,ref,createVNode,computed} from 'vue'
|
||||
import { Https } from "@/tool/https";
|
||||
import {dataURLtoFile} from "@/tool/util"
|
||||
import { getCookie } from "@/tool/cookie";
|
||||
import { useStore } from "vuex";
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
@@ -127,8 +126,9 @@ export default defineComponent({
|
||||
let pointList:any = ref([])
|
||||
let isSubmit:any = ref(false) //判断历史是否有提交过
|
||||
let manager:any = ref(false)
|
||||
let userInfo:any = ref()
|
||||
|
||||
let userDetail:any= computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
return {
|
||||
store,
|
||||
oldLocationList,
|
||||
@@ -141,7 +141,7 @@ export default defineComponent({
|
||||
pointList,
|
||||
isSubmit,
|
||||
manager,
|
||||
userInfo
|
||||
userDetail
|
||||
}
|
||||
},
|
||||
data(){
|
||||
@@ -162,8 +162,6 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
this.userInfo = JSON.parse(userInfo);
|
||||
this.getSex()
|
||||
},
|
||||
methods:{
|
||||
@@ -398,7 +396,7 @@ export default defineComponent({
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
...this.getPrintLocation()
|
||||
}
|
||||
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
|
||||
if(this.userDetail.userId == 88 || this.userDetail.userId == 83){
|
||||
// param.modelType = this.modelType
|
||||
}
|
||||
this.isShowMark = true
|
||||
@@ -424,7 +422,7 @@ export default defineComponent({
|
||||
modelType:'System',
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
}
|
||||
if(this.userInfo.userId == 88 || this.userInfo.userId == 83){
|
||||
if(this.userDetail.userId == 88 || this.userDetail.userId == 83){
|
||||
// new_data.modelType = this.modelType
|
||||
new_data.sex = this.sex
|
||||
}
|
||||
|
||||
@@ -82,7 +82,6 @@ import { defineComponent,ref,createVNode,watch,nextTick,inject} from 'vue'
|
||||
import { Https } from "@/tool/https";
|
||||
// import {dataURLtoFile,base64toFile} from "@/tool/util"
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
// import { getCookie } from "@/tool/cookie";
|
||||
import 'vue-cropper/dist/index.css'
|
||||
import { VueCropper } from "vue-cropper";
|
||||
// import { useStore } from "vuex";
|
||||
|
||||
@@ -53,7 +53,6 @@ import { defineComponent,ref,createVNode,watch,nextTick,inject} from 'vue'
|
||||
import { Https } from "@/tool/https";
|
||||
// import {dataURLtoFile,base64toFile} from "@/tool/util"
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
// import { getCookie } from "@/tool/cookie";
|
||||
import 'vue-cropper/dist/index.css'
|
||||
import { VueCropper } from "vue-cropper";
|
||||
// import { useStore } from "vuex";
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<template>
|
||||
<div class="Container">
|
||||
<!-- 谷歌登录 -->
|
||||
<div class="g_id_signin" id="g_id_signin"></div>
|
||||
<div class="g_id_signin" id="g_id_signin">
|
||||
<img src="@/assets/images/loginPage/gmailIcon.svg" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { defineComponent, ref, reactive, watch, onMounted, nextTick, toRefs } from "vue";
|
||||
import { defineComponent, ref, reactive, watch, onMounted, onBeforeUnmount, toRefs } from "vue";
|
||||
|
||||
export default defineComponent({
|
||||
name: "login",
|
||||
@@ -17,38 +19,49 @@
|
||||
emit('googelLogin',code)
|
||||
}
|
||||
let data = reactive({
|
||||
// scriptSrc:'https://apis.google.com/js/platform.js',
|
||||
scriptSrc:'https://accounts.google.com/gsi/client',
|
||||
script:null
|
||||
})
|
||||
let GOOGLE_CLIENT_ID = '194770296147-njd68pm7tnapgonkj2h48mhf63n15n3f.apps.googleusercontent.com'
|
||||
// let GOOGLE_CLIENT_ID = '399537927614-3sd3rs9p79doocsrff7gm5m1f3chvmn2.apps.googleusercontent.com'
|
||||
// 使用谷歌登录的api
|
||||
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
|
||||
if(!existingScript){
|
||||
const script = document.createElement("script");
|
||||
script.src = data.scriptSrc
|
||||
script.onload=()=>{
|
||||
document.body.appendChild(script);
|
||||
window.google.accounts.id.initialize({
|
||||
// 主要就是填写client_id
|
||||
client_id: GOOGLE_CLIENT_ID,
|
||||
auto_select: false,
|
||||
callback: handleCredentialResponse,
|
||||
// context:"signin",
|
||||
ux_mode:"popup",
|
||||
itp_support:true,
|
||||
});
|
||||
window.google.accounts.id.renderButton(
|
||||
document.getElementById("g_id_signin"),
|
||||
{
|
||||
type:"icon",//icon为只有一个icon
|
||||
shape:"circle",
|
||||
theme:"outline",
|
||||
size:"large",
|
||||
logo_alignment:"center",
|
||||
const createGmailLogin = async ()=>{
|
||||
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
|
||||
if(!existingScript){
|
||||
await new Promise((resolve, reject) => {
|
||||
const script = document.createElement("script");
|
||||
script.src = data.scriptSrc
|
||||
script.onload=()=>{
|
||||
resolve()
|
||||
}
|
||||
);
|
||||
document.body.appendChild(script);
|
||||
})
|
||||
}
|
||||
window.google.accounts.id.initialize({
|
||||
// 主要就是填写client_id
|
||||
client_id: GOOGLE_CLIENT_ID,
|
||||
auto_select: false,
|
||||
callback: handleCredentialResponse,
|
||||
// context:"signin",
|
||||
ux_mode:"popup",
|
||||
itp_support:true,
|
||||
});
|
||||
window.google.accounts.id.renderButton(
|
||||
document.getElementById("g_id_signin"),
|
||||
{
|
||||
type:"icon",//icon为只有一个icon
|
||||
shape:"circle",
|
||||
theme:"outline",
|
||||
size:"large",
|
||||
logo_alignment:"center",
|
||||
});
|
||||
}
|
||||
onBeforeUnmount(()=>{
|
||||
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
|
||||
if(existingScript)existingScript.remove()
|
||||
})
|
||||
createGmailLogin()
|
||||
return {
|
||||
}
|
||||
},
|
||||
@@ -62,5 +75,22 @@
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
.g_id_signin{
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid #dadce0;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
&:hover{
|
||||
background: #f8faff;
|
||||
}
|
||||
img{
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -34,10 +34,12 @@
|
||||
|
||||
<script>
|
||||
import { defineComponent,ref,reactive,toRefs, onMounted} from "vue";
|
||||
import { useRoute } from 'vue-router';
|
||||
export default defineComponent({
|
||||
components: {
|
||||
},
|
||||
setup(){
|
||||
const route = useRoute();
|
||||
let weiXinModel = reactive({
|
||||
weiXinModel:false,
|
||||
weiXinModelMask:true,
|
||||
@@ -71,7 +73,7 @@ export default defineComponent({
|
||||
id: "wx_id_signin", //容器的id
|
||||
appid: "wxcfb92eb28d6385f5", //应用唯一标识,在微信开放平台提交应用审核通过后获得
|
||||
scope: "snsapi_login", //应用授权作用域,拥有多个作用域用逗号(,)分隔,网页应用目前仅填写snsapi_login即可
|
||||
redirect_uri: `${http}/login`, //扫完码授权成功跳转到的路径
|
||||
redirect_uri: `${http}${route.path}`, //扫完码授权成功跳转到的路径
|
||||
state: 'weiXin', //用于保持请求和回调的状态,授权请求后原样带回给第三方。该参数可用于防止 csrf 攻击(跨站请求伪造攻击),建议第三方带上该参数,可设置为简单的随机数加 session 进行校验
|
||||
style: "black", //提供"black"、"white"可选,默认为黑色文字描述
|
||||
href: "data:text/css;base64,DQoud2ViX3FyY29kZV90eXBlX2lmcmFtZXsNCglkaXNwbGF5OiBmbGV4Ow0KCWFsaWduLWl0ZW1zOiBjZW50ZXI7DQoJanVzdGlmeS1jb250ZW50OiBjZW50ZXI7DQp9DQoud2ViX3FyY29kZV9wYW5lbF9hcmVhew0KCWhlaWdodDogMTAwJTsNCglkaXNwbGF5OiBmbGV4Ow0KCWFsaWduLWl0ZW1zOiBjZW50ZXI7DQoJanVzdGlmeS1jb250ZW50OiBjZW50ZXI7DQp9" //自定义样式链接,第三方可根据实际需求覆盖默认样式
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="generalModel_state">
|
||||
<div class="generalModel_state_item">
|
||||
<!-- <span>{{$t('allOrder.Time')}}:</span> -->
|
||||
<a-range-picker
|
||||
<a-range-picker
|
||||
class="range_picker"
|
||||
v-model:value="rangePickerValue"
|
||||
:placeholder="[
|
||||
@@ -22,10 +22,13 @@
|
||||
</template>
|
||||
</a-range-picker>
|
||||
</div>
|
||||
<div class="generalModel_state_item">
|
||||
<!-- <span>{{$t('allOrder.Time')}}:</span> -->
|
||||
<input type="Number" :placeholder="$t('Generate.jsContent3')" v-model="orderId">
|
||||
</div>
|
||||
</div>
|
||||
<div class="generalModel_search">
|
||||
<div class="gallery_btn" @click="searchAllOrderList()">Search</div>
|
||||
<div class="gallery_btn" style="margin-left: 2rem;" @click="searchAllOrderList()">Export</div>
|
||||
<!-- <div
|
||||
class="generalModel_search_item"
|
||||
@click="searchAllOrderList()"
|
||||
@@ -39,7 +42,6 @@
|
||||
<div class="generalModel_table_content" ref="historyTable">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKey, onChange: onSelectChange }"
|
||||
:data-source="collectionList"
|
||||
:scroll="{ y: historyTableHeight }"
|
||||
@change="changePage"
|
||||
@@ -61,7 +63,7 @@
|
||||
class="operate_list"
|
||||
v-if="column?.Operations"
|
||||
>
|
||||
<div class="operate_item">{{ $t('HistoryPage.Delete') }}</div>
|
||||
<div class="operate_item"><a v-if="text" :href="text" target="_blank">LINK</a><span v-else>\</span></div>
|
||||
</div>
|
||||
</template>
|
||||
<template #itemRender="{ type, originalElement }">
|
||||
@@ -89,8 +91,8 @@ export default defineComponent({
|
||||
title: useI18n().t('allOrder.Serial'),
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "orderNo",
|
||||
key: "orderNo",
|
||||
dataIndex: "id",
|
||||
key: "id",
|
||||
},
|
||||
{
|
||||
title: useI18n().t('allOrder.Time'),
|
||||
@@ -103,29 +105,37 @@ export default defineComponent({
|
||||
title: useI18n().t('allOrder.Money'),
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "totalFee",
|
||||
key: "totalFee",
|
||||
dataIndex: "amount",
|
||||
key: "amount",
|
||||
},
|
||||
{
|
||||
title: useI18n().t('allOrder.PaymentMethods'),
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "paymentType",
|
||||
key: "paymentType",
|
||||
dataIndex: "paymentMethod",
|
||||
key: "paymentMethod",
|
||||
},
|
||||
{
|
||||
title: useI18n().t('allOrder.State'),
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "orderStatus",
|
||||
key: "orderStatus",
|
||||
dataIndex: "state",
|
||||
key: "state",
|
||||
},
|
||||
{
|
||||
title: useI18n().t('allOrder.OrderType'),
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
dataIndex: "title",
|
||||
key: "title",
|
||||
dataIndex: "orderType",
|
||||
key: "orderType",
|
||||
},
|
||||
{
|
||||
title: useI18n().t('allOrder.Receipt'),
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
Operations:true,
|
||||
dataIndex: "invoiceLink",
|
||||
key: "invoiceLink",
|
||||
},
|
||||
|
||||
// {
|
||||
@@ -139,6 +149,7 @@ export default defineComponent({
|
||||
});
|
||||
let dataList: any = ref([]);
|
||||
let rangePickerValue: any = ref([]);
|
||||
let orderId: any = ref();
|
||||
let collectionList: any = ref([]);
|
||||
|
||||
let userInfo: any = {};
|
||||
@@ -164,6 +175,7 @@ export default defineComponent({
|
||||
dataList,
|
||||
renameData,
|
||||
rangePickerValue,
|
||||
orderId,
|
||||
collectionList,
|
||||
userInfo,
|
||||
currentState,
|
||||
@@ -185,9 +197,10 @@ export default defineComponent({
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
init(id:any){
|
||||
this.currentPage = 1
|
||||
this.pageSize = 10
|
||||
this.orderId = id
|
||||
nextTick(()=>{
|
||||
let historyTable: any = this.$refs.historyTable;
|
||||
this.historyTableHeight = historyTable.clientHeight - 100;
|
||||
@@ -215,7 +228,8 @@ export default defineComponent({
|
||||
isIncome: this.currentState.value == 'income'?true:false,
|
||||
page:this.currentPage,
|
||||
size:this.pageSize,
|
||||
startTime: startDate
|
||||
startTime: startDate,
|
||||
orderId:this.orderId
|
||||
}
|
||||
// getCreditsDetail
|
||||
// orderInfoList
|
||||
|
||||
@@ -88,7 +88,6 @@
|
||||
import { defineComponent,ref,reactive,toRefs ,onMounted} from "vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { isEmail } from "@/tool/util";
|
||||
import { setCookie ,WriteCookie } from "@/tool/cookie";
|
||||
import { message } from "ant-design-vue";
|
||||
import VerificationCodeInput from "@/component/LoginPage/verificationCodeInput.vue";
|
||||
import { useStore } from "vuex";
|
||||
|
||||
@@ -71,11 +71,12 @@ export default defineComponent({
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
init() {
|
||||
init(id:any) {
|
||||
this.showPayOrder = true;
|
||||
this.setState('paypal')
|
||||
this.setState('paypal',id)
|
||||
if(id)sessionStorage.removeItem('orderId')
|
||||
},
|
||||
setState(str:any){
|
||||
setState(str:any,id:any){
|
||||
nextTick(()=>{
|
||||
this.presentState = str
|
||||
let setInit:any
|
||||
@@ -84,7 +85,7 @@ export default defineComponent({
|
||||
}else{
|
||||
setInit = this.$refs.creditsDetail
|
||||
}
|
||||
setInit.init()
|
||||
setInit.init(id)
|
||||
})
|
||||
},
|
||||
cancelDsign(){
|
||||
|
||||
@@ -60,10 +60,10 @@
|
||||
|
||||
</div>
|
||||
<div class="detail_right_user_content">
|
||||
<div>
|
||||
<div style="text-align: center;">
|
||||
<div class="scaleImage_chunk_title_intro">@{{scaleImageData.userName}}</div>
|
||||
<div v-if="scaleImageData.isFollow == 0 && userInfo?.userId != scaleImageData?.accountId" style="margin-bottom: 0;" class="started_btn" @click="setFollow()" >{{$t('newScaleImage.Follow')}}</div>
|
||||
<div v-else-if="userInfo?.userId != scaleImageData?.accountId" class="started_btn" style="margin-bottom: 0;" @click="setFollow()" >{{$t('newScaleImage.Unfollow')}}</div>
|
||||
<div v-if="scaleImageData.isFollow == 0 && userDetail?.userId != scaleImageData?.accountId" style="margin-bottom: 0;" class="started_btn" @click="setFollow()" >{{$t('newScaleImage.Follow')}}</div>
|
||||
<div v-else-if="userDetail?.userId != scaleImageData?.accountId" class="started_btn" style="margin-bottom: 0;" @click="setFollow()" >{{$t('newScaleImage.Unfollow')}}</div>
|
||||
</div>
|
||||
<div v-if="scaleImageData.original == 1" class="scaleImage_chunk_title_intro scaleImage_chunk_title_Original">{{$t('newScaleImage.Original')}}</div>
|
||||
<div v-else @click="originalGetDetail()" class="scaleImage_chunk_title_intro">{{$t('newScaleImage.from')}}<span :class="{active:scaleImageData.jumpable == 1}"> @{{ scaleImageData.originalUserName }}/{{ scaleImageData.portfolioName }}</span></div>
|
||||
@@ -99,7 +99,7 @@
|
||||
<i class="fi fi-rr-comment-alt-dots"></i>
|
||||
<span>{{commentList.length}}</span>
|
||||
</div>
|
||||
<div v-if="userInfo?.userName === scaleImageData.userName" @click="deletePortfolio" class="detail_left_right_item_click">
|
||||
<div v-if="userDetail?.userName === scaleImageData.userName" @click="deletePortfolio" class="detail_left_right_item_click">
|
||||
<i class="icon iconfont icon-shanchu operate_icon"></i>
|
||||
<!-- <span>{{$t('newScaleImage.Delete')}}</span> -->
|
||||
</div>
|
||||
@@ -111,7 +111,7 @@
|
||||
<img v-for="item in scaleImageData?.designPythonOutfitList" v-lazy="item.designUrl">
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="systemUser.value == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" >{{$t('newScaleImage.SecondaryCreation')}}</div>
|
||||
<div v-if="userDetail.systemUser == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" >{{$t('newScaleImage.SecondaryCreation')}}</div>
|
||||
<!-- <div v-if="systemUser.value == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" :title="systemUser.value != 1?$t('newScaleImage.jsContent1'): scaleImageData.openSource == 0?$t('newScaleImage.jsContent2'):''" :class="{active:systemUser.value != 1?true:scaleImageData.openSource == 0}">{{$t('newScaleImage.SecondaryCreation')}}</div> -->
|
||||
</div>
|
||||
<div v-else class="newScaleImage_right_content_generate">
|
||||
@@ -206,7 +206,7 @@
|
||||
<span>123</span>
|
||||
</div> -->
|
||||
<div class="left_content_item_btn">
|
||||
<div class="left_content_item_delete" v-if="userInfo?.userName === item.userName" @click="setDeleteComment(item,index,'')">{{$t('newScaleImage.Delete')}}</div>
|
||||
<div class="left_content_item_delete" v-if="userDetail?.userName === item.userName" @click="setDeleteComment(item,index,'')">{{$t('newScaleImage.Delete')}}</div>
|
||||
<div class="left_content_item_unfold" @click="()=>item.detailUnfold = !item.detailUnfold">{{item.detailUnfold?$t('newScaleImage.Collapse'):$t('newScaleImage.unfold')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -231,7 +231,7 @@
|
||||
<span>123</span>
|
||||
</div> -->
|
||||
<div class="left_content_item_btn">
|
||||
<div class="left_content_item_delete" v-if="userInfo?.userName === children.userName" @click="setDeleteComment(children,index,childrenIndex)">{{$t('newScaleImage.Delete')}}</div>
|
||||
<div class="left_content_item_delete" v-if="userDetail?.userName === children.userName" @click="setDeleteComment(children,index,childrenIndex)">{{$t('newScaleImage.Delete')}}</div>
|
||||
<div class="left_content_item_unfold" @click="()=>children.detailUnfold = !children.detailUnfold">{{children.detailUnfold?$t('newScaleImage.Collapse'):$t('newScaleImage.unfold')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -266,7 +266,6 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent,watch,getCurrentInstance, createVNode, ref ,toRefs,computed,reactive,triggerRef, nextTick, onMounted} from "vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { getCookie } from "@/tool/cookie";
|
||||
// import domTurnImg from '@/tool/domTurnImg'
|
||||
import { useStore } from "vuex";
|
||||
import { useRouter } from 'vue-router'
|
||||
@@ -282,8 +281,10 @@ export default defineComponent({
|
||||
setup(props:any,{emit}) {
|
||||
let {t} = useI18n()
|
||||
//首先在setup中定义
|
||||
let userInfo = ref({});
|
||||
const store = useStore();
|
||||
let userDetail:any= computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
const router = useRouter()
|
||||
let scaleImage: any = ref(false);//弹窗
|
||||
let scaleImageMask:any = ref(false)//弹窗遮罩
|
||||
@@ -310,9 +311,6 @@ export default defineComponent({
|
||||
isNoData:false,
|
||||
isShowMark:false,
|
||||
})
|
||||
let systemUser = computed(()=>{
|
||||
return store.state.UserHabit.systemUser
|
||||
})
|
||||
let commentInputFocus:any = ref()
|
||||
let textarea: any = ref(null)
|
||||
let setCopy = ()=>{
|
||||
@@ -370,6 +368,8 @@ export default defineComponent({
|
||||
Https.axiosPost(Https.httpUrls.getPorfolioDetail,data).then(
|
||||
(rv: any) => {
|
||||
imgData.loadingShow = false
|
||||
|
||||
if(rv.portfolioDes)rv.portfolioDes = rv.portfolioDes.replace(/#/g, ' ');
|
||||
imgData.scaleImageData = rv
|
||||
let canvasUrl = [rv.canvasUrl]
|
||||
var findUrl = []
|
||||
@@ -406,7 +406,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
let setChoose = () =>{
|
||||
if(systemUser.value.value !== 1){
|
||||
if(userDetail.value.systemUser !== 1){
|
||||
return message.info(t('newScaleImage.jsContent1'))
|
||||
}
|
||||
if(imgData.scaleImageData.openSource == 0){
|
||||
@@ -593,15 +593,12 @@ export default defineComponent({
|
||||
}
|
||||
)
|
||||
onMounted(()=>{
|
||||
let user:any = getCookie('userInfo')
|
||||
userInfo.value = JSON.parse(user)
|
||||
})
|
||||
return {
|
||||
userInfo,
|
||||
userDetail,
|
||||
scaleImage,
|
||||
scaleImageMask,
|
||||
...toRefs(imgData),
|
||||
systemUser,
|
||||
commentInputFocus,
|
||||
textarea,
|
||||
setCopy,
|
||||
@@ -801,6 +798,7 @@ export default defineComponent({
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
align-items: flex-start;
|
||||
|
||||
.scaleImage_chunk_title_Original{
|
||||
color: #39215b;
|
||||
background: #c9a2ff;
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
<img v-for="item in scaleImageData?.designPythonOutfitList" v-lazy="item.designUrl">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div v-if="systemUser.value == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" :title="systemUser.value != 1?$t('newScaleImage.jsContent1'): scaleImageData.openSource == 0?$t('newScaleImage.jsContent2'):''" :class="{active:systemUser.value != 1?true:scaleImageData.openSource == 0}">{{$t('newScaleImage.SecondaryCreation')}}</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -114,7 +113,7 @@
|
||||
<i class="fi fi-rr-comment-alt-dots"></i>
|
||||
<span>{{commentList.length}}</span>
|
||||
</div>
|
||||
<div v-if="userInfo?.userName === scaleImageData.userName" @click="deletePortfolio" class="detail_left_right_item_click">
|
||||
<div v-if="userDetail?.userName === scaleImageData.userName" @click="deletePortfolio" class="detail_left_right_item_click">
|
||||
<i class="icon iconfont icon-shanchu operate_icon"></i>
|
||||
<!-- <span>{{$t('newScaleImage.Delete')}}</span> -->
|
||||
</div>
|
||||
@@ -126,7 +125,6 @@
|
||||
<img v-for="item in scaleImageData?.designPythonOutfitList" v-lazy="item.designUrl">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div v-if="systemUser.value == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" :title="systemUser.value != 1?$t('newScaleImage.jsContent1'): scaleImageData.openSource == 0?$t('newScaleImage.jsContent2'):''" :class="{active:systemUser.value != 1?true:scaleImageData.openSource == 0}">{{$t('newScaleImage.SecondaryCreation')}}</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="false" class="newScaleImageMobile_right_detail">
|
||||
@@ -177,7 +175,7 @@
|
||||
<span>123</span>
|
||||
</div> -->
|
||||
<div class="left_content_item_btn">
|
||||
<div class="left_content_item_delete" v-if="userInfo?.userName === item.userName" @click="setDeleteComment(item,index,'')">{{$t('newScaleImage.Delete')}}</div>
|
||||
<div class="left_content_item_delete" v-if="userDetail?.userName === item.userName" @click="setDeleteComment(item,index,'')">{{$t('newScaleImage.Delete')}}</div>
|
||||
<div class="left_content_item_unfold" @click="()=>item.detailUnfold = !item.detailUnfold">{{item.detailUnfold?$t('newScaleImage.Collapse'):$t('newScaleImage.unfold')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -202,7 +200,7 @@
|
||||
<span>123</span>
|
||||
</div> -->
|
||||
<div class="left_content_item_btn">
|
||||
<div class="left_content_item_delete" v-if="userInfo?.userName === children.userName" @click="setDeleteComment(children,index,childrenIndex)">{{$t('newScaleImage.Delete')}}</div>
|
||||
<div class="left_content_item_delete" v-if="userDetail?.userName === children.userName" @click="setDeleteComment(children,index,childrenIndex)">{{$t('newScaleImage.Delete')}}</div>
|
||||
<div class="left_content_item_unfold" @click="()=>children.detailUnfold = !children.detailUnfold">{{children.detailUnfold?$t('newScaleImage.Collapse'):$t('newScaleImage.unfold')}}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -238,7 +236,6 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent,watch,getCurrentInstance, createVNode, ref ,toRefs,computed,reactive,triggerRef, nextTick, onMounted} from "vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { getCookie } from "@/tool/cookie";
|
||||
// import domTurnImg from '@/tool/domTurnImg'
|
||||
import { useStore } from "vuex";
|
||||
import { useRouter } from 'vue-router'
|
||||
@@ -256,7 +253,9 @@ export default defineComponent({
|
||||
setup(props:any,{emit}) {
|
||||
let {t} = useI18n()
|
||||
//首先在setup中定义
|
||||
let userInfo = ref({});
|
||||
let userDetail:any= computed(()=>{
|
||||
return store.state.UserHabit.userDetail
|
||||
})
|
||||
const store = useStore();
|
||||
const router = useRouter()
|
||||
let scaleImage: any = ref(false);//弹窗
|
||||
@@ -284,9 +283,6 @@ export default defineComponent({
|
||||
isNoData:false,
|
||||
isShowMark:false,
|
||||
})
|
||||
let systemUser = computed(()=>{
|
||||
return store.state.UserHabit.systemUser
|
||||
})
|
||||
let commentInputFocus:any = ref()
|
||||
let textarea: any = ref(null)
|
||||
let setCopy = ()=>{
|
||||
@@ -379,7 +375,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
let setChoose = () =>{
|
||||
if(systemUser.value.value !== 1){
|
||||
if(userDetail.value.systemUser !== 1){
|
||||
return message.info(t('newScaleImage.jsContent1'))
|
||||
}
|
||||
if(imgData.scaleImageData.openSource == 0){
|
||||
@@ -545,15 +541,12 @@ export default defineComponent({
|
||||
}
|
||||
)
|
||||
onMounted(()=>{
|
||||
let user:any = getCookie('userInfo')
|
||||
userInfo.value = JSON.parse(user)
|
||||
})
|
||||
return {
|
||||
userInfo,
|
||||
userDetail,
|
||||
scaleImage,
|
||||
scaleImageMask,
|
||||
...toRefs(imgData),
|
||||
systemUser,
|
||||
commentInputFocus,
|
||||
textarea,
|
||||
setCopy,
|
||||
|
||||
@@ -76,9 +76,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent,watch,createVNode, inject, ref ,toRefs,computed,reactive,triggerRef, nextTick} from "vue";
|
||||
// import { getCookie } from "@/tool/cookie";
|
||||
import { Https } from "@/tool/https";
|
||||
import { getCookie,setCookie } from "@/tool/cookie";
|
||||
// import domTurnImg from '@/tool/domTurnImg'
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
@@ -115,14 +113,14 @@ export default defineComponent({
|
||||
})
|
||||
let portfolio:any = inject('portfolio')
|
||||
let setPortfolio:any = inject('setPortfolio')
|
||||
let tagList = ref([{id:1,tagName:'#RCAworkshop_2024',title:'The process is simple: use AiDA to post your design work on the "Gallery ", and the one with the most likes(at least 20 likes) will be invited to the AiDA Workshop offline event in Hong Kong on November 14th, to exchange ideas with the Royal College of Art (RCA), Jae Lim, co-founder of the renowned fashion brand BESFXXK, and outstanding designers! '}])
|
||||
let tagList = ref([{id:1,tagName:'#AiDAworkshop_2024',title:'The process is simple: use AiDA to post your design work on the "Gallery ", and the one with the most likes(at least 20 likes) will be invited to the AiDA Workshop offline event in Hong Kong on November 14th, to exchange ideas with the Royal College of Art (RCA), Jae Lim, co-founder of the renowned fashion brand BESFXXK, and outstanding designers! '}])
|
||||
// let textarea: any = ref(null)
|
||||
// let setCopy = ()=>{
|
||||
// textarea.value.select()
|
||||
// document.execCommand("copy");
|
||||
// }
|
||||
let init = (data:any)=>{
|
||||
let userInfo:any = getCookie("userInfo")
|
||||
let userInfo:any = store.state.UserHabit.userDetail
|
||||
// console.log(data);
|
||||
publish.value = true
|
||||
publishData.selectDate.url = data.imgUrl
|
||||
@@ -131,7 +129,7 @@ export default defineComponent({
|
||||
// userLikeGroupId : data.id,
|
||||
coverId : '',
|
||||
// coverId : data.groupDetails[0].designOutfitId,
|
||||
accountId : JSON.parse(userInfo).userId,
|
||||
accountId : userInfo.userId,
|
||||
createDate:'',
|
||||
idDeleted:'',
|
||||
id:portfolio.value.id?portfolio.value.id:'',
|
||||
|
||||
267
src/component/affiliate/home.vue
Normal file
267
src/component/affiliate/home.vue
Normal file
@@ -0,0 +1,267 @@
|
||||
<template>
|
||||
<div class="affiliate_home">
|
||||
<div class="detail">
|
||||
<div class="detail_item">
|
||||
<div class="title">Invitation link</div>
|
||||
<div class="link" @click="copyLink">{{affiliateLink}}</div>
|
||||
</div>
|
||||
<div class="detail_item">
|
||||
<div class="title">Number of link visits</div>
|
||||
<div class="num">{{linkVisits}}<span>times</span></div>
|
||||
</div>
|
||||
<div class="detail_item">
|
||||
<div class="title">Number of Invitations</div>
|
||||
<div class="num">{{people}}<span>people</span></div>
|
||||
</div>
|
||||
<div class="detail_item">
|
||||
<div class="title">Earned commission</div>
|
||||
<div class="num"><sup>$</sup>{{earned}}<span>HKD</span></div>
|
||||
</div>
|
||||
<div class="detail_item">
|
||||
<div class="title">Total commission</div>
|
||||
<div class="num"><sup>$</sup>{{total}}<span>HKD</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="echarts_box">
|
||||
<div class="title generalModel_state">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input name="pric" type="radio" value="monthly" v-model="current.type" @change="setPricType('monthly')">
|
||||
Monthly
|
||||
</label>
|
||||
<label>
|
||||
<input name="pric" type="radio" value="year" v-model="current.type" @change="setPricType('year')">
|
||||
Yearly
|
||||
</label>
|
||||
</div>
|
||||
<div class="date generalModel_state_item">
|
||||
<a-date-picker
|
||||
class="range_picker"
|
||||
v-model:value="rangePickerValue"
|
||||
picker="year"
|
||||
valueFormat="YYYY"
|
||||
>
|
||||
<template #suffixIcon>
|
||||
<span
|
||||
class="icon iconfont range_picker_icon icon-rili"
|
||||
></span>
|
||||
</template>
|
||||
</a-date-picker>
|
||||
</div>
|
||||
<div class="gallery_btn" style="margin-right: 1rem;" @click="search">Search</div>
|
||||
</div>
|
||||
<div class="echarts" ref="echarts">
|
||||
213
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, nextTick, computed, reactive, toRefs, onMounted } from "vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import type { Dayjs } from 'dayjs';
|
||||
|
||||
import * as echarts from 'echarts/core';
|
||||
import {
|
||||
DatasetComponent,
|
||||
TooltipComponent,
|
||||
GridComponent,
|
||||
LegendComponent
|
||||
} from 'echarts/components';
|
||||
import { BarChart } from 'echarts/charts';
|
||||
import { CanvasRenderer } from 'echarts/renderers';
|
||||
import { color } from "echarts";
|
||||
import { message } from "ant-design-vue";
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
},
|
||||
setup() {
|
||||
const affiliateData = reactive({
|
||||
rangePickerValue:'2024',
|
||||
current:{
|
||||
type:'year',
|
||||
} as any,
|
||||
affiliateLink:'-------------',
|
||||
linkVisits:'--',
|
||||
people:'--',
|
||||
earned:'--',
|
||||
total:'--',
|
||||
|
||||
echartsList:[]
|
||||
})
|
||||
const affiliateDom = reactive({
|
||||
echarts:null,
|
||||
})
|
||||
const setPricType=(str:any)=>{
|
||||
affiliateData.current.type = str
|
||||
}
|
||||
const getUserInfo = ()=>{
|
||||
Https.axiosGet(Https.httpUrls.personalCenter).then((rv)=>{
|
||||
affiliateData.affiliateLink = rv.link
|
||||
affiliateData.linkVisits = rv.linkViewCount
|
||||
affiliateData.people = rv.visits
|
||||
affiliateData.earned = rv.unpaidEarnings
|
||||
affiliateData.total = rv.totalEarnings
|
||||
})
|
||||
search()
|
||||
}
|
||||
const search = ()=>{
|
||||
let year = affiliateData.rangePickerValue?affiliateData.rangePickerValue:''
|
||||
let data = {
|
||||
year,
|
||||
}
|
||||
Https.axiosGet(Https.httpUrls.getPersonalMonthlyIncome,{params:data}).then((rv)=>{
|
||||
let value = rv.map((item:any,index:any)=>{
|
||||
return {product:`${index+1}`,'Earned commission':item}
|
||||
})
|
||||
console.log(value)
|
||||
setEcharts(value)
|
||||
})
|
||||
}
|
||||
const copyLink = (e:any)=>{
|
||||
navigator.clipboard.writeText(e.target.innerText)
|
||||
.then(() => {
|
||||
message.success('Copy Successful')
|
||||
})
|
||||
.catch(err => {
|
||||
console.error("复制失败:", err);
|
||||
});
|
||||
}
|
||||
let myChart:any
|
||||
|
||||
let setEcharts = (data:any) =>{
|
||||
if (myChart) {
|
||||
myChart.setOption({
|
||||
dataset: {
|
||||
dimensions: ['product', 'Earned commission'],
|
||||
source: data
|
||||
},
|
||||
});
|
||||
}else{
|
||||
echarts.use([
|
||||
DatasetComponent,
|
||||
TooltipComponent,
|
||||
GridComponent,
|
||||
LegendComponent,
|
||||
BarChart,
|
||||
CanvasRenderer
|
||||
]);
|
||||
|
||||
var app = {};
|
||||
|
||||
var chartDom = affiliateDom.echarts;
|
||||
myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
legend: {right: '0%'},
|
||||
tooltip: {
|
||||
|
||||
},
|
||||
dataset: {
|
||||
dimensions: ['product', 'Earned commission'],
|
||||
source: data
|
||||
},
|
||||
xAxis: { type: 'category' },
|
||||
yAxis: {},
|
||||
series: [{
|
||||
type: 'bar',
|
||||
itemStyle:{
|
||||
borderRadius: [10, 10, 5, 5],
|
||||
color: '#7f43f6',
|
||||
}
|
||||
}]
|
||||
}
|
||||
};
|
||||
option && myChart.setOption(option);
|
||||
|
||||
}
|
||||
onMounted(()=>{
|
||||
getUserInfo()
|
||||
})
|
||||
|
||||
return {
|
||||
...toRefs(affiliateData),
|
||||
...toRefs(affiliateDom),
|
||||
setPricType,
|
||||
search,
|
||||
copyLink,
|
||||
};
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.affiliate_home{
|
||||
height: 100%;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
flex-direction: column;
|
||||
>.detail{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 3rem;
|
||||
>.detail_item{
|
||||
padding: 2rem 3rem;
|
||||
background: #eeeff6;
|
||||
border-radius: 2rem;
|
||||
width: calc((100% - 1rem * 4) / 5 );
|
||||
>div{
|
||||
font-weight: 600;
|
||||
}
|
||||
>.title{
|
||||
margin-bottom: 1rem;
|
||||
font-size: 2rem;
|
||||
color: #666;
|
||||
}
|
||||
>.link{
|
||||
font-size: 1.8rem;
|
||||
color: #000;
|
||||
text-decoration-line: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
>.num{
|
||||
font-size: 4rem;
|
||||
>span{
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
>.echarts_box{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
padding: 3rem;
|
||||
border-radius: 2rem;
|
||||
>.title{
|
||||
>.radio{
|
||||
margin-right: 3rem;
|
||||
display: flex;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 400;
|
||||
>label{
|
||||
margin-right: 2rem;
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
input{
|
||||
margin-right: 1rem;
|
||||
}
|
||||
}
|
||||
>label:last-child{
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
>.echarts{
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -5,7 +5,7 @@
|
||||
< BACK
|
||||
</div>
|
||||
<div class="title">Choose your subscription plan</div>
|
||||
<div class="introduce" @click="()=>isSelectSignUp=true">LEARN MORE ALL OUR PRODUCT FEATURES</div>
|
||||
<div class="introduce"><span @click="()=>isSelectSignUp=true">LEARN MORE ALL OUR PRODUCT FEATURES</span></div>
|
||||
<div class="gallery_list product_list">
|
||||
<div class="gallery_item" v-for="item in productList" :key="item">
|
||||
<div class="product_signUp_box">
|
||||
@@ -158,7 +158,7 @@
|
||||
font-size: 1.6rem;
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
.back,.introduce{
|
||||
.back,.introduce>span{
|
||||
cursor: pointer;
|
||||
}
|
||||
.title,.introduce{
|
||||
|
||||
@@ -498,31 +498,24 @@ export default defineComponent({
|
||||
let isTest = rv.systemUser == 3 ? true : false;
|
||||
let isBeginner = rv.isBeginner == 1 ? true : false;
|
||||
let token = rv.token;
|
||||
setCookie("isMurmur", false);
|
||||
setCookie("token", token);
|
||||
setCookie("isTest", isTest);
|
||||
setCookie("isBeginner", isBeginner);
|
||||
setCookie("isBeginnerNum", 0); //从第一步开始,机器人开始的话就是从第二部开始
|
||||
setCookie("userInfo", JSON.stringify(rv));
|
||||
this.store.commit("setSystemUser", rv.systemUser);
|
||||
let obj: any = {
|
||||
avatar: rv.avatar,
|
||||
followeeCount: rv.followeeCount,
|
||||
followerCount: rv.followerCount,
|
||||
};
|
||||
|
||||
this.store.commit("setUserInfo", obj);
|
||||
if (rv.systemUser == 0) {
|
||||
let userid = {
|
||||
ueserId:rv.userId,
|
||||
systemUser:rv.systemUser
|
||||
}
|
||||
this.store.commit("upUserDetail", userid);
|
||||
|
||||
if (window.innerWidth < 768) {
|
||||
message.info(
|
||||
"If you need to design, please log in using an iPad or computer."
|
||||
);
|
||||
this.turnToHomePage("/Square");
|
||||
} else {
|
||||
if (window.innerWidth < 768) {
|
||||
message.info(
|
||||
"If you need to design, please log in using an iPad or computer."
|
||||
);
|
||||
this.turnToHomePage("/Square");
|
||||
} else {
|
||||
this.turnToHomePage("/home");
|
||||
}
|
||||
this.turnToHomePage("/home");
|
||||
}
|
||||
sessionStorage.setItem(
|
||||
"isTimeOne",
|
||||
@@ -537,6 +530,7 @@ export default defineComponent({
|
||||
},
|
||||
//邮箱登录提交
|
||||
submitEmailLogin(emailVerifyCode: any) {
|
||||
let affiliateRef = sessionStorage.getItem('affiliateRef');
|
||||
let data = {
|
||||
email: this.email,
|
||||
emailVerifyCode: emailVerifyCode,
|
||||
@@ -545,6 +539,7 @@ export default defineComponent({
|
||||
"userEmail": this.email,
|
||||
"userName": this.username,
|
||||
"userPassword": md5(this.password + "abc"),
|
||||
invitationCode:affiliateRef?affiliateRef:'',
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.designWorksRegisterCode, data).then(
|
||||
(rv: any) => {
|
||||
|
||||
Reference in New Issue
Block a user