|
@@ -94,121 +94,121 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
|
|
|
-//例如:import 《组件名称》 from '《组件路径》';
|
|
|
|
-import Paging from "@/components/pagination";
|
|
|
|
-import { format } from 'date-fns'
|
|
|
|
|
|
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
|
|
|
+// 例如:import 《组件名称》 from '《组件路径》';
|
|
|
|
+import Paging from '@/components/pagination'
|
|
|
|
+// import { format } from 'date-fns'
|
|
export default {
|
|
export default {
|
|
- name: "exhibition-type",
|
|
|
|
- //import引入的组件需要注入到对象中才能使用
|
|
|
|
|
|
+ name: 'exhibition-type',
|
|
|
|
+ // import引入的组件需要注入到对象中才能使用
|
|
components: {
|
|
components: {
|
|
- Paging,
|
|
|
|
|
|
+ Paging
|
|
},
|
|
},
|
|
- data() {
|
|
|
|
- //这里存放数据
|
|
|
|
|
|
+ data () {
|
|
|
|
+ // 这里存放数据
|
|
return {
|
|
return {
|
|
- exhibitionType: "hot",
|
|
|
|
|
|
+ exhibitionType: 'hot',
|
|
dataList: [],
|
|
dataList: [],
|
|
paging: {
|
|
paging: {
|
|
pageSize: 9,
|
|
pageSize: 9,
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
total: 0,
|
|
total: 0,
|
|
showSize: 9,
|
|
showSize: 9,
|
|
- current: 1,
|
|
|
|
|
|
+ current: 1
|
|
},
|
|
},
|
|
params: {
|
|
params: {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 9,
|
|
pageSize: 9,
|
|
- type:''
|
|
|
|
|
|
+ type: ''
|
|
},
|
|
},
|
|
typeChange: {
|
|
typeChange: {
|
|
- hot: "start",
|
|
|
|
- preview: "unstart",
|
|
|
|
- review: "end",
|
|
|
|
- },
|
|
|
|
- };
|
|
|
|
|
|
+ hot: 'start',
|
|
|
|
+ preview: 'unstart',
|
|
|
|
+ review: 'end'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- //监听属性 类似于data概念
|
|
|
|
|
|
+ // 监听属性 类似于data概念
|
|
computed: {},
|
|
computed: {},
|
|
- //监控data中的数据变化
|
|
|
|
|
|
+ // 监控data中的数据变化
|
|
watch: {
|
|
watch: {
|
|
paging: {
|
|
paging: {
|
|
deep: true,
|
|
deep: true,
|
|
- handler: function () {},
|
|
|
|
- },
|
|
|
|
|
|
+ handler: function () {}
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- //方法集合
|
|
|
|
|
|
+ // 方法集合
|
|
methods: {
|
|
methods: {
|
|
- async getList() {
|
|
|
|
|
|
+ async getList () {
|
|
let result = await this.$http({
|
|
let result = await this.$http({
|
|
- method: "post",
|
|
|
|
- url: "/api/web/exhibition/list",
|
|
|
|
- data: this.params,
|
|
|
|
- });
|
|
|
|
- this.dataList = result.data.list;
|
|
|
|
- this.paging.total = result.data.total;
|
|
|
|
- console.log('this.dataList-----------------------',this.dataList)
|
|
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: '/api/web/exhibition/list',
|
|
|
|
+ data: this.params
|
|
|
|
+ })
|
|
|
|
+ this.dataList = result.data.list
|
|
|
|
+ this.paging.total = result.data.total
|
|
|
|
+ console.log('this.dataList-----------------------', this.dataList)
|
|
// // 暂时没有图片
|
|
// // 暂时没有图片
|
|
this.dataList = this.dataList.map((item) => {
|
|
this.dataList = this.dataList.map((item) => {
|
|
return {
|
|
return {
|
|
...item,
|
|
...item,
|
|
imgUrl:
|
|
imgUrl:
|
|
- "test-exhibition.png",
|
|
|
|
- };
|
|
|
|
- });
|
|
|
|
|
|
+ 'test-exhibition.png'
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- switchType(type) {
|
|
|
|
- this.exhibitionType = type;
|
|
|
|
- this.params["type"] = this.typeChange[this.exhibitionType];
|
|
|
|
- this.params["pageNum"] = 1;
|
|
|
|
- this.paging.current = 1;
|
|
|
|
- this.getList();
|
|
|
|
|
|
+ switchType (type) {
|
|
|
|
+ this.exhibitionType = type
|
|
|
|
+ this.params['type'] = this.typeChange[this.exhibitionType]
|
|
|
|
+ this.params['pageNum'] = 1
|
|
|
|
+ this.paging.current = 1
|
|
|
|
+ this.getList()
|
|
},
|
|
},
|
|
- back() {
|
|
|
|
- this.$router.push({ path: "/exhibition" });
|
|
|
|
|
|
+ back () {
|
|
|
|
+ this.$router.push({ path: '/exhibition' })
|
|
},
|
|
},
|
|
- pageChange(val) {
|
|
|
|
- console.log(val);
|
|
|
|
- this.paging.current = val;
|
|
|
|
- this.params.pageNum = val;
|
|
|
|
- this.getList();
|
|
|
|
|
|
+ pageChange (val) {
|
|
|
|
+ console.log(val)
|
|
|
|
+ this.paging.current = val
|
|
|
|
+ this.params.pageNum = val
|
|
|
|
+ this.getList()
|
|
},
|
|
},
|
|
- toDetail(item) {
|
|
|
|
|
|
+ toDetail (item) {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
- path: "/exhibition-detail",
|
|
|
|
- query: { ...item, navType: this.exhibitionType },
|
|
|
|
- });
|
|
|
|
|
|
+ path: '/exhibition-detail',
|
|
|
|
+ query: { ...item, navType: this.exhibitionType }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- jumpTo(onlineLink){
|
|
|
|
|
|
+ jumpTo (onlineLink) {
|
|
window.open(onlineLink)
|
|
window.open(onlineLink)
|
|
},
|
|
},
|
|
- async getOnlineLink(){
|
|
|
|
|
|
+ async getOnlineLink () {
|
|
let result = await this.$http({
|
|
let result = await this.$http({
|
|
- method: "get",
|
|
|
|
- url: "/api/web/exhibition/online",
|
|
|
|
- data: this.params,
|
|
|
|
- });
|
|
|
|
- this.onlineLink = result && result.data && result.data.url;
|
|
|
|
|
|
+ method: 'get',
|
|
|
|
+ url: '/api/web/exhibition/online',
|
|
|
|
+ data: this.params
|
|
|
|
+ })
|
|
|
|
+ this.onlineLink = result && result.data && result.data.url
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- //生命周期 - 创建完成(可以访问当前this实例)
|
|
|
|
- created() {
|
|
|
|
|
|
+ // 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
|
+ created () {
|
|
this.exhibitionType =
|
|
this.exhibitionType =
|
|
- (this.$route.query && this.$route.query["type"]) || "preview";
|
|
|
|
- this.params["type"] = this.typeChange[this.exhibitionType];
|
|
|
|
- this.getList();
|
|
|
|
|
|
+ (this.$route.query && this.$route.query['type']) || 'preview'
|
|
|
|
+ this.params['type'] = this.typeChange[this.exhibitionType]
|
|
|
|
+ this.getList()
|
|
this.getOnlineLink()
|
|
this.getOnlineLink()
|
|
},
|
|
},
|
|
- //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
|
- mounted() {},
|
|
|
|
- beforeCreate() {}, //生命周期 - 创建之前
|
|
|
|
- beforeMount() {}, //生命周期 - 挂载之前
|
|
|
|
- beforeUpdate() {}, //生命周期 - 更新之前
|
|
|
|
- updated() {}, //生命周期 - 更新之后
|
|
|
|
- beforeDestroy() {}, //生命周期 - 销毁之前
|
|
|
|
- destroyed() {}, //生命周期 - 销毁完成
|
|
|
|
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
|
-};
|
|
|
|
|
|
+ // 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
|
+ mounted () {},
|
|
|
|
+ beforeCreate () {}, // 生命周期 - 创建之前
|
|
|
|
+ beforeMount () {}, // 生命周期 - 挂载之前
|
|
|
|
+ beforeUpdate () {}, // 生命周期 - 更新之前
|
|
|
|
+ updated () {}, // 生命周期 - 更新之后
|
|
|
|
+ beforeDestroy () {}, // 生命周期 - 销毁之前
|
|
|
|
+ destroyed () {}, // 生命周期 - 销毁完成
|
|
|
|
+ activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
<style lang='less' scoped>
|
|
<style lang='less' scoped>
|
|
.bg {
|
|
.bg {
|