feat(WechatSmallProject): 新增 微信小程序 课程(包含实验1-4)

This commit is contained in:
2026-05-05 14:38:52 +08:00
parent 69db4c1c07
commit f1679c1767
177 changed files with 1977 additions and 10 deletions

View File

@@ -0,0 +1,31 @@
/*
* Eslint config file
* Documentation: https://eslint.org/docs/user-guide/configuring/
* Install the Eslint extension before using this feature.
*/
module.exports = {
env: {
es6: true,
browser: true,
node: true,
},
ecmaFeatures: {
modules: true,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
globals: {
wx: true,
App: true,
Page: true,
getCurrentPages: true,
getApp: true,
Component: true,
requirePlugin: true,
requireMiniProgram: true,
},
// extends: 'eslint:recommended',
rules: {},
}

View File

@@ -0,0 +1,3 @@
## 微信小程序课程实训
- 实验一: [实验一](./pages/demo1)

View File

@@ -0,0 +1,2 @@
// app.js
App({})

View File

@@ -0,0 +1,14 @@
{
"pages": [
"pages/demo1/demo1"
],
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "Weixin",
"navigationBarBackgroundColor": "#ffffff"
},
"style": "v2",
"componentFramework": "glass-easel",
"sitemapLocation": "sitemap.json",
"lazyCodeLoading": "requiredComponents"
}

View File

@@ -0,0 +1,10 @@
/**app.wxss**/
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,66 @@
// pages/demo1/demo1.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -0,0 +1,6 @@
{
"usingComponents": {},
"navigationBarTitleText": "实验一",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}

View File

@@ -0,0 +1,44 @@
<view class="demo1-container">
<view class="lbt">
<swiper current="1" duration="500" autoplay="true">
<swiper-item>
<image src="https://ts3.tc.mm.bing.net/th/id/OIP-C.VCcgAcUd3Xv7HszQm8ZaJQHaEK?rs=1&pid=ImgDetMain&o=7&rm=3" mode="widthFix" />
</swiper-item>
<swiper-item>
<image src="https://pic1.zhimg.com/v2-4fd3f2bb57d4bcc195e3d3cf092a7dd7_r.jpg" mode="widthFix" />
</swiper-item>
<swiper-item>
<image src="https://ts2.tc.mm.bing.net/th/id/OIP-C.zRwcvZSd5rTvcUKulre4nAHaEK?rs=1&pid=ImgDetMain&o=7&rm=3" mode="widthFix" />
</swiper-item>
</swiper>
</view>
<view class="jgg">
<view class="items">
<image src="/images/demo1/193_会议室.png" mode="aspectFit" /><text>会议室</text>
</view>
<view class="items">
<image src="/images/demo1/193_公告.png" mode="aspectFit" /><text>公告</text>
</view>
<view class="items">
<image src="/images/demo1/193_报修.png" mode="aspectFit" /><text>报修</text>
</view>
<view class="items">
<image src="/images/demo1/193_共享中心.png" mode="aspectFit" /><text>共享中心</text>
</view>
<view class="items">
<image src="/images/demo1/193_活动.png" mode="aspectFit" /><text>活动</text>
</view>
<view class="items">
<image src="/images/demo1/193_流程.png" mode="aspectFit" /><text>流程</text>
</view>
<view class="items">
<image src="/images/demo1/193_食堂.png" mode="aspectFit" /><text>食堂</text>
</view>
<view class="items">
<image src="/images/demo1/193_通讯录.png" mode="aspectFit" /><text>通讯录</text>
</view>
<view class="items">
<image src="/images/demo1/193_推广.png" mode="aspectFit" /><text>推广</text>
</view>
</view>
</view>

View File

@@ -0,0 +1,53 @@
.demo1-container {
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
}
.lbt {
width: 100%;
height: 300rpx;
}
swiper-item {
display: flex;
}
swiper-item>image {
flex: 1;
}
.jgg {
width: 100%;
flex: 1;
display: flex;
width: 100%;
flex-wrap: wrap;
}
.jgg .items {
width: 33.33%;
height: 33.33%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
box-sizing: border-box;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
.jgg .items>image {
width: 100rpx;
height: 100rpx;
}
.jgg .items:nth-child(3) {
border-right: none;
}
.jgg .items:nth-last-child(6) {
border-bottom: none;
}

View File

@@ -0,0 +1,35 @@
{
"setting": {
"es6": true,
"postcss": true,
"minified": true,
"uglifyFileName": false,
"enhance": true,
"packNpmRelationList": [],
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useCompilerPlugins": false,
"minifyWXML": true,
"compileWorklet": false,
"uploadWithSourceMap": true,
"packNpmManually": false,
"minifyWXSS": true,
"localPlugins": false,
"disableUseStrict": false,
"condition": false,
"swc": false,
"disableSWC": true
},
"compileType": "miniprogram",
"simulatorPluginLibVersion": {},
"packOptions": {
"ignore": [],
"include": []
},
"appid": "wx8c60a45abd90774a",
"editorSetting": {},
"libVersion": "3.15.1"
}

View File

@@ -0,0 +1,22 @@
{
"libVersion": "3.15.1",
"projectname": "test1",
"setting": {
"urlCheck": true,
"coverView": true,
"lazyloadPlaceholderEnable": false,
"skylineRenderEnable": false,
"preloadBackgroundData": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"compileHotReLoad": true,
"useApiHook": true,
"useApiHostProcess": true,
"useStaticServer": false,
"useLanDebug": false,
"showES6CompileOption": false,
"checkInvalidKey": true,
"ignoreDevUnusedFiles": true,
"bigPackageSizeSupport": false
}
}

View File

@@ -0,0 +1,7 @@
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}