关祥喆 преди 2 години
ревизия
1f86b2ca19
променени са 48 файла, в които са добавени 1213 реда и са изтрити 0 реда
  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. 19 0
      miniprogram/app.json
  15. 27 0
      miniprogram/app.wxss
  16. 6 0
      miniprogram/envList.js
  17. BIN
      miniprogram/images/md55afcf12f-ff08-4677-b079-eb433876d635__30c3cd1bc81108dc5706c0128e352d34.png
  18. BIN
      miniprogram/images/三角形.png
  19. BIN
      miniprogram/images/微信图片_20230305104839.png
  20. BIN
      miniprogram/images/邮票.png
  21. 95 0
      miniprogram/pages/index/index.js
  22. 3 0
      miniprogram/pages/index/index.json
  23. 17 0
      miniprogram/pages/index/index.wxml
  24. 57 0
      miniprogram/pages/index/index.wxss
  25. 75 0
      miniprogram/pages/logagain/logagain.js
  26. 3 0
      miniprogram/pages/logagain/logagain.json
  27. 15 0
      miniprogram/pages/logagain/logagain.wxml
  28. 48 0
      miniprogram/pages/logagain/logagain.wxss
  29. 66 0
      miniprogram/pages/message/message.js
  30. 3 0
      miniprogram/pages/message/message.json
  31. 5 0
      miniprogram/pages/message/message.wxml
  32. 18 0
      miniprogram/pages/message/message.wxss
  33. 66 0
      miniprogram/pages/procotol/procotol.js
  34. 4 0
      miniprogram/pages/procotol/procotol.json
  35. 10 0
      miniprogram/pages/procotol/procotol.wxml
  36. 25 0
      miniprogram/pages/procotol/procotol.wxss
  37. 66 0
      miniprogram/pages/shouquan/shouquan.js
  38. 3 0
      miniprogram/pages/shouquan/shouquan.json
  39. 5 0
      miniprogram/pages/shouquan/shouquan.wxml
  40. 18 0
      miniprogram/pages/shouquan/shouquan.wxss
  41. 84 0
      miniprogram/pages/yijian/yijian.js
  42. 3 0
      miniprogram/pages/yijian/yijian.json
  43. 5 0
      miniprogram/pages/yijian/yijian.wxml
  44. 1 0
      miniprogram/pages/yijian/yijian.wxss
  45. 7 0
      miniprogram/sitemap.json
  46. 79 0
      project.config.json
  47. 102 0
      project.private.config.json
  48. 1 0
      uploadCloudFunction.bat

+ 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 = {};
+  }
+});

+ 19 - 0
miniprogram/app.json

@@ -0,0 +1,19 @@
+{
+  "pages": [
+    "pages/index/index",
+    "pages/procotol/procotol",
+    "pages/logagain/logagain",
+    "pages/message/message",
+    "pages/shouquan/shouquan",
+    "pages/yijian/yijian"
+  ],
+  "window": {
+    "backgroundColor": "#F6F6F6",
+    "backgroundTextStyle": "light",
+    "navigationBarBackgroundColor": "#F6F6F6",
+    "navigationBarTitleText": "云开发 QuickStart",
+    "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 = [{"envId":"cloud1-8gto6ybx6ad7250f","alias":"cloud1"}]
+const isMac = false
+module.exports = {
+    envList,
+    isMac
+}

BIN
miniprogram/images/md55afcf12f-ff08-4677-b079-eb433876d635__30c3cd1bc81108dc5706c0128e352d34.png


BIN
miniprogram/images/三角形.png


BIN
miniprogram/images/微信图片_20230305104839.png


BIN
miniprogram/images/邮票.png


+ 95 - 0
miniprogram/pages/index/index.js

@@ -0,0 +1,95 @@
+// pages/index/index.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    /*按钮*/
+    btn_disabled: true,
+  },
+  bindAgreeChange: function (e) {
+    //  console.log(e.detail.value)
+    this.setData({
+      isAgree: e.detail.value.length,
+    })
+    if (e.detail.value.length == 1) {
+      this.setData({
+        btn_disabled: false,
+      })
+    } else {
+      //onsole.log(e.detail.value.length)
+      this.setData({
+        btn_disabled: true
+      })
+    }
+  },
+
+  procotol() {
+    wx.navigateTo({
+      url: '/pages/procotol/procotol',
+    })
+  },
+
+  tz() {
+    wx.navigateTo({
+      url: '/pages/message/message',
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

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

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

+ 17 - 0
miniprogram/pages/index/index.wxml

@@ -0,0 +1,17 @@
+<view>
+    <image src="../../images/邮票.png" mode="aspectFill" class="img"></image>
+  <view class="youb">邮贝</view>
+  <input type="text" placeholder="请输入手机号" class="inpphone" />
+  <view class="yzm">
+    <text>未注册手机号通过验证将自动注册</text>
+  </view>
+  <view class="agree">
+    请阅读并同意协议
+  </view>
+  <checkbox class="checkagree">
+    <view class="agreement">
+      已阅读并同意协议<text bindtap="procotol" class="agreement-text">《用户服务协议》</text> <text class="agreement-text">《隐私权政策》</text>
+    </view>
+  </checkbox>
+  <button class="but" type="primary" bindtap="tz">发送短信验证码</button>
+</view>

+ 57 - 0
miniprogram/pages/index/index.wxss

@@ -0,0 +1,57 @@
+/* pages/index/index.wxss */
+.img {
+  margin-top: 30px;
+  width: 82px;
+  height: 82px;
+  display: inline-block;
+  overflow: hidden;
+  margin-left: 10px;
+}
+
+.youb {
+  margin-left: 30px;
+  margin-top: 20px;
+  font-size: x-large;
+}
+
+.inpphone {
+  border: 1px solid black;
+  width: 90%;
+  border-radius: 10px;
+  margin: 0 auto;
+  font-size: 13px;
+  margin-top: 20%;
+}
+
+.yzm {
+  margin-left: -190px;
+  margin-top: 10px;
+  text-align: center;
+  font-size: 10px;
+}
+
+.agree {
+  border: 1px solid black;
+  font-size: 12px;
+  width: 102px;
+  height: 21px;
+  border-radius: 5px;
+  margin-top: 70px;
+  margin-left: 17px;
+}
+.agreement{
+  font-size: 13px;
+}
+.checkmust{
+  margin-left: 17px;
+  border-radius: 50px;
+}
+.agreement-text{
+  color: red;
+}
+.checkagree{
+  margin-left: 16px;
+}
+.but{
+  margin-top: 50px;
+}

+ 75 - 0
miniprogram/pages/logagain/logagain.js

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

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

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

+ 15 - 0
miniprogram/pages/logagain/logagain.wxml

@@ -0,0 +1,15 @@
+<!--pages/logagain/logagain.wxml-->
+<view>
+    <image src="../../images/邮票.png" mode="aspectFill" class="img"></image>
+  <view class="youb">邮贝</view>
+   <view class="number">151*******33 </view><button class="btn" bindtap="btnnumber">修改</button>
+   <view class="agree">
+    请阅读并同意协议
+  </view>
+  <checkbox class="checkagree">
+    <view class="agreement">
+      已阅读并同意协议<text bindtap="procotol" class="agreement-text">《用户服务协议》</text> <text class="agreement-text">《隐私权政策》</text>
+    </view>
+  </checkbox>
+  <button class="onelog" style="width:600rpx">一键登陆</button>
+</view>

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

@@ -0,0 +1,48 @@
+/* pages/logagain/logagain.wxss */
+.img {
+  margin-top: 30rpx;
+  width: 82px;
+  height: 82px;
+  display: inline-block;
+  overflow: hidden;
+  margin-left: 10rpx;
+}
+.youb {
+  margin-left: 30rpx;
+  margin-top: 20rpx;
+  font-size: x-large;
+}
+.number{
+  text-align: center;
+  margin-top: 20%;
+  overflow: hidden;
+}
+.btn{
+  float: right;
+  margin-top: -8.1%;
+  width: 10px;
+}
+.agree {
+  border: 1px solid black;
+  font-size: 12px;
+  width: 102px;
+  height: 21px;
+  border-radius: 5px;
+  margin-top: 70px;
+  margin-left: 17px;
+}
+.checkagree{
+  margin-left: 16px;
+}
+.agreement{
+  font-size: 13px;
+}
+.agreement-text{
+  color: red;
+}
+.onelog{
+  margin-top: 10%;
+  background: blue;
+  color: aliceblue;
+  border-radius: 50px;
+}

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

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

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

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

+ 5 - 0
miniprogram/pages/message/message.wxml

@@ -0,0 +1,5 @@
+<!--pages/message/message.wxml-->
+<view class="message-head">输入短信验证码</view>
+<view class="message-center">验证码已发送至151*********33,请在下发输入6位数字验证码</view>
+<input type="text" class="put"/>
+<view class="re">60s后重新发送</view>

+ 18 - 0
miniprogram/pages/message/message.wxss

@@ -0,0 +1,18 @@
+/* pages/message/message.wxss */
+.message-head{
+  font-size: 18px;
+  text-align: left;
+  font-weight: bolder;
+}
+.message-center{
+  margin-top: 30rpx;
+}
+.put{
+width: 80%;
+border: 1px solid;
+margin: 20% auto;
+}
+
+.re{
+  text-align: center;
+}

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

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

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

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "协议内容"
+}

+ 10 - 0
miniprogram/pages/procotol/procotol.wxml

@@ -0,0 +1,10 @@
+<!--pages/procotol/procotol.wxml-->
+<view class="top">蚂蚁链数字藏品平台用户服务协议</view>
+<view class="second">20220706版本</view>
+<text class="third">
+  《蚂蚁链数字藏品平台用户服务协议》(以下简称“本协议”) 是由您与上海小块头数字科技有限公司(作为运营方)和杭州蚂蚁酷爱科技有限公司 (作为开发者) (以下统称“我们”) 就我们向您提供数字藏品平台服务(以下简称“本服务”)所订立的有效合约。请您先仔细阅读本协议内容,尤其是字体加粗部分。如您对本协议内容或页面提示信息有任何疑问的,请勿进行下一步操作。您可通过上海小块头数字科技有限公司运营的在线客服或拨打4009030234进行咨询,以便我们为您解释和说明。
+</text>
+<view class="special">[特别提醒]</view>
+<view class="five">
+  您需审慎阅读、充分理解本协议的各个条款,尤其是以粗体并下划线标示的条款,包括第三条的数字藏品购买和转赠规则、第四条的平台服务说明及使用规范、第五条用户违约及处理措施、第八条免责事项、第十条的法律适用和争议解决以及附件一
+</view>

+ 25 - 0
miniprogram/pages/procotol/procotol.wxss

@@ -0,0 +1,25 @@
+/* pages/procotol/procotol.wxss */
+.top{
+  margin: 0 auto;
+  font-size: larger;
+  font-weight: 800;
+
+}
+.second{
+  margin-top: 20px;
+  margin-left: 280px;
+  font-size: 13px;
+  font-weight: 500;
+}
+.third{
+  margin-top: 110px;
+  
+}
+.special{
+  margin-top: 70px;
+  font-weight: 800;
+}
+.five{
+  margin-top: 70px;
+  font-weight: 800;
+}

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

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

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

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

+ 5 - 0
miniprogram/pages/shouquan/shouquan.wxml

@@ -0,0 +1,5 @@
+<!--pages/shouquan/shouquan.wxml-->
+<view class="message-head">输入手机号码</view>
+<view>微信授权登录,需绑定手机号码</view>
+<input type="text" class="put"/>
+<button class="onelog" style="width:600rpx">发送短信验证码</button>

+ 18 - 0
miniprogram/pages/shouquan/shouquan.wxss

@@ -0,0 +1,18 @@
+/* pages/shouquan/shouquan.wxss */
+.message-head{
+  font-size: 18px;
+  text-align: left;
+  font-weight: bolder;
+}
+.put{
+  width: 80%;
+  border: 1px solid;
+  margin: 20% auto;
+  border-radius: 20rpx;
+  }
+  .onelog{
+    margin-top: 10%;
+    background: blue;
+    color: aliceblue;
+    border-radius: 50px;
+  }

+ 84 - 0
miniprogram/pages/yijian/yijian.js

@@ -0,0 +1,84 @@
+// pages/yijian/yijian.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    userInfo: {},
+    hasUserInfo: false,
+    canIUseGetUserProfile: false,
+  },
+  getUserProfile(e) {
+    // 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
+    // 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
+    wx.getUserProfile({
+      desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+      success: (res) => {
+        this.setData({
+          userInfo: res.userInfo,
+          hasUserInfo: true
+        })
+      }
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad() {
+    if (wx.getUserProfile) {
+      this.setData({
+        canIUseGetUserProfile: true
+      })
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

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

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

+ 5 - 0
miniprogram/pages/yijian/yijian.wxml

@@ -0,0 +1,5 @@
+<!--pages/yijian/yijian.wxml-->
+<button class='bottom' type='primary' bindtap="getUserProfile" lang="zh_CN">微信一键登录</button>
+
+<!-- <button class='bottom' type='primary' open-type="getPhoneNumber" lang="zh_CN" bindgetphonenumber="bindGetUserInfo">微信手机号一键登录</button> -->
+

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

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

+ 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": "wx3eaff71c16b3fafd",
+  "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
+  }
+}

+ 102 - 0
project.private.config.json

@@ -0,0 +1,102 @@
+{
+  "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
+        },
+        {
+          "name": "",
+          "pathName": "pages/procotol/procotol",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "",
+          "pathName": "pages/logagain/logagain",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "",
+          "pathName": "pages/logagain/logagain",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "",
+          "pathName": "pages/message/message",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "",
+          "pathName": "pages/shouquan/shouquan",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "",
+          "pathName": "pages/yijian/yijian",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        }
+      ]
+    }
+  },
+  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+  "projectname": "miniprogram-5"
+}

+ 1 - 0
uploadCloudFunction.bat

@@ -0,0 +1 @@
+"D:\΢ÐÅweb¿ª·¢Õß¹¤¾ß\cli.bat" cloud functions deploy --e cloud1-8gto6ybx6ad7250f --n quickstartFunctions --r --project "C:\Users\31113\WeChatProjects\miniprogram-5" --report_first --report