From 01885408a7bd190285d7fa2b1e58c14b0ba09d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A9=E9=9B=8D=E6=95=AC?= <2622604517@qq.com> Date: Sun, 24 Sep 2023 14:17:52 +0800 Subject: [PATCH] init miniprogram --- src/miniprogram/app.json | 40 +++-- .../pages/createCollection/index.js | 10 -- .../pages/createCollection/index.json | 3 - .../pages/createCollection/index.wxml | 7 - .../pages/createCollection/index.wxss | 29 ---- src/miniprogram/pages/deployService/index.js | 11 -- .../pages/deployService/index.json | 3 - .../pages/deployService/index.wxml | 10 -- .../pages/deployService/index.wxss | 30 ---- .../pages/getMiniProgramCode/index.js | 53 ------- .../pages/getMiniProgramCode/index.json | 6 - .../pages/getMiniProgramCode/index.wxml | 11 -- .../pages/getMiniProgramCode/index.wxss | 58 ------- src/miniprogram/pages/getOpenId/index.js | 52 ------- src/miniprogram/pages/getOpenId/index.json | 6 - src/miniprogram/pages/getOpenId/index.wxml | 8 - src/miniprogram/pages/getOpenId/index.wxss | 46 ------ src/miniprogram/pages/index/index.js | 142 +----------------- src/miniprogram/pages/index/index.wxml | 42 ++---- src/miniprogram/pages/index/index.wxss | 105 ++----------- src/miniprogram/pages/selectRecord/index.js | 53 ------- src/miniprogram/pages/selectRecord/index.json | 6 - src/miniprogram/pages/selectRecord/index.wxml | 22 --- src/miniprogram/pages/selectRecord/index.wxss | 83 ---------- src/miniprogram/pages/sumRecord/index.js | 48 ------ src/miniprogram/pages/sumRecord/index.json | 6 - src/miniprogram/pages/sumRecord/index.wxml | 21 --- src/miniprogram/pages/sumRecord/index.wxss | 83 ---------- .../pages/sumRecordResult/index.js | 46 ------ .../pages/sumRecordResult/index.json | 6 - .../pages/sumRecordResult/index.wxml | 19 --- .../pages/sumRecordResult/index.wxss | 73 --------- src/miniprogram/pages/updateRecord/index.js | 51 ------- src/miniprogram/pages/updateRecord/index.json | 6 - src/miniprogram/pages/updateRecord/index.wxml | 21 --- src/miniprogram/pages/updateRecord/index.wxss | 83 ---------- .../pages/updateRecordResult/index.js | 78 ---------- .../pages/updateRecordResult/index.json | 6 - .../pages/updateRecordResult/index.wxml | 21 --- .../pages/updateRecordResult/index.wxss | 72 --------- .../pages/updateRecordSuccess/index.js | 16 -- .../pages/updateRecordSuccess/index.json | 6 - .../pages/updateRecordSuccess/index.wxml | 6 - .../pages/updateRecordSuccess/index.wxss | 30 ---- src/miniprogram/pages/uploadFile/index.js | 58 ------- src/miniprogram/pages/uploadFile/index.json | 6 - src/miniprogram/pages/uploadFile/index.wxml | 15 -- src/miniprogram/pages/uploadFile/index.wxss | 86 ----------- src/project.config.json | 18 +-- src/project.private.config.json | 2 +- 50 files changed, 68 insertions(+), 1651 deletions(-) delete mode 100644 src/miniprogram/pages/createCollection/index.js delete mode 100644 src/miniprogram/pages/createCollection/index.json delete mode 100644 src/miniprogram/pages/createCollection/index.wxml delete mode 100644 src/miniprogram/pages/createCollection/index.wxss delete mode 100644 src/miniprogram/pages/deployService/index.js delete mode 100644 src/miniprogram/pages/deployService/index.json delete mode 100644 src/miniprogram/pages/deployService/index.wxml delete mode 100644 src/miniprogram/pages/deployService/index.wxss delete mode 100644 src/miniprogram/pages/getMiniProgramCode/index.js delete mode 100644 src/miniprogram/pages/getMiniProgramCode/index.json delete mode 100644 src/miniprogram/pages/getMiniProgramCode/index.wxml delete mode 100644 src/miniprogram/pages/getMiniProgramCode/index.wxss delete mode 100644 src/miniprogram/pages/getOpenId/index.js delete mode 100644 src/miniprogram/pages/getOpenId/index.json delete mode 100644 src/miniprogram/pages/getOpenId/index.wxml delete mode 100644 src/miniprogram/pages/getOpenId/index.wxss delete mode 100644 src/miniprogram/pages/selectRecord/index.js delete mode 100644 src/miniprogram/pages/selectRecord/index.json delete mode 100644 src/miniprogram/pages/selectRecord/index.wxml delete mode 100644 src/miniprogram/pages/selectRecord/index.wxss delete mode 100644 src/miniprogram/pages/sumRecord/index.js delete mode 100644 src/miniprogram/pages/sumRecord/index.json delete mode 100644 src/miniprogram/pages/sumRecord/index.wxml delete mode 100644 src/miniprogram/pages/sumRecord/index.wxss delete mode 100644 src/miniprogram/pages/sumRecordResult/index.js delete mode 100644 src/miniprogram/pages/sumRecordResult/index.json delete mode 100644 src/miniprogram/pages/sumRecordResult/index.wxml delete mode 100644 src/miniprogram/pages/sumRecordResult/index.wxss delete mode 100644 src/miniprogram/pages/updateRecord/index.js delete mode 100644 src/miniprogram/pages/updateRecord/index.json delete mode 100644 src/miniprogram/pages/updateRecord/index.wxml delete mode 100644 src/miniprogram/pages/updateRecord/index.wxss delete mode 100644 src/miniprogram/pages/updateRecordResult/index.js delete mode 100644 src/miniprogram/pages/updateRecordResult/index.json delete mode 100644 src/miniprogram/pages/updateRecordResult/index.wxml delete mode 100644 src/miniprogram/pages/updateRecordResult/index.wxss delete mode 100644 src/miniprogram/pages/updateRecordSuccess/index.js delete mode 100644 src/miniprogram/pages/updateRecordSuccess/index.json delete mode 100644 src/miniprogram/pages/updateRecordSuccess/index.wxml delete mode 100644 src/miniprogram/pages/updateRecordSuccess/index.wxss delete mode 100644 src/miniprogram/pages/uploadFile/index.js delete mode 100644 src/miniprogram/pages/uploadFile/index.json delete mode 100644 src/miniprogram/pages/uploadFile/index.wxml delete mode 100644 src/miniprogram/pages/uploadFile/index.wxss diff --git a/src/miniprogram/app.json b/src/miniprogram/app.json index 7deec01..cc944ed 100644 --- a/src/miniprogram/app.json +++ b/src/miniprogram/app.json @@ -1,25 +1,37 @@ { "pages": [ "pages/index/index", - "pages/getOpenId/index", - "pages/getMiniProgramCode/index", - "pages/deployService/index", - "pages/createCollection/index", - "pages/uploadFile/index", - "pages/selectRecord/index", - "pages/updateRecord/index", - "pages/updateRecordResult/index", - "pages/updateRecordSuccess/index", - "pages/sumRecord/index", - "pages/sumRecordResult/index" + "pages/msg/index", + "pages/profile/index" ], "window": { - "backgroundColor": "#F6F6F6", + "backgroundColor": "#FFF", "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#F6F6F6", - "navigationBarTitleText": "云开发 QuickStart", + "navigationBarBackgroundColor": "#FFF", + "navigationBarTitleText": "家教帮", "navigationBarTextStyle": "black" }, + "tabBar": { + "list": [{ + "pagePath": "pages/index/index", + "text": "main", + "iconPath": "images/main.png", + "selectedIconPath": "images/main_on.png" + }, + { + "pagePath": "pages/msg/index", + "text": "msg", + "iconPath": "images/msg.png", + "selectedIconPath": "images/msg_on.png" + }, + { + "pagePath": "pages/profile/index", + "text": "profile", + "iconPath": "images/profile.png", + "selectedIconPath": "images/profile_on.png" + } + ] + }, "sitemapLocation": "sitemap.json", "style": "v2" } \ No newline at end of file diff --git a/src/miniprogram/pages/createCollection/index.js b/src/miniprogram/pages/createCollection/index.js deleted file mode 100644 index d98a4ce..0000000 --- a/src/miniprogram/pages/createCollection/index.js +++ /dev/null @@ -1,10 +0,0 @@ -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - -}); diff --git a/src/miniprogram/pages/createCollection/index.json b/src/miniprogram/pages/createCollection/index.json deleted file mode 100644 index 8835af0..0000000 --- a/src/miniprogram/pages/createCollection/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/src/miniprogram/pages/createCollection/index.wxml b/src/miniprogram/pages/createCollection/index.wxml deleted file mode 100644 index fcec8c8..0000000 --- a/src/miniprogram/pages/createCollection/index.wxml +++ /dev/null @@ -1,7 +0,0 @@ - - 功能介绍 - 集合为常用数据库中表的概念。云开发数据库支持自动备份、无损回档,并且QPS高达3千+。 - 如何体验 - 已自动创建名为“sales”的体验合集,可打开“云开发控制台>数据库>记录列表”中找到该集合。 - - diff --git a/src/miniprogram/pages/createCollection/index.wxss b/src/miniprogram/pages/createCollection/index.wxss deleted file mode 100644 index d89d5f0..0000000 --- a/src/miniprogram/pages/createCollection/index.wxss +++ /dev/null @@ -1,29 +0,0 @@ -page { - background-color: white; - padding-bottom: 50px; -} - -.page { - padding: 0 32px; -} - -.title { - margin-top: 16px; - font-size: 17px; - font-family: PingFang SC; - font-weight: 500; - color: #000000; -} - -.info { - margin-top: 12px; - font-size: 17px; - font-family: PingFang SC; - font-weight: 400; - color: #000000; -} - -.img { - margin-top: 16px; - width: 100%; -} \ No newline at end of file diff --git a/src/miniprogram/pages/deployService/index.js b/src/miniprogram/pages/deployService/index.js deleted file mode 100644 index 133cd5d..0000000 --- a/src/miniprogram/pages/deployService/index.js +++ /dev/null @@ -1,11 +0,0 @@ -// miniprogram/pages/deployService/index.js -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - -}); diff --git a/src/miniprogram/pages/deployService/index.json b/src/miniprogram/pages/deployService/index.json deleted file mode 100644 index 8835af0..0000000 --- a/src/miniprogram/pages/deployService/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/src/miniprogram/pages/deployService/index.wxml b/src/miniprogram/pages/deployService/index.wxml deleted file mode 100644 index 476e764..0000000 --- a/src/miniprogram/pages/deployService/index.wxml +++ /dev/null @@ -1,10 +0,0 @@ - - - 功能介绍 - 云托管是全托管的容器服务,支持任何语言及框架运行,只需将已有业务代码打包上传,即可快速迁移。 - 如何体验 - 步骤一:切换按量付费,打开“云开发控制台>设置>环境设置”找到按量付费,点击切换。 - - 步骤二:开通云托管,体验相关能力 - - diff --git a/src/miniprogram/pages/deployService/index.wxss b/src/miniprogram/pages/deployService/index.wxss deleted file mode 100644 index aa739a0..0000000 --- a/src/miniprogram/pages/deployService/index.wxss +++ /dev/null @@ -1,30 +0,0 @@ -/* miniprogram/pages/deployService/index.wxss */ -page { - background-color: white; - padding-bottom: 50px; -} - -.page { - padding: 0 32px; -} - -.title { - margin-top: 16px; - font-size: 17px; - font-family: PingFang SC; - font-weight: 500; - color: #000000; -} - -.info { - margin-top: 12px; - font-size: 17px; - font-family: PingFang SC; - font-weight: 400; - color: #000000; -} - -.img { - margin-top: 16px; - width: 100%; -} \ No newline at end of file diff --git a/src/miniprogram/pages/getMiniProgramCode/index.js b/src/miniprogram/pages/getMiniProgramCode/index.js deleted file mode 100644 index 75328ae..0000000 --- a/src/miniprogram/pages/getMiniProgramCode/index.js +++ /dev/null @@ -1,53 +0,0 @@ -Page({ - - /** - * 页面的初始数据 - */ - data: { - showUploadTip: false, - haveGetCodeSrc: false, - envId: '', - codeSrc: '' - }, - - onLoad(options) { - this.setData({ - envId: options.envId - }); - }, - - getCodeSrc() { - wx.showLoading({ - title: '', - }); - wx.cloud.callFunction({ - name: 'quickstartFunctions', - config: { - env: this.data.envId - }, - data: { - type: 'getMiniProgramCode' - } - }).then((resp) => { - this.setData({ - haveGetCodeSrc: true, - codeSrc: resp.result - }); - wx.hideLoading(); - }).catch((e) => { - console.log(e); - this.setData({ - showUploadTip: true - }); - wx.hideLoading(); - }); - }, - - clearCodeSrc() { - this.setData({ - haveGetCodeSrc: false, - codeSrc: '' - }); - } - -}); diff --git a/src/miniprogram/pages/getMiniProgramCode/index.json b/src/miniprogram/pages/getMiniProgramCode/index.json deleted file mode 100644 index 73fa860..0000000 --- a/src/miniprogram/pages/getMiniProgramCode/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "navigationBarTitleText": "生成小程序码", - "usingComponents": { - "cloud-tip-modal": "/components/cloudTipModal/index" - } -} \ No newline at end of file diff --git a/src/miniprogram/pages/getMiniProgramCode/index.wxml b/src/miniprogram/pages/getMiniProgramCode/index.wxml deleted file mode 100644 index df1b529..0000000 --- a/src/miniprogram/pages/getMiniProgramCode/index.wxml +++ /dev/null @@ -1,11 +0,0 @@ - - 可通过云函数免接口调用凭证,直接生成小程序码。 - 小程序码将展示在这里 - - - - 生成小程序码 - 清空 - 在”资源管理器>cloudfunctions>quickstartFunctions>getMiniProgramCode>index.js“找到获取小程序码函数,体验该能力 - - diff --git a/src/miniprogram/pages/getMiniProgramCode/index.wxss b/src/miniprogram/pages/getMiniProgramCode/index.wxss deleted file mode 100644 index 3557c79..0000000 --- a/src/miniprogram/pages/getMiniProgramCode/index.wxss +++ /dev/null @@ -1,58 +0,0 @@ -.tip { - font-size: 23rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: center; - margin: 30rpx auto 0 auto; -} - -.top_tip { - font-size: 28rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: left; - margin-top: 30rpx; - margin-left: 20rpx; -} - -.box_text { - background-color: white; - text-align: center; - padding: 300rpx 0; - margin-top: 30rpx; - color: rgba(0, 0, 0, 0.5); -} - -.code_box { - text-align: center; - background-color: white; - margin-top: 30rpx; - padding: 17rpx 0; -} - -.code_img { - width: 600rpx; - height: 600rpx; -} - -.button { - width: 300rpx; - text-align: center; - margin: 20% auto 0 auto; - height: 80rpx; - color: white; - border-radius: 5px; - line-height: 80rpx; - background-color: #07c160; -} - -.button_clear { - width: 300rpx; - text-align: center; - margin: 20% auto 0 auto; - height: 80rpx; - color: #07c160; - border-radius: 5px; - line-height: 80rpx; - background-color: rgba(0, 0, 0, 0.03); -} diff --git a/src/miniprogram/pages/getOpenId/index.js b/src/miniprogram/pages/getOpenId/index.js deleted file mode 100644 index a8927bc..0000000 --- a/src/miniprogram/pages/getOpenId/index.js +++ /dev/null @@ -1,52 +0,0 @@ -Page({ - - /** - * 页面的初始数据 - */ - data: { - showUploadTip: false, - haveGetOpenId: false, - envId: '', - openId: '' - }, - - onLoad(options) { - this.setData({ - envId: options.envId - }); - }, - - getOpenId() { - wx.showLoading({ - title: '', - }); - wx.cloud.callFunction({ - name: 'quickstartFunctions', - config: { - env: this.data.envId - }, - data: { - type: 'getOpenId' - } - }).then((resp) => { - this.setData({ - haveGetOpenId: true, - openId: resp.result.openid - }); - wx.hideLoading(); - }).catch((e) => { - this.setData({ - showUploadTip: true - }); - wx.hideLoading(); - }); - }, - - clearOpenId() { - this.setData({ - haveGetOpenId: false, - openId: '' - }); - } - -}); diff --git a/src/miniprogram/pages/getOpenId/index.json b/src/miniprogram/pages/getOpenId/index.json deleted file mode 100644 index 899024b..0000000 --- a/src/miniprogram/pages/getOpenId/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "navigationBarTitleText": "获取OpenId", - "usingComponents": { - "cloud-tip-modal": "/components/cloudTipModal/index" - } -} \ No newline at end of file diff --git a/src/miniprogram/pages/getOpenId/index.wxml b/src/miniprogram/pages/getOpenId/index.wxml deleted file mode 100644 index 6f011cc..0000000 --- a/src/miniprogram/pages/getOpenId/index.wxml +++ /dev/null @@ -1,8 +0,0 @@ - - 无需维护鉴权机制及登录票据,仅一行代码即可获得。 - {{ openId ? openId : 'OpenID将展示在这里' }} - 获取OpenId - 清空 - 在”资源管理器>cloudfunctions>quickstartFunctions>getOpenId>index.js“找到获取openId函数,体验该能力 - - diff --git a/src/miniprogram/pages/getOpenId/index.wxss b/src/miniprogram/pages/getOpenId/index.wxss deleted file mode 100644 index 596c65d..0000000 --- a/src/miniprogram/pages/getOpenId/index.wxss +++ /dev/null @@ -1,46 +0,0 @@ -.tip { - font-size: 23rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: center; - margin: 30rpx auto 0 auto; -} - -.top_tip { - font-size: 28rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: left; - margin-top: 30rpx; - margin-left: 20rpx; -} - -.box_text { - background-color: white; - text-align: center; - padding: 300rpx 0; - margin-top: 30rpx; - color: rgba(0, 0, 0, 0.5); -} - -.button { - width: 300rpx; - text-align: center; - margin: 250rpx auto 0 auto; - height: 80rpx; - color: white; - border-radius: 5px; - line-height: 80rpx; - background-color: #07c160; -} - -.button_clear { - width: 300rpx; - text-align: center; - margin: 250rpx auto 0 auto; - height: 80rpx; - color: #07c160; - border-radius: 5px; - line-height: 80rpx; - background-color: rgba(0, 0, 0, 0.03); -} diff --git a/src/miniprogram/pages/index/index.js b/src/miniprogram/pages/index/index.js index 807f628..d1e8441 100644 --- a/src/miniprogram/pages/index/index.js +++ b/src/miniprogram/pages/index/index.js @@ -1,142 +1,10 @@ -// index.js -// const app = getApp() -const { envList } = require('../../envList.js'); - Page({ - data: { - showUploadTip: false, - powerList: [{ - title: '云函数', - tip: '安全、免鉴权运行业务代码', - showItem: false, - item: [{ - title: '获取OpenId', - page: 'getOpenId' - }, - // { - // title: '微信支付' - // }, - { - title: '生成小程序码', - page: 'getMiniProgramCode' - }, - // { - // title: '发送订阅消息', - // } - ] - }, { - title: '数据库', - tip: '安全稳定的文档型数据库', - showItem: false, - item: [{ - title: '创建集合', - page: 'createCollection' - }, { - title: '更新记录', - page: 'updateRecord' - }, { - title: '查询记录', - page: 'selectRecord' - }, { - title: '聚合操作', - page: 'sumRecord' - }] - }, { - title: '云存储', - tip: '自带CDN加速文件存储', - showItem: false, - item: [{ - title: '上传文件', - page: 'uploadFile' - }] - }, { - title: '云托管', - tip: '不限语言的全托管容器服务', - showItem: false, - item: [{ - title: '部署服务', - page: 'deployService' - }] - }], - envList, - selectedEnv: envList[0], - haveCreateCollection: false + data:{ + hello:'Hi~' }, - - onClickPowerInfo(e) { - const index = e.currentTarget.dataset.index; - const powerList = this.data.powerList; - powerList[index].showItem = !powerList[index].showItem; - if (powerList[index].title === '数据库' && !this.data.haveCreateCollection) { - this.onClickDatabase(powerList); - } else { - this.setData({ - powerList - }); - } - }, - - onChangeShowEnvChoose() { - wx.showActionSheet({ - itemList: this.data.envList.map(i => i.alias), - success: (res) => { - this.onChangeSelectedEnv(res.tapIndex); - }, - fail (res) { - console.log(res.errMsg); - } - }); - }, - - onChangeSelectedEnv(index) { - if (this.data.selectedEnv.envId === this.data.envList[index].envId) { - return; - } - const powerList = this.data.powerList; - powerList.forEach(i => { - i.showItem = false; - }); + change:function(){ this.setData({ - selectedEnv: this.data.envList[index], - powerList, - haveCreateCollection: false + hello:this.data.hello+'~~', }); }, - - jumpPage(e) { - wx.navigateTo({ - url: `/pages/${e.currentTarget.dataset.page}/index?envId=${this.data.selectedEnv.envId}`, - }); - }, - - onClickDatabase(powerList) { - wx.showLoading({ - title: '', - }); - wx.cloud.callFunction({ - name: 'quickstartFunctions', - config: { - env: this.data.selectedEnv.envId - }, - data: { - type: 'createCollection' - } - }).then((resp) => { - if (resp.result.success) { - this.setData({ - haveCreateCollection: true - }); - } - this.setData({ - powerList - }); - wx.hideLoading(); - }).catch((e) => { - console.log(e); - this.setData({ - showUploadTip: true - }); - wx.hideLoading(); - }); - } -}); +}); \ No newline at end of file diff --git a/src/miniprogram/pages/index/index.wxml b/src/miniprogram/pages/index/index.wxml index ecd65e4..7d6ccbb 100644 --- a/src/miniprogram/pages/index/index.wxml +++ b/src/miniprogram/pages/index/index.wxml @@ -1,32 +1,14 @@ - - + + + - 快速了解云开发 - - 免鉴权接口调用 免部署后台 高并发 - - - - - {{power.title}} - {{power.tip}} - - - - - - - - - {{item.title}} - - - - - - 当前环境 {{ selectedEnv.alias }} - - - - + {{hello}} + 这里是家教帮平台,再也不用担心孩子的学习了 + + 创建小组 + 加入小组 + 其他小组 + 我的小组 + > + \ No newline at end of file diff --git a/src/miniprogram/pages/index/index.wxss b/src/miniprogram/pages/index/index.wxss index c813cf4..82ab862 100644 --- a/src/miniprogram/pages/index/index.wxss +++ b/src/miniprogram/pages/index/index.wxss @@ -1,94 +1,21 @@ -/**index.wxss**/ - -page { - padding-top: 54rpx; - background-color: #f6f6f6; - padding-bottom: 60rpx; +.cover{ + background-color: #f1f1f1; + text-align: center; + padding: 80rpx; } - -.title { - font-family: PingFang SC; +.app{ + width: 160rpx; + height: 160rpx; +} +.title{ font-weight: 500; - color: #000000; + color: #000; font-size: 44rpx; - margin-bottom: 40rpx; -} - -.top_tip { - font-size: 28rpx; - font-family: PingFang SC; - font-weight: 400; - color: #888888; - margin-bottom: 28rpx; -} - -.power { - margin-top: 30rpx; - border-radius: 5px; - background-color: white; - width: 93%; - padding-bottom: 1rpx; -} - -.power_info { - display: flex; - padding: 30rpx 25rpx; - align-items: center; - justify-content: space-between; -} - -.power_info_more { - width: 30rpx; - height: 30rpx; - transform: rotate(90deg); -} - -.power_info_less { - width: 30rpx; - height: 30rpx; - transform: rotate(270deg); -} - -.power_info_text { - display: flex; - flex-direction: column; -} - -.power_info_text_title { - margin-bottom: 10rpx; - font-weight: 400; - font-size: 35rpx; + margin: 50rpx 32rpx; } - -.power_info_text_tip { - color: rgba(0, 0, 0, 0.4); - font-size: 25rpx; -} - -.power_item { - padding: 30rpx 25rpx; - display: flex; - justify-content: space-between; -} - -.power_item_title { - font-size: 30rpx; -} - -.power_item_icon { - width: 30rpx; - height: 30rpx; -} - -.line { - width: 95%; - margin: 0 auto; - height: 2rpx; - background-color: rgba(0, 0, 0, 0.1); -} - -.environment { - color: rgba(0, 0, 0, 0.4); - font-size: 24rpx; - margin-top: 25%; +.desc{ + font-weight: 500; + color: #000; + font-size: 44rpx; + margin: 50rpx 32rpx; } \ No newline at end of file diff --git a/src/miniprogram/pages/selectRecord/index.js b/src/miniprogram/pages/selectRecord/index.js deleted file mode 100644 index fe00c3e..0000000 --- a/src/miniprogram/pages/selectRecord/index.js +++ /dev/null @@ -1,53 +0,0 @@ -Page({ - - /** - * 页面的初始数据 - */ - data: { - showUploadTip: false, - haveGetRecord: false, - envId: '', - record: '' - }, - - onLoad(options) { - this.setData({ - envId: options.envId - }); - }, - - getRecord() { - wx.showLoading({ - title: '', - }); - wx.cloud.callFunction({ - name: 'quickstartFunctions', - config: { - env: this.data.envId - }, - data: { - type: 'selectRecord' - } - }).then((resp) => { - this.setData({ - haveGetRecord: true, - record: resp.result.data - }); - wx.hideLoading(); - }).catch((e) => { - console.log(e); - this.setData({ - showUploadTip: true - }); - wx.hideLoading(); - }); - }, - - clearRecord() { - this.setData({ - haveGetRecord: false, - record: '' - }); - } - -}); diff --git a/src/miniprogram/pages/selectRecord/index.json b/src/miniprogram/pages/selectRecord/index.json deleted file mode 100644 index a85acd9..0000000 --- a/src/miniprogram/pages/selectRecord/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "navigationBarTitleText": "查询记录", - "usingComponents": { - "cloud-tip-modal": "/components/cloudTipModal/index" - } -} \ No newline at end of file diff --git a/src/miniprogram/pages/selectRecord/index.wxml b/src/miniprogram/pages/selectRecord/index.wxml deleted file mode 100644 index 78dd8fc..0000000 --- a/src/miniprogram/pages/selectRecord/index.wxml +++ /dev/null @@ -1,22 +0,0 @@ - - 体验查询记录能力,查询数据表中的销量数据。 - 销量数据将展示在这里 - - 地区销量统计 - - 地域 - 城市 - 销量 - - - - {{item.region}} - {{item.city}} - {{item.sales}} - - - 查询记录 - 清空 - 在”资源管理器>cloudfunctions>quickstartFunctions>selectRecord>index.js“找到查询记录函数,体验该能力 - - diff --git a/src/miniprogram/pages/selectRecord/index.wxss b/src/miniprogram/pages/selectRecord/index.wxss deleted file mode 100644 index 76652f4..0000000 --- a/src/miniprogram/pages/selectRecord/index.wxss +++ /dev/null @@ -1,83 +0,0 @@ -.tip { - font-size: 23rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: center; - margin: 30rpx auto 0 auto; -} - -.top_tip { - font-size: 28rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: left; - margin-top: 30rpx; - margin-left: 20rpx; -} - -.box_text { - background-color: white; - text-align: center; - padding: 300rpx 0; - margin-top: 30rpx; - color: rgba(0, 0, 0, 0.5); -} - -.code_box { - text-align: center; - background-color: white; - margin-top: 30rpx; - padding: 17rpx; -} - -.code_box_title { - color: rgba(0, 0, 0, 0.5); - font-size: 26rpx; - margin-bottom: 20rpx; - text-align: left; -} - -.code_box_record { - display: flex; -} - -.code_box_record_title { - width: 33%; - font-size: 26rpx; - color: rgba(0, 0, 0, 0.5); - padding: 20rpx 0; -} - -.code_box_record_detail { - width: 33%; - font-size: 26rpx; - padding: 20rpx 0; -} - -.button { - width: 300rpx; - text-align: center; - margin: 20% auto 0 auto; - height: 80rpx; - color: white; - border-radius: 5px; - line-height: 80rpx; - background-color: #07c160; -} - -.button_clear { - width: 300rpx; - text-align: center; - margin: 250rpx auto 0 auto; - height: 80rpx; - color: #07c160; - border-radius: 5px; - line-height: 80rpx; - background-color: rgba(0, 0, 0, 0.03); -} - -.line { - height: 1rpx; - width: 100%; - background-color: rgba(0, 0, 0, 0.1); -} diff --git a/src/miniprogram/pages/sumRecord/index.js b/src/miniprogram/pages/sumRecord/index.js deleted file mode 100644 index 4ee28ce..0000000 --- a/src/miniprogram/pages/sumRecord/index.js +++ /dev/null @@ -1,48 +0,0 @@ -Page({ - - /** - * 页面的初始数据 - */ - data: { - showUploadTip: false, - haveGetRecord: false, - envId: '', - record: '' - }, - - onLoad(options) { - this.setData({ - envId: options.envId - }); - wx.showLoading({ - title: '', - }); - wx.cloud.callFunction({ - name: 'quickstartFunctions', - config: { - env: this.data.envId - }, - data: { - type: 'selectRecord' - } - }).then((resp) => { - this.setData({ - record: resp.result.data - }); - wx.hideLoading(); - }).catch((e) => { - console.log(e); - this.setData({ - showUploadTip: true - }); - wx.hideLoading(); - }); - }, - - sumRecord() { - wx.navigateTo({ - url: `/pages/sumRecordResult/index?envId=${this.data.envId}`, - }); - }, - -}); diff --git a/src/miniprogram/pages/sumRecord/index.json b/src/miniprogram/pages/sumRecord/index.json deleted file mode 100644 index b2e58f0..0000000 --- a/src/miniprogram/pages/sumRecord/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "navigationBarTitleText": "聚合记录", - "usingComponents": { - "cloud-tip-modal": "/components/cloudTipModal/index" - } -} \ No newline at end of file diff --git a/src/miniprogram/pages/sumRecord/index.wxml b/src/miniprogram/pages/sumRecord/index.wxml deleted file mode 100644 index 467c63b..0000000 --- a/src/miniprogram/pages/sumRecord/index.wxml +++ /dev/null @@ -1,21 +0,0 @@ - - 常用数据库中的groupby操作,体验按地域聚合数据。 - 数据将展示在这里 - - 地区销量统计 - - 地域 - 城市 - 销量 - - - - {{item.region}} - {{item.city}} - {{item.sales}} - - - 聚合记录 - 在”资源管理器>cloudfunctions>quickstartFunctions>sumRecord>index.js“找到聚合记录函数,体验该能力 - - diff --git a/src/miniprogram/pages/sumRecord/index.wxss b/src/miniprogram/pages/sumRecord/index.wxss deleted file mode 100644 index 02d5527..0000000 --- a/src/miniprogram/pages/sumRecord/index.wxss +++ /dev/null @@ -1,83 +0,0 @@ -.tip { - font-size: 23rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: center; - margin: 30rpx auto 0 auto; -} - -.top_tip { - font-size: 28rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: left; - margin-top: 30rpx; - margin-left: 20rpx; -} - -.box_text { - background-color: white; - text-align: center; - padding: 300rpx 0; - margin-top: 30rpx; - color: rgba(0, 0, 0, 0.5); -} - -.code_box { - text-align: center; - background-color: white; - margin-top: 30rpx; - padding: 17rpx; -} - -.code_box_title { - color: rgba(0, 0, 0, 0.5); - font-size: 26rpx; - margin-bottom: 20rpx; - text-align: left; -} - -.code_box_record { - display: flex; -} - -.code_box_record_title { - width: 33%; - font-size: 26rpx; - color: rgba(0, 0, 0, 0.5); - padding: 20rpx 0; -} - -.code_box_record_detail { - width: 33%; - font-size: 26rpx; - padding: 20rpx 0; -} - -.button { - width: 300rpx; - text-align: center; - margin: 250rpx auto 0 auto; - height: 80rpx; - color: white; - border-radius: 5px; - line-height: 80rpx; - background-color: #07c160; -} - -.button_clear { - width: 300rpx; - text-align: center; - margin: 250rpx auto 0 auto; - height: 80rpx; - color: #07c160; - border-radius: 5px; - line-height: 80rpx; - background-color: rgba(0, 0, 0, 0.03); -} - -.line { - height: 1rpx; - width: 100%; - background-color: rgba(0, 0, 0, 0.1); -} diff --git a/src/miniprogram/pages/sumRecordResult/index.js b/src/miniprogram/pages/sumRecordResult/index.js deleted file mode 100644 index d2dcc09..0000000 --- a/src/miniprogram/pages/sumRecordResult/index.js +++ /dev/null @@ -1,46 +0,0 @@ -Page({ - - /** - * 页面的初始数据 - */ - data: { - showUploadTip: false, - haveGetRecord: false, - envId: '', - record: '' - }, - - onLoad(options) { - this.setData({ - envId: options.envId - }); - wx.showLoading({ - title: '', - }); - wx.cloud.callFunction({ - name: 'quickstartFunctions', - config: { - env: this.data.envId - }, - data: { - type: 'sumRecord' - } - }).then((resp) => { - this.setData({ - record: resp.result.list - }); - wx.hideLoading(); - }).catch((e) => { - console.log(e); - this.setData({ - showUploadTip: true - }); - wx.hideLoading(); - }); - }, - - goBack() { - wx.navigateBack(); - }, - -}); diff --git a/src/miniprogram/pages/sumRecordResult/index.json b/src/miniprogram/pages/sumRecordResult/index.json deleted file mode 100644 index b2e58f0..0000000 --- a/src/miniprogram/pages/sumRecordResult/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "navigationBarTitleText": "聚合记录", - "usingComponents": { - "cloud-tip-modal": "/components/cloudTipModal/index" - } -} \ No newline at end of file diff --git a/src/miniprogram/pages/sumRecordResult/index.wxml b/src/miniprogram/pages/sumRecordResult/index.wxml deleted file mode 100644 index 2e32aac..0000000 --- a/src/miniprogram/pages/sumRecordResult/index.wxml +++ /dev/null @@ -1,19 +0,0 @@ - - 常用数据库中的groupby操作,体验按地域聚合数据。 - 数据将展示在这里 - - 地区销量统计 - - 地域 - 销量 - - - - {{item._id}} - {{item.sum}} - - - 返回上一步 - 在”资源管理器>cloudfunctions>quickstartFunctions>sumRecord>index.js“找到聚合记录函数,体验该能力 - - diff --git a/src/miniprogram/pages/sumRecordResult/index.wxss b/src/miniprogram/pages/sumRecordResult/index.wxss deleted file mode 100644 index 49ba9e3..0000000 --- a/src/miniprogram/pages/sumRecordResult/index.wxss +++ /dev/null @@ -1,73 +0,0 @@ -.tip { - font-size: 23rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: center; - margin: 30rpx auto 0 auto; -} - -.top_tip { - font-size: 28rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: left; - margin-top: 30rpx; - margin-left: 20rpx; -} - -.box_text { - background-color: white; - text-align: center; - padding: 300rpx 0; - margin-top: 30rpx; - color: rgba(0, 0, 0, 0.5); -} - -.code_box { - text-align: center; - background-color: white; - margin-top: 30rpx; - padding: 17rpx; -} - -.code_box_title { - color: rgba(0, 0, 0, 0.5); - font-size: 26rpx; - margin-bottom: 20rpx; - text-align: left; -} - -.code_box_record { - display: flex; - justify-content: space-between; -} - -.code_box_record_title { - width: 33%; - font-size: 26rpx; - color: rgba(0, 0, 0, 0.5); - padding: 20rpx 0; -} - -.code_box_record_detail { - width: 33%; - font-size: 26rpx; - padding: 20rpx 0; -} - -.button { - width: 300rpx; - text-align: center; - margin: 250rpx auto 0 auto; - height: 80rpx; - color: #07c160; - border-radius: 5px; - line-height: 80rpx; - background-color: rgba(0, 0, 0, 0.03); -} - -.line { - height: 1rpx; - width: 100%; - background-color: rgba(0, 0, 0, 0.1); -} diff --git a/src/miniprogram/pages/updateRecord/index.js b/src/miniprogram/pages/updateRecord/index.js deleted file mode 100644 index e27c4c8..0000000 --- a/src/miniprogram/pages/updateRecord/index.js +++ /dev/null @@ -1,51 +0,0 @@ -Page({ - - /** - * 页面的初始数据 - */ - data: { - showUploadTip: false, - haveGetRecord: false, - envId: '', - record: '' - }, - - onLoad(options) { - this.setData({ - envId: options.envId - }); - }, - - onShow() { - wx.showLoading({ - title: '', - }); - wx.cloud.callFunction({ - name: 'quickstartFunctions', - config: { - env: this.data.envId - }, - data: { - type: 'selectRecord' - } - }).then((resp) => { - this.setData({ - record: resp.result.data - }); - wx.hideLoading(); - }).catch((e) => { - console.log(e); - this.setData({ - showUploadTip: true - }); - wx.hideLoading(); - }); - }, - - updateRecord() { - wx.navigateTo({ - url: `/pages/updateRecordResult/index?envId=${this.data.envId}`, - }); - }, - -}); diff --git a/src/miniprogram/pages/updateRecord/index.json b/src/miniprogram/pages/updateRecord/index.json deleted file mode 100644 index d7969cb..0000000 --- a/src/miniprogram/pages/updateRecord/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "navigationBarTitleText": "更新记录", - "usingComponents": { - "cloud-tip-modal": "/components/cloudTipModal/index" - } -} \ No newline at end of file diff --git a/src/miniprogram/pages/updateRecord/index.wxml b/src/miniprogram/pages/updateRecord/index.wxml deleted file mode 100644 index 4a62aa6..0000000 --- a/src/miniprogram/pages/updateRecord/index.wxml +++ /dev/null @@ -1,21 +0,0 @@ - - 体验更新字段记录能力,更新数据表中的销量数据。 - 数据将展示在这里 - - 地区销量统计 - - 地域 - 城市 - 销量 - - - - {{item.region}} - {{item.city}} - {{item.sales}} - - - 修改数据 - 在”资源管理器>cloudfunctions>quickstartFunctions>updateRecord>index.js“找到查询记录函数,体验该能力 - - diff --git a/src/miniprogram/pages/updateRecord/index.wxss b/src/miniprogram/pages/updateRecord/index.wxss deleted file mode 100644 index 02d5527..0000000 --- a/src/miniprogram/pages/updateRecord/index.wxss +++ /dev/null @@ -1,83 +0,0 @@ -.tip { - font-size: 23rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: center; - margin: 30rpx auto 0 auto; -} - -.top_tip { - font-size: 28rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: left; - margin-top: 30rpx; - margin-left: 20rpx; -} - -.box_text { - background-color: white; - text-align: center; - padding: 300rpx 0; - margin-top: 30rpx; - color: rgba(0, 0, 0, 0.5); -} - -.code_box { - text-align: center; - background-color: white; - margin-top: 30rpx; - padding: 17rpx; -} - -.code_box_title { - color: rgba(0, 0, 0, 0.5); - font-size: 26rpx; - margin-bottom: 20rpx; - text-align: left; -} - -.code_box_record { - display: flex; -} - -.code_box_record_title { - width: 33%; - font-size: 26rpx; - color: rgba(0, 0, 0, 0.5); - padding: 20rpx 0; -} - -.code_box_record_detail { - width: 33%; - font-size: 26rpx; - padding: 20rpx 0; -} - -.button { - width: 300rpx; - text-align: center; - margin: 250rpx auto 0 auto; - height: 80rpx; - color: white; - border-radius: 5px; - line-height: 80rpx; - background-color: #07c160; -} - -.button_clear { - width: 300rpx; - text-align: center; - margin: 250rpx auto 0 auto; - height: 80rpx; - color: #07c160; - border-radius: 5px; - line-height: 80rpx; - background-color: rgba(0, 0, 0, 0.03); -} - -.line { - height: 1rpx; - width: 100%; - background-color: rgba(0, 0, 0, 0.1); -} diff --git a/src/miniprogram/pages/updateRecordResult/index.js b/src/miniprogram/pages/updateRecordResult/index.js deleted file mode 100644 index a200e6e..0000000 --- a/src/miniprogram/pages/updateRecordResult/index.js +++ /dev/null @@ -1,78 +0,0 @@ -Page({ - - /** - * 页面的初始数据 - */ - data: { - showUploadTip: false, - haveGetRecord: false, - envId: '', - record: '' - }, - - onLoad(options) { - this.setData({ - envId: options.envId - }); - wx.showLoading({ - title: '', - }); - wx.cloud.callFunction({ - name: 'quickstartFunctions', - config: { - env: this.data.envId - }, - data: { - type: 'selectRecord' - } - }).then((resp) => { - this.setData({ - record: resp.result.data - }); - wx.hideLoading(); - }).catch((e) => { - console.log(e); - this.setData({ - showUploadTip: true - }); - wx.hideLoading(); - }); - }, - - updateRecord() { - wx.showLoading({ - title: '', - }); - wx.cloud.callFunction({ - name: 'quickstartFunctions', - config: { - env: this.data.envId - }, - data: { - type: 'updateRecord', - data: this.data.record - } - }).then((resp) => { - wx.navigateTo({ - url: `/pages/updateRecordSuccess/index`, - }); - wx.hideLoading(); - }).catch((e) => { - console.log(e); - this.setData({ - showUploadTip: true - }); - wx.hideLoading(); - }); - }, - - bindInput (e) { - const index = e.currentTarget.dataset.index; - const record = this.data.record; - record[index].sales = Number(e.detail.value); - this.setData({ - record - }); - }, - -}); diff --git a/src/miniprogram/pages/updateRecordResult/index.json b/src/miniprogram/pages/updateRecordResult/index.json deleted file mode 100644 index d7969cb..0000000 --- a/src/miniprogram/pages/updateRecordResult/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "navigationBarTitleText": "更新记录", - "usingComponents": { - "cloud-tip-modal": "/components/cloudTipModal/index" - } -} \ No newline at end of file diff --git a/src/miniprogram/pages/updateRecordResult/index.wxml b/src/miniprogram/pages/updateRecordResult/index.wxml deleted file mode 100644 index 97ebbab..0000000 --- a/src/miniprogram/pages/updateRecordResult/index.wxml +++ /dev/null @@ -1,21 +0,0 @@ - - 体验更新字段记录能力,更新数据表中的销量数据。 - 数据将展示在这里 - - 地区销量统计 - - 地域 - 城市 - 销量 - - - - {{item.region}} - {{item.city}} - - - - 更新 - 在”资源管理器>cloudfunctions>quickstartFunctions>updateRecord>index.js“找到查询记录函数,体验该能力 - - diff --git a/src/miniprogram/pages/updateRecordResult/index.wxss b/src/miniprogram/pages/updateRecordResult/index.wxss deleted file mode 100644 index 95e89fa..0000000 --- a/src/miniprogram/pages/updateRecordResult/index.wxss +++ /dev/null @@ -1,72 +0,0 @@ -.tip { - font-size: 23rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: center; - margin: 30rpx auto 0 auto; -} - -.top_tip { - font-size: 28rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: left; - margin-top: 30rpx; - margin-left: 20rpx; -} - -.box_text { - background-color: white; - text-align: center; - padding: 300rpx 0; - margin-top: 30rpx; - color: rgba(0, 0, 0, 0.5); -} - -.code_box { - text-align: center; - background-color: white; - margin-top: 30rpx; - padding: 17rpx; -} - -.code_box_title { - color: rgba(0, 0, 0, 0.5); - font-size: 26rpx; - margin-bottom: 20rpx; - text-align: left; -} - -.code_box_record { - display: flex; -} - -.code_box_record_title { - width: 33%; - font-size: 26rpx; - color: rgba(0, 0, 0, 0.5); - padding: 20rpx 0; -} - -.code_box_record_detail { - width: 33%; - font-size: 26rpx; - padding: 20rpx 0; -} - -.button { - width: 300rpx; - text-align: center; - margin: 250rpx auto 0 auto; - height: 80rpx; - color: white; - border-radius: 5px; - line-height: 80rpx; - background-color: #07c160; -} - -.line { - height: 1rpx; - width: 100%; - background-color: rgba(0, 0, 0, 0.1); -} diff --git a/src/miniprogram/pages/updateRecordSuccess/index.js b/src/miniprogram/pages/updateRecordSuccess/index.js deleted file mode 100644 index b4ebffd..0000000 --- a/src/miniprogram/pages/updateRecordSuccess/index.js +++ /dev/null @@ -1,16 +0,0 @@ -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - - goBack() { - wx.navigateBack({ - delta: 2 - }); - }, - -}); diff --git a/src/miniprogram/pages/updateRecordSuccess/index.json b/src/miniprogram/pages/updateRecordSuccess/index.json deleted file mode 100644 index d7969cb..0000000 --- a/src/miniprogram/pages/updateRecordSuccess/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "navigationBarTitleText": "更新记录", - "usingComponents": { - "cloud-tip-modal": "/components/cloudTipModal/index" - } -} \ No newline at end of file diff --git a/src/miniprogram/pages/updateRecordSuccess/index.wxml b/src/miniprogram/pages/updateRecordSuccess/index.wxml deleted file mode 100644 index 297640c..0000000 --- a/src/miniprogram/pages/updateRecordSuccess/index.wxml +++ /dev/null @@ -1,6 +0,0 @@ - - - 地区销量统计更新成功 - 可在“云开发控制台>数据库>记录列表”中进行查看 - 我知道了 - diff --git a/src/miniprogram/pages/updateRecordSuccess/index.wxss b/src/miniprogram/pages/updateRecordSuccess/index.wxss deleted file mode 100644 index 9334db1..0000000 --- a/src/miniprogram/pages/updateRecordSuccess/index.wxss +++ /dev/null @@ -1,30 +0,0 @@ -page { - text-align: center; -} - -.icon { - margin: 80rpx 0 50rpx 0; -} - -.title { - font-size: 42rpx; - font-weight: 600; - margin-bottom: 30rpx; -} - -.info { - font-size: 36rpx; - width: 90%; - margin: 0 auto; -} - -.button { - width: 300rpx; - text-align: center; - margin: 550rpx auto 0 auto; - height: 80rpx; - color: #07c160; - border-radius: 5px; - line-height: 80rpx; - background-color: rgba(0, 0, 0, 0.03); -} \ No newline at end of file diff --git a/src/miniprogram/pages/uploadFile/index.js b/src/miniprogram/pages/uploadFile/index.js deleted file mode 100644 index b1ba60e..0000000 --- a/src/miniprogram/pages/uploadFile/index.js +++ /dev/null @@ -1,58 +0,0 @@ -Page({ - - /** - * 页面的初始数据 - */ - data: { - showUploadTip: false, - haveGetImgSrc: false, - envId: '', - imgSrc: '' - }, - - onLoad(options) { - this.setData({ - envId: options.envId - }); - }, - - uploadImg() { - wx.showLoading({ - title: '', - }); - // 让用户选择一张图片 - wx.chooseImage({ - count: 1, - success: chooseResult => { - // 将图片上传至云存储空间 - wx.cloud.uploadFile({ - // 指定上传到的云路径 - cloudPath: 'my-photo.png', - // 指定要上传的文件的小程序临时文件路径 - filePath: chooseResult.tempFilePaths[0], - config: { - env: this.data.envId - } - }).then(res => { - console.log('上传成功', res); - this.setData({ - haveGetImgSrc: true, - imgSrc: res.fileID - }); - wx.hideLoading(); - }).catch((e) => { - console.log(e); - wx.hideLoading(); - }); - }, - }); - }, - - clearImgSrc() { - this.setData({ - haveGetImgSrc: false, - imgSrc: '' - }); - } - -}); diff --git a/src/miniprogram/pages/uploadFile/index.json b/src/miniprogram/pages/uploadFile/index.json deleted file mode 100644 index 50b16bd..0000000 --- a/src/miniprogram/pages/uploadFile/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "navigationBarTitleText": "上传文件", - "usingComponents": { - "cloud-tip-modal": "/components/cloudTipModal/index" - } -} \ No newline at end of file diff --git a/src/miniprogram/pages/uploadFile/index.wxml b/src/miniprogram/pages/uploadFile/index.wxml deleted file mode 100644 index 2eecd5c..0000000 --- a/src/miniprogram/pages/uploadFile/index.wxml +++ /dev/null @@ -1,15 +0,0 @@ - - 多存储类型,仅需一个云函数即可完成上传。 - 上传的图片将展示在这里 - - - - 文件路径 - {{imgSrc}} - - - 上传一张图片 - 清空 - 在“资源管理器>miniprogram>pages>uploadFile>index.js”找到相应代码,体验该能力 - - diff --git a/src/miniprogram/pages/uploadFile/index.wxss b/src/miniprogram/pages/uploadFile/index.wxss deleted file mode 100644 index c5c3b6a..0000000 --- a/src/miniprogram/pages/uploadFile/index.wxss +++ /dev/null @@ -1,86 +0,0 @@ -.tip { - font-size: 23rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: center; - margin: 30rpx auto 0 auto; -} - -.top_tip { - font-size: 28rpx; - color: rgba(0, 0, 0, 0.5); - width: 90%; - text-align: left; - margin-top: 30rpx; - margin-left: 20rpx; -} - -.box_text { - background-color: white; - text-align: center; - padding: 300rpx 0; - margin-top: 30rpx; - color: rgba(0, 0, 0, 0.5); -} - -.code_box { - text-align: center; - background-color: white; - margin-top: 30rpx; - padding: 50rpx 0 17px 0; -} - -.code_img { - width: 300rpx; - height: 300rpx; -} - -.button { - width: 300rpx; - text-align: center; - margin: 20% auto 0 auto; - height: 80rpx; - color: white; - border-radius: 5px; - line-height: 80rpx; - background-color: #07c160; -} - -.button_clear { - width: 300rpx; - text-align: center; - margin: 20% auto 0 auto; - height: 80rpx; - color: #07c160; - border-radius: 5px; - line-height: 80rpx; - background-color: rgba(0, 0, 0, 0.03); -} - -.img_info { - padding-top: 16px; - width: 90%; - margin: 0 auto; - display: flex; - padding: 16rpx 0; - border-top: 0.5px solid #E5E5E5; - margin-top: 50rpx; -} - -.img_info_title { - font-size: 14; - font-family: PingFang SC; - font-weight: 400; - color: #888888; - width: 72px; - margin-right: 32px; -} - -.img_info_detail { - text-align: left; - font-size: 14; - font-family: PingFang SC; - font-weight: 400; - color: #000000; - width: 500rpx; -} diff --git a/src/project.config.json b/src/project.config.json index 4e35543..899bca8 100644 --- a/src/project.config.json +++ b/src/project.config.json @@ -21,8 +21,6 @@ "compileHotReLoad": false, "lazyloadPlaceholderEnable": false, "useMultiFrameRuntime": true, - "useApiHook": true, - "useApiHostProcess": true, "babelSetting": { "ignore": [], "disablePlugins": [], @@ -37,11 +35,9 @@ "disableUseStrict": false, "showES6CompileOption": false, "useCompilerPlugins": false, - "minifyWXML": true + "minifyWXML": true, + "ignoreUploadUnusedFiles": true }, - "appid": "wxa443f40488e954d4", - "projectname": "quickstart-wx-cloud", - "libVersion": "2.14.1", "cloudfunctionTemplateRoot": "cloudfunctionTemplate/", "condition": { "search": { @@ -68,12 +64,14 @@ }, "srcMiniprogramRoot": "miniprogram/", "compileType": "miniprogram", + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 2 + }, + "libVersion": "2.14.1", "packOptions": { "ignore": [], "include": [] }, - "editorSetting": { - "tabIndent": "insertSpaces", - "tabSize": 2 - } + "appid": "wxa443f40488e954d4" } \ No newline at end of file diff --git a/src/project.private.config.json b/src/project.private.config.json index bea9b82..063df5e 100644 --- a/src/project.private.config.json +++ b/src/project.private.config.json @@ -56,5 +56,5 @@ } }, "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", - "projectname": "%E8%BD%AF%E5%B7%A5%E8%AF%BE%E8%AE%BE" + "projectname": "miniprogram1" } \ No newline at end of file