فهرست منبع

修复手机动画卡顿

liyongli 3 سال پیش
والد
کامیت
96dffab2cc
74فایلهای تغییر یافته به همراه93 افزوده شده و 1419 حذف شده
  1. 0 12
      miniprogram/app.json
  2. BIN
      miniprogram/images/0.png
  3. BIN
      miniprogram/images/1.png
  4. BIN
      miniprogram/images/2.png
  5. BIN
      miniprogram/images/3.png
  6. BIN
      miniprogram/images/4.png
  7. BIN
      miniprogram/images/5.png
  8. BIN
      miniprogram/images/code-cloud-callback-config.png
  9. BIN
      miniprogram/images/code-db-inc-dec.png
  10. BIN
      miniprogram/images/code-db-onAdd.png
  11. BIN
      miniprogram/images/code-db-onQuery.png
  12. BIN
      miniprogram/images/code-db-onRemove.png
  13. BIN
      miniprogram/images/code-func-sum.png
  14. BIN
      miniprogram/images/console-entrance.png
  15. BIN
      miniprogram/images/create-collection.png
  16. BIN
      miniprogram/images/door_left.jpg
  17. BIN
      miniprogram/images/door_right.jpg
  18. BIN
      miniprogram/images/wood.jpg
  19. 0 60
      miniprogram/pages/addFunction/addFunction.js
  20. 0 4
      miniprogram/pages/addFunction/addFunction.json
  21. 0 29
      miniprogram/pages/addFunction/addFunction.wxml
  22. 0 3
      miniprogram/pages/addFunction/addFunction.wxss
  23. 0 66
      miniprogram/pages/chooseLib/chooseLib.js
  24. 0 4
      miniprogram/pages/chooseLib/chooseLib.json
  25. 0 14
      miniprogram/pages/chooseLib/chooseLib.wxml
  26. 0 7
      miniprogram/pages/chooseLib/chooseLib.wxss
  27. 0 193
      miniprogram/pages/databaseGuide/databaseGuide.js
  28. 0 4
      miniprogram/pages/databaseGuide/databaseGuide.json
  29. 0 134
      miniprogram/pages/databaseGuide/databaseGuide.wxml
  30. 0 10
      miniprogram/pages/databaseGuide/databaseGuide.wxss
  31. 0 66
      miniprogram/pages/deployFunctions/deployFunctions.js
  32. 0 4
      miniprogram/pages/deployFunctions/deployFunctions.json
  33. 0 21
      miniprogram/pages/deployFunctions/deployFunctions.wxml
  34. 0 7
      miniprogram/pages/deployFunctions/deployFunctions.wxss
  35. 0 1
      miniprogram/pages/home/index.js
  36. 6 6
      miniprogram/pages/home/index.wxml
  37. 0 18
      miniprogram/pages/im/im.js
  38. 0 4
      miniprogram/pages/im/im.json
  39. 0 21
      miniprogram/pages/im/im.wxml
  40. 0 10
      miniprogram/pages/im/im.wxss
  41. 0 84
      miniprogram/pages/im/room/room.js
  42. 0 5
      miniprogram/pages/im/room/room.json
  43. 0 12
      miniprogram/pages/im/room/room.wxml
  44. 0 10
      miniprogram/pages/im/room/room.wxss
  45. 29 12
      miniprogram/pages/marvellous/components/videoAn/index.js
  46. 21 31
      miniprogram/pages/marvellous/components/videoAn/index.wxml
  47. 31 0
      miniprogram/pages/marvellous/components/videoAn/index.wxss
  48. 2 0
      miniprogram/pages/marvellous/index.js
  49. 3 2
      miniprogram/pages/marvellous/index.wxml
  50. 0 15
      miniprogram/pages/openapi/callback/callback.js
  51. 0 3
      miniprogram/pages/openapi/callback/callback.json
  52. 0 16
      miniprogram/pages/openapi/callback/callback.wxml
  53. 0 3
      miniprogram/pages/openapi/callback/callback.wxss
  54. 0 59
      miniprogram/pages/openapi/cloudid/cloudid.js
  55. 0 3
      miniprogram/pages/openapi/cloudid/cloudid.json
  56. 0 41
      miniprogram/pages/openapi/cloudid/cloudid.wxml
  57. 0 1
      miniprogram/pages/openapi/cloudid/cloudid.wxss
  58. 0 5
      miniprogram/pages/openapi/openapi.js
  59. 0 3
      miniprogram/pages/openapi/openapi.json
  60. 0 22
      miniprogram/pages/openapi/openapi.wxml
  61. 0 7
      miniprogram/pages/openapi/openapi.wxss
  62. 0 201
      miniprogram/pages/openapi/serverapi/serverapi.js
  63. 0 3
      miniprogram/pages/openapi/serverapi/serverapi.json
  64. 0 63
      miniprogram/pages/openapi/serverapi/serverapi.wxml
  65. 0 7
      miniprogram/pages/openapi/serverapi/serverapi.wxss
  66. 0 31
      miniprogram/pages/storageConsole/storageConsole.js
  67. 0 4
      miniprogram/pages/storageConsole/storageConsole.json
  68. 0 29
      miniprogram/pages/storageConsole/storageConsole.wxml
  69. 0 7
      miniprogram/pages/storageConsole/storageConsole.wxss
  70. 0 13
      miniprogram/pages/userConsole/userConsole.js
  71. 0 4
      miniprogram/pages/userConsole/userConsole.json
  72. 0 22
      miniprogram/pages/userConsole/userConsole.wxml
  73. 0 3
      miniprogram/pages/userConsole/userConsole.wxss
  74. 1 0
      project.config.json

+ 0 - 12
miniprogram/app.json

@@ -2,18 +2,6 @@
   "pages": [
     "pages/home/index",
     "pages/index/index",
-    "pages/userConsole/userConsole",
-    "pages/storageConsole/storageConsole",
-    "pages/databaseGuide/databaseGuide",
-    "pages/addFunction/addFunction",
-    "pages/deployFunctions/deployFunctions",
-    "pages/chooseLib/chooseLib",
-    "pages/openapi/openapi",
-    "pages/openapi/serverapi/serverapi",
-    "pages/openapi/callback/callback",
-    "pages/openapi/cloudid/cloudid",
-    "pages/im/im",
-    "pages/im/room/room",
     "pages/interList/interList",
     "pages/detail/detail",
     "pages/ruins/index",

BIN
miniprogram/images/0.png


BIN
miniprogram/images/1.png


BIN
miniprogram/images/2.png


BIN
miniprogram/images/3.png


BIN
miniprogram/images/4.png


BIN
miniprogram/images/5.png


BIN
miniprogram/images/code-cloud-callback-config.png


BIN
miniprogram/images/code-db-inc-dec.png


BIN
miniprogram/images/code-db-onAdd.png


BIN
miniprogram/images/code-db-onQuery.png


BIN
miniprogram/images/code-db-onRemove.png


BIN
miniprogram/images/code-func-sum.png


BIN
miniprogram/images/console-entrance.png


BIN
miniprogram/images/create-collection.png


BIN
miniprogram/images/door_left.jpg


BIN
miniprogram/images/door_right.jpg


BIN
miniprogram/images/wood.jpg


+ 0 - 60
miniprogram/pages/addFunction/addFunction.js

@@ -1,60 +0,0 @@
-// pages/addFunction/addFunction.js
-
-const code = `// 云函数入口函数
-exports.main = async (event, context) => {
-  console.log(event)
-  console.log(context)
-  return {
-    sum: event.a + event.b
-  }
-}`
-
-Page({
-
-  data: {
-    result: '',
-    canIUseClipboard: wx.canIUse('setClipboardData'),
-  },
-
-  onLoad: function (options) {
-
-  },
-
-  copyCode: function() {
-    wx.setClipboardData({
-      data: code,
-      success: function () {
-        wx.showToast({
-          title: '复制成功',
-        })
-      }
-    })
-  },
-
-  testFunction() {
-    wx.cloud.callFunction({
-      name: 'sum',
-      data: {
-        a: 1,
-        b: 2
-      },
-      success: res => {
-        wx.showToast({
-          title: '调用成功',
-        })
-        this.setData({
-          result: JSON.stringify(res.result)
-        })
-      },
-      fail: err => {
-        wx.showToast({
-          icon: 'none',
-          title: '调用失败',
-        })
-        console.error('[云函数] [sum] 调用失败:', err)
-      }
-    })
-  },
-
-})
-

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

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "云函数指引",
-  "usingComponents": {}
-}

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

@@ -1,29 +0,0 @@
-<!--pages/addFunction/addFunction.wxml-->
-<view class="container">
-
-  <view class="list">
-    <view class="list-item" bindtap="testFunction">
-      <text>测试云函数</text>
-    </view>
-    <view class="list-item">
-      <text class="request-text">期望输出:{"sum":3}</text>
-    </view>
-    <view class="list-item" wx:if="{{result}}">
-      <text class="request-text">调用结果:{{result}}</text>
-    </view>
-  </view>
-
-  <view class="guide">
-    <text class="headline">新增云函数</text>
-    <text class="p">1. 在云函数根目录 cloudfunctions 上右键选择新建云函数,命名为 sum</text>
-    <text class="p">2. 在创建的 cloudfunctions/sum/index.js 文件中添加如下代码</text>
-    <image class="image1" src="../../images/code-func-sum.png" mode="aspectFit"></image>
-    <button class="copyBtn" wx:if="{{canIUseClipboard}}" bindtap="copyCode">复制代码</button>
-    <text class="p">3. 在 cloudfunctions/sum 目录上右键上传并部署</text>
-    <text class="p">4. 点击测试云函数测试</text>
-    <text class="p">5. 打开云开发云函数管理页,选择 sum 云函数</text>
-    <text class="p">6. 查看 sum 的调用日志</text>
-    <text class="p">进阶:可在云函数中使用 wx-server-sdk 操作数据库,文件存储和调用其他云函数,详见文档</text>
-  </view>
-
-</view>

+ 0 - 3
miniprogram/pages/addFunction/addFunction.wxss

@@ -1,3 +0,0 @@
-/* pages/addFunction/addFunction.wxss */
-
-@import "../../style/guide.wxss";

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

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

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

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "选择基础库",
-  "usingComponents": {}
-}

+ 0 - 14
miniprogram/pages/chooseLib/chooseLib.wxml

@@ -1,14 +0,0 @@
-<!--pages/chooseLib/chooseLib.wxml-->
-<view class="container">
-
-  <view class="list">
-    <view class="list-item">
-      <text class="black">初始化失败</text>
-    </view>
-    <view class="list-item">
-      <text class="request-text">请使用 2.2.3 或以上的基础库以使用云能力</text>
-    </view>
-  </view>
-
-</view>
-

+ 0 - 7
miniprogram/pages/chooseLib/chooseLib.wxss

@@ -1,7 +0,0 @@
-/* pages/chooseLib/chooseLib.wxss */
-
-@import "../../style/guide.wxss";
-
-.black {
-  color: black;
-}

+ 0 - 193
miniprogram/pages/databaseGuide/databaseGuide.js

@@ -1,193 +0,0 @@
-// pages/databaseGuide/databaseGuide.js
-
-const app = getApp()
-
-Page({
-
-  data: {
-    step: 1,
-    counterId: '',
-    openid: '',
-    count: null,
-    queryResult: '',
-  },
-
-  onLoad: function (options) {
-    if (app.globalData.openid) {
-      this.setData({
-        openid: app.globalData.openid
-      })
-    }
-  },
-
-  onAdd: function () {
-    const db = wx.cloud.database()
-    db.collection('counters').add({
-      data: {
-        count: 1
-      },
-      success: res => {
-        // 在返回结果中会包含新创建的记录的 _id
-        this.setData({
-          counterId: res._id,
-          count: 1
-        })
-        wx.showToast({
-          title: '新增记录成功',
-        })
-        console.log('[数据库] [新增记录] 成功,记录 _id: ', res._id)
-      },
-      fail: err => {
-        wx.showToast({
-          icon: 'none',
-          title: '新增记录失败'
-        })
-        console.error('[数据库] [新增记录] 失败:', err)
-      }
-    })
-  },
-
-  onQuery: function() {
-    // const db = wx.cloud.database()
-    // // 查询当前用户所有的 counters
-    // db.collection('counters').where({
-    //   _openid: this.data.openid
-    // }).get({
-    //   success: res => {
-    //     this.setData({
-    //       queryResult: JSON.stringify(res.data, null, 2)
-    //     })
-    //     console.log('[数据库] [查询记录] 成功: ', res)
-    //   },
-    //   fail: err => {
-    //     wx.showToast({
-    //       icon: 'none',
-    //       title: '查询记录失败'
-    //     })
-    //     console.error('[数据库] [查询记录] 失败:', err)
-    //   }
-    // })
-  },
-
-  onCounterInc: function() {
-    // const db = wx.cloud.database()
-    // const newCount = this.data.count + 1
-    // db.collection('counters').doc(this.data.counterId).update({
-    //   data: {
-    //     count: newCount
-    //   },
-    //   success: res => {
-    //     this.setData({
-    //       count: newCount
-    //     })
-    //   },
-    //   fail: err => {
-    //     icon: 'none',
-    //     console.error('[数据库] [更新记录] 失败:', err)
-    //   }
-    // })
-  },
-
-  onCounterDec: function() {
-    // const db = wx.cloud.database()
-    // const newCount = this.data.count - 1
-    // db.collection('counters').doc(this.data.counterId).update({
-    //   data: {
-    //     count: newCount
-    //   },
-    //   success: res => {
-    //     this.setData({
-    //       count: newCount
-    //     })
-    //   },
-    //   fail: err => {
-    //     icon: 'none',
-    //     console.error('[数据库] [更新记录] 失败:', err)
-    //   }
-    // })
-  },
-
-  onRemove: function() {
-    // if (this.data.counterId) {
-    //   const db = wx.cloud.database()
-    //   db.collection('counters').doc(this.data.counterId).remove({
-    //     success: res => {
-    //       wx.showToast({
-    //         title: '删除成功',
-    //       })
-    //       this.setData({
-    //         counterId: '',
-    //         count: null,
-    //       })
-    //     },
-    //     fail: err => {
-    //       wx.showToast({
-    //         icon: 'none',
-    //         title: '删除失败',
-    //       })
-    //       console.error('[数据库] [删除记录] 失败:', err)
-    //     }
-    //   })
-    // } else {
-    //   wx.showToast({
-    //     title: '无记录可删,请见创建一个记录',
-    //   })
-    // }
-  },
-
-  nextStep: function () {
-    // 在第一步,需检查是否有 openid,如无需获取
-    if (this.data.step === 1 && !this.data.openid) {
-      wx.cloud.callFunction({
-        name: 'login',
-        data: {},
-        success: res => {
-          app.globalData.openid = res.result.openid
-          this.setData({
-            step: 2,
-            openid: res.result.openid
-          })
-        },
-        fail: err => {
-          wx.showToast({
-            icon: 'none',
-            title: '获取 openid 失败,请检查是否有部署 login 云函数',
-          })
-          console.log('[云函数] [login] 获取 openid 失败,请检查是否有部署云函数,错误信息:', err)
-        }
-      })
-    } else {
-      const callback = this.data.step !== 6 ? function() {} : function() {
-        console.group('数据库文档')
-        console.log('https://developers.weixin.qq.com/miniprogram/dev/wxcloud/guide/database.html')
-        console.groupEnd()
-      }
-
-      this.setData({
-        step: this.data.step + 1
-      }, callback)
-    }
-  },
-
-  prevStep: function () {
-    this.setData({
-      step: this.data.step - 1
-    })
-  },
-
-  goHome: function() {
-    const pages = getCurrentPages()
-    if (pages.length === 2) {
-      wx.navigateBack()
-    } else if (pages.length === 1) {
-      wx.redirectTo({
-        url: '../index/index',
-      })
-    } else {
-      wx.reLaunch({
-        url: '../index/index',
-      })
-    }
-  }
-
-})

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

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "数据库指引",
-  "usingComponents": {}
-}

+ 0 - 134
miniprogram/pages/databaseGuide/databaseGuide.wxml

@@ -1,134 +0,0 @@
-<!--pages/databaseGuide/databaseGuide.wxml-->
-<view class="container">
-
-  <!-- 导航 -->
-  <view class="list">
-    <view class="list-item">
-      <text class="request-text">数据库指引</text>
-    </view>
-    <view class="list-item">
-      <text class="request-text" wx:key="id" wx:for="{{7}}" style="color: {{step === index + 1 ? 'red': 'black'}}">{{index + 1}}</text>
-    </view>
-    <view class="list-item" wx:if="{{openid}}">
-      <text class="request-text">openid:{{openid}}</text>
-    </view>
-    <view class="list-item" wx:if="{{counterId}}">
-      <text class="request-text">当前记录 ID:{{counterId}}</text>
-    </view>
-  </view>
-
-  <!-- 快速操作数据库指引 -->
-
-  <!-- 简介 -->
-  <view class="guide" wx:if="{{step === 1}}">
-    <text class="headline">示例介绍</text>
-    <text class="p">1. 以计数器为例,在此演示如何操作数据库</text>
-    <text class="p">2. 数据库操作大多需要用户 openid,需先配置好 login 云函数,如已配置好,点击下一步,获取用户 openid 并开始我们的指引</text>
-    <div class="nav">
-      <button class="next" size="mini" type="default" bindtap="nextStep">下一步</button>
-    </div>
-  </view>
-
-  <!-- 新建集合 -->
-  <view class="guide" wx:if="{{step === 2}}">
-    <text class="headline">新建集合</text>
-    <text class="p">1. 打开云开发控制台,进入到数据库管理页</text>
-    <image class="image1" src="../../images/console-entrance.png" mode="aspectFit"></image>
-    <text class="p">2. 选择添加集合,集合名为 counters</text>
-    <image class="flat-image" src="../../images/create-collection.png" mode="aspectFit"></image>
-    <text class="p">3. 可以看到 counters 集合出现在左侧集合列表中</text>
-    <text class="p">注:集合必须在云开发控制台中创建</text>
-
-    <div class="nav">
-      <button class="prev" size="mini" type="default" bindtap="prevStep">上一步</button>
-      <button class="next" size="mini" type="default" bindtap="nextStep">下一步</button>
-    </div>
-  </view>
-
-  <!-- 新增记录 -->
-  <view class="guide" wx:if="{{step === 3}}">
-    <text class="headline">新增记录</text>
-    <text class="p">1. 打开 pages/databaseGuide/databaseGuide.js 文件,定位到 onAdd 方法</text>
-    <text class="p">2. 把注释掉的代码解除注释</text>
-    <image class="code-image" src="../../images/code-db-onAdd.png" mode="aspectFit"></image>
-    <text class="p">3. onAdd 方法会往 counters 集合新增一个记录,新增如下格式的一个 JSON 记录</text>
-    <text class="code">
-    {
-      "_id": "数据库自动生成记录 ID 字段",
-      "_openid": "数据库自动插入记录创建者的 openid",
-      "count": 1
-    }
-    </text>
-    <text class="p">4. 点击按钮</text>
-    <button size="mini" type="default" bindtap="onAdd">新增记录</button>
-    <text class="p" wx:if="{{counterId}}">新增的记录 _id 为:{{counterId}}</text>
-    <text class="p">5. 在云开发 -> 数据库 -> counters 集合中可以看到新增的记录</text>
-
-    <div class="nav">
-      <button class="prev" size="mini" type="default" bindtap="prevStep">上一步</button>
-      <button class="next" size="mini" type="default" bindtap="nextStep" wx:if="{{counterId}}">下一步</button>
-    </div>
-  </view>
-
-  <!-- 查询记录 -->
-  <view class="guide" wx:if="{{step === 4}}">
-    <text class="headline">查询记录</text>
-    <text class="p">1. 打开 pages/databaseGuide/databaseGuide.js 文件,定位到 onQuery 方法</text>
-    <text class="p">2. 把注释掉的代码解除注释,onQuery 方法会在下方按钮被点击时触发</text>
-    <image class="code-image" src="../../images/code-db-onQuery.png" mode="aspectFit"></image>
-    <text class="p">3. 点击按钮</text>
-    <button size="mini" type="default" bindtap="onQuery">查询记录</button>
-    <text class="code" wx:if="{{queryResult}}">{{queryResult}}</text>
-
-    <div class="nav">
-      <button class="prev" size="mini" type="default" bindtap="prevStep">上一步</button>
-      <button class="next" size="mini" type="default" bindtap="nextStep">下一步</button>
-    </div>
-  </view>
-
-  <!-- 更新记录 -->
-  <view class="guide" wx:if="{{step === 5}}">
-    <text class="headline">更新记录</text>
-    <text class="p">1. 打开 pages/databaseGuide/databaseGuide.js 文件,定位到 onCounterInc 和 onCounterDec 方法</text>
-    <text class="p">2. 把注释掉的代码解除注释</text>
-    <image class="code-image" src="../../images/code-db-inc-dec.png" mode="aspectFit"></image>
-    <text class="p">3. 点击下方按钮更新计数器</text>
-    <div class="counter">
-      <button class="minus" size="mini" type="default" bindtap="onCounterDec">-</button>
-      <text class="p">{{count}}</text>
-      <button class="plus" size="mini" type="default" bindtap="onCounterInc">+</button>
-    </div>
-
-    <div class="nav">
-      <button class="prev" size="mini" type="default" bindtap="prevStep">上一步</button>
-      <button class="next" size="mini" type="default" bindtap="nextStep">下一步</button>
-    </div>
-  </view>
-
-  <!-- 删除记录 -->
-  <view class="guide" wx:if="{{step === 6}}">
-    <text class="headline">删除记录</text>
-    <text class="p">1. 打开 pages/databaseGuide/databaseGuide.js 文件,定位到 onRemove 方法</text>
-    <text class="p">2. 把注释掉的代码解除注释</text>
-    <image class="code-image" src="../../images/code-db-onRemove.png" mode="aspectFit"></image>
-    <text class="p">3. 点击下方按钮删除计数器</text>
-    <button size="mini" type="default" bindtap="onRemove">删除记录</button>
-
-    <div class="nav">
-      <button class="prev" size="mini" type="default" bindtap="prevStep" wx:if="{{counterId}}">上一步</button>
-      <button class="next" size="mini" type="default" bindtap="nextStep">下一步</button>
-    </div>
-  </view>
-
-  <!-- 结语 -->
-  <view class="guide" wx:if="{{step === 7}}">
-    <text class="headline">完成指引 !</text>
-    <text class="p">恭喜你,至此已完成数据库操作入门基础,可以点击调试器中的链接,查看详尽的数据库文档</text>
-
-    <div class="nav">
-      <button class="prev" size="mini" type="default" bindtap="prevStep">上一步</button>
-      <button class="next" size="mini" type="default" bindtap="goHome">回到首页</button>
-    </div>
-  </view>
-
-</view>

+ 0 - 10
miniprogram/pages/databaseGuide/databaseGuide.wxss

@@ -1,10 +0,0 @@
-/* pages/databaseGuide/databaseGuide.wxss */
-
-@import "../../style/guide.wxss";
-
-.guide .counter {
-  margin-top: 50rpx;
-  display: flex;
-  flex-direction: row;
-  align-content: space-between;
-}

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

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

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

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "部署云函数",
-  "usingComponents": {}
-}

+ 0 - 21
miniprogram/pages/deployFunctions/deployFunctions.wxml

@@ -1,21 +0,0 @@
-<!--pages/deployFunctions/deployFunctions.wxml-->
-<view class="container">
-
-  <view class="list">
-    <view class="list-item">
-      <text class="black">调用失败</text>
-    </view>
-    <view class="list-item">
-      <text class="request-text">请检查 login 云函数是否已部署</text>
-    </view>
-  </view>
-
-  <view class="guide">
-    <text class="headline">部署 login 云函数</text>
-    <text class="p">1. 确保已通过工具栏云开发入口开通云开发</text>
-    <text class="p">2. 在 cloudfunctions/login 目录上右键上传并部署</text>
-    <text class="p">3. 回到首页,重新点击获取 openid</text>
-  </view>
-
-</view>
-

+ 0 - 7
miniprogram/pages/deployFunctions/deployFunctions.wxss

@@ -1,7 +0,0 @@
-/* pages/deployFunctions/deployFunctions.wxss */
-
-@import "../../style/guide.wxss";
-
-.black {
-  color: black;
-}

+ 0 - 1
miniprogram/pages/home/index.js

@@ -14,7 +14,6 @@ Page({
   onLoad: async function (options) {
     const db = wx.cloud.database();
     const _ = db.command;
-    const _this = this;
     let list = await db.collection('data_news').where({
       hot: 1,
       type: 1

+ 6 - 6
miniprogram/pages/home/index.wxml

@@ -11,7 +11,7 @@
   <view class="icon_container">
     <view class="icon_item_cell">
       <view class="icon_content" data-title="活动简介" data-id="79550af260b0394f1aea63d27b6f2ae9" bindtap="toDetail">
-        <image class="img" src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/0.png"></image>
+        <image class="img" src="../../images/0.png"></image>
         <view class="icon_title">
           活动简介
         </view>
@@ -19,7 +19,7 @@
     </view>
     <view class="icon_item_cell">
       <view class="icon_content" data-title="日程会务" data-id="cbddf0af60b041bd0c3e871a1a8f5a7e" bindtap="toDetail">
-        <image class="img" src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/1.png"></image>
+        <image class="img" src="../../images/1.png"></image>
         <view class="icon_title">
           日程会务
         </view>
@@ -27,7 +27,7 @@
     </view>
     <view class="icon_item_cell">
       <view class="icon_content" data-title="疫情防控" data-id="cbddf0af60b042750c3ebf6b09f3e165" bindtap="toDetail">
-        <image class="img" src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/2.png"></image>
+        <image class="img" src="../../images/2.png"></image>
         <view class="icon_title">
           疫情防控
         </view>
@@ -35,7 +35,7 @@
     </view>
     <view class="icon_item_cell">
       <view class="icon_content" data-title="精彩瞬间" data-type="img" bindtap="toMarvellous">
-        <image class="img" src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/3.png"></image>
+        <image class="img" src="../../images/3.png"></image>
         <view class="icon_title">
           精彩瞬间
         </view>
@@ -43,7 +43,7 @@
     </view>
     <view class="icon_item_cell">
       <view class="icon_content" data-title="红色声音" data-type="video" bindtap="toMarvellous">
-        <image class="img" src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/4.png"></image>
+        <image class="img" src="../../images/4.png"></image>
         <view class="icon_title">
           红色声音
         </view>
@@ -51,7 +51,7 @@
     </view>
     <view class="icon_item_cell">
       <view class="icon_content" bindtap="toRuins">
-        <image class="img" src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/5.png"></image>
+        <image class="img" src="../../images/5.png"></image>
         <view class="icon_title">
           红色遗址会发声
         </view>

+ 0 - 18
miniprogram/pages/im/im.js

@@ -1,18 +0,0 @@
-const app = getApp()
-
-Page({
-  data: {
-  },
-
-  onLoad: function (options) {
-    if (app.globalData.openid) {
-      this.setData({
-        openid: app.globalData.openid
-      })
-    }
-
-    console.group('数据库"实时数据推送"文档')
-    console.log('https://developers.weixin.qq.com/miniprogram/dev/wxcloud/guide/database/realtime.html')
-    console.groupEnd()
-  },
-})

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

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "数据库指引",
-  "usingComponents": {}
-}

+ 0 - 21
miniprogram/pages/im/im.wxml

@@ -1,21 +0,0 @@
-<view class="container">
-  <!-- 简介 -->
-  <view class="guide">
-    <text class="headline">即时通信 demo 介绍</text>
-    <text class="p">本 demo 以《聊天室》为例,在此演示如何使用数据库《实时数据推送》能力</text>
-    <text class="p">1. 确保正在使用基础库 2.8.1</text>
-    <text class="p">2. 打开云开发控制台,进入到数据库管理页</text>
-    <text class="p">3. 选择添加集合,集合名设置为 chatroom</text>
-    <text class="p">4. 将集合设置为所有用户可读、仅创建者可写</text>
-    <text class="p">5. 确保IDE增强编译已开启(如无,到工具详情页中开启)</text>
-    <text class="p">6. 点击下方按钮进入聊天室!</text>
-    <text class="p">注1:可使用(菜单栏-工具)多账号调试的功能在工具中模拟多账号登录调试</text>
-    <text class="p">注2:实时数据推送的文档链接已在调试器中打印,可打开查看</text>
-  </view>
-
-  <view class="uploader">
-    <navigator url="./room/room" open-type="navigate" class="uploader-text">
-      <text>进入聊天室</text>
-    </navigator>
-  </view>
-</view>

+ 0 - 10
miniprogram/pages/im/im.wxss

@@ -1,10 +0,0 @@
-/* pages/databaseGuide/databaseGuide.wxss */
-
-@import "../../style/guide.wxss";
-
-.guide .counter {
-  margin-top: 50rpx;
-  display: flex;
-  flex-direction: row;
-  align-content: space-between;
-}

+ 0 - 84
miniprogram/pages/im/room/room.js

@@ -1,84 +0,0 @@
-const app = getApp()
-
-Page({
-  data: {
-    avatarUrl: './user-unlogin.png',
-    userInfo: null,
-    logged: false,
-    takeSession: false,
-    requestResult: '',
-    // chatRoomEnvId: 'release-f8415a',
-    chatRoomCollection: 'chatroom',
-    chatRoomGroupId: 'demo',
-    chatRoomGroupName: '聊天室',
-
-    // functions for used in chatroom components
-    onGetUserInfo: null,
-    getOpenID: null,
-  },
-
-  onLoad: function() {
-    // 获取用户信息
-    wx.getSetting({
-      success: res => {
-        if (res.authSetting['scope.userInfo']) {
-          // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
-          wx.getUserInfo({
-            success: res => {
-              this.setData({
-                avatarUrl: res.userInfo.avatarUrl,
-                userInfo: res.userInfo
-              })
-            }
-          })
-        }
-      }
-    })
-
-    this.setData({
-      onGetUserInfo: this.onGetUserInfo,
-      getOpenID: this.getOpenID,
-    })
-
-    wx.getSystemInfo({
-      success: res => {
-        console.log('system info', res)
-        if (res.safeArea) {
-          const { top, bottom } = res.safeArea
-          this.setData({
-            containerStyle: `padding-top: ${(/ios/i.test(res.system) ? 10 : 20) + top}px; padding-bottom: ${20 + res.windowHeight - bottom}px`,
-          })
-        }
-      },
-    })
-  },
-
-  getOpenID: async function() {
-    if (this.openid) {
-      return this.openid
-    }
-
-    const { result } = await wx.cloud.callFunction({
-      name: 'login',
-    })
-
-    return result.openid
-  },
-
-  onGetUserInfo: function(e) {
-    if (!this.logged && e.detail.userInfo) {
-      this.setData({
-        logged: true,
-        avatarUrl: e.detail.userInfo.avatarUrl,
-        userInfo: e.detail.userInfo
-      })
-    }
-  },
-
-  onShareAppMessage() {
-    return {
-      title: '即时通信 Demo',
-      path: '/pages/im/room/room',
-    }
-  },
-})

+ 0 - 5
miniprogram/pages/im/room/room.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "chatroom": "/components/chatroom/chatroom"
-  }
-}

+ 0 - 12
miniprogram/pages/im/room/room.wxml

@@ -1,12 +0,0 @@
-<view class="container" style="{{containerStyle}}">
-  <chatroom
-    style="width: 100%; height: 100%"
-    envId="{{chatRoomEnvId}}"
-    collection="{{chatRoomCollection}}"
-    groupId="{{chatRoomGroupId}}"
-    groupName="{{chatRoomGroupName}}"
-    userInfo="{{userInfo}}"
-    onGetUserInfo="{{onGetUserInfo}}"
-    getOpenID="{{getOpenID}}"
-  ></chatroom>
-</view>

+ 0 - 10
miniprogram/pages/im/room/room.wxss

@@ -1,10 +0,0 @@
-.container {
-  height: 100%;
-  position: absolute;
-  top: 0;
-  bottom: 0;
-  left: 0;
-  right: 0;
-  padding-top: 80rpx;
-  padding-bottom: 30rpx;
-}

+ 29 - 12
miniprogram/pages/marvellous/components/videoAn/index.js

@@ -13,41 +13,58 @@ Component({
   data: {
     tra: {},
     por: {},
+    step: 0,
     show: true,
     heng: true,
     shu: true
   },
 
   ready() {
-    this.transverse = wx.createAnimation({
-      duration: 1500,
-      timingFunction: 'linear',
-    })
-    this.portrait = wx.createAnimation({
-      duration: 1500,
-      timingFunction: 'linear',
-    })
-    this.transverse.width("750rpx").step();
-    this.portrait.height("100vh").step();
+    // this.transverse = wx.createAnimation({
+    //   duration: 1500,
+    //   timingFunction: 'linear',
+    // })
+    // this.portrait = wx.createAnimation({
+    //   duration: 1500,
+    //   timingFunction: 'linear',
+    // })
+    // this.transverse.width("750rpx").step();
+    // this.portrait.height("100vh").step();
   },
   /**
    * 组件的方法列表
    */
   methods: {
     start() {
+      let _this = this;
       this.setData({
-        tra: this.transverse.export(),
+        // tra: this.transverse.export(),
+        step: 1
+      },()=>{
+        let time = setInterval(() => {
+          clearInterval(time);
+          _this.nextAnstion();
+        }, 1450);
+
       })
     },
     nextAnstion() {
+      let _this = this;
       this.setData({
         heng: false,
-        por: this.portrait.export(),
+        // por: this.portrait.export(),
+        step: 2
+      },()=>{
+        let time = setInterval(() => {
+          clearInterval(time);
+          _this.end();
+        }, 1450);
       })
     },
     end(){
       this.setData({
         shu: false,
+        step: 3
       })
       this.triggerEvent("close")
     }

+ 21 - 31
miniprogram/pages/marvellous/components/videoAn/index.wxml

@@ -1,37 +1,27 @@
 <!--miniprogram/pages/marvellous/template/videoAn/index.wxml-->
-<!-- <cover-view class="door {{ showBtn >= 1 ? 'doorAnimation' : '' }}" bindtap="start">
-  <cover-image wx:if="{{showBtn <= 1}}" animation="{{AnimationRight}}" bindanimationend="nextAnstion" class="right"
-    src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/door_right.jpg"></cover-image>
-  <cover-image wx:if="{{showBtn <= 1}}" animation="{{AnimationLeft}}" class="left"
-    src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/door_left.jpg"></cover-image>
 
-  <cover-image wx:if="{{showBtn <= 2}}" animation="{{AnimationUp}}" bindanimationend="nextAnstion1" class="up {{ showBtn == 2 ? 'up1' : '' }}"
-    src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/wood.jpg"></cover-image>
-  <cover-image wx:if="{{showBtn <= 2}}" animation="{{AnimationDown}}" class="down {{ showBtn == 2 ? 'down1' : '' }}"
-    src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/wood.jpg"></cover-image>
+<view class="door" bindtap="start" wx:if="show">
+  <view class="transverse" wx:if="{{heng}}">
+    <image class="left"
+      src="../../../../images/door_left.jpg"></image>
+    <view class="center {{ step === 1 ? 'width100' : '' }}" ></view>
+    <!-- <view class="center" animation="{{tra}}" bindtransitionend="nextAnstion"></view> -->
+    <image class="right"
+      src="../../../../images/door_right.jpg"></image>
+  </view>
 
-  <cover-view class="tip" wx:if="{{!showBtn}}">点击开始</cover-view>
-</cover-view> -->
-<cover-view class="door" bindtap="start" wx:if="show">
-  <cover-view class="transverse" wx:if="{{heng}}">
-    <cover-image class="left"
-      src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/door_left.jpg"></cover-image>
-    <cover-view class="center" animation="{{tra}}" bindtransitionend="nextAnstion"></cover-view>
-    <cover-image class="right"
-      src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/door_right.jpg"></cover-image>
-  </cover-view>
 
 
+  <view class="portrait" wx:if="{{shu}}">
+    <view class="port">
+      <image class="up" src="../../../../images/wood.jpg">
+      </image>
+      <view class="center  {{ step === 2 ? 'height100' : '' }}"></view>
+      <!-- <view class="center" animation="{{por}}" bindtransitionend="end"></view> -->
+      <image class="down" src="../../../../images/wood.jpg">
+      </image>
+    </view>
+  </view>
 
-  <cover-view class="portrait" wx:if="{{shu}}">
-    <cover-view class="port">
-      <cover-image class="up" src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/wood.jpg">
-      </cover-image>
-      <cover-view class="center" animation="{{por}}" bindtransitionend="end"></cover-view>
-      <cover-image class="down" src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/wood.jpg">
-      </cover-image>
-    </cover-view>
-  </cover-view>
-
-  <cover-view class="tip">点击开始</cover-view>
-</cover-view>
+  <view class="tip">点击开始</view>
+</view>

+ 31 - 0
miniprogram/pages/marvellous/components/videoAn/index.wxss

@@ -21,6 +21,7 @@
 .door .transverse .right,
 .door .transverse .left{
   width: 375rpx;
+  height: 100vh;
 }
 
 .door .transverse .center{
@@ -42,10 +43,12 @@
   top: 50%;
   transform: translateY(-50%);
   width: 750rpx;
+  font-size: 0;
 }
 .door .port .up,
 .door .port .down{
   height: 50vh;
+  width: 750rpx;
 }
 .door .portrait .center{
   height: 0;
@@ -73,4 +76,32 @@
   100% {
     opacity: 1;
   }
+}
+
+.door .width100{
+  animation: width100 1.5s;
+
+}
+.door .height100{
+  animation: height100 1.5s;
+
+}
+
+@keyframes width100 {
+  0% {
+    width: 0;
+  }
+
+  100% {
+    width: 750rpx;
+  }
+}
+@keyframes height100 {
+  0% {
+    height: 0;
+  }
+
+  100% {
+    height: 100vh;
+  }
 }

+ 2 - 0
miniprogram/pages/marvellous/index.js

@@ -21,6 +21,7 @@ Page({
     wx.setNavigationBarTitle({
       title: options.title || "精彩瞬间"
     })
+    
     const db = wx.cloud.database();
     const _ = db.command;
     const $ = db.command.aggregate
@@ -41,6 +42,7 @@ Page({
       pageList[v.creat_time] ? pageList[v.creat_time].list.push(v) : pageList[v.creat_time] = { list: [v], time: this.format(v.creat_time) };
       this.imgList.push(v.url);
     }
+    console.log(pageList)
     this.setData({
       pageList: pageList,
       pageType: options.type || "img"

+ 3 - 2
miniprogram/pages/marvellous/index.wxml

@@ -10,9 +10,10 @@
         bindlongtap="longtap">
         <cover-view wx:if="{{showSelect}}" class="btnClose {{ v.select ? 'act': '' }}" size="{{20}}">√</cover-view>
         <image wx:if="{{pageType === 'img'}}" class="img" src="{{v.url}}"></image>
-        <video show-progress="{{false}}" show-fullscreen-btn="{{false}}" show-play-btn="{{false}}"
+        <image wx:if="{{pageType === 'video'}}" class="img" src="{{v.cover}}"></image>
+        <!-- <video show-progress="{{false}}" show-fullscreen-btn="{{false}}" show-play-btn="{{false}}"
           show-center-play-btn="{{false}}" bindlongtap="longtap" wx:if="{{pageType === 'video'}}" class="video {{}}"
-          src="{{v.url}}"></video>
+          src="{{v.url}}"></video> -->
       </view>
     </view>
 

+ 0 - 15
miniprogram/pages/openapi/callback/callback.js

@@ -1,15 +0,0 @@
-// miniprogram/pages/openapi/callback/callback.js
-Page({
-
-  data: {
-
-  },
-
-  onLoad: function (options) {
-
-  },
-
-  onCustomerServiceButtonClick(e) {
-    console.log(e)
-  },
-})

+ 0 - 3
miniprogram/pages/openapi/callback/callback.json

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

+ 0 - 16
miniprogram/pages/openapi/callback/callback.wxml

@@ -1,16 +0,0 @@
-<view class="container">
-  <view class="list">
-    <button open-type="contact" bindcontact="onCustomerServiceButtonClick">
-      进入客服消息
-    </button>
-  </view>
-
-  <view class="guide">
-    <text class="headline">测试须知</text>
-    <text class="p">1. 进入云开发控制台“设置-全局设置”,选择添加消息推送配置</text>
-    <text class="p">2. 消息类型选择 text(文本客户消息)</text>
-    <text class="p">3. 事件类型选择空</text>
-    <text class="p">4. 选择需要推送到哪个环境的哪个云函数</text>
-    <text class="p">5. 在手机上测试</text>
-  </view>
-</view>

+ 0 - 3
miniprogram/pages/openapi/callback/callback.wxss

@@ -1,3 +0,0 @@
-/* miniprogram/pages/openapi/callback/callback.wxss */
-
-@import "../../../style/guide.wxss";

+ 0 - 59
miniprogram/pages/openapi/cloudid/cloudid.js

@@ -1,59 +0,0 @@
-// miniprogram/pages/openapi/cloudid/cloudid.js
-Page({
-
-  data: {
-    weRunResult: '',
-    userInfoResult: '',
-  },
-
-  onGetWeRunData() {
-    wx.getWeRunData({
-      success: res => {
-        wx.cloud.callFunction({
-          name: 'echo',
-          data: {
-            // info 字段在云函数 event 对象中会被自动替换为相应的敏感数据
-            info: wx.cloud.CloudID(res.cloudID),
-          },
-        }).then(res => {
-          console.log('[onGetWeRunData] 收到 echo 回包:', res)
-
-          this.setData({
-            weRunResult: JSON.stringify(res.result),
-          })
-
-          wx.showToast({
-            title: '敏感数据获取成功',
-          })
-        }).catch(err => {
-          console.log('[onGetWeRunData] 失败:', err)
-        })
-      }
-    })
-  },
-
-  onGetUserInfo(e) {
-    console.log(e)
-    wx.cloud.callFunction({
-      name: 'openapi',
-      data: {
-        action: 'getOpenData',
-        openData: {
-          list: [
-            e.detail.cloudID,
-          ]
-        }
-      }
-    }).then(res => {
-      console.log('[onGetUserInfo] 调用成功:', res)
-
-      this.setData({
-        userInfoResult: JSON.stringify(res.result),
-      })
-
-      wx.showToast({
-        title: '敏感数据获取成功',
-      })
-    })
-  }
-})

+ 0 - 3
miniprogram/pages/openapi/cloudid/cloudid.json

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

+ 0 - 41
miniprogram/pages/openapi/cloudid/cloudid.wxml

@@ -1,41 +0,0 @@
-<!--index.wxml-->
-<view class="container">
-
-  <view class="guide">
-    <text class="headline">开放数据调用</text>
-    <text class="p">通过 cloudID 获取敏感开放数据有以下两种方式</text>
-    <text class="p">1. 小程序端 callFunction 自动获取</text>
-    <text class="p">2. 通过 wx-server-sdk 获取</text>
-    <text class="p">以下分别先后展示这两种获取方式</text>
-  </view>
-
-  <view class="uploader">
-    <button class="uploader-text" bindtap="onGetWeRunData">getWeRunData 敏感数据获取</button>
-  </view>
-
-  <view class="guide">
-    <text class="headline">测试须知</text>
-    <text class="p">1. 公共库版本需大于 2.7.0</text>
-    <text class="p">2. 请确保 echo 函数已上传</text>
-  </view>
-
-  <view class="guide" style="word-break: break-all">
-    {{weRunResult}}
-  </view>
-
-
-  <view class="uploader">
-    <button class="uploader-text" open-type="getUserInfo" bindgetuserinfo="onGetUserInfo">getUserInfo 敏感数据获取</button>
-  </view>
-
-  <view class="guide">
-    <text class="headline">测试须知</text>
-    <text class="p">1. 公共库版本需大于 2.7.0</text>
-    <text class="p">2. 请确保 openapi 函数已上传</text>
-  </view>
-
-  <view class="guide" style="word-break: break-all">
-    {{userInfoResult}}
-  </view>
-
-</view>

+ 0 - 1
miniprogram/pages/openapi/cloudid/cloudid.wxss

@@ -1 +0,0 @@
-@import "../../../style/guide.wxss";

+ 0 - 5
miniprogram/pages/openapi/openapi.js

@@ -1,5 +0,0 @@
-Page({
-  data: {
-  },
-})
-

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

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

+ 0 - 22
miniprogram/pages/openapi/openapi.wxml

@@ -1,22 +0,0 @@
-<!--index.wxml-->
-<view class="container">
-
-  <view class="uploader">
-    <navigator url="./serverapi/serverapi" open-type="navigate" class="uploader-text">
-      <text>服务端调用</text>
-    </navigator>
-  </view>
-
-  <view class="uploader">
-    <navigator url="./cloudid/cloudid" open-type="navigate" class="uploader-text">
-      <text>开放数据调用</text>
-    </navigator>
-  </view>
-
-  <view class="uploader">
-    <navigator url="./callback/callback" open-type="navigate" class="uploader-text">
-      <text>消息推送</text>
-    </navigator>
-  </view>
-
-</view>

+ 0 - 7
miniprogram/pages/openapi/openapi.wxss

@@ -1,7 +0,0 @@
-/* miniprogram/pages/openapi/openapi.wxss */
-
-@import "../../style/guide.wxss";
-
-.black {
-  color: black;
-}

+ 0 - 201
miniprogram/pages/openapi/serverapi/serverapi.js

@@ -1,201 +0,0 @@
-Page({
-
-  data: {
-    templateId: '',
-    subscribeMessageResult: '',
-    requestSubscribeMessageResult: '',
-    wxacodeSrc: '',
-    wxacodeResult: '',
-    showClearWXACodeCache: false,
-  },
-
-  async getSubscribeMessageTemplate() {
-    try {
-      const { result } = await wx.cloud.callFunction({
-        name: 'openapi',
-        data: {
-          action: 'requestSubscribeMessage',
-        },
-      })
-
-      const templateId = result
-
-      console.warn('[云函数] [openapi] 获取订阅消息模板 调用成功:', templateId)
-      this.setData({
-        templateId,
-      })
-    } catch (err) {
-      wx.showToast({
-        icon: 'none',
-        title: '调用失败',
-      })
-      console.error('[云函数] [openapi] 获取订阅消息模板 调用失败:', err)
-    }
-  },
-
-  async requestSubscribeMessage() {
-    const templateId = this.data.templateId
-
-    if (!templateId) {
-      wx.showModal({
-        title: '发送失败',
-        content: '请先获取模板 ID',
-        showCancel: false,
-      })
-    }
-
-    wx.requestSubscribeMessage({
-      tmplIds: [templateId],
-      success: (res) => {
-        if (res[templateId] === 'accept') {
-          this.setData({
-            requestSubscribeMessageResult: '成功',
-          })
-        } else {
-          this.setData({
-            requestSubscribeMessageResult: `失败(${res[templateId]})`,
-          })
-        }
-      },
-      fail: (err) => {
-        this.setData({
-          requestSubscribeMessageResult: `失败(${JSON.stringify(err)})`,
-        })
-      },
-    })
-  },
-
-  sendSubscribeMessage(e) {
-    this.setData({
-      subscribeMessageResult: '',
-    })
-
-    wx.cloud.callFunction({
-      name: 'openapi',
-      data: {
-        action: 'sendSubscribeMessage',
-        templateId: this.data.templateId,
-      },
-      success: res => {
-        console.warn('[云函数] [openapi] subscribeMessage.send 调用成功:', res)
-        wx.showModal({
-          title: '发送成功',
-          content: '请返回微信主界面查看',
-          showCancel: false,
-        })
-        wx.showToast({
-          title: '发送成功,请返回微信主界面查看',
-        })
-        this.setData({
-          subscribeMessageResult: JSON.stringify(res.result)
-        })
-      },
-      fail: err => {
-        wx.showToast({
-          icon: 'none',
-          title: '调用失败',
-        })
-        console.error('[云函数] [openapi] subscribeMessage.send 调用失败:', err)
-      }
-    })
-  },
-
-  submitSubscribeMessageForm(e) {
-    this.setData({
-      subscribeMessageResult: '',
-    })
-
-    wx.cloud.callFunction({
-      name: 'openapi',
-      data: {
-        action: 'sendSubscribeMessage',
-        formId: e.detail.formId,
-      },
-      success: res => {
-        console.warn('[云函数] [openapi] subscribeMessage.send 调用成功:', res)
-        wx.showModal({
-          title: '发送成功',
-          content: '请返回微信主界面查看',
-          showCancel: false,
-        })
-        wx.showToast({
-          title: '发送成功,请返回微信主界面查看',
-        })
-        this.setData({
-          templateMessageResult: JSON.stringify(res.result)
-        })
-      },
-      fail: err => {
-        wx.showToast({
-          icon: 'none',
-          title: '调用失败',
-        })
-        console.error('[云函数] [openapi] templateMessage.send 调用失败:', err)
-      }
-    })
-  },
-
-  onGetWXACode() {
-    this.setData({
-      wxacodeSrc: '',
-      wxacodeResult: '',
-      showClearWXACodeCache: false,
-    })
-
-    // 此处为演示,将使用 localStorage 缓存,正常开发中文件 ID 应存在数据库中
-    const fileID = wx.getStorageSync('wxacodeCloudID')
-
-    if (fileID) {
-      // 有云文件 ID 缓存,直接使用该 ID
-      // 如需清除缓存,选择菜单栏中的 “工具 -> 清除缓存 -> 清除数据缓存”,或在 Storage 面板中删掉相应的 key
-      this.setData({
-        wxacodeSrc: fileID,
-        wxacodeResult: `从本地缓存中取得了小程序码的云文件 ID`,
-        showClearWXACodeCache: true,
-      })
-      console.log(`从本地缓存中取得了小程序码的云文件 ID:${fileID}`)
-    } else {
-      wx.cloud.callFunction({
-        name: 'openapi',
-        data: {
-          action: 'getWXACode',
-        },
-        success: res => {
-          console.warn('[云函数] [openapi] wxacode.get 调用成功:', res)
-          wx.showToast({
-            title: '调用成功',
-          })
-          this.setData({
-            wxacodeSrc: res.result,
-            wxacodeResult: `云函数获取二维码成功`,
-            showClearWXACodeCache: true,
-          })
-          wx.setStorageSync('wxacodeCloudID', res.result)
-        },
-        fail: err => {
-          wx.showToast({
-            icon: 'none',
-            title: '调用失败',
-          })
-          console.error('[云函数] [openapi] wxacode.get 调用失败:', err)
-        }
-      })
-    }
-  },
-
-  clearWXACodeCache() {
-    wx.removeStorageSync('wxacodeCloudID')
-
-    this.setData({
-      wxacodeSrc: '',
-      wxacodeResult: '',
-      showClearWXACodeCache: false,
-    })
-
-    wx.showToast({
-      title: '清除成功',
-    })
-  },
-
-})
-

+ 0 - 3
miniprogram/pages/openapi/serverapi/serverapi.json

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

+ 0 - 63
miniprogram/pages/openapi/serverapi/serverapi.wxml

@@ -1,63 +0,0 @@
-<view class="container">
-
-  <view class="list">
-    <view class="list-item" bindtap="getSubscribeMessageTemplate">
-      <text>获取订阅消息模板 ID</text>
-    </view>
-    <view class="list-item" wx:if="{{templateId}}">
-      <text class="request-text">模板 ID:{{templateId}}</text>
-    </view>
-  </view>
-
-  <view class="list">
-    <view class="list-item" bindtap="requestSubscribeMessage">
-      <text>获取下发权限</text>
-    </view>
-    <view class="list-item" wx:if="{{requestSubscribeMessageResult}}">
-      <text class="request-text">获取权限结果:{{requestSubscribeMessageResult}}</text>
-    </view>
-  </view>
-
-  <view class="list">
-    <view class="list-item" bindtap="sendSubscribeMessage">
-      <text>发送订阅消息</text>
-    </view>
-    <view class="list-item" wx:if="{{subscribeMessageResult}}">
-      <text class="request-text">调用结果:{{subscribeMessageResult}}</text>
-    </view>
-  </view>
-
-  <view class="guide">
-    <text class="headline">测试须知</text>
-    <text class="p">1. 需先到小程序管理后台,进入订阅消息管理</text>
-    <text class="p">2. 在订阅消息管理、公共模板库中添加一个模板</text>
-    <text class="p">3. 添加完成后在我的模板中点开模板详情</text>
-    <text class="p">4. 根据模板详情修改 openapi 云函数 index.js 中的相应位置</text>
-    <text class="p">5. 上传 cloudfunctions 目录下的 openapi 云函数</text>
-    <text class="p">6. 需在手机上预览测试,工具中无效</text>
-    <text class="p">7. 依次点击获取模板、获取下发权限、发送订阅消息</text>
-    <text class="p">8. 调用成功后返回到微信主界面查看收到的模板消息</text>
-  </view>
-
-  <view class="list">
-    <view class="list-item" bindtap="onGetWXACode">
-      <text>获取小程序码</text>
-    </view>
-    <view class="list-item" wx:if="{{wxacodeResult}}">
-      <text class="request-text">{{wxacodeResult}}</text>
-      <text class="request-text" wx:if="{{showClearWXACodeCache}}" bindtap="clearWXACodeCache">清除缓存</text>
-    </view>
-  </view>
-
-  <view class="guide">
-    <text class="headline">测试须知</text>
-    <text class="p">1. 需上传 cloudfunctions 目录下的 openapi 云函数</text>
-    <text class="p">2. 云函数中获取图片后会上传至存储空间并返回至小程序使用和缓存</text>
-    <text class="p">3. 云存储需设置为公有读</text>
-  </view>
-
-  <view class="guide">
-    <image src="{{wxacodeSrc}}" mode="aspectFit"></image>
-  </view>
-
-</view>

+ 0 - 7
miniprogram/pages/openapi/serverapi/serverapi.wxss

@@ -1,7 +0,0 @@
-/* miniprogram/pages/openapi/openapi.wxss */
-
-@import "../../../style/guide.wxss";
-
-.black {
-  color: black;
-}

+ 0 - 31
miniprogram/pages/storageConsole/storageConsole.js

@@ -1,31 +0,0 @@
-// pages/storageConsole/storageConsole.js
-
-const app = getApp()
-
-Page({
-
-  data: {
-    fileID: '',
-    cloudPath: '',
-    imagePath: '',
-  },
-
-  onLoad: function (options) {
-    const {
-      fileID,
-      cloudPath,
-      imagePath,
-    } = app.globalData
-
-    this.setData({
-      fileID,
-      cloudPath,
-      imagePath,
-    })
-
-    console.group('文件存储文档')
-    console.log('https://developers.weixin.qq.com/miniprogram/dev/wxcloud/guide/storage.html')
-    console.groupEnd()
-  },
-
-})

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

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "文件存储指引",
-  "usingComponents": {}
-}

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

@@ -1,29 +0,0 @@
-<!--pages/storageConsole/storageConsole.wxml-->
-<view class="container">
-
-  <view class="list">
-    <view class="list-item" bindtap="testCgi">
-      <text class="black">上传成功</text>
-    </view>
-    <view class="list-item">
-      <text class="request-text">文件 ID:{{fileID}}</text>
-    </view>
-    <view class="list-item">
-      <text class="request-text">云文件路径:{{cloudPath}}</text>
-    </view>
-    <view class="list-item">
-      <image class="image1" src="{{imagePath}}" mode="aspectFit"></image>
-    </view>
-  </view>
-
-  <view class="guide">
-    <!-- <image class="image1" src="{{imagePath}}" mode="aspectFit"></image> -->
-    <text class="headline">云开发控制台中管理文件</text>
-    <text class="p">1. 打开云开发控制台</text>
-    <image class="image1" src="../../images/console-entrance.png" mode="aspectFit"></image>
-    <text class="p">2. 切换到文件管理标签页</text>
-    <text class="p">3. 可查看文件列表、管理权限</text>
-    <text class="p">4. 详细的教程和 API 文件,可点击调试器中打印的链接查看</text>
-  </view>
-
-</view>

+ 0 - 7
miniprogram/pages/storageConsole/storageConsole.wxss

@@ -1,7 +0,0 @@
-/* pages/storageConsole/storageConsole.wxss */
-
-@import "../../style/guide.wxss";
-
-.black {
-  color: black;
-}

+ 0 - 13
miniprogram/pages/userConsole/userConsole.js

@@ -1,13 +0,0 @@
-// pages/userConsole/userConsole.js
-Page({
-
-  data: {
-    openid: ''
-  },
-
-  onLoad: function (options) {
-    this.setData({
-      openid: getApp().globalData.openid
-    })
-  }
-})

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

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "用户管理指引",
-  "usingComponents": {}
-}

+ 0 - 22
miniprogram/pages/userConsole/userConsole.wxml

@@ -1,22 +0,0 @@
-<!--pages/userConsole/userConsole.wxml-->
-<view class="container">
-
-  <view class="list">
-    <view class="list-item" bindtap="testCgi">
-      <text class="request-text">用户 openid 获取成功</text>
-    </view>
-    <view class="list-item" bindtap="testCgi">
-      <text class="request-text">{{openid}}</text>
-    </view>
-  </view>
-
-  <!-- 云开发用户管理指引 -->
-  <view class="guide">
-    <text class="headline">云开发管理用户</text>
-    <text class="p">1. 打开云开发控制台</text>
-    <image class="image1" src="../../images/console-entrance.png" mode="aspectFit"></image>
-    <text class="p">2. 切换到 "用户管理" 标签页</text>
-    <text class="p">3. 查看访问小程序的用户列表</text>
-  </view>
-
-</view>

+ 0 - 3
miniprogram/pages/userConsole/userConsole.wxss

@@ -1,3 +0,0 @@
-/* pages/userConsole/userConsole.wxss */
-
-@import "../../style/guide.wxss";

+ 1 - 0
project.config.json

@@ -28,6 +28,7 @@
       "outputPath": ""
     },
     "enableEngineNative": false,
+    "bundle": false,
     "useIsolateContext": true,
     "useCompilerModule": true,
     "userConfirmedUseCompilerModuleSwitch": false,