Browse Source

Initial Commit

unknown 2 years ago
commit
f3bb28cb6d
61 changed files with 1810 additions and 0 deletions
  1. 31 0
      .eslintrc.js
  2. 14 0
      .gitignore
  3. 12 0
      README.md
  4. 7 0
      cloudfunctions/quickstartFunctions/config.json
  5. 56 0
      cloudfunctions/quickstartFunctions/createCollection/index.js
  6. 20 0
      cloudfunctions/quickstartFunctions/getMiniProgramCode/index.js
  7. 17 0
      cloudfunctions/quickstartFunctions/getOpenId/index.js
  8. 25 0
      cloudfunctions/quickstartFunctions/index.js
  9. 14 0
      cloudfunctions/quickstartFunctions/package.json
  10. 12 0
      cloudfunctions/quickstartFunctions/selectRecord/index.js
  11. 18 0
      cloudfunctions/quickstartFunctions/sumRecord/index.js
  12. 32 0
      cloudfunctions/quickstartFunctions/updateRecord/index.js
  13. 19 0
      miniprogram/app.js
  14. 46 0
      miniprogram/app.json
  15. 27 0
      miniprogram/app.wxss
  16. 6 0
      miniprogram/envList.js
  17. 1 0
      miniprogram/images/delete.svg
  18. 1 0
      miniprogram/images/go.svg
  19. 14 0
      miniprogram/images/images.svg
  20. 1 0
      miniprogram/images/下载.svg
  21. 7 0
      miniprogram/images/头像.svg
  22. BIN
      miniprogram/images/我未选择.png
  23. BIN
      miniprogram/images/我的已选择.png
  24. 1 0
      miniprogram/images/添加.svg
  25. BIN
      miniprogram/images/返回.png
  26. BIN
      miniprogram/images/邮品未选择.png
  27. BIN
      miniprogram/images/邮票已选择.png
  28. BIN
      miniprogram/images/首页已选择.png
  29. BIN
      miniprogram/images/首页未选择.png
  30. 82 0
      miniprogram/pages/Postage/Postage.js
  31. 4 0
      miniprogram/pages/Postage/Postage.json
  32. 27 0
      miniprogram/pages/Postage/Postage.wxml
  33. 48 0
      miniprogram/pages/Postage/Postage.wxss
  34. 66 0
      miniprogram/pages/change/change.js
  35. 4 0
      miniprogram/pages/change/change.json
  36. 29 0
      miniprogram/pages/change/change.wxml
  37. 133 0
      miniprogram/pages/change/change.wxss
  38. 116 0
      miniprogram/pages/home/home.js
  39. 4 0
      miniprogram/pages/home/home.json
  40. 4 0
      miniprogram/pages/home/home.wxml
  41. 1 0
      miniprogram/pages/home/home.wxss
  42. 66 0
      miniprogram/pages/information/information.js
  43. 3 0
      miniprogram/pages/information/information.json
  44. 2 0
      miniprogram/pages/information/information.wxml
  45. 1 0
      miniprogram/pages/information/information.wxss
  46. 66 0
      miniprogram/pages/me/me.js
  47. 4 0
      miniprogram/pages/me/me.json
  48. 2 0
      miniprogram/pages/me/me.wxml
  49. 1 0
      miniprogram/pages/me/me.wxss
  50. 90 0
      miniprogram/pages/my/my.js
  51. 4 0
      miniprogram/pages/my/my.json
  52. 37 0
      miniprogram/pages/my/my.wxml
  53. 102 0
      miniprogram/pages/my/my.wxss
  54. 131 0
      miniprogram/pages/new/new.js
  55. 5 0
      miniprogram/pages/new/new.json
  56. 57 0
      miniprogram/pages/new/new.wxml
  57. 193 0
      miniprogram/pages/new/new.wxss
  58. 7 0
      miniprogram/sitemap.json
  59. 79 0
      project.config.json
  60. 60 0
      project.private.config.json
  61. 1 0
      uploadCloudFunction.sh

+ 31 - 0
.eslintrc.js

@@ -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: {},
+}

+ 14 - 0
.gitignore

@@ -0,0 +1,14 @@
+# Windows
+[Dd]esktop.ini
+Thumbs.db
+$RECYCLE.BIN/
+
+# macOS
+.DS_Store
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+
+# Node.js
+node_modules/

+ 12 - 0
README.md

@@ -0,0 +1,12 @@
+# 云开发 quickstart
+
+这是云开发的快速启动指引,其中演示了如何上手使用云开发的三大基础能力:
+
+- 数据库:一个既可在小程序前端操作,也能在云函数中读写的 JSON 文档型数据库
+- 文件存储:在小程序前端直接上传/下载云端文件,在云开发控制台可视化管理
+- 云函数:在云端运行的代码,微信私有协议天然鉴权,开发者只需编写业务逻辑代码
+
+## 参考文档
+
+- [云开发文档](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html)
+

+ 7 - 0
cloudfunctions/quickstartFunctions/config.json

@@ -0,0 +1,7 @@
+{
+  "permissions": {
+    "openapi": [
+      "wxacode.get"
+    ]
+  }
+}

+ 56 - 0
cloudfunctions/quickstartFunctions/createCollection/index.js

@@ -0,0 +1,56 @@
+const cloud = require('wx-server-sdk');
+
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+});
+
+const db = cloud.database();
+
+// 创建集合云函数入口函数
+exports.main = async (event, context) => {
+  try {
+    // 创建集合
+    await db.createCollection('sales');
+    await db.collection('sales').add({
+      // data 字段表示需新增的 JSON 数据
+      data: {
+        region: '华东',
+        city: '上海',
+        sales: 11
+      }
+    });
+    await db.collection('sales').add({
+      // data 字段表示需新增的 JSON 数据
+      data: {
+        region: '华东',
+        city: '南京',
+        sales: 11
+      }
+    });
+    await db.collection('sales').add({
+      // data 字段表示需新增的 JSON 数据
+      data: {
+        region: '华南',
+        city: '广州',
+        sales: 22
+      }
+    });
+    await db.collection('sales').add({
+      // data 字段表示需新增的 JSON 数据
+      data: {
+        region: '华南',
+        city: '深圳',
+        sales: 22
+      }
+    });
+    return {
+      success: true
+    };
+  } catch (e) {
+    // 这里catch到的是该collection已经存在,从业务逻辑上来说是运行成功的,所以catch返回success给前端,避免工具在前端抛出异常
+    return {
+      success: true,
+      data: 'create collection success'
+    };
+  }
+};

+ 20 - 0
cloudfunctions/quickstartFunctions/getMiniProgramCode/index.js

@@ -0,0 +1,20 @@
+const cloud = require('wx-server-sdk');
+
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+});
+
+// 获取小程序二维码云函数入口函数
+exports.main = async (event, context) => {
+  // 获取小程序二维码的buffer
+  const resp = await cloud.openapi.wxacode.get({
+    path: 'pages/index/index'
+  });
+  const { buffer } = resp;
+  // 将图片上传云存储空间
+  const upload = await cloud.uploadFile({
+    cloudPath: 'code.png',
+    fileContent: buffer
+  });
+  return upload.fileID;
+};

+ 17 - 0
cloudfunctions/quickstartFunctions/getOpenId/index.js

@@ -0,0 +1,17 @@
+const cloud = require('wx-server-sdk');
+
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+});
+
+// 获取openId云函数入口函数
+exports.main = async (event, context) => {
+  // 获取基础信息
+  const wxContext = cloud.getWXContext();
+
+  return {
+    openid: wxContext.OPENID,
+    appid: wxContext.APPID,
+    unionid: wxContext.UNIONID,
+  };
+};

+ 25 - 0
cloudfunctions/quickstartFunctions/index.js

@@ -0,0 +1,25 @@
+const getOpenId = require('./getOpenId/index');
+const getMiniProgramCode = require('./getMiniProgramCode/index');
+const createCollection = require('./createCollection/index');
+const selectRecord = require('./selectRecord/index');
+const updateRecord = require('./updateRecord/index');
+const sumRecord = require('./sumRecord/index');
+
+
+// 云函数入口函数
+exports.main = async (event, context) => {
+  switch (event.type) {
+    case 'getOpenId':
+      return await getOpenId.main(event, context);
+    case 'getMiniProgramCode':
+      return await getMiniProgramCode.main(event, context);
+    case 'createCollection':
+      return await createCollection.main(event, context);
+    case 'selectRecord':
+      return await selectRecord.main(event, context);
+    case 'updateRecord':
+      return await updateRecord.main(event, context);
+    case 'sumRecord':
+      return await sumRecord.main(event, context);
+  }
+};

+ 14 - 0
cloudfunctions/quickstartFunctions/package.json

@@ -0,0 +1,14 @@
+{
+  "name": "quickstartFunctions",
+  "version": "1.0.0",
+  "description": "",
+  "main": "index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "author": "",
+  "license": "ISC",
+  "dependencies": {
+    "wx-server-sdk": "~2.4.0"
+  }
+}

+ 12 - 0
cloudfunctions/quickstartFunctions/selectRecord/index.js

@@ -0,0 +1,12 @@
+const cloud = require('wx-server-sdk');
+
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+});
+const db = cloud.database();
+
+// 查询数据库集合云函数入口函数
+exports.main = async (event, context) => {
+  // 返回数据库查询结果
+  return await db.collection('sales').get();
+};

+ 18 - 0
cloudfunctions/quickstartFunctions/sumRecord/index.js

@@ -0,0 +1,18 @@
+const cloud = require('wx-server-sdk');
+
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+});
+const db = cloud.database();
+const $ = db.command.aggregate;
+
+// 聚合记录云函数入口函数
+exports.main = async (event, context) => {
+  // 返回数据库聚合结果
+  return db.collection('sales').aggregate()
+    .group({
+      _id: '$region',
+      sum: $.sum('$sales')
+    })
+    .end();
+};

+ 32 - 0
cloudfunctions/quickstartFunctions/updateRecord/index.js

@@ -0,0 +1,32 @@
+const cloud = require('wx-server-sdk');
+
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+});
+const db = cloud.database();
+
+// 修改数据库信息云函数入口函数
+exports.main = async (event, context) => {
+  try {
+    // 遍历修改数据库信息
+    for (let i = 0; i < event.data.length; i++) {
+      await db.collection('sales').where({
+        _id: event.data[i]._id
+      })
+        .update({
+          data: {
+            sales: event.data[i].sales
+          },
+        });
+    }
+    return {
+      success: true,
+      data: event.data
+    };
+  } catch (e) {
+    return {
+      success: false,
+      errMsg: e
+    };
+  }
+};

+ 19 - 0
miniprogram/app.js

@@ -0,0 +1,19 @@
+// app.js
+App({
+  onLaunch: function () {
+    if (!wx.cloud) {
+      console.error('请使用 2.2.3 或以上的基础库以使用云能力');
+    } else {
+      wx.cloud.init({
+        // env 参数说明:
+        //   env 参数决定接下来小程序发起的云开发调用(wx.cloud.xxx)会默认请求到哪个云环境的资源
+        //   此处请填入环境 ID, 环境 ID 可打开云控制台查看
+        //   如不填则使用默认环境(第一个创建的环境)
+        // env: 'my-env-id',
+        traceUser: true,
+      });
+    }
+
+    this.globalData = {};
+  }
+});

+ 46 - 0
miniprogram/app.json

@@ -0,0 +1,46 @@
+{
+  "pages": [
+    "pages/home/home",
+    "pages/Postage/Postage",
+    "pages/me/me",
+    "pages/new/new",
+    "pages/information/information",
+    "pages/my/my",
+    "pages/change/change"
+  ],
+  "tabBar": {
+    "color": "#969696",
+    "selectedColor": "#0C6E4D ",
+    "backgroundColor": "#FFFFFF",
+    "position": "bottom",
+    "borderStyle": "black",
+    "list": [
+      {
+        "pagePath": "pages/home/home",
+        "text": "首页",
+        "iconPath": "images/首页未选择.png",
+        "selectedIconPath": "images/首页已选择.png"
+      },
+      {
+        "pagePath": "pages/Postage/Postage",
+        "text": "邮票",
+        "iconPath": "images/邮品未选择.png",
+        "selectedIconPath": "images/邮票已选择.png"
+      },
+      {
+        "pagePath": "pages/me/me",
+        "text": "我的",
+        "iconPath": "images/我未选择.png",
+        "selectedIconPath": "images/我的已选择.png"
+      }
+    ]
+  },
+  "window": {
+    "backgroundColor": "#F6F6F6",
+    "backgroundTextStyle": "light",
+    "navigationBarBackgroundColor": "#F6F6F6",
+    "navigationBarTextStyle": "black"
+  },
+  "sitemapLocation": "sitemap.json",
+  "style": "v2"
+}

+ 27 - 0
miniprogram/app.wxss

@@ -0,0 +1,27 @@
+/**app.wxss**/
+.container {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  box-sizing: border-box;
+} 
+
+button {
+  background: initial;
+}
+
+button:focus{
+  outline: 0;
+}
+
+button::after{
+  border: none;
+}
+
+
+page {
+  background: #f6f6f6;
+  display: flex;
+  flex-direction: column;
+  justify-content: flex-start;
+}

+ 6 - 0
miniprogram/envList.js

@@ -0,0 +1,6 @@
+const envList = [];
+const isMac = false;
+module.exports = {
+  envList,
+  isMac
+};

+ 1 - 0
miniprogram/images/delete.svg

@@ -0,0 +1 @@
+<svg t="1662087287294" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8537" width="200" height="200"><path d="M886.784 746.496q29.696 30.72 43.52 56.32t-4.608 58.368q-4.096 6.144-11.264 14.848t-14.848 16.896-15.36 14.848-12.8 9.728q-25.6 15.36-60.416 8.192t-62.464-34.816l-43.008-43.008-57.344-57.344-67.584-67.584-73.728-73.728-131.072 131.072q-60.416 60.416-98.304 99.328-38.912 38.912-77.312 48.128t-68.096-17.408l-7.168-7.168-11.264-11.264-11.264-11.264q-6.144-6.144-7.168-8.192-11.264-14.336-13.312-29.184t2.56-29.184 13.824-27.648 20.48-24.576q9.216-8.192 32.768-30.72l55.296-57.344q33.792-32.768 75.264-73.728t86.528-86.016q-49.152-49.152-93.696-93.184t-79.872-78.848-57.856-56.832-27.648-27.136q-26.624-26.624-27.136-52.736t17.92-52.736q8.192-10.24 23.552-24.064t21.504-17.92q30.72-20.48 55.296-17.92t49.152 28.16l31.744 31.744q23.552 23.552 58.368 57.344t78.336 76.288 90.624 88.576q38.912-38.912 76.288-75.776t69.632-69.12 58.368-57.856 43.52-43.008q24.576-23.552 53.248-31.232t55.296 12.8q1.024 1.024 6.656 5.12t11.264 9.216 10.752 9.728 7.168 5.632q27.648 26.624 27.136 57.856t-27.136 57.856q-18.432 18.432-45.568 46.08t-60.416 60.416-70.144 69.632l-77.824 77.824q37.888 36.864 74.24 72.192t67.584 66.048 56.32 56.32 41.472 41.984z" p-id="8538" fill="#d81e06"></path></svg>

+ 1 - 0
miniprogram/images/go.svg

@@ -0,0 +1 @@
+<svg t="1662019001274" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7321" width="200" height="200"><path d="M761.055557 532.128047c0.512619-0.992555 1.343475-1.823411 1.792447-2.848649 8.800538-18.304636 5.919204-40.703346-9.664077-55.424808L399.935923 139.743798c-19.264507-18.208305-49.631179-17.344765-67.872168 1.888778-18.208305 19.264507-17.375729 49.631179 1.888778 67.872168l316.960409 299.839269L335.199677 813.631716c-19.071845 18.399247-19.648112 48.767639-1.247144 67.872168 9.407768 9.791372 21.984142 14.688778 34.560516 14.688778 12.000108 0 24.000215-4.479398 33.311652-13.439914l350.048434-337.375729c0.672598-0.672598 0.927187-1.599785 1.599785-2.303346 0.512619-0.479935 1.056202-0.832576 1.567101-1.343475C757.759656 538.879828 759.199462 535.391265 761.055557 532.128047z" p-id="7322" fill="#ffffff"></path></svg>

+ 14 - 0
miniprogram/images/images.svg

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="61px" height="54px" xmlns="http://www.w3.org/2000/svg">
+  <defs>
+    <mask fill="white" id="clip867">
+      <path d="M 34 297  C 31.225 297  29 294.775  29 292  L 29 248  C 29 245.225  31.225 243  34 243  L 85 243  C 87.775 243  90 245.225  90 248  L 90 292  C 90 294.775  87.775 297  85 297  " fill-rule="evenodd" />
+    </mask>
+  </defs>
+  <g transform="matrix(1 0 0 1 -29 -243 )">
+    <path d="M 29 243  L 90 243  L 90 297  L 29 297  L 29 243  " fill-rule="nonzero" fill="#cccccc" stroke="none" mask="url(#clip867)" />
+    <path d="M 33 247  L 86 247  L 86 293  L 33 293  L 33 247  " fill-rule="nonzero" fill="#ffffff" stroke="none" mask="url(#clip867)" />
+    <path d="M 64.77 259.2  C 62.502 259.2  60.72 257.418  60.72 255.15  C 60.72 252.882  62.502 251.1  64.77 251.1  C 67.038 251.1  68.82 252.882  68.82 255.15  C 68.82 257.418  67.038 259.2  64.77 259.2  " fill-rule="nonzero" fill="#cccccc" stroke="none" mask="url(#clip867)" />
+    <path d="M 35 292  L 35 268.35  L 47.5 257.6  L 65 269.160655737705  L 75 264.05  L 85 269.160655737705  L 85 292  L 35 292  " fill-rule="nonzero" fill="#169bd5" stroke="none" mask="url(#clip867)" />
+  </g>
+</svg>

+ 1 - 0
miniprogram/images/下载.svg

@@ -0,0 +1 @@
+<svg t="1662082473310" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3462" width="200" height="200"><path d="M512 960c-247.039484 0-448-200.960516-448-448S264.960516 64 512 64 960 264.960516 960 512 759.039484 960 512 960zM512 128c-211.744443 0-384 172.255557-384 384s172.255557 384 384 384 384-172.255557 384-384S723.744443 128 512 128z" p-id="3463" fill="#050505"></path><path d="M694.559548 522.144013c-12.54369-12.607338-33.375299-12.640022-45.951673-0.063647l-104.608735 103.903454L543.99914 319.327402c0-17.759333-14.208843-32.160839-32.00086-32.160839-17.759333 0-32.00086 14.399785-32.00086 32.160839l0 308.319849-105.215966-106.688456c-12.480043-12.607338-32.704421-12.736353-45.311759-0.25631-12.640022 12.512727-12.672705 32.895364-0.192662 45.504421l159.359226 161.055342c6.271845 6.335493 14.592447 9.567746 22.880366 9.567746 8.160624 0 16.383174-3.168606 22.624056-9.311437 0.032684-0.063647 0.032684-0.063647 0.063647-0.127295 0.032684 0 0.063647 0 0.096331-0.063647l160.191802-159.679183C707.072275 555.104744 707.103239 534.720387 694.559548 522.144013z" p-id="3464" fill="#050505"></path></svg>

+ 7 - 0
miniprogram/images/头像.svg

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="56px" height="56px" xmlns="http://www.w3.org/2000/svg">
+  <g transform="matrix(1 0 0 1 -29 -98 )">
+    <path d="M 57 98  C 72.68 98  85 110.32  85 126  C 85 141.68  72.68 154  57 154  C 41.32 154  29 141.68  29 126  C 29 110.32  41.32 98  57 98  Z " fill-rule="nonzero" fill="#ffffff" stroke="none" />
+    <path d="M 57 98.5  C 72.4 98.5  84.5 110.6  84.5 126  C 84.5 141.4  72.4 153.5  57 153.5  C 41.6 153.5  29.5 141.4  29.5 126  C 29.5 110.6  41.6 98.5  57 98.5  Z " stroke-width="1" stroke="#797979" fill="none" />
+  </g>
+</svg>

BIN
miniprogram/images/我未选择.png


BIN
miniprogram/images/我的已选择.png


+ 1 - 0
miniprogram/images/添加.svg

@@ -0,0 +1 @@
+<svg t="1662085752027" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5516" width="200" height="200"><path d="M512 85.333333c235.637333 0 426.666667 191.029333 426.666667 426.666667S747.637333 938.666667 512 938.666667 85.333333 747.637333 85.333333 512 276.362667 85.333333 512 85.333333z m0 234.666667a32 32 0 0 0-32 32v128H352a32 32 0 0 0 0 64h128v128a32 32 0 0 0 64 0V544h128a32 32 0 0 0 0-64H544V352a32 32 0 0 0-32-32z" p-id="5517" fill="#050505"></path></svg>

BIN
miniprogram/images/返回.png


BIN
miniprogram/images/邮品未选择.png


BIN
miniprogram/images/邮票已选择.png


BIN
miniprogram/images/首页已选择.png


BIN
miniprogram/images/首页未选择.png


+ 82 - 0
miniprogram/pages/Postage/Postage.js

@@ -0,0 +1,82 @@
+// pages/Postage.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+  
+  },
+  go(event){
+    wx.navigateTo({
+      url: '/pages/new/new',
+      success: (result)=>{},//成功回调
+      fail: ()=>{},//失败回调
+      complete: ()=>{},//无论成功还是失败都会执行
+  })
+},
+  information(event){
+    wx.navigateTo({
+      url: '/pages/information/information',
+      success: (result)=>{},//成功回调
+      fail: ()=>{},//失败回调
+      complete: ()=>{},//无论成功还是失败都会执行
+    })
+
+},
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 4 - 0
miniprogram/pages/Postage/Postage.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationStyle": "custom"
+}

+ 27 - 0
miniprogram/pages/Postage/Postage.wxml

@@ -0,0 +1,27 @@
+<!--pages/Postage.wxml-->
+<view class="new">
+  <button class="new-button" bindtap="go">新建展览馆</button>
+</view>
+<view class="my">我的藏品</view>
+<view>
+  <view class="me-1" bindtap="information">
+    <image src="../../images/images.svg" class="me-1-image"/>
+    <text class="me-title-1">改革开发新时代</text>
+    <text class="me-title-2">全套6张藏品,已购买1张</text>
+  </view>  
+  <view class="me-1" bindtap="information">
+    <image src="../../images/images.svg" class="me-1-image"/>
+    <text class="me-title-1">改革开发新时代</text>
+    <text class="me-title-2">全套6张藏品,已购买1张</text>
+  </view>
+  <view class="me-1" bindtap="information">
+    <image src="../../images/images.svg" class="me-1-image"/>
+    <text class="me-title-1">改革开发新时代</text>
+    <text class="me-title-2">全套6张藏品,已购买1张</text>
+  </view>
+  <view class="me-1" bindtap="information">
+    <image src="../../images/images.svg" class="me-1-image"/>
+    <text class="me-title-1">改革开发新时代</text>
+    <text class="me-title-2">全套6张藏品,已购买1张</text>
+  </view>
+</view>

+ 48 - 0
miniprogram/pages/Postage/Postage.wxss

@@ -0,0 +1,48 @@
+/* pages/Postage.wxss */
+.new{
+  height:2.5rem ;
+  padding-top: 7.03125rem;
+  padding-bottom: 2.40625rem;
+}
+.new-button{
+ height: 2.5rem;
+ background: rgba(22, 155, 213, 1);
+}
+.my{
+  height: 1.5rem;
+  margin-left: 1.5rem;
+  margin-top: 1rem;
+  font-weight: 650;
+  color: #000000;
+  font-family: 'PingFangSC-Semibold', 'PingFang SC Semibold', 'PingFang SC 標準體', 'PingFang SC', sans-serif;
+}
+.me-1{
+  height: 4.5rem;
+  background: rgba(170, 170, 170, 1);
+  margin: 1rem 1rem;
+  border-radius: 0.3125rem;
+}
+.me-1-image{
+  width: 3.8125rem;
+  height: 3.375rem;
+  margin-top: 0.5rem;
+  margin-left: 0.8rem;
+  display: inline-block;
+  float: left;
+}
+.me-title-1{
+  box-sizing: border-box;
+  display: inline-block;
+  margin: 0.5rem 0.5rem;
+  color: #FFFFFF;
+  font-weight: 650;
+  font-size: 0.9375rem;
+}
+.me-title-2{
+  box-sizing: border-box;
+  display: inline-block;
+  margin: 0.5rem 0.5rem;
+  color: #FFFFFF;
+  font-weight: 400;
+  font-size: 0.8125rem;
+}

+ 66 - 0
miniprogram/pages/change/change.js

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

+ 4 - 0
miniprogram/pages/change/change.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationStyle": "custom"
+}

+ 29 - 0
miniprogram/pages/change/change.wxml

@@ -0,0 +1,29 @@
+<view class="top">
+  <image src="/images/返回.png" mode="" class="return" bindtap="content"/>
+  <text class="top-title">修改展览</text>
+    <view class="top-button" bindtap="content">确定</view>
+</view>
+<view class="theme">
+ <text class="theme-title">展览主题</text>
+ <text class="theme-star">*</text>
+  <input type="text" class="theme-content"/>
+</view>
+<view class="introduce">
+ <text class="introduce-title">展览介绍</text>
+  <input type="text" class="introduce-content"/>
+  <text class="introduce-number">0/20</text>
+</view>
+<view class="add">
+  <text class="add-title">添加藏品</text>
+  <text class="add-star">*</text>
+  <view class="add-project">
+    <view class="add-project-left">
+      <image src="/images/delete.svg" mode="" class="add-delete"/>
+      <image src="/images/images.svg" mode="" class="add-project-img"/>
+      <text class="add-content-1">改革开发新时期</text>
+      <text class="add-content-2">全套6张藏品,已购买1张</text>
+  </view>
+  <image src="/images/添加.svg" mode="" class="add-project-right"/>
+  </view>
+</view>
+

+ 133 - 0
miniprogram/pages/change/change.wxss

@@ -0,0 +1,133 @@
+
+.top{
+  height: 3rem;
+  margin-top: 2.3rem;
+  width: 100%;
+}
+.return{
+  width: 1.75rem;
+  height: 1.75rem;
+  margin-left: 1rem;
+  float: left;
+}
+.top-title{
+ line-height: 1.75rem;
+ box-sizing: border-box;
+ margin-left: 6.5rem;
+ float: left;
+ font-weight: 650;
+ color: #333333;
+}
+.top-button{
+  background: #36A9CE;
+  width: 5.875rem;
+  height: 1.75rem;
+  font-size: 0.8125rem;
+  font-family: PingFangSC, "PingFang SC 標準體", "PingFang SC", sans-serif;
+  color: aliceblue;
+  font-weight: 400;
+  float: left;
+  border-radius: 0.3125rem;
+  text-align: center;
+  line-height: 1.75rem;
+  margin-left: 3rem;
+}
+.theme{
+  margin: 0.65rem 1rem;
+}
+.theme-star{
+  color: #D9001B;
+  font-size: 1.375rem;
+  font-weight: 650;
+}
+.theme-title{
+  font-weight: 650;
+  font-size: 1.375rem;
+  color: #333333;
+}
+.theme-content{
+  border: 0.05rem solid rgb(95, 41, 41);
+  padding: 0.125rem;
+  height: 8.5625rem;
+  margin-top: 0.5rem;
+  margin-bottom: 0.5rem;
+  border-radius: 0.5rem;
+}
+.introduce{
+  margin: 0.5rem 1rem 0rem 1rem;
+}
+.introduce-title{
+  font-weight: 650;
+  font-size: 1.375rem;
+  color: #333333;
+}
+.introduce-content{
+  border: 0.05rem solid rgb(0, 0, 0);
+  padding: 0.125rem;
+  height: 8.5625rem;
+  margin-top: 0.5rem;
+  margin-bottom: 0.5rem;
+  border-radius: 0.5rem;
+}
+.introduce-number{
+  float: right;
+}
+.add{
+  margin-left: 1rem;
+}
+.add-title{
+  font-weight: 650;
+  font-size: 1.375rem;
+  color: #333333;
+}
+.add-star{
+  color: #D9001B;
+  font-size: 1.375rem;
+  font-weight: 650;
+}
+.add-project{
+  height: 4.5rem;
+  margin-top: 3rem;
+}
+.add-project-left{
+  height: 4.5rem;
+  width: 16.4rem;
+  background-color: #aaaaaa;
+  border-radius: 0.5rem;
+  float: left;
+}
+.add-project-img{
+  width: 3rem;
+  height: 3.5rem;
+  margin: 0.5rem 0.1rem 0.5rem 0.3rem;
+  float: left;
+}
+.add-delete{
+  float: right;
+  position: relative;
+  top: -1rem;
+  left: -0.1rem;
+  width: 1.8125rem;
+  height: 1.8125rem;
+}
+.add-content-1{
+  float: left;
+  font-weight: 650;
+  font-size: 0.9rem;
+  color: #ffffff;
+  margin-top: 0.8rem;
+}
+.add-content-2{
+  float: left;
+  font-weight: 400;
+  font-size: 0.9rem;
+  color: #ffffff;
+  margin-top: 0.8rem;
+}
+.add-project-right{
+  float: right;
+  position: relative;
+  top: -1rem;
+  width: 6rem;
+  height: 6rem;
+}

+ 116 - 0
miniprogram/pages/home/home.js

@@ -0,0 +1,116 @@
+// pages/index/index.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    homePath:'./home.wxml',//存储other页面的路径
+    mePath:'../me/me.wxml',//存储me页面的路径
+    PostagePath:'../Postage/Postage.wxml'//存储me页面的路径
+    },
+    // 事件处理函数
+    gotoOther(event){
+    //  console.log('goto');
+    //  console.log(event);
+     wx.navigateTo({
+      url: '../other/other',//跳转的页面路径
+      success: (result)=>{},//成功回调
+      fail: ()=>{},//失败回调
+      complete: ()=>{},//无论成功还是失败都会执行
+     });
+    },
+  
+    gotoMe(event){
+      //  console.log('goto');
+      //  console.log(event);
+       wx.navigateTo({
+        url: '../me/me',//跳转的页面路径
+        success: (result)=>{},//成功回调
+        fail: ()=>{},//失败回调
+        complete: ()=>{},//无论成功还是失败都会执行
+       });
+      },
+  
+      go(event){
+      //  let ds = event.target.dataset; // 所有data-*属性
+      //  console.log(ds);
+      //  let { url } = ds;
+      //  wx.navigateTo({
+      //   url,//跳转的页面路径
+      
+      //  });
+      let { url , istab } = event.target.dataset;;
+      // navigateTo只能跳转非tabBar页面
+      // 如果me页面为tabBar页 的 就会失败
+      let methodName = istab ? 'switchTab' : 'navigateTo'
+      wx[methodName]({
+        url,
+      });
+  
+      // wx.navigateTo({
+      //  url,//跳转的页面路径
+     
+      // });
+      },
+      goo(url){
+        wx.navigateTo({
+          url,
+        });
+      },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 4 - 0
miniprogram/pages/home/home.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationStyle": "custom"
+}

+ 4 - 0
miniprogram/pages/home/home.wxml

@@ -0,0 +1,4 @@
+<!--pages/index/index.wxml-->
+<button data-url="{{ homePath }}" data-istab="{{ false }}" bindtap="go"></button>
+<button data-url="{{ PostagePath }}" data-istab="{{ true }}" bindtap="go"></button>
+<button data-url="{{ mePath }}" data-istab="{{ true }}" bindtap="go"></button>

+ 1 - 0
miniprogram/pages/home/home.wxss

@@ -0,0 +1 @@
+/* pages/index/index.wxss */

+ 66 - 0
miniprogram/pages/information/information.js

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

+ 3 - 0
miniprogram/pages/information/information.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
miniprogram/pages/information/information.wxml

@@ -0,0 +1,2 @@
+<!--pages/information/information.wxml-->
+<text>pages/information/information.wxml</text>

+ 1 - 0
miniprogram/pages/information/information.wxss

@@ -0,0 +1 @@
+/* pages/information/information.wxss */

+ 66 - 0
miniprogram/pages/me/me.js

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

+ 4 - 0
miniprogram/pages/me/me.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationStyle": "custom"
+}

+ 2 - 0
miniprogram/pages/me/me.wxml

@@ -0,0 +1,2 @@
+<!--pages/me/me.wxml-->
+<text>pages/me/me.wxml</text>

+ 1 - 0
miniprogram/pages/me/me.wxss

@@ -0,0 +1 @@
+/* pages/me/me.wxss */

+ 90 - 0
miniprogram/pages/my/my.js

@@ -0,0 +1,90 @@
+// pages/my/my.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+  return(event){
+    wx.navigateTo({
+      url: '/pages/new/new',
+      success: (result)=>{},//成功回调
+      fail: ()=>{},//失败回调
+      complete: ()=>{},//无论成功还是失败都会执行
+  })
+},
+  information(event){
+  wx.navigateTo({
+    url: '/pages/information/information',
+    success: (result)=>{},//成功回调
+    fail: ()=>{},//失败回调
+    complete: ()=>{},//无论成功还是失败都会执行
+  })
+
+},
+  change(event){
+    wx.navigateTo({
+      url:'/pages/change/change',
+      success:(result)=>{},
+      fail:()=>{},
+      complete:()=>{},
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 4 - 0
miniprogram/pages/my/my.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationStyle": "custom"
+}

+ 37 - 0
miniprogram/pages/my/my.wxml

@@ -0,0 +1,37 @@
+<!--pages/my/my.wxml-->
+<view class="top">
+  <image src="/images/返回.png" mode="" class="return" bindtap="return"/>
+  <text class="top-title">我的展览馆</text>
+    <view class="top-button" bindtap="change">修改</view>
+</view>
+<view class="middle">
+  <image src="/images/头像.svg" mode="" class="header"/>
+  <text class="name-1">八月飞雪</text>
+  <text class="name-2">八月精粹  16个展品</text>
+</view>
+<view class="content">
+  <view class="me-1" bindtap="information">
+    <image src="../../images/images.svg" class="me-1-image"/>
+    <text class="me-title-1">改革开发新时代</text>
+    <image src="/images/go.svg" mode="" class="go"/>
+    <text class="me-title-2">全套6张藏品,已购买1张</text>
+  </view>  
+  <view class="me-1" bindtap="information">
+    <image src="../../images/images.svg" class="me-1-image"/>
+    <text class="me-title-1">改革开发新时代</text>
+    <image src="/images/go.svg" mode="" class="go"/>
+    <text class="me-title-2">全套6张藏品,已购买1张</text>
+  </view>
+  <view class="me-1" bindtap="information">
+    <image src="../../images/images.svg" class="me-1-image"/>
+    <text class="me-title-1">改革开发新时代</text>
+    <image src="/images/go.svg" mode="" class="go"/>
+    <text class="me-title-2">全套6张藏品,已购买1张</text>
+  </view>
+  <view class="me-1" bindtap="information">
+    <image src="../../images/images.svg" class="me-1-image"/>
+    <text class="me-title-1">改革开发新时代</text>
+    <image src="/images/go.svg" mode="" class="go"/>
+    <text class="me-title-2">全套6张藏品,已购买1张</text>
+  </view>
+</view>

+ 102 - 0
miniprogram/pages/my/my.wxss

@@ -0,0 +1,102 @@
+.top{
+  height: 3rem;
+  margin-top: 2.3rem;
+  width: 100%;
+}
+.return{
+  width: 1.75rem;
+  height: 1.75rem;
+  margin-left: 1rem;
+  float: left;
+}
+.top-title{
+ line-height: 1.75rem;
+ box-sizing: border-box;
+ margin-left: 6.5rem;
+ float: left;
+ font-weight: 650;
+ color: #333333;
+}
+.top-button{
+  background: #36A9CE;
+  width: 5.875rem;
+  height: 1.75rem;
+  font-size: 0.8125rem;
+  font-family: PingFangSC, "PingFang SC 標準體", "PingFang SC", sans-serif;
+  color: aliceblue;
+  font-weight: 400;
+  float: left;
+  border-radius: 0.3125rem;
+  text-align: center;
+  line-height: 1.75rem;
+  margin-left: 3rem;
+}
+.header{
+  width: 3.5rem;
+  height: 3.5rem;
+  float: left;
+}
+.middle{
+  height: 7.0625rem;
+  width: 20rem;
+  margin-left: 2rem;
+  margin-top: 1.5rem;
+}
+.name-1{
+  width: 4.5rem;
+  height: 1.59rem;
+  font-size: 1.125rem;
+  font-weight: 650;
+  margin-left: 0.5rem;
+  display: inline-block;
+  color: #333333;
+}
+.name-2{
+ display: block;
+ font-weight: 650;
+ margin-top: 0.5rem;
+ margin-left:4rem;
+ color: #333333;
+ font-size: 0.875rem;
+}
+.content{
+  height: 35.125rem;
+  background: rgba(215, 215, 215, 1);
+  margin: 0rem 0.8rem;
+}
+.me-1{
+  height: 4.5rem;
+  background: rgba(170, 170, 170, 1);
+  margin: 1rem 1rem;
+  border-radius: 0.3125rem;
+}
+.me-1-image{
+  width: 3.8125rem;
+  height: 3.375rem;
+  margin-top: 0.5rem;
+  margin-left: 0.8rem;
+  display: inline-block;
+  float: left;
+}
+.me-title-1{
+  box-sizing: border-box;
+  display: inline-block;
+  margin: 0.5rem 0.5rem;
+  color: #FFFFFF;
+  font-weight: 650;
+  font-size: 0.9375rem;
+}
+.me-title-2{
+  box-sizing: border-box;
+  display: inline-block;
+  margin: 0.5rem 0.5rem;
+  color: #FFFFFF;
+  font-weight: 400;
+  font-size: 0.825rem;
+}
+.go{
+  float: right;
+  width: 2rem;
+  height: 4.5rem;
+  margin-right: 0.8rem;
+}

+ 131 - 0
miniprogram/pages/new/new.js

@@ -0,0 +1,131 @@
+// pages/new/new.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    //最大字符数
+    maxTextLen: 20,
+    maxTitleLen: 15,
+    //默认长度
+    textLen: 0,
+   arr:[
+     {
+      name:'改革开发新时代',
+      content:'全套6张藏品, 已购买1张'
+    },
+  ],
+  },
+    
+  checkboxChange: function (e) {
+    console.log(e.detail.value)
+    this.setData({
+      choseNames: e.detail.value, //单个选中的值
+    })
+    if (this.data.choseNames.length == this.data.list.length) {
+      this.setData({
+        select_all: true
+      })
+    } else {
+      this.setData({
+        select_all: false
+      })
+    }
+  },
+  getIntroduce(e){
+    let page = this;
+    //设置最大字符串长度(为-1时,则不限制)
+    let maxTextLen = page.data.maxTextLen;
+    //文本长度
+    let textLen = e.detail.value.length;
+
+    page.setData({
+      maxTextLen : maxTextLen,
+      textLen: textLen
+    });
+  },
+  getTitle(e){
+    let page = this;
+    //设置最大字符串长度(为-1时,则不限制)
+    let maxTitleLen = page.data.maxTitleLen;
+    //文本长度
+    let textLen = e.detail.value.length;
+
+    page.setData({
+      maxTitleLen : maxTitleLen,
+      textLen: textLen
+    });
+  },
+  return(event){
+    wx.switchTab({
+      url: '/pages/Postage/Postage',
+      success: (result)=>{},//成功回调
+      fail: ()=>{},//失败回调
+      complete: ()=>{},//无论成功还是失败都会执行
+  })
+},
+  change(event){
+   wx.navigateTo({
+    url: '/pages/my/my',
+    success: (result)=>{},//成功回调
+    fail: ()=>{},//失败回调
+    complete: ()=>{},//无论成功还是失败都会执行
+})
+}, 
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 5 - 0
miniprogram/pages/new/new.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {},
+    "navigationStyle": "custom"
+
+}

+ 57 - 0
miniprogram/pages/new/new.wxml

@@ -0,0 +1,57 @@
+<!--pages/new/new.wxml-->
+<template name="hide-content">
+  <view class="me-1" bindtap="information">
+    <image src="../../images/images.svg" class="me-1-image" />
+    <!-- <text class="me-title-1">{{arr.name}}</text>
+    <text class="me-title-2">{{arr.content}}</text> -->
+    <text class="me-title-1">{{arr}}</text>
+  </view>
+</template>
+<view class="top">
+  <image src="/images/返回.png" mode="" class="return" bindtap="return" />
+  <text class="top-title">创建新展览</text>
+  <view class="top-button" bindtap="change">创建</view>
+</view>
+<view class="theme">
+  <text class="theme-title">展览主题</text>
+  <text class="theme-star">*</text>
+  <textarea bindinput="getTitle" maxlength='{{maxTitleLen}}' class="theme-content" />
+</view>
+<view class="introduce">
+  <text class="introduce-title">展览介绍</text>
+  <textarea bindinput="getIntroduce" maxlength='{{maxTextLen}}' class="introduce-content" />
+  <view class="introduce-number">{{textLen}}/{{maxTextLen}}</view>
+</view>
+<view class="add">
+  <text class="add-title">添加藏品</text>
+  <text class="add-star">*</text>
+  <view class="add-project">
+    <view class="add-project-left">
+      <image src="/images/delete.svg" mode="" class="add-delete" />
+      <image src="/images/images.svg" mode="" class="add-project-img" />
+      <text class="add-content-1">改革开发新时期</text>
+      <text class="add-content-2">全套6张藏品,已购买1张</text>
+    </view>
+    <image src="/images/添加.svg" mode="" class="add-project-right" bindtap="showOptionBtn" />
+    <view class="popup">
+      <text class="popup-title">我的藏品</text>
+      <image src="/images/下载.svg" mode="" class="download" />
+      <checkbox-group bindchange="checkboxChange">
+        <block wx:key="index">
+          <view class="content">
+            <checkbox value="{{item.name}}" checked="{{item.checked}}" />
+            <template is="hide-content" data="{{...list}}" />
+            <template is="hide-content" data="{{...list}}" />
+            <template is="hide-content" data="{{...list}}" />
+            <template is="hide-content" data="{{...list}}" />
+          </view>
+          <!-- <checkbox-group>
+            <label wx:for="{{array}}" wx:key="">
+              <checkbox id="{{item.id}}" value='{{item.name}}' checked='{{item.checkbox}}' color='{{item.color}}' disabled='{{item.disabled}}' />{{item.value}}
+            </label>
+          </checkbox-group> -->
+        </block>
+      </checkbox-group>
+    </view>
+  </view>
+</view>

+ 193 - 0
miniprogram/pages/new/new.wxss

@@ -0,0 +1,193 @@
+/* pages/new/new.wxss */
+.top{
+  height: 3rem;
+  margin-top: 2.3rem;
+  width: 100%;
+}
+.return{
+  width: 1.75rem;
+  height: 1.75rem;
+  margin-left: 1rem;
+  float: left;
+}
+.top-title{
+ line-height: 1.75rem;
+ box-sizing: border-box;
+ margin-left: 6.5rem;
+ float: left;
+ font-weight: 650;
+ color: #333333;
+}
+.top-button{
+  background: #36A9CE;
+  width: 5.875rem;
+  height: 1.75rem;
+  font-size: 0.8125rem;
+  font-family: PingFangSC, "PingFang SC 標準體", "PingFang SC", sans-serif;
+  color: aliceblue;
+  font-weight: 400;
+  float: left;
+  border-radius: 0.3125rem;
+  text-align: center;
+  line-height: 1.75rem;
+  margin-left: 3rem;
+}
+.theme{
+  margin: 0.65rem 1rem;
+}
+.theme-star{
+  color: #D9001B;
+  font-size: 1.375rem;
+  font-weight: 650;
+}
+.theme-title{
+  font-weight: 650;
+  font-size: 1.375rem;
+  color: #333333;
+}
+.theme-content{
+  border: 0.05rem solid rgb(95, 41, 41);
+  padding: 0.125rem;
+  height: 8.5625rem;
+  margin-top: 0.5rem;
+  margin-bottom: 0.5rem;
+  border-radius: 0.5rem;
+  width: 21.625rem;
+}
+.introduce{
+  margin: 0.5rem 1rem 0rem 1rem;
+  width: 21.625rem;
+}
+.introduce-title{
+  font-weight: 650;
+  font-size: 1.375rem;
+  color: #333333;
+}
+.introduce-content{
+  border: 0.05rem solid rgb(0, 0, 0);
+  padding: 0.125rem;
+  height: 8.5625rem;
+  margin-top: 0.5rem;
+  margin-bottom: 0.5rem;
+  border-radius: 0.5rem;
+  width: 21.625rem;
+}
+.introduce-number{
+  float: right;
+}
+.add{
+  margin-left: 1rem;
+}
+.add-title{
+  font-weight: 650;
+  font-size: 1.375rem;
+  color: #333333;
+}
+.add-star{
+  color: #D9001B;
+  font-size: 1.375rem;
+  font-weight: 650;
+}
+.add-project{
+  height: 4.5rem;
+  margin-top: 3rem;
+}
+.add-project-left{
+  height: 4.5rem;
+  width: 16.4rem;
+  background-color: #aaaaaa;
+  border-radius: 0.5rem;
+  float: left;
+}
+.add-project-img{
+  width: 3rem;
+  height: 3.5rem;
+  margin: 0.5rem 0.1rem 0.5rem 0.3rem;
+  float: left;
+}
+.add-delete{
+  float: right;
+  position: relative;
+  top: -1rem;
+  left: -0.1rem;
+  width: 1.8125rem;
+  height: 1.8125rem;
+}
+.add-content-1{
+  float: left;
+  font-weight: 650;
+  font-size: 0.9rem;
+  color: #ffffff;
+  margin-top: 0.8rem;
+}
+.add-content-2{
+  float: left;
+  font-weight: 400;
+  font-size: 0.9rem;
+  color: #ffffff;
+  margin-top: 0.8rem;
+}
+.add-project-right{
+  float: right;
+  position: relative;
+  top: -1rem;
+  width: 6rem;
+  height: 6rem;
+}
+.popup{
+  height: 42.375rem;
+  width: 20rem;
+  position: absolute;
+  background: rgba(215, 215, 215, 1);
+  top: 10rem;
+  right: 1.5rem;
+  border-radius: 0.625rem;
+  box-shadow: 0.3125rem 0.3125rem 0.3125rem rgb(97, 95, 95);
+}
+.popup-title{
+  font-weight: 650;
+  font-size: 1.125rem;
+  color: #333333;
+  margin: 1rem 0rem 0rem 0.8rem;
+  display: inline-block;
+}
+.download{
+  width: 1.4375rem;
+  height: 1.4375rem;
+  float: right;
+  margin: 1rem;
+}
+.content{
+  margin-top: 3rem;
+}
+.me-1{
+  height: 4.5rem;
+  background: rgba(170, 170, 170, 1);
+  margin: 1.5rem 1rem;
+  border-radius: 0.3125rem;
+  width: 16rem;
+}
+.me-1-image{
+  width: 3.8125rem;
+  height: 3.375rem;
+  margin-top: 0.5rem;
+  margin-left: 0.8rem;
+  display: inline-block;
+  float: left;
+}
+.me-title-1{
+  box-sizing: border-box;
+  display: inline-block;
+  margin: 0.5rem 0.5rem;
+  color: #FFFFFF;
+  font-weight: 650;
+  font-size: 0.9375rem;
+}
+.me-title-2{
+  box-sizing: border-box;
+  display: inline-block;
+  margin: 0.5rem 0.5rem;
+  color: #FFFFFF;
+  font-weight: 400;
+  font-size: 0.8125rem;
+}

+ 7 - 0
miniprogram/sitemap.json

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

+ 79 - 0
project.config.json

@@ -0,0 +1,79 @@
+{
+  "miniprogramRoot": "miniprogram/",
+  "cloudfunctionRoot": "cloudfunctions/",
+  "setting": {
+    "urlCheck": true,
+    "es6": true,
+    "enhance": true,
+    "postcss": true,
+    "preloadBackgroundData": false,
+    "minified": true,
+    "newFeature": true,
+    "coverView": true,
+    "nodeModules": false,
+    "autoAudits": false,
+    "showShadowRootInWxmlPanel": true,
+    "scopeDataCheck": false,
+    "uglifyFileName": false,
+    "checkInvalidKey": true,
+    "checkSiteMap": true,
+    "uploadWithSourceMap": true,
+    "compileHotReLoad": false,
+    "lazyloadPlaceholderEnable": false,
+    "useMultiFrameRuntime": true,
+    "useApiHook": true,
+    "useApiHostProcess": true,
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    },
+    "enableEngineNative": false,
+    "useIsolateContext": true,
+    "userConfirmedBundleSwitch": false,
+    "packNpmManually": false,
+    "packNpmRelationList": [],
+    "minifyWXSS": true,
+    "disableUseStrict": false,
+    "showES6CompileOption": false,
+    "useCompilerPlugins": false,
+    "minifyWXML": true
+  },
+  "appid": "wx28d9044fa0ea73d3",
+  "projectname": "quickstart-wx-cloud",
+  "libVersion": "2.14.1",
+  "cloudfunctionTemplateRoot": "cloudfunctionTemplate/",
+  "condition": {
+    "search": {
+      "list": []
+    },
+    "conversation": {
+      "list": []
+    },
+    "plugin": {
+      "list": []
+    },
+    "game": {
+      "list": []
+    },
+    "miniprogram": {
+      "list": [
+        {
+          "id": -1,
+          "name": "db guide",
+          "pathName": "pages/databaseGuide/databaseGuide"
+        }
+      ]
+    }
+  },
+  "srcMiniprogramRoot": "miniprogram/",
+  "compileType": "miniprogram",
+  "packOptions": {
+    "ignore": [],
+    "include": []
+  },
+  "editorSetting": {
+    "tabIndent": "insertSpaces",
+    "tabSize": 2
+  }
+}

+ 60 - 0
project.private.config.json

@@ -0,0 +1,60 @@
+{
+  "setting": {
+    "compileHotReLoad": true
+  },
+  "condition": {
+    "miniprogram": {
+      "list": [
+        {
+          "name": "db guide",
+          "pathName": "pages/databaseGuide/databaseGuide",
+          "query": ""
+        },
+        {
+          "name": "pages/getOpenId/index",
+          "pathName": "pages/getOpenId/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/deployService/index",
+          "pathName": "pages/deployService/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/selectRecord/index",
+          "pathName": "pages/selectRecord/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/sumRecordResult/index",
+          "pathName": "pages/sumRecordResult/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/updateRecord/index",
+          "pathName": "pages/updateRecord/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/updateRecordResult/index",
+          "pathName": "pages/updateRecordResult/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/updateRecordSuccess/index",
+          "pathName": "pages/updateRecordSuccess/index",
+          "query": "",
+          "scene": null
+        }
+      ]
+    }
+  },
+  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+  "projectname": "miniprogram-2"
+}

+ 1 - 0
uploadCloudFunction.sh

@@ -0,0 +1 @@
+${installPath} cloud functions deploy --e ${envId} --n quickstartFunctions --r --project ${projectPath}