Commit 99eff7d6 authored by zhengke's avatar zhengke

op 横版竖版 修复bug

parent 8d0e824e
......@@ -209,7 +209,7 @@ const goToTemplate = (item: any) => {
if((searchData.value.TempId2&&searchData.value.TempId2!=item.TempId)||!searchData.value.TempId2) slidesStore.ClearSlides()
let url = ''
if(model.value==2) url = createSaleCreateLink(item.TempId,item.TemplateType)
else if(model.value==0 && router.currentRoute.value.params.configId) url = createOpEditorLink(parseInt(router.currentRoute.value.params.configId.toString()),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) {
searchData.value.currentMenu = null
url = managerTemplateLink(item.TempId,item.TemplateType)
......
......@@ -138,14 +138,14 @@ const routes: RouteRecordRaw[] = [
}
},
{
path: '/team_editor/:configId(\\d+)/:tid(\\d+)',
path: '/team_editor/:configId(\\d+)/:tempType(\\d+)/:tid(\\d+)',
component: () => import('@/views/Editor/Editor.vue'),
meta:{
title:'设计团队行程'
}
},
{
path: '/team_editor/:configId(\\d+)',
path: '/team_editor/:configId(\\d+)/:tempType(\\d+)',
component: () => import('@/views/Editor/Editor.vue'),
meta:{
title:'修改团队行程'
......
......@@ -10,6 +10,7 @@ export interface ScreenState {
TemplateType: [],
TemplateDataSource: [],
TempId: number,
TempType: number,
CoverImg: any,
isCoverImg: boolean,
dataLoading: number,
......@@ -28,6 +29,7 @@ export const useScreenStore = defineStore('screen', {
TemplateType: [], // 数据源分类
TemplateDataSource: [], // 所有数据源
TempId: 0, // 模版Id
TempType: 1,// 横版竖版
CoverImg: null, // 封面图
isCoverImg: false, // 封面
dataLoading: 0, // 记录保存是否成功
......@@ -71,6 +73,9 @@ export const useScreenStore = defineStore('screen', {
setTempId(TempId: number) {
this.TempId = TempId
},
setTempType(TempType: number) {
this.TempType = TempType
},
setDataLoading(dataLoading: number) {
this.dataLoading = dataLoading
},
......
......@@ -26,8 +26,8 @@ export const createSaleEditorLink = (id:number,tid:number,type:1|2,pid:number,ep
export const createSaleCreateLink = (tid:number,type:1|2) =>{
return `/editor/${tid}/${type}`
}
export const createOpEditorLink = (configId:number,tid:number) =>{
return `/team_editor/${configId}/${tid}`
export const createOpEditorLink = (configId:number,tempType:number,tid:number) =>{
return `/team_editor/${configId}/${tempType}/${tid}`
}
export const managerTemplateLink = (tid:number,type:1|2) =>{
return `/manager_template/${tid}/${type}`
......
......@@ -28,7 +28,7 @@ const userLoginHandler = async ()=>{
//if(response.isSuccess){
if(param.model=='0') {
router.push({
path: `/team_editor/${param.ConfigId}`
path: `/team_editor/${param.ConfigId}/${param.TempType}`
})
} else if(param.model == '448963') {
router.push({
......
......@@ -55,6 +55,7 @@ const initSellCreate = ()=>{
const initOpModify = async ()=>{
const ConfigId = parseInt(params.configId.toString())
const TempType = parseInt(params.tempType.toString())
try {
const queryMsg = {ConfigId}
const response = await ConfigService.triptemplateGetTripConfig(queryMsg);
......@@ -64,13 +65,14 @@ const initOpModify = async ()=>{
useScreenStore().setIsModel(true)
useScreenStore().setTempId(data.TempId)
useScreenStore().setConfigId(ConfigId)
useScreenStore().setTempType(TempType)
useScreenStore().setModel(0)
showEditor.value=true
return
}
}
} catch (error) { }
const path = `/market/op/${ConfigId}`
const path = `/market/op/${ConfigId}/${TempType}`
router.push({path})
}
......
......@@ -220,7 +220,7 @@ const isCopyTo = ref(false)
const journeyAdsDetails = ref<Object>()
const psdVisibleStatus = ref(false)
const { market, model, ConfigId, CoverImg, dataLoading, TempId, SourceLoading } = storeToRefs(useScreenStore())
const { market, model, ConfigId, CoverImg, dataLoading, TempId, TempType, SourceLoading } = storeToRefs(useScreenStore())
// 返回到首页 type 1 模版列表页 0 销售在线模版页
const goBack = (type:any) =>{
console.log(model.value,searchData.value.currentMenu)
......@@ -239,7 +239,7 @@ const goBack = (type:any) =>{
let path ='/'
const t = useSlidesStore().viewportRatio<0?1:2
if(model.value==0) {
path = `/market/op/${ConfigId.value}/${t}`
path = `/market/op/${ConfigId.value}/${TempType.value}`
router.push({path})
}else if(model.value==2&&searchData.value.currentMenu>=0){
if(type) path = `/market/create`
......
......@@ -237,6 +237,11 @@ const {
userInfo
} = storeToRefs(useUserStore())
const router = useRouter();
const parmas = ref({} as any)
const currentRoute = router.currentRoute.value
parmas.value = currentRoute.params
const lines = ref([] as Array < any > ) //线路
const countriesOther = ref([] as Array < any > ) //国家
const countries = ref([] as Array < any > ) //国家
......@@ -258,6 +263,7 @@ const loading = ref(false as any)
const searchData = ref({} as any)
searchData.value = inject(injectKeyTemplate)
const marketStore = useScreenStore()
const { TempType } = storeToRefs(marketStore)
const { SalesEditor, SalesBack } = storeToRefs(useSellTemplateStore())
......@@ -302,8 +308,6 @@ const queryColor = ref({
Code: '',
})
const parmas = ref({} as any)
parmas.value = router.currentRoute.value.params
// 关闭vip购买提示
const closeVip = () =>{
......@@ -381,7 +385,7 @@ const goToTemplate = (item: any) => {
if((searchData.value.TempId2&&searchData.value.TempId2!=item.TempId)||!searchData.value.TempId2) slidesStore.ClearSlides()
let url = ''
if(model.value==2) url = createSaleCreateLink(item.TempId,item.TemplateType)
else if(model.value==0 && router.currentRoute.value.params.configId) url = createOpEditorLink(parseInt(router.currentRoute.value.params.configId.toString()),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) url = managerTemplateLink(item.TempId,item.TemplateType)
if(url!='') {
router.push({
......@@ -398,6 +402,7 @@ const search = () => {
* 获取模板市场分页列表
*/
const queryTemplateBySearchHandler = async () => {
console.log(parmas,'---------')
if(parmas.value.temptype) queryObj.TempType = parseInt(parmas.value.temptype.toString())
loading.value = true
try {
......
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