Merge branch 'dev_vite' of ssh://18.167.251.121:10002/aidlab/aida_front into dev_vite
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
/** @type {import('prettier').Config} */
|
||||
module.exports = {
|
||||
// 打印宽度
|
||||
printWidth: 100,
|
||||
// 使用 4 空格缩进
|
||||
tabWidth: 4,
|
||||
// 使用 4 空格缩进,不使用制表符
|
||||
useTabs: true,
|
||||
// 行尾使用 LF (Unix 风格)
|
||||
endOfLine: 'lf',
|
||||
// 语句末尾使用分号
|
||||
semi: false,
|
||||
// 使用单引号
|
||||
singleQuote: false,
|
||||
// 对象和数组末尾不添加尾随逗号
|
||||
trailingComma: 'none',
|
||||
// JSX 引号使用单引号
|
||||
jsxSingleQuote: false,
|
||||
// 括号内侧空格
|
||||
bracketSpacing: true,
|
||||
// JSX 标签不换行
|
||||
bracketSameLine: false,
|
||||
// 箭头函数参数始终使用括号
|
||||
arrowParens: 'always',
|
||||
// HTML、Vue、Angular 和 Markdown 使用 LF
|
||||
htmlWhitespaceSensitivity: 'css',
|
||||
// Vue 文件脚本和样式缩进
|
||||
vueIndentScriptAndStyle: false,
|
||||
// 行注释位置在注释上方,不加空格
|
||||
proseWrap: 'preserve',
|
||||
// 根据文件类型自动推断
|
||||
embeddedLanguageFormatting: 'auto',
|
||||
};
|
||||
17
.prettierrc.json
Normal file
17
.prettierrc.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"printWidth": 100,
|
||||
"tabWidth": 4,
|
||||
"useTabs": true,
|
||||
"endOfLine": "lf",
|
||||
"semi": false,
|
||||
"singleQuote": false,
|
||||
"trailingComma": "none",
|
||||
"jsxSingleQuote": false,
|
||||
"bracketSpacing": true,
|
||||
"bracketSameLine": false,
|
||||
"arrowParens": "always",
|
||||
"htmlWhitespaceSensitivity": "css",
|
||||
"vueIndentScriptAndStyle": true,
|
||||
"proseWrap": "preserve",
|
||||
"embeddedLanguageFormatting": "auto"
|
||||
}
|
||||
@@ -49,8 +49,11 @@ const seller: Module<Seller, RootState> = {
|
||||
},
|
||||
set_designerInfo(state: Seller, value: DesignerInfo) {
|
||||
state.designerInfo = {
|
||||
...state.designerInfo,
|
||||
...value,
|
||||
socialLinks: JSON.parse(value.socialLinks)
|
||||
}
|
||||
if (value.socialLinks) {
|
||||
state.designerInfo.socialLinks = JSON.parse(value.socialLinks)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -474,6 +474,7 @@ export const Https = {
|
||||
|
||||
|
||||
// 卖家端接口
|
||||
sellerUploadFile: '/seller/file/upload', // 卖家上传文件
|
||||
checkSellerDesigner: '/seller/designer/check', // 检查卖家是否为设计师
|
||||
getSellerApplyStatus: '/seller/designer/apply/status', // 获取卖家申请状态
|
||||
submitSellerApply: '/seller/designer/apply', // 提交卖家申请
|
||||
@@ -483,7 +484,8 @@ export const Https = {
|
||||
getSellerOrderList: '/seller/order/page', // 获取卖家订单列表
|
||||
getListingPopup: '/seller/listing/popup/check', // 获取是否勾选发布作品提示
|
||||
setListingPopup: '/seller/listing/popup/set', // 设置是否勾选发布作品提示
|
||||
|
||||
getListingList: '/seller/listing/page', // 获取商品列表,发布和未发布
|
||||
putListingStatus: '/seller/listing/status', // 更新商品状态
|
||||
},
|
||||
|
||||
axiosGet(url, config, pathParams) {
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
centerBox
|
||||
@realTime="onChange"
|
||||
outputType="png"
|
||||
v-bind="bindProps"
|
||||
></VueCropper>
|
||||
</div>
|
||||
<div class="clip_opterate">
|
||||
@@ -51,6 +50,10 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
fixedBox: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: () => ""
|
||||
@@ -65,17 +68,6 @@ const autoCropHeight = computed(() => {
|
||||
return height
|
||||
})
|
||||
|
||||
const bindProps = computed(() => {
|
||||
// :autoCropWidth="isProduct ? undefined : type === 'cover' ? 297 : 242"
|
||||
// :autoCropHeight="isProduct ? undefined : autoCropHeight"
|
||||
// if (props.isProduct) {
|
||||
// return {
|
||||
// autoCropHeight: autoCropHeight.value,
|
||||
// autoCropWidth: props.type === "cover" ? 297 : 242
|
||||
// }
|
||||
// }
|
||||
})
|
||||
|
||||
const onChange = (data) => {
|
||||
if (attrs.onChange) {
|
||||
getCropUrl().then((url) => attrs.onChange(url))
|
||||
@@ -99,7 +91,8 @@ const createCropLabel = ({ text, top, className }) => {
|
||||
label.textContent = text
|
||||
label.style.top = top
|
||||
label.style.left = className === "label-v" ? "50%" : "0"
|
||||
label.style.transform = className === "label-v" ? "translate(-50%, -50%)" : "translateY(-50%)"
|
||||
label.style.transform =
|
||||
className === "label-v" ? "translate(-50%, -50%)" : "translateY(-50%)"
|
||||
return label
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
<div class="and-profile-footer">
|
||||
<template v-if="isEdit">
|
||||
<div class="btns">
|
||||
<button class="cancel" @click="onCancel">Cancel</button>
|
||||
<button class="submit" @click="onSubmit">Save Change</button>
|
||||
<button class="cancel" @click="onCancel()">Cancel</button>
|
||||
<button class="submit" @click="onSubmit()">Save Change</button>
|
||||
</div>
|
||||
<p class="tip">Changes will be reflected on your Stylish Parade brand page.</p>
|
||||
</template>
|
||||
@@ -47,6 +47,7 @@
|
||||
import ImageClipDialog from "./image-clip-dialog.vue"
|
||||
import { useStore } from "vuex"
|
||||
const store = useStore()
|
||||
store.dispatch("seller/get_designerInfo")
|
||||
const designerInfo = computed(() => store.state.seller.designerInfo)
|
||||
const avatar = computed(() => designerInfo.value.avatar)
|
||||
const banner = computed(() => designerInfo.value.brandBanner)
|
||||
@@ -69,13 +70,25 @@
|
||||
input.click()
|
||||
}
|
||||
|
||||
const uploadFile = async (file) => {
|
||||
const formData = new FormData()
|
||||
formData.append("file", file)
|
||||
return Https.axiosPost(Https.httpUrls.sellerUploadFile, formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data"
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const onChangeBanner = () => {
|
||||
uploadImg(({ url }) => {
|
||||
imageClipDialogRef.value.open(
|
||||
url,
|
||||
(file) => {
|
||||
// banner.value = URL.createObjectURL(file)
|
||||
console.log(URL.createObjectURL(file))
|
||||
async (file) => {
|
||||
store.commit("set_loading", true)
|
||||
const res = await uploadFile(file)
|
||||
onSubmit({ brandBanner: res })
|
||||
store.commit("set_loading", false)
|
||||
},
|
||||
{ ratio: [40, 7], isPreview: false, title: "Crop Brand Banner" }
|
||||
)
|
||||
@@ -85,9 +98,11 @@
|
||||
uploadImg(({ url }) => {
|
||||
imageClipDialogRef.value.open(
|
||||
url,
|
||||
(file) => {
|
||||
// avatar.value = URL.createObjectURL(file)
|
||||
console.log(URL.createObjectURL(file))
|
||||
async (file) => {
|
||||
store.commit("set_loading", true)
|
||||
const res = await uploadFile(file)
|
||||
onSubmit({ avatar: res })
|
||||
store.commit("set_loading", false)
|
||||
},
|
||||
{ ratio: [1, 1], isPreview: true, title: "Crop Avatar" }
|
||||
)
|
||||
@@ -99,12 +114,16 @@
|
||||
const onCancel = () => {
|
||||
isEdit.value = false
|
||||
}
|
||||
const onSubmit = async () => {
|
||||
const res = await brandInfoRef.value.submit()
|
||||
const onSubmit = async (value = null) => {
|
||||
const res = value ? value : await brandInfoRef.value.submit()
|
||||
const data = {
|
||||
...designerInfo.value,
|
||||
...res,
|
||||
socialLinks: JSON.stringify(res.socialLinks)
|
||||
...res
|
||||
}
|
||||
try {
|
||||
data.socialLinks = JSON.stringify(data.socialLinks)
|
||||
} catch (error) {
|
||||
data.socialLinks = JSON.stringify([])
|
||||
}
|
||||
Https.axiosPut(Https.httpUrls.updateDesignerInfo, data).then((res) => {
|
||||
isEdit.value = false
|
||||
@@ -123,6 +142,7 @@
|
||||
margin-bottom: 6rem;
|
||||
> .bg {
|
||||
position: relative;
|
||||
min-height: 15rem;
|
||||
> img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
|
||||
@@ -43,7 +43,7 @@ const multiple = props.multiple === true
|
||||
|
||||
const selectedValues = computed(() => {
|
||||
if (!multiple) {
|
||||
return typeof props.modelValue === 'undefined' || props.modelValue === null
|
||||
return typeof props.modelValue === "undefined" || props.modelValue === null
|
||||
? []
|
||||
: [props.modelValue]
|
||||
}
|
||||
|
||||
@@ -198,7 +198,11 @@
|
||||
<span class="help-text">{{ $t("SellerListEdit.categoryTips") }}</span>
|
||||
</div>
|
||||
<div class="form-item-value no-border">
|
||||
<Radio multiple :options="categoryOptions" v-model="currentListing.category" />
|
||||
<Radio
|
||||
multiple
|
||||
:options="categoryOptions"
|
||||
v-model="currentListing.category"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="license-note flex align-center">
|
||||
@@ -242,7 +246,12 @@ import SellerHeader from "../../seller-header.vue"
|
||||
import Radio from "./components/Radio.vue"
|
||||
import ImageClipDialog from "../../BrandProfile/image-clip-dialog.vue"
|
||||
import { useStore } from "vuex"
|
||||
import { fetchSketchDetail, uploadFile, fetchListingDetailById, fetchUpdateListing } from "./api"
|
||||
import {
|
||||
fetchSketchDetail,
|
||||
uploadFile,
|
||||
fetchListingDetailById,
|
||||
fetchUpdateListing
|
||||
} from "./api"
|
||||
|
||||
const ROUTER = useRouter()
|
||||
const { t } = useI18n()
|
||||
|
||||
@@ -65,7 +65,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="null" v-show="list.length === 0 && !loading && finish">no data</div>
|
||||
<div class="null" v-show="list.length === 0 && !loading && finish">
|
||||
<img src="@/assets/images/homePage/null_img.png" alt="" />
|
||||
</div>
|
||||
<div class="placeholder" ref="placeholderRef" v-show="!loading"></div>
|
||||
<div class="footer" :class="{ null: list.length === 0 }" v-if="!finish">
|
||||
<a-spin :delay="0.5" v-show="loading" />
|
||||
@@ -120,7 +122,8 @@
|
||||
size: size.value
|
||||
}
|
||||
if (nameOrId.value) data.keyword = nameOrId.value
|
||||
Https.axiosGet(Https.httpUrls.getSellerOrderList, { params: data }).then((res) => {
|
||||
Https.axiosGet(Https.httpUrls.getSellerOrderList, { params: data })
|
||||
.then((res) => {
|
||||
res.content?.forEach((v) => {
|
||||
const obj = {
|
||||
orderId: v.orderId,
|
||||
@@ -142,6 +145,10 @@
|
||||
finish.value = page.value > total.value / size.value
|
||||
loading.value = false
|
||||
})
|
||||
.catch(() => {
|
||||
finish.value = true
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
const getSummary = () => {
|
||||
Https.axiosGet(Https.httpUrls.getSellerOrderSummary).then((res) => {
|
||||
@@ -360,8 +367,14 @@
|
||||
}
|
||||
> .null {
|
||||
margin-top: 10rem;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
> img {
|
||||
width: 30rem;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
> .footer {
|
||||
min-height: 10rem;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
import myEvent from "@/tool/myEvents.js"
|
||||
import { useStore } from "vuex"
|
||||
const store = useStore()
|
||||
store.dispatch("seller/get_designerInfo")
|
||||
// store.dispatch("seller/get_designerInfo")
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const visible = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user