Commit f97a454e authored by zhengke's avatar zhengke

Merge branch 'master' into 1.4.0

# Conflicts:
#	src/components/home/BackTop.vue
#	src/views/Market/Index.vue
parents d80235e2 5706d176
...@@ -17,8 +17,8 @@ const BackTop = () =>{ ...@@ -17,8 +17,8 @@ const BackTop = () =>{
<style lang="scss" scoped> <style lang="scss" scoped>
.BackTopBox{ .BackTopBox{
position: fixed; position: fixed;
right: 20px; right: 5vw;
bottom: 100px; bottom: 5vw;
z-index: 15; z-index: 15;
} }
</style> </style>
\ No newline at end of file
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</div> </div>
</div> </div>
<div class="row flex-center"> <div class="row flex-center">
<div class="MarketAdd MarketAddw140 pointer" @click="goToTemplate(showCurrentTemplate)">立即使用</div> <div class="MarketAdd MarketAddw140 pointer" @click="goToTemplate(showCurrentTemplate)">立即{{model==1?'编辑':'使用'}}</div>
</div> </div>
</div> </div>
<!-- <template v-if="showCurrentTemplate.PageImageList.length>1"> <!-- <template v-if="showCurrentTemplate.PageImageList.length>1">
...@@ -84,7 +84,7 @@ import { useSellTemplateStore,useSlidesStore } from '@/store' ...@@ -84,7 +84,7 @@ import { useSellTemplateStore,useSlidesStore } from '@/store'
import { useScreenStore } from "@/store/screen"; import { useScreenStore } from "@/store/screen";
import { storeToRefs } from "pinia"; import { storeToRefs } from "pinia";
import { injectKeyTemplate } from '@/types/injectKey' import { injectKeyTemplate } from '@/types/injectKey'
import { noDataImg, createOpEditorLink, createSaleCreateLink, managerTemplateLink, createSaleEditorLink } from '@/utils/common' import { noDataImg, createOpEditorLink, createSaleCreateLink, managerTemplateLink, createSaleEditorLink, openNewBlank } from '@/utils/common'
import { ElLoading, ElMessage, ElMessageBox } from "element-plus"; import { ElLoading, ElMessage, ElMessageBox } from "element-plus";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import UserCard from "@/components/User/UserCard.vue"; import UserCard from "@/components/User/UserCard.vue";
...@@ -105,26 +105,26 @@ const scrollToElement = ref<any>() ...@@ -105,26 +105,26 @@ const scrollToElement = ref<any>()
const searchData = ref({} as any) const searchData = ref({} as any)
searchData.value = inject(injectKeyTemplate) searchData.value = inject(injectKeyTemplate)
const marketStore = useScreenStore() const marketStore = useScreenStore()
const { market, ConfigId} = storeToRefs(useScreenStore()) const { model, market, ConfigId} = storeToRefs(useScreenStore())
const personVisible = ref(false) const personVisible = ref(false)
const model = ref(2) // const model = ref(2)
const showCurrentTemplate = ref<any>() const showCurrentTemplate = ref<any>()
const imgList = ref<any>() const imgList = ref<any>()
const datas = reactive({ const datas = reactive({
scrollTop: 0, scrollTop: 0,
currentImg: 0,// 当前查看img currentImg: 0,// 当前查看img
}) })
let TemplateType = 0 // let TemplateType = 0
if(router.currentRoute.value.path=='/market') model.value=1 // if(router.currentRoute.value.path=='/market') model.value=1
if(router.currentRoute.value.path.includes('create')) { // if(router.currentRoute.value.path.includes('create')) {
model.value=2 // model.value=2
if(router.currentRoute.value.fullPath.indexOf('/ad')!=-1) TemplateType = 2 // if(router.currentRoute.value.fullPath.indexOf('/ad')!=-1) TemplateType = 2
else if(router.currentRoute.value.fullPath.indexOf('/trip')!=-1) TemplateType = 1 // else if(router.currentRoute.value.fullPath.indexOf('/trip')!=-1) TemplateType = 1
}else if(router.currentRoute.value.path.includes('op')) { // }else if(router.currentRoute.value.path.includes('op')) {
model.value=0 // model.value=0
} // }
marketStore.setModel(model.value) // marketStore.setModel(model.value)
const props = defineProps({ const props = defineProps({
DetaTem:{ DetaTem:{
...@@ -143,6 +143,10 @@ const props = defineProps({ ...@@ -143,6 +143,10 @@ const props = defineProps({
type: Number, type: Number,
default: 0, default: 0,
}, },
isModel: {
type: Number as any,
default: 0,
}
}) })
const emit = defineEmits<{ const emit = defineEmits<{
(event: 'close'): void, (event: 'close'): void,
...@@ -237,11 +241,12 @@ const goToTemplate = (item: any) => { ...@@ -237,11 +241,12 @@ const goToTemplate = (item: any) => {
url = createSaleEditorLink(Editor.id,item.TempId,Editor.type,Editor.pid,Editor.e,Editor.c) url = createSaleEditorLink(Editor.id,item.TempId,Editor.type,Editor.pid,Editor.e,Editor.c)
} }
else if(model.value==0 && router.currentRoute.value.params.configId) url = createOpEditorLink(parseInt(router.currentRoute.value.params.configId.toString()),item.TempType,item.TempId) else if(model.value==0 && router.currentRoute.value.params.configId) url = createOpEditorLink(parseInt(router.currentRoute.value.params.configId.toString()),item.TempType,item.TempId)
else if(model.value==1) { else if(model.value==1||props.isModel) {
searchData.value.currentMenu = null searchData.value.currentMenu = null
url = managerTemplateLink(item.TempId,item.TemplateType) url = managerTemplateLink(item.TempId,item.TemplateType)
openNewBlank(url)
} }
if(url!='') { if(url!=''&&model.value!=1) {
router.push({ router.push({
path:url path:url
}) })
......
...@@ -353,9 +353,9 @@ ...@@ -353,9 +353,9 @@
const { setNewDatasList } = useEditor() const { setNewDatasList } = useEditor()
const TemplateAuthType = ref([ const TemplateAuthType = ref([
{Type: 0,Name: '免费',}, {Type: 1,Name: '全部',},
{Type: 1,Name: 'VIP',}, {Type: 2,Name: 'VIP',},
{Type: 2,Name: '私有',} {Type: 3,Name: '私有',}
]) ])
const ParentObj = reactive({ const ParentObj = reactive({
......
...@@ -125,7 +125,7 @@ const datas = reactive({ ...@@ -125,7 +125,7 @@ const datas = reactive({
Width: 0, Width: 0,
Height: 0, Height: 0,
ColorId: '', ColorId: '',
AuthType: 2,//0-免费模版 1-vip模版 2-私有模版 AuthType: 3,//1-全部可见 2-vip可见 2-私有模版
SubColor: null, // 父级颜色 SubColor: null, // 父级颜色
} }
}, },
......
...@@ -196,14 +196,14 @@ ...@@ -196,14 +196,14 @@
</div> </div>
<div class="MarketIndexList-img"> <div class="MarketIndexList-img">
<LazyImg :url="item.CoverImg" <LazyImg :url="item.CoverImg"
class="rounded" style="display: block;" /> class="rounded" style="display: block;"/>
</div> </div>
</div> </div>
</template> </template>
</Waterfall> </Waterfall>
</div> </div>
<div v-else-if="dataList.length == 0 && !loading" class="q-mt-lg full-width full-height bg-white rounded" <div v-else-if="dataList.length == 0 && !loading" class="q-mt-lg bg-white rounded"
style="padding: 3.68vw 0;"> style="padding: 3.68vw 0;">
<el-empty description="暂无数据" :image="noDataImg(1)" /> <el-empty description="暂无数据" :image="noDataImg(1)" />
</div> </div>
...@@ -301,7 +301,6 @@ const datas = reactive({ ...@@ -301,7 +301,6 @@ const datas = reactive({
TemDetails: {} TemDetails: {}
}) })
const DetailsVisible = ref(false) const DetailsVisible = ref(false)
let TemplateType = 0 let TemplateType = 0
if(router.currentRoute.value.path=='/market') model.value=1 if(router.currentRoute.value.path=='/market') model.value=1
if(router.currentRoute.value.path.includes('create')) { if(router.currentRoute.value.path.includes('create')) {
...@@ -343,6 +342,7 @@ const goBackTop = () => { ...@@ -343,6 +342,7 @@ const goBackTop = () => {
marketRef.value.scrollTop = 0 marketRef.value.scrollTop = 0
} }
// 关闭vip购买提示 // 关闭vip购买提示
const closeVip = () =>{ const closeVip = () =>{
userInfo.value.OpenPrompt = true userInfo.value.OpenPrompt = true
......
...@@ -130,7 +130,7 @@ const getColorShade = async (newSlides:any) => { ...@@ -130,7 +130,7 @@ const getColorShade = async (newSlides:any) => {
let dark = false let dark = false
let day = 0 let day = 0
// 根据集团渲染logo // 根据集团渲染logo
if(tempDatas.value.AuthType<=1){ if(tempDatas.value.AuthType<=2){
for(let j=0;j<colorList.value.length;j++){ for(let j=0;j<colorList.value.length;j++){
if (getRgbLevel(colorList.value[j].Color) > 50) dark = true if (getRgbLevel(colorList.value[j].Color) > 50) dark = true
} }
......
...@@ -201,6 +201,7 @@ ...@@ -201,6 +201,7 @@
:Details="datas.TemDetails" :Details="datas.TemDetails"
:Total="dataList.length" :Total="dataList.length"
:TemCurrent="datas.currentImg" :TemCurrent="datas.currentImg"
:isModel="1"
@close="DetailsVisible=false" @close="DetailsVisible=false"
@previous="previous" @previous="previous"
@next="next"/> @next="next"/>
...@@ -266,7 +267,7 @@ const SalesEditorStore = useSellTemplateStore() ...@@ -266,7 +267,7 @@ const SalesEditorStore = useSellTemplateStore()
const { SalesEditor, SalesBack } = storeToRefs(useSellTemplateStore()) const { SalesEditor, SalesBack } = storeToRefs(useSellTemplateStore())
const personVisible = ref(false) const personVisible = ref(false)
const model = ref(2) // const model = ref(2)
const showCurrentTemplate = ref<any>() const showCurrentTemplate = ref<any>()
const imgList = ref<any>() const imgList = ref<any>()
const deleteLoading = ref<any>(null) const deleteLoading = ref<any>(null)
...@@ -291,16 +292,15 @@ const datas = reactive({ ...@@ -291,16 +292,15 @@ const datas = reactive({
currentImg: 0,// 当前查看img currentImg: 0,// 当前查看img
}) })
const DetailsVisible = ref(false) const DetailsVisible = ref(false)
let TemplateType = 0 // let TemplateType = 0
if(router.currentRoute.value.path=='/market') model.value=1 // if(router.currentRoute.value.path=='/market') model.value=1
if(router.currentRoute.value.path.includes('create')) { // if(router.currentRoute.value.path.includes('create')) {
model.value=2 // model.value=2
if(router.currentRoute.value.fullPath.indexOf('/ad')!=-1) TemplateType = 2 // if(router.currentRoute.value.fullPath.indexOf('/ad')!=-1) TemplateType = 2
else if(router.currentRoute.value.fullPath.indexOf('/trip')!=-1) TemplateType = 1 // else if(router.currentRoute.value.fullPath.indexOf('/trip')!=-1) TemplateType = 1
}else if(router.currentRoute.value.path.includes('op')) { // }else if(router.currentRoute.value.path.includes('op')) {
model.value=0 // model.value=0
} // }
marketStore.setModel(model.value)
const queryObj = reactive({ const queryObj = reactive({
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 20,
...@@ -314,7 +314,7 @@ const queryObj = reactive({ ...@@ -314,7 +314,7 @@ const queryObj = reactive({
ColorNames: [], //颜色名称 ColorNames: [], //颜色名称
pageCount: 0, //总页数 pageCount: 0, //总页数
TempType: 0, TempType: 0,
TemplateType: TemplateType,//0 不限 1模版 2广告 TemplateType: 0,//0 不限 1模版 2广告
type: 0, type: 0,
OrderByType: 1,//排序方式 OrderByType: 1,//排序方式
}) })
...@@ -324,7 +324,7 @@ const queryColor = ref({ ...@@ -324,7 +324,7 @@ const queryColor = ref({
}) })
const setTemplateType = ref(1) const setTemplateType = ref(1)
const ColorList = ref([]) const ColorList = ref([])
marketStore.setModel('1')
const tableScrollHandler = ()=>{ const tableScrollHandler = ()=>{
if(queryObj.pageCount>queryObj.pageIndex){ if(queryObj.pageCount>queryObj.pageIndex){
queryObj.pageIndex++ queryObj.pageIndex++
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment