first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
<template>
<view class="home">
<div class="header">
<div class="header_search theme_color">
<i class="iconfont icon-taozi1"></i>
<div class="search">
<i class="iconfont icon-search"></i>
<span>198万张图,有你想要的...</span>
</div>
<i class="iconfont icon-wo"></i>
</div>
<div class="header_menu">
<scroll-view class="menu_list" scroll-x="true" :scroll-into-view="into">
<text @click="GetList(i)" v-for="(v,i) in list" :id="v.into" :class="i==Index?'active': ''" :key="i">{{ v.title }}</text>
</scroll-view>
<i class="iconfont icon-edit"></i>
</div>
</div>
<div class="content">
<swiper class="swiper" :current="Index" @change="pageChange">
<swiper-item v-for="(v,i) in list" :key="i">
<uni-ImgList v-if="v.content.length != 0" :list="v.content"></uni-ImgList>
</swiper-item>
</swiper>
</div>
</view>
</template>
<script>
export default {
data() {
return {
into: "",
Index: 0,
list: []
}
},
async created() {
await this.getType();
await this.getClassList();
},
methods: {
async pageChange(event) {
let { current } = event.detail
this.Index = current;
this.into = `title${current}`
await this.getClassList();
},
async GetList(i) {
this.Index = i;
},
async getType() {
let res = await this.$http.index.type();
this.list = res.principal;
},
async getClassList() {
if (this.list[this.Index].content.length == 0) {
let res = await this.$http.index.classList({
page: this.list[this.Index].page,
id: this.list[this.Index].id,
});
this.list[this.Index].page = res.current_page
this.list[this.Index].total_page = res.total_page
this.list[this.Index].content = [
...this.list[this.Index].content,
...res.data
]
console.log("this.list ==== ", this.list[this.Index].content)
}
}
},
// components: {
// ImgList
// }
}
</script>
<style lang="less" scoped>
@import "@/less/page/index.less";
</style>

View File

@@ -0,0 +1,75 @@
<template>
<view v-if="list.imgs.length != 0">
<image v-for="(v,i) in list.imgs" :key="i" :src="v" :data-src="v" mode="widthFix" @tap="previewOpen"></image>
<kxj-previewImage ref="previewImage" :imgs="list.imgs" :descs="descs" @longPress="longPress"></kxj-previewImage>
</view>
</template>
<script>
export default {
data() {
return {
id:'',
list:{
imgs:[]
}
}
},
methods: {
async getInfo() {
this.list = await this.$http.index.getInfo({
id:this.id,
});
console.log(this.list)
},
previewOpen(e) {
var param = e.currentTarget.dataset.src;
console.log(param);
this.$refs.previewImage.open(param); // 传入当前选中的图片地址或序号
return; //如需测试和uni原生预览差别可注释这两行
//以下是效果对比相关
var _this = this;
uni.showModal({
title: '请选择',
content: '请选择使用uni原生图片预览或非原生自定义的图片预览。',
cancelText: 'uni',
confirmText: '自定义',
success: function(res) {
if (res.confirm) {
_this.$refs.previewImage.open(param); // 传入当前选中的图片地址或序号
} else if (res.cancel) {
uni.previewImage({
current: param,
urls: _this.imgs
});
}
}
});
},
setTitle(){
if(this.list.length != 0){
uni.setNavigationBarTitle({
title:this.list
})
}
},
onLoad: function (option) {
this.id =option.id;
},
created() {
this.getInfo();
console.log(this.id)
setTitle()
}
}
}
</script>
<style lang="less" scoped>
image {
width: 100%;
}
</style>

View File

@@ -0,0 +1,22 @@
<template>
<view>
我的
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,22 @@
<template>
<view>
机构
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,22 @@
<template>
<view>
模特
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>