-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
61 additions
and
537 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
56 changes: 0 additions & 56 deletions
56
cloudfunctions/quickstartFunctions/createCollection/index.js
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
cloudfunctions/quickstartFunctions/fetchGoodsList/index.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
cloudfunctions/quickstartFunctions/getMiniProgramCode/index.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,8 @@ | ||
const { envList } = require("../../envList"); | ||
const { QuickStartPoints, QuickStartSteps } = require("./constants"); | ||
|
||
Page({ | ||
data: { | ||
knowledgePoints: QuickStartPoints, | ||
steps: QuickStartSteps, | ||
}, | ||
|
||
copyCode(e) { | ||
const code = e.target?.dataset?.code || ''; | ||
wx.setClipboardData({ | ||
data: code, | ||
success: () => { | ||
wx.showToast({ | ||
title: '已复制', | ||
}) | ||
}, | ||
fail: (err) => { | ||
console.error('复制失败-----', err); | ||
} | ||
}) | ||
}, | ||
|
||
discoverCloud() { | ||
wx.switchTab({ | ||
url: '/pages/examples/index', | ||
}) | ||
}, | ||
|
||
gotoGoodsListPage() { | ||
wx.navigateTo({ | ||
url: '/pages/goods-list/index', | ||
}) | ||
}, | ||
}); | ||
// 表单提交事件处理函数 | ||
submitForm: function(e) { | ||
const formData = e.detail.value; | ||
console.log('表单数据', formData); | ||
// 这里可以调用后端API生成行程,或者进行其他逻辑处理 | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,25 @@ | ||
<!--index.wxml--> | ||
<view class="container"> | ||
<view class="main"> | ||
<view class="title font_title_1">快速开始</view> | ||
<view class="sub_title"> | ||
欢迎使用云开发!本页将带你了解如何使用云开发提供的能力快速开发小程序。 | ||
</view> | ||
<view class="ability_container"> | ||
<view class="ability_title">你将学习到</view> | ||
<view class="ability_item" wx:for="{{ knowledgePoints }}" wx:for-item="point" wx:key="id"> | ||
{{ point.title }} | ||
</view> | ||
<!-- 这是页面的 WXML 文件,用于定义页面结构 --> | ||
<view class="ai-travel-container"> | ||
<form bindsubmit="submitForm"> | ||
<!-- 用户输入目的地 --> | ||
<view class="ai-travel-input-group"> | ||
<text class="ai-travel-label">目的地</text> | ||
<input class="ai-travel-input" name="destination" placeholder="请输入目的地" /> | ||
</view> | ||
|
||
<view class="title font_title_2">5分钟上手教程</view> | ||
<view class="sub_title"> | ||
我们将会使用常用的云开发能力,快速实现一个简单的商品列表页面。无需购买服务器,即可快速开发出后台服务、读取数据库、存取文件、调用微信开放服务。页面最终效果如下图所示。 | ||
</view> | ||
<view class="image_container"> | ||
<image src="../../images/list-database.png" mode="widthFix" /> | ||
<!-- 用户输入旅行天数 --> | ||
<view class="ai-travel-input-group"> | ||
<text class="ai-travel-label">旅行天数</text> | ||
<input class="ai-travel-input" name="travelDays" type="number" placeholder="请输入天数" /> | ||
</view> | ||
|
||
<view class="btn-view-demo-page with-margin" bind:tap="gotoGoodsListPage">查看页面</view> | ||
|
||
<view class="seperator" /> | ||
<view class="step_container" wx:for="{{ steps }}" wx:key="id" wx:for-item="step"> | ||
<view id="step_{{ step.id }}" data-step="{{ step.id }}" class="step_title"> | ||
<view class="step_id_container"> | ||
<view class="step_id_mark">NO.</view> | ||
<view class="step_id_content">0{{ step.id }}</view> | ||
</view> | ||
<view class="font_title_2">{{ step.title }}</view> | ||
</view> | ||
<view class="step_content"> | ||
<block wx:for="{{ step.contents }}" wx:for-item="item" wx:key="index"> | ||
<view wx:if="{{ item.type === 'text' }}" class="text_zone"> | ||
<rich-text nodes="<p style='line-height: 26px;'>{{ item.content }}</p>" /> | ||
</view> | ||
<view wx:if="{{ item.type === 'code' }}" class="code_zone"> | ||
<image class="btn-copy" data-code="{{ item.content }}" bind:tap="copyCode" src="../../images/icons/copy.png" /> | ||
<rich-text nodes="<pre style='overflow: scroll;'>{{ item.content }}</pre>" /> | ||
</view> | ||
<view wx:if="{{ item.type === 'image' }}" class="image_zone"> | ||
<image src="../../images/{{ item.content }}" mode="widthFix" /> | ||
</view> | ||
</block> | ||
</view> | ||
<view wx:if="{{ step.showJumpButton }}" class="btn-view-demo-page" bind:tap="gotoGoodsListPage">查看页面</view> | ||
<view class="seperator" /> | ||
<!-- 用户输入兴趣点 --> | ||
<view class="ai-travel-input-group"> | ||
<text class="ai-travel-label">兴趣点</text> | ||
<textarea class="ai-travel-textarea" name="interests" placeholder="请输入感兴趣的景点、活动等" auto-height /> | ||
</view> | ||
|
||
<view class="bottom-tip"> | ||
至此,我们完成了一个带分享功能的小程序,利用了云开发的云函数、云数据库、云存储等能力,无需服务器即可快速完成较为复杂的功能。 | ||
</view> | ||
<view class="bottom-tip">此外,云开发还提供了云模板、云后台、云托管等更多高级能力,可点击下方按钮前往查看。</view> | ||
<view class="button" bind:tap="discoverCloud">探索云开发更多功能</view> | ||
</view> | ||
<!-- 生成行程按钮 --> | ||
<button class="ai-travel-button" formType="submit">🌟 AI 生成行程</button> | ||
</form> | ||
</view> |
Oops, something went wrong.