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,23 @@
<template>
<view class="info">
info {{ id }}
</view>
</template>
<script>
// onPullDownRefresh
export default {
data() {
return {
id: null
};
},
onLoad(option) {
this.id = option.id
}
}
</script>
<style lang="less">
</style>

View File

@@ -0,0 +1,180 @@
<template>
<view class="about">
<scroll-view class="scr" scroll-x="true" :scroll-into-view="currentId">
<view class="list">
<view class="item" :id="'s'+index" :class="index == current ? 'active' : '' "
@click="changeTitle(index)"
v-for="(item, index) in tabsList"
:key="index">
{{ item.title }}
</view>
</view>
</scroll-view>
<swiper class="swiper"
:current="current"
@change="swiperChange" >
<swiper-item v-for="(item,index) in tabsList" :key="index">
<view v-for="(j,i) in item.content" :key="i" class="swiper-item uni-bg-red">
{{j.title}}
</view>
</swiper-item>
</swiper>
</view>
</template>
<script>
export default {
data() {
return {
current: 0,
currentId: 's0',
tabsList: [{
id: 1,
title: '首页',
page: 1,
content: [{
title: '首页1'
},
{
title: '首页2'
},
{
title: '首页3'
},
],
},
{
id: 2,
title: '社会',
content: [{
title: '社会1'
},
{
title: '社会2'
},
{
title: '社会3'
},
],
},
{
id: 3,
title: '新闻',
content: [{
title: '新闻1'
},
{
title: '新闻2'
},
{
title: '新闻3'
},
],
},
{
id: 4,
title: '咨询',
content: [{
title: '咨询1'
},
{
title: '咨询2'
},
{
title: '咨询3'
},
],
},
{
id: 4,
title: '咨询',
content: [{
title: '咨询1'
},
{
title: '咨询2'
},
{
title: '咨询3'
},
],
},
{
id: 4,
title: '咨询',
content: [{
title: '咨询1'
},
{
title: '咨询2'
},
{
title: '咨询3'
},
],
},
{
id: 4,
title: '咨询',
content: [{
title: '咨询1'
},
{
title: '咨询2'
},
{
title: '咨询3'
},
],
},
{
id: 4,
title: '咨询',
content: [{
title: '咨询1'
},
{
title: '咨询2'
},
{
title: '咨询3'
},
],
},
{
id: 4,
title: '咨询',
content: [{
title: '咨询1'
},
{
title: '咨询2'
},
{
title: '咨询3'
},
],
},
]
}
},
onLoad() {
},
methods: {
changeTitle (index) {
this.current = index;
this.currentId = 's'+index
},
swiperChange(e) {
this.current = e.detail.current
this.currentId = 's'+this.current
}
}
}
</script>
<style lang="less" scoped>
@import "@/assets/less/page/about.less";
</style>

View File

@@ -0,0 +1,81 @@
<template>
<view class="index">
<image class="logo" src="/static/logo.png"></image>
<v-header></v-header>
<!-- #ifndef H5 -->
<button @click="change">点我</button>
<!-- #endif -->
<view class="item" v-for="i in 200">
{{ i }}
</view>
<uni-load-more :status="test"></uni-load-more>
</view>
</template>
<script>
import header from "@/components/header/header.vue";
export default {
data() {
return {
title: '你好',
test: "more",
tabsList: [
{ id: 1, title: '你好1' },
{ id: 2, title: '你好2' },
{ id: 3, title: '你好3' },
{ id: 4, title: '你好4' },
]
}
},
onLoad() {
},
created() {
this.$utils.test()
this.getIndex()
},
methods: {
async getIndex() {
let res = await this.$http.index.home();
console.log(res)
},
change() {
uni.setScreenBrightness({
value: 1,
success: function () {
console.log('success');
}
});
},
onPullDownRefresh() {
console.log("下拉刷新")
setTimeout(()=>{
uni.stopPullDownRefresh()
},2000)
},
onReachBottom() {
this.test = "loading"
setTimeout(()=>{
this.test = "more"
},2000)
console.log("到底")
},
enterInfo(item) {
uni.navigateTo({
url: `/pages/about/about?id=${item.id}`
})
}
},
components: {
'v-header': header
}
}
</script>
<style lang="less" scoped>
@import "@/assets/less/page/index.less";
</style>