Files
BlackFriday-GPTs-Prompts/gpts/wechat-dev-design-event-mini-program.md
T
2024-05-06 10:24:52 +03:00

395 lines
6.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# WeChat Dev: Design Event Mini-Program | [Start Chat](https://gptcall.net/chat.html?data=%7B%22contact%22%3A%7B%22id%22%3A%225ZizwJe6gL77qDF3T7p2A%22%2C%22flow%22%3Atrue%7D%7D)
Design and develop a mini-program for creating, publishing, and sharing events using WeChat's cloud development and language tools. Provide full functionality list and complete code for the home page, registration, and sign-up processes.
# Prompt
```
我希望你扮演一个微信小程序开发工程师。我将提供有关小程序程序需要的一些特殊信息,您的工作是根据市场现场分析以及您的专业知识经验设计并提供一个功能列表,并根据你需要创建的页面。例如:第一步,创建首页,首页包含的功能,以及提供wxml,js完整代码。不要提供简单或省略的代码,因为那样毫无意义,使用云开发和原始小程序语言开发小程序。我的第一个要求是'我想做一个活动之前的小程序,用户可以创建,发布和分享活动。用户可以报名与活动'。
```
## Welcome Message
好的,根据您的需求,这是我为您设计的微信小程序功能列表和页面架构:
功能列表:
1. 首页:展示热门活动和用户已发布的活动
2. 创建活动页面:用户可以填写活动的标题、时间、地点、费用等信息,并上传封面图
3. 活动详情页面:展示活动的详细信息,包括参加者、留言、报名等
4. 我的活动页面:展示用户已发布或已参加的活动
5. 报名页面:用户可以填写个人信息并报名参加活动
页面架构:
1. 首页(index):
- 搜索框
- 轮播图(展示热门活动)
- 分类标签(筛选不同类型的活动)
- 活动卡片(展示已发布的活动)
2. 创建活动页面(create):
- 标题输入框
- 时间选择器
- 地点输入框
- 费用输入框
- 封面图上传组件
- 保存按钮
3. 活动详情页面(detail):
- 活动基本信息
- 参加者头像列表
- 留言板
- 报名按钮
4. 我的活动页面(myactivities):
- 已发布/已参加的活动列表
- 活动操作按钮(编辑/删除/分享)
5. 报名页面(signup):
- 姓名输入框
- 手机号输入框
- 确认报名按钮
以下是首页的WXML和JS代码示例:
WXML代码:
```html
<view class="index">
<view class="search">
<input type="text" placeholder="搜索活动" bindinput="onSearchInput" value="{{ searchKeyword }}" />
</view>
<swiper autoplay="{{true}}" interval="3000" duration="1000">
<block wx:for="{{banners}}">
<swiper-item>
<image class="swiper-image" src="{{item.image_url}}" mode="aspectFill"></image>
</swiper-item>
</block>
</swiper>
<view class="category">
<block wx:for="{{categories}}">
<view class="item {{activeCategoryIndex==index?'active':''}}" bindtap="onSelectCategory">
{{item.name}}
</view>
</block>
</view>
<view class="activity-list">
<block wx:for="{{activities}}" wx:key="id">
<navigator url="/pages/detail/detail?id={{item.id}}">
<view class="activity-card">
<view class="cover">
<image src="{{item.cover_url}}"></image>
</view>
<view class="title">{{item.title}}</view>
<view class="info">
<view class="date">{{item.date}}</view>
<view class="price">{{item.price}}</view>
</view>
</view>
</navigator>
</block>
</view>
</view>
```
JS代码:
```javascript
Page({
data: {
banners: [],
categories: [],
activities: [],
activeCategoryIndex: 0,
searchKeyword: ''
},
onLoad() {
// 调用云函数获取banner图、活动分类和活动列表数据
## Conversation
**ASSISTANT**: 好的根据您的需求这是我为您设计的微信小程序功能列表和页面架构
功能列表
1. 首页展示热门活动和用户已发布的活动
2. 创建活动页面用户可以填写活动的标题时间地点费用等信息并上传封面图
3. 活动详情页面展示活动的详细信息包括参加者留言报名等
4. 我的活动页面展示用户已发布或已参加的活动
5. 报名页面用户可以填写个人信息并报名参加活动
页面架构
1. 首页index
- 搜索框
- 轮播图展示热门活动
- 分类标签筛选不同类型的活动
- 活动卡片展示已发布的活动
2. 创建活动页面create
- 标题输入框
- 时间选择器
- 地点输入框
- 费用输入框
- 封面图上传组件
- 保存按钮
3. 活动详情页面detail
- 活动基本信息
- 参加者头像列表
- 留言板
- 报名按钮
4. 我的活动页面myactivities
- 已发布/已参加的活动列表
- 活动操作按钮编辑/删除/分享
5. 报名页面signup
- 姓名输入框
- 手机号输入框
- 确认报名按钮
以下是首页的WXML和JS代码示例
WXML代码
```html
<view class="index">
<view class="search">
<input type="text" placeholder="搜索活动" bindinput="onSearchInput" value="{{ searchKeyword }}" />
</view>
<swiper autoplay="{{true}}" interval="3000" duration="1000">
<block wx:for="{{banners}}">
<swiper-item>
<image class="swiper-image" src="{{item.image_url}}" mode="aspectFill"></image>
</swiper-item>
</block>
</swiper>
<view class="category">
<block wx:for="{{categories}}">
<view class="item {{activeCategoryIndex==index?'active':''}}" bindtap="onSelectCategory">
{{item.name}}
</view>
</block>
</view>
<view class="activity-list">
<block wx:for="{{activities}}" wx:key="id">
<navigator url="/pages/detail/detail?id={{item.id}}">
<view class="activity-card">
<view class="cover">
<image src="{{item.cover_url}}"></image>
</view>
<view class="title">{{item.title}}</view>
<view class="info">
<view class="date">{{item.date}}</view>
<view class="price">{{item.price}}</view>
</view>
</view>
</navigator>
</block>
</view>
</view>
```
JS代码:
```javascript
Page({
data: {
banners: [],
categories: [],
activities: [],
activeCategoryIndex: 0,
searchKeyword: ''
},
onLoad() {
// 调用云函数获取banner图、活动分类和活动列表数据