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 = () =>{
<style lang="scss" scoped>
.BackTopBox{
position: fixed;
right: 20px;
bottom: 100px;
right: 5vw;
bottom: 5vw;
z-index: 15;
}
</style>
\ No newline at end of file
......@@ -52,7 +52,7 @@
</div>
</div>
<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>
<!-- <template v-if="showCurrentTemplate.PageImageList.length>1">
......@@ -84,7 +84,7 @@ import { useSellTemplateStore,useSlidesStore } from '@/store'
import { useScreenStore } from "@/store/screen";
import { storeToRefs } from "pinia";
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 { useRouter } from "vue-router";
import UserCard from "@/components/User/UserCard.vue";
......@@ -105,26 +105,26 @@ const scrollToElement = ref<any>()
const searchData = ref({} as any)
searchData.value = inject(injectKeyTemplate)
const marketStore = useScreenStore()
const { market, ConfigId} = storeToRefs(useScreenStore())
const { model, market, ConfigId} = storeToRefs(useScreenStore())
const personVisible = ref(false)
const model = ref(2)
// const model = ref(2)
const showCurrentTemplate = ref<any>()
const imgList = ref<any>()
const datas = reactive({
scrollTop: 0,
currentImg: 0,// 当前查看img
})
let TemplateType = 0
if(router.currentRoute.value.path=='/market') model.value=1
if(router.currentRoute.value.path.includes('create')) {
model.value=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.path.includes('op')) {
model.value=0
}
marketStore.setModel(model.value)
// let TemplateType = 0
// if(router.currentRoute.value.path=='/market') model.value=1
// if(router.currentRoute.value.path.includes('create')) {
// model.value=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.path.includes('op')) {
// model.value=0
// }
// marketStore.setModel(model.value)
const props = defineProps({
DetaTem:{
......@@ -143,6 +143,10 @@ const props = defineProps({
type: Number,
default: 0,
},
isModel: {
type: Number as any,
default: 0,
}
})
const emit = defineEmits<{
(event: 'close'): void,
......@@ -237,11 +241,12 @@ const goToTemplate = (item: any) => {
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==1) {
else if(model.value==1||props.isModel) {
searchData.value.currentMenu = null
url = managerTemplateLink(item.TempId,item.TemplateType)
openNewBlank(url)
}
if(url!='') {
if(url!=''&&model.value!=1) {
router.push({
path:url
})
......
......@@ -353,9 +353,9 @@
const { setNewDatasList } = useEditor()
const TemplateAuthType = ref([
{Type: 0,Name: '免费',},
{Type: 1,Name: 'VIP',},
{Type: 2,Name: '私有',}
{Type: 1,Name: '全部',},
{Type: 2,Name: 'VIP',},
{Type: 3,Name: '私有',}
])
const ParentObj = reactive({
......
......@@ -125,7 +125,7 @@ const datas = reactive({
Width: 0,
Height: 0,
ColorId: '',
AuthType: 2,//0-免费模版 1-vip模版 2-私有模版
AuthType: 3,//1-全部可见 2-vip可见 2-私有模版
SubColor: null, // 父级颜色
}
},
......
......@@ -196,14 +196,14 @@
</div>
<div class="MarketIndexList-img">
<LazyImg :url="item.CoverImg"
class="rounded" style="display: block;" />
class="rounded" style="display: block;"/>
</div>
</div>
</template>
</Waterfall>
</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;">
<el-empty description="暂无数据" :image="noDataImg(1)" />
</div>
......@@ -301,7 +301,6 @@ const datas = reactive({
TemDetails: {}
})
const DetailsVisible = ref(false)
let TemplateType = 0
if(router.currentRoute.value.path=='/market') model.value=1
if(router.currentRoute.value.path.includes('create')) {
......@@ -343,6 +342,7 @@ const goBackTop = () => {
marketRef.value.scrollTop = 0
}
// 关闭vip购买提示
const closeVip = () =>{
userInfo.value.OpenPrompt = true
......
......@@ -130,7 +130,7 @@ const getColorShade = async (newSlides:any) => {
let dark = false
let day = 0
// 根据集团渲染logo
if(tempDatas.value.AuthType<=1){
if(tempDatas.value.AuthType<=2){
for(let j=0;j<colorList.value.length;j++){
if (getRgbLevel(colorList.value[j].Color) > 50) dark = true
}
......
......@@ -201,6 +201,7 @@
:Details="datas.TemDetails"
:Total="dataList.length"
:TemCurrent="datas.currentImg"
:isModel="1"
@close="DetailsVisible=false"
@previous="previous"
@next="next"/>
......@@ -266,7 +267,7 @@ const SalesEditorStore = useSellTemplateStore()
const { SalesEditor, SalesBack } = storeToRefs(useSellTemplateStore())
const personVisible = ref(false)
const model = ref(2)
// const model = ref(2)
const showCurrentTemplate = ref<any>()
const imgList = ref<any>()
const deleteLoading = ref<any>(null)
......@@ -291,16 +292,15 @@ const datas = reactive({
currentImg: 0,// 当前查看img
})
const DetailsVisible = ref(false)
let TemplateType = 0
if(router.currentRoute.value.path=='/market') model.value=1
if(router.currentRoute.value.path.includes('create')) {
model.value=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.path.includes('op')) {
model.value=0
}
marketStore.setModel(model.value)
// let TemplateType = 0
// if(router.currentRoute.value.path=='/market') model.value=1
// if(router.currentRoute.value.path.includes('create')) {
// model.value=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.path.includes('op')) {
// model.value=0
// }
const queryObj = reactive({
pageIndex: 1,
pageSize: 20,
......@@ -314,7 +314,7 @@ const queryObj = reactive({
ColorNames: [], //颜色名称
pageCount: 0, //总页数
TempType: 0,
TemplateType: TemplateType,//0 不限 1模版 2广告
TemplateType: 0,//0 不限 1模版 2广告
type: 0,
OrderByType: 1,//排序方式
})
......@@ -324,7 +324,7 @@ const queryColor = ref({
})
const setTemplateType = ref(1)
const ColorList = ref([])
marketStore.setModel('1')
const tableScrollHandler = ()=>{
if(queryObj.pageCount>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