liyongli 2 лет назад
Родитель
Сommit
6afe517fd8
42 измененных файлов с 632 добавлено и 667 удалено
  1. 0 6
      cloudfunctions/cloudbase_auth/config.json
  2. 0 28
      cloudfunctions/cloudbase_auth/index.js
  3. 0 14
      cloudfunctions/cloudbase_auth/package.json
  4. 0 15
      cloudfunctions/openapi/config.json
  5. 0 86
      cloudfunctions/openapi/index.js
  6. 0 14
      cloudfunctions/openapi/package.json
  7. 0 48
      cloudfunctions/server/auto/utils.js
  8. 41 0
      cloudfunctions/server/controller/appConfig/index.js
  9. 7 0
      cloudfunctions/server/controller/index.js
  10. 100 0
      cloudfunctions/server/controller/media/index.js
  11. 22 16
      cloudfunctions/server/index.js
  12. 9 0
      cloudfunctions/server/utils/http.js
  13. 11 0
      miniprogram/app.js
  14. 7 5
      miniprogram/app.json
  15. 5 0
      miniprogram/components/dayList/components/imageComponents/index.wxml
  16. 8 0
      miniprogram/components/dayList/components/imageComponents/index.wxss
  17. 5 0
      miniprogram/components/dayList/components/videoComponents/index.wxml
  18. 0 0
      miniprogram/components/dayList/components/videoComponents/index.wxss
  19. 55 0
      miniprogram/components/dayList/index.js
  20. 8 0
      miniprogram/components/dayList/index.json
  21. 10 0
      miniprogram/components/dayList/index.wxml
  22. 6 0
      miniprogram/components/dayList/index.wxss
  23. 21 25
      miniprogram/pages/detail/detail.js
  24. 32 80
      miniprogram/pages/home/index.js
  25. 5 63
      miniprogram/pages/home/index.wxml
  26. 1 4
      miniprogram/pages/home/index.wxss
  27. 0 144
      miniprogram/pages/interList/interList.js
  28. 0 4
      miniprogram/pages/interList/interList.json
  29. 0 20
      miniprogram/pages/interList/interList.wxml
  30. 0 56
      miniprogram/pages/interList/interList.wxss
  31. 4 4
      miniprogram/pages/marvellous/components/videoAn/index.wxml
  32. 90 0
      miniprogram/pages/mediaController/index.js
  33. 5 0
      miniprogram/pages/mediaController/index.json
  34. 4 0
      miniprogram/pages/mediaController/index.wxml
  35. 1 0
      miniprogram/pages/mediaController/index.wxss
  36. 94 0
      miniprogram/pages/videoDetail/index.js
  37. 5 0
      miniprogram/pages/videoDetail/index.json
  38. 9 0
      miniprogram/pages/videoDetail/index.wxml
  39. 22 0
      miniprogram/pages/videoDetail/index.wxss
  40. 30 0
      miniprogram/utils/httpFunc.js
  41. 13 2
      project.config.json
  42. 2 33
      project.private.config.json

+ 0 - 6
cloudfunctions/cloudbase_auth/config.json

@@ -1,6 +0,0 @@
-{
-  "permissions": {
-    "openapi": [
-    ]
-  }
-}

+ 0 - 28
cloudfunctions/cloudbase_auth/index.js

@@ -1,28 +0,0 @@
-const cloud = require('wx-server-sdk')
-cloud.init({
-  env: cloud.DYNAMIC_CURRENT_ENV
-})
-
-// 云函数入口函数
-exports.main = async (event, context) => {
-  const wxContext = cloud.getWXContext()
-
-  console.log(event)
-  console.log(wxContext)
-  // 跨账号调用时,由此拿到来源方小程序/公众号 AppID
-  console.log(wxContext.FROM_APPID)
-  // 跨账号调用时,由此拿到来源方小程序/公众号的用户 OpenID
-  console.log(wxContext.FROM_OPENID)
-  // 跨账号调用、且满足 unionid 获取条件时,由此拿到同主体下的用户 UnionID
-  console.log(wxContext.FROM_UNIONID)
-
-  return {
-    errCode: 0,
-    errMsg: '',
-    auth: JSON.stringify({
-      // 自定义安全规则
-      // 在前端访问资源方数据库、云函数等资源时,资源方可以通过
-      // 安全规则的 `auth.custom` 字段获取此对象的内容做校验
-    }),
-  }
-}

+ 0 - 14
cloudfunctions/cloudbase_auth/package.json

@@ -1,14 +0,0 @@
-{
-  "name": "cloudbase_auth",
-  "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"
-  }
-}

+ 0 - 15
cloudfunctions/openapi/config.json

@@ -1,15 +0,0 @@
-{
-  "permissions": {
-    "openapi": [
-      "wxacode.get",
-      "subscribeMessage.send",
-      "subscribeMessage.addTemplate",
-      "templateMessage.send",
-      "templateMessage.addTemplate",
-      "templateMessage.deleteTemplate",
-      "templateMessage.getTemplateList",
-      "templateMessage.getTemplateLibraryById",
-      "templateMessage.getTemplateLibraryList"
-    ]
-  }
-}

+ 0 - 86
cloudfunctions/openapi/index.js

@@ -1,86 +0,0 @@
-// 云函数入口文件
-const cloud = require('wx-server-sdk')
-
-cloud.init()
-
-// 云函数入口函数
-exports.main = async (event, context) => {
-  console.log(event)
-  switch (event.action) {
-    case 'requestSubscribeMessage': {
-      return requestSubscribeMessage(event)
-    }
-    case 'sendSubscribeMessage': {
-      return sendSubscribeMessage(event)
-    }
-    case 'getWXACode': {
-      return getWXACode(event)
-    }
-    case 'getOpenData': {
-      return getOpenData(event)
-    }
-    default: {
-      return
-    }
-  }
-}
-
-async function requestSubscribeMessage(event) {
-  // 此处为模板 ID,开发者需要到小程序管理后台 - 订阅消息 - 公共模板库中添加模板,
-  // 然后在我的模板中找到对应模板的 ID,填入此处
-  return '请到管理后台申请模板 ID 然后在此替换' // 如 'N_J6F05_bjhqd6zh2h1LHJ9TAv9IpkCiAJEpSw0PrmQ'
-}
-
-async function sendSubscribeMessage(event) {
-  const { OPENID } = cloud.getWXContext()
-
-  const { templateId } = event
-
-  const sendResult = await cloud.openapi.subscribeMessage.send({
-    touser: OPENID,
-    templateId,
-    miniprogram_state: 'developer',
-    page: 'pages/openapi/openapi',
-    // 此处字段应修改为所申请模板所要求的字段
-    data: {
-      thing1: {
-        value: '咖啡',
-      },
-      time3: {
-        value: '2020-01-01 00:00',
-      },
-    }
-  })
-
-  return sendResult
-}
-
-async function getWXACode(event) {
-  // 此处将获取永久有效的小程序码,并将其保存在云文件存储中,最后返回云文件 ID 给前端使用
-
-  const wxacodeResult = await cloud.openapi.wxacode.get({
-    path: 'pages/openapi/openapi',
-  })
-
-  const fileExtensionMatches = wxacodeResult.contentType.match(/\/([^/]+)/)
-  const fileExtension = (fileExtensionMatches && fileExtensionMatches[1]) || 'jpg'
-
-  const uploadResult = await cloud.uploadFile({
-    // 云文件路径,此处为演示采用一个固定名称
-    cloudPath: `wxacode_default_openapi_page.${fileExtension}`,
-    // 要上传的文件内容可直接传入图片 Buffer
-    fileContent: wxacodeResult.buffer,
-  })
-
-  if (!uploadResult.fileID) {
-    throw new Error(`upload failed with empty fileID and storage server status code ${uploadResult.statusCode}`)
-  }
-
-  return uploadResult.fileID
-}
-
-async function getOpenData(event) {
-  return cloud.getOpenData({
-    list: event.openData.list,
-  })
-}

+ 0 - 14
cloudfunctions/openapi/package.json

@@ -1,14 +0,0 @@
-{
-  "name": "openapi",
-  "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"
-  }
-}

+ 0 - 48
cloudfunctions/server/auto/utils.js

@@ -1,48 +0,0 @@
-const cloudbase = require("@cloudbase/node-sdk");
-
-async function checkAuth() {
-  // 获取用户信息
-  // 在云函数中获取用户身份信息
-  const app = cloudbase.init();
-  const { TCB_UUID } = cloudbase.getCloudbaseContext();
-  let { userInfo } = await app.auth().getEndUserInfo(TCB_UUID);
-
-  // 未登录用户
-  if (!userInfo.username && !userInfo.openId) {
-    return {
-      msg: "未登录用户!",
-      result: false
-    }
-  }
-
-  // 校验用户是否为 CMS 的用户
-  // 腾讯云 CMS 用户数据集合为 tcb-ext-cms-users
-  // 微信 CMS 用户数据集合为 wx-ext-cms-users
-  const {
-    data: [userRecord]
-  } = await app
-    .database()
-    .collection("tcb-ext-cms-users")
-    .where({
-      username: userInfo.username
-    })
-    .get();
-
-  // 用户信息不存在
-  if (!userRecord) {
-    return {
-      msg: "用户不存在,请确认登录信息!",
-      result: false
-    }
-  }
-
-  // 校验通过
-  return {
-    msg: "",
-    result: true
-  }
-}
-
-exports.config = {
-  checkAuth
-}

+ 41 - 0
cloudfunctions/server/controller/appConfig/index.js

@@ -0,0 +1,41 @@
+const { formmat } = require("../../utils/http");
+function Home() {
+  const homeList = [
+    {
+      text: "何以中国",
+      url: "https://cxzx.smcic.net/topic/Applets/shengshizhongguo/0.png",
+      type: 'toDetail'
+    },
+    {
+      text: "日程安排",
+      url: "https://cxzx.smcic.net/topic/Applets/shengshizhongguo/1.png",
+      type: 'toDetail'
+    },
+    {
+      text: "图片集锦",
+      url: "https://cxzx.smcic.net/topic/Applets/shengshizhongguo/3.png",
+      type: 'image'
+    },
+    {
+      text: "精彩视频",
+      url: "https://cxzx.smcic.net/topic/Applets/shengshizhongguo/4.png",
+      type: 'video'
+    },
+    {
+      text: "媒体风采",
+      url: "https://cxzx.smcic.net/topic/Applets/shengshizhongguo/5.png",
+      type: 'toDetail'
+    },
+    {
+      text: "蓝直播",
+      url: "https://cxzx.smcic.net/topic/Applets/shengshizhongguo/2.png",
+      type: 'video'
+    },
+  ];
+  return formmat(homeList, 0, "ok");
+}
+
+
+module.exports = {
+  Home
+}

+ 7 - 0
cloudfunctions/server/controller/index.js

@@ -0,0 +1,7 @@
+const appConfig = require("./appConfig/index");
+const media = require("./media/index");
+
+module.exports = {
+  ...appConfig,
+  ...media
+}

+ 100 - 0
cloudfunctions/server/controller/media/index.js

@@ -0,0 +1,100 @@
+const { formmat } = require("../../utils/http");
+function MediaController(data) {
+  console.log('参数------------>',data)
+  let list = [
+    {
+      location: "西安",
+      date: "2022-11-22",
+      icon: "",
+      id: 0,
+      child: [
+        {
+          url: "https://cxzx.smcic.net/topic/activity/img/upbg.ab3a4dc7.jpg",
+          title: "走进文物"
+        },
+        {
+          url: "https://cxzx.smcic.net/topic/activity/img/upbg.ab3a4dc7.jpg",
+          title: "走进文物"
+        },
+        {
+          url: "https://cxzx.smcic.net/topic/activity/img/upbg.ab3a4dc7.jpg",
+          title: "走进文物"
+        },
+      ]
+    },
+  ];
+  list = [
+    {
+      location: "西安",
+      date: "2022-11-22",
+      icon: "",
+      id: 0,
+      child: [
+        {
+          url: "https://cxzx.smcic.net/operate/worldCup/works/10086/20221119113805/97ba6b60662ab4f31ef06cdf5a5f8e94_preview.mp4",
+          title: "走进文物"
+        },
+        {
+          url: "https://cxzx.smcic.net/operate/worldCup/works/10086/20221119113805/97ba6b60662ab4f31ef06cdf5a5f8e94_preview.mp4",
+          title: "走进文物"
+        },
+        {
+          url: "https://cxzx.smcic.net/operate/worldCup/works/10086/20221119113805/97ba6b60662ab4f31ef06cdf5a5f8e94_preview.mp4",
+          title: "走进文物"
+        },
+      ]
+    },
+  ]
+  return formmat(list, 0, "ok");
+}
+
+function MediaControllerOnce(data) {
+  console.log('参数------------>',data)
+  let once = {
+    location: "西安",
+    date: "2022-11-22",
+    icon: "",
+    id: 0,
+    child: [
+      {
+        url: "https://cxzx.smcic.net/topic/activity/img/upbg.ab3a4dc7.jpg",
+        title: "走进文物"
+      },
+      {
+        url: "https://cxzx.smcic.net/topic/activity/img/upbg.ab3a4dc7.jpg",
+        title: "走进文物"
+      },
+      {
+        url: "https://cxzx.smcic.net/topic/activity/img/upbg.ab3a4dc7.jpg",
+        title: "走进文物"
+      },
+    ]
+  };
+  once =  {
+    location: "西安",
+    date: "2022-11-22",
+    icon: "",
+    id: 0,
+    child: [
+      {
+        url: "https://cxzx.smcic.net/operate/worldCup/works/10086/20221119113805/97ba6b60662ab4f31ef06cdf5a5f8e94_preview.mp4",
+        title: "走进文物"
+      },
+      {
+        url: "https://cxzx.smcic.net/operate/worldCup/works/10086/20221119113805/97ba6b60662ab4f31ef06cdf5a5f8e94_preview.mp4",
+        title: "走进文物"
+      },
+      {
+        url: "https://cxzx.smcic.net/operate/worldCup/works/10086/20221119113805/97ba6b60662ab4f31ef06cdf5a5f8e94_preview.mp4",
+        title: "走进文物"
+      },
+    ]
+  }
+  return formmat(once, 0, "ok");
+}
+
+
+module.exports = {
+  MediaController,
+  MediaControllerOnce
+}

+ 22 - 16
cloudfunctions/server/index.js

@@ -1,24 +1,30 @@
-// 云函数入口文件
-const cloud = require('wx-server-sdk')
-
-const utils = require("./auto/utils")
-
-cloud.init()
-
+/**
+ * 云函数入口文件
+ * 初始化数据库
+ */
+const cloud = require('wx-server-sdk');
+const { Home, MediaController, MediaControllerOnce } = require("./controller/index");
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+})
 // 云函数入口函数
 exports.main = async (event, context) => {
-  let result = await utils.checkAuth();
-  if(!result.result) return {
-    msg: result.msg
-  }
   console.log(event)
-  switch (event.action) {
-    case 'img': {
-      return upImage(event)
+  switch (event.type) {
+    case "getHomeList": {
+      delete event.type;
+      return Home();
     }
-    case 'video': {
-      return video(event)
+    case "getMediaController": {
+      delete event.type;
+      return MediaController(event);
     }
+
+    case "getMediaControllerOnce": {
+      delete event.type
+      return MediaControllerOnce(event)
+    }
+
     default: {
       return {}
     }

+ 9 - 0
cloudfunctions/server/utils/http.js

@@ -0,0 +1,9 @@
+module.exports = {
+  formmat(data, code, msg){
+    return {
+      code,
+      data,
+      msg
+    }
+  }
+}

+ 11 - 0
miniprogram/app.js

@@ -17,3 +17,14 @@ App({
     this.globalData = {}
   }
 })
+
+
+/**
+ * 何以中国 --》 图文稿件
+ * 日程安排 --》 全部日程,扫码进入当天日程
+ * 图片集锦 --》 日期与地点分类 1
+ * 精彩视频 --》 地点列表 -》 视频详情(上部视频,视频需要考虑横竖屏 下部相关视频列表 ) 2
+ * 蓝直播   --》 参考精彩视频 2
+ * 媒体风采 --》 待定
+ * 新闻动态 --》 去掉  1
+ */

+ 7 - 5
miniprogram/app.json

@@ -1,9 +1,10 @@
 {
   "pages": [
     "pages/home/index",
-    "pages/interList/interList",
     "pages/detail/detail",
-    "pages/marvellous/index"
+    "pages/marvellous/index",
+    "pages/mediaController/index",
+    "pages/videoDetail/index"
   ],
   "window": {
     "backgroundColor": "#F6F6F6",
@@ -12,11 +13,12 @@
     "navigationBarTitleText": "追寻红色记忆",
     "navigationBarTextStyle": "black"
   },
-  "requiredBackgroundModes":["audio"],
+  "requiredBackgroundModes": [
+    "audio"
+  ],
   "sitemapLocation": "sitemap.json",
   "style": "v2",
   "useExtendedLib": {
     "weui": true
-  },
-  "onReachBottomDistance": 10
+  }
 }

+ 5 - 0
miniprogram/components/dayList/components/imageComponents/index.wxml

@@ -0,0 +1,5 @@
+<template name="mediaImage">
+  <view class="col-3" wx:for="{{list}}" wx:for-index="i" wx:for-item="itemSon" wx:key="i" data-index="{{index + '-' + i}}" bindtap="showMedia">
+    <image style="width: 100%;height: 100%" src="{{itemSon.url}}" mode="aspectFit" />
+  </view>
+</template>

+ 8 - 0
miniprogram/components/dayList/components/imageComponents/index.wxss

@@ -0,0 +1,8 @@
+.col-3{
+  width: 240rpx;
+  height: 240rpx;
+  background-color: #eee;
+  display: inline-block;
+  margin-right: 5rpx;
+  overflow: hidden;
+}

+ 5 - 0
miniprogram/components/dayList/components/videoComponents/index.wxml

@@ -0,0 +1,5 @@
+<template name="mediaVideo">
+  <view class="col-3" wx:for="{{list}}" wx:for-index="i" wx:for-item="itemSon" wx:key="i" data-index="{{index + '-' + i}}" bindtap="showMedia">
+    <image style="width: 100%;height: 100%" src="{{itemSon.url + '?x-oss-process=video/snapshot,t_100,f_jpg,m_fast'}}" mode="aspectFit" />
+  </view>
+</template>

+ 0 - 0
miniprogram/components/dayList/components/videoComponents/index.wxss


+ 55 - 0
miniprogram/components/dayList/index.js

@@ -0,0 +1,55 @@
+// components/dayList/index.js
+const urlList = [];
+const titleList = [];
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    mediaList: {
+      type: Array,
+      observer: function (n) {
+        if (!n.length) return;
+        let y = -1;
+        for (let i = 0; i < n.length; i++) {
+          const v = n[i];
+          for (let p = 0; p < v.child.length; p++) {
+            const item = v.child[p];
+            item.index = ++y;
+            urlList.push({
+              url: item.url,
+              type: item.mediaType,
+              poster: item.poster || ""
+            });
+            titleList.push(item.title);
+          }
+        }
+      }
+    }
+  },
+  /**
+   * 组件的初始数据
+   */
+  data: {
+  },
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    showMedia(e) {
+      const indexs = e.currentTarget.dataset.index.split("-");
+      const row = this.data.mediaList[indexs[0]];
+      const item = row.child[indexs[1]];
+      if (row.mediaType === 'image') {
+        wx.previewMedia({
+          sources: urlList,
+          current: item.index
+        })
+        return
+      }
+      wx.navigateTo({
+        url: "/pages/videoDetail/index?id=" + row.id + '&index=' + indexs[1]
+      })
+    }
+  }
+})

+ 8 - 0
miniprogram/components/dayList/index.json

@@ -0,0 +1,8 @@
+{
+  "component": true,
+  "usingComponents": {    
+    "mp-cells": "weui-miniprogram/cells/cells",
+    "mp-cell": "weui-miniprogram/cell/cell",
+    "mp-gallery": "weui-miniprogram/gallery/gallery"
+  }
+}

+ 10 - 0
miniprogram/components/dayList/index.wxml

@@ -0,0 +1,10 @@
+<!--components/dayList/index.wxml-->
+<import src="./components/imageComponents/index"></import>
+<import src="./components/videoComponents/index"></import>
+<view wx:for="{{mediaList}}" wx:key="index" class="program">
+  <mp-cell title="{{item.date}}" footer="{{item.location}}"></mp-cell>
+  <view class="Allmedia">
+    <template wx:if="{{item.mediaType === 'image'}}" is="mediaImage" data="{{list: item.child || [], index}}"></template>
+    <template wx:if="{{item.mediaType === 'video'}}" is="mediaVideo" data="{{list: item.child || [], index}}"></template>
+  </view>
+</view>

+ 6 - 0
miniprogram/components/dayList/index.wxss

@@ -0,0 +1,6 @@
+/* components/dayList/index.wxss */
+@import "./components/imageComponents/index.wxss";
+@import "./components/videoComponents/index.wxss";
+.program .Allmedia{
+  padding: 10rpx 0 0 10rpx;
+}

+ 21 - 25
miniprogram/pages/detail/detail.js

@@ -5,36 +5,32 @@ Page({
    * 页面的初始数据
    */
   data: {
-    detail: {},
-    name: "",
-    id: ""
+    detail: {}
   },
-
+  nameText: "",
+  idText: "",
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: async function (options) {
+    console.log(options)
+    this.nameText = decodeURIComponent(options.title || "详情");
+    this.idText = options.id || "";
     wx.setNavigationBarTitle({
-      title: decodeURIComponent(options.title) || "详情"
-    })
-    const db = wx.cloud.database();
-    const _ = db.command;
-    const _this = this;
-    let list = await db.collection('data_news').where({
-      _id: _.eq(options.id)
-    }).get();
-    if (!list.data.length) return wx.showToast({
-      title: '数据走丢了',
-      icon: "error"
-    })
-    let D = list.data[0] || {};
-    D.content = D.content.replace(/style=\"([a-z|A-Z|-|:|;|0-9|\.]*)\"/g, "").replace(/width=\"([a-z|A-Z|-|:|;|0-9|\.]*)\"/g, "").replace(/height=\"([a-z|A-Z|-|:|;|0-9|\.]*)\"/g, "").replace(/<img/g, "<img style='width: 100%'").replace(/<p/gi, '<p style="text-indent: 2em;min-height: 1em"')
-    if (D.creat_time) D.creat_time = this.format(D.creat_time);
-    _this.setData({
-      detail: D,
-      id: options.id,
-      name: decodeURIComponent(options.title)
+      title:  this.nameText
     })
+    // const db = wx.cloud.database();
+    // const _ = db.command;
+    // let list = await db.collection('data_news').where({
+    //   _id: _.eq(options.id)
+    // }).get();
+    
+    // let D = list.data[0] || {};
+    // D.content = D.content.replace(/style=\"([a-z|A-Z|-|:|;|0-9|\.]*)\"/g, "").replace(/width=\"([a-z|A-Z|-|:|;|0-9|\.]*)\"/g, "").replace(/height=\"([a-z|A-Z|-|:|;|0-9|\.]*)\"/g, "").replace(/<img/g, "<img style='width: 100%'").replace(/<p/gi, '<p style="text-indent: 2em;min-height: 1em"')
+    // if (D.creat_time) D.creat_time = this.format(D.creat_time);
+    // _this.setData({
+    //   detail: D,
+    // })
     wx.showShareMenu({
       withShareTicket: true,
     });
@@ -86,8 +82,8 @@ Page({
    */
   onShareAppMessage: function () {
     return {
-      title: this.data.name,  // 分享名称
-      path: 'pages/detail/detail?title=' + this.data.name + '&id=' + this.data.id,  // 点击分享后的链接要来到的页面的路径已经对应需要的参数
+      title: this.nameText,  // 分享名称
+      path: 'pages/detail/detail?title=' + this.nameText + '&id=' + this.data.id,  // 点击分享后的链接要来到的页面的路径已经对应需要的参数
     }
   },
 

+ 32 - 80
miniprogram/pages/home/index.js

@@ -1,3 +1,4 @@
+import { httpCloud } from "../../utils/httpFunc";
 // miniprogram/pages/home/index.js
 Page({
 
@@ -5,56 +6,43 @@ Page({
    * 页面的初始数据
    */
   data: {
-    newList: []
+    iconList: []
+  },
+
+  clickFunc(data) {
+    console.log(data.currentTarget);
+    const index = data.currentTarget.dataset.index;
+    const item = this.data.iconList[index];
+    let url = ""
+    if (!item.type) return
+    switch (item.type) {
+      case 'image':
+      case 'video':
+        url = '/pages/mediaController/index?title=' + item.text + "&mediaType=" + item.type;
+        break;
+      default:
+        url = '/pages/detail/detail?title=' + item.text + "&id=" + item.id;
+        break;
+    }
+    wx.navigateTo({ url })
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad: async function (options) {
-    const db = wx.cloud.database();
-    const _ = db.command;
-    let listNews = await db.collection('data_news').where({
-      hot: true,
-      type: 1
-    }).count();
-    let video = await db.collection("data_asset").where({
-      type: "video"
-    }).count();
-    const listpage = Math.ceil(listNews.total / 20)
-    const videopage = Math.ceil(video.total / 20)
-    let list = [];
-    for (let i = 0; i < listpage; i++) {
-      let end = listNews.total > (i + 1) * 20 ? (i + 1) * 20 : listNews.total;
-      let li = await db.collection('data_news').where({
-        hot: true,
-        type: 1
-      }).skip(i * 20)
-        .limit(end)
-        .get() || { data: [] };
-      list = list.concat(...li.data)
-    }
-    for (let i = 0; i < videopage; i++) {
-      let end = video.total > (i + 1) * 20 ? (i + 1) * 20 : video.total;
-      let li = await db.collection("data_asset").where({
-        type: "video"
-      }).skip(i * 20)
-        .limit(end)
-        .get() || { data: [] };
-      list = list.concat(...li.data)
-    }
-    list = list.sort((a,b)=>{
-      if(a._createTime) a.create_time = a._createTime;
-      if(b._createTime) b.create_time = b._createTime;
-      return b.create_time - a.create_time
+  onLoad: function () {
+    const _this = this;
+    wx.setNavigationBarTitle({
+      title: "盛世中华 何以中国"
     })
-
-    for (let i = 0; i < list.length; i++) {
-      const v = list[i];
-      v.create_time = this.format(v.create_time || 0)
-    }
-    this.setData({
-      newList: list || []
+    httpCloud({
+      name: "server",
+      type: "getHomeList",
+      call(res) {
+        _this.setData({
+          iconList: res || []
+        })
+      }
     })
   },
 
@@ -105,42 +93,6 @@ Page({
    */
   onShareAppMessage: function () {
 
-  },
-
-  play: function (e) {
-    var that = this;
-    var id = e.currentTarget.id;
-    for (var i = 0; i < that.data.newList.length; i++) {
-      if (id !== 'newsVideo' + i && that.data.newList[i].type == 'video') {
-        //console.log('暂停其他正在播放的视频');
-        var videoContext = wx.createVideoContext("newsVideo" + i, that);
-        videoContext.pause();
-      }else{
-        continue
-      }
-    }
-  },
-  format: function (res) {
-    if (!res) return ""
-    let T = new Date(res || 0);
-    let year = T.getFullYear();
-    let month = T.getMonth() + 1;
-    let day = T.getDate();
-    let hour = T.getHours();
-    let min = T.getMinutes() + 1;
-    let sec = T.getSeconds();
-    return year + "-" + (month > 9 ? month : "0" + month) + "-" + (day > 9 ? day : "0" + day) + " " + (hour > 9 ? hour : '0' + hour) + ":" + (min > 9 ? min : '0' + min) + ":" + (sec > 9 ? sec : '0' + sec);
-  },
-  toDetail: function (e) {
-    let title = e.currentTarget.dataset.title, id = e.currentTarget.dataset.id;
-    wx.navigateTo({
-      url: '/pages/detail/detail?title=' + title + "&id=" + id,
-    })
-  },
-  toMarvellous: function (e) {
-    wx.navigateTo({
-      url: '/pages/marvellous/index?title=' + e.currentTarget.dataset.title + "&type=" + e.currentTarget.dataset.type,
-    })
   }
 
 })

+ 5 - 63
miniprogram/pages/home/index.wxml

@@ -1,7 +1,6 @@
 <!--miniprogram/pages/home/index.wxml-->
 <view class="home">
-  <image class="headImg" mode="aspectFit"
-    src="cloud://cloud1-6gbxfp9x33ff3b7c.636c-cloud1-6gbxfp9x33ff3b7c-1306051304/head.jpeg"></image>
+  <image class="headImg" mode="aspectFit" src="https://cxzx.smcic.net/topic/activity/img/upbg.ab3a4dc7.jpg"></image>
   <view class="title">
     畅行中国·庆祝建党100周年“追寻红色记忆”——“重访红色声音故里”融媒传播暨 “党性教育基地”揭牌仪式定于2021年6月16日-19日在陕西延安举行。
   </view>
@@ -10,70 +9,13 @@
   </view>
 
   <view class="icon_container">
-    <view class="icon_item_cell">
-      <view class="icon_content" data-title="活动简介" data-id="79550af260b0394f1aea63d27b6f2ae9" bindtap="toDetail">
-        <image mode="aspectFit" class="img" src="../../images/0.png"></image>
+    <view class="icon_item_cell" wx:for="{{iconList}}" wx:key="index">
+      <view class="icon_content" data-index="{{index}}" bindtap="clickFunc">
+        <image mode="aspectFit" class="img" src="{{item.url}}"></image>
         <view class="icon_title">
-          活动简介
+          {{item.text}}
         </view>
       </view>
     </view>
-    <view class="icon_item_cell">
-      <view class="icon_content" data-title="日程会务" data-id="cbddf0af60b041bd0c3e871a1a8f5a7e" bindtap="toDetail">
-        <image mode="aspectFit" class="img" src="../../images/1.png"></image>
-        <view class="icon_title">
-          日程会务
-        </view>
-      </view>
-    </view>
-    <view class="icon_item_cell">
-      <view class="icon_content" data-title="精彩瞬间" data-type="img" bindtap="toMarvellous">
-        <image mode="aspectFit" class="img" src="../../images/3.png"></image>
-        <view class="icon_title">
-          精彩瞬间
-        </view>
-      </view>
-    </view>
-    <view class="icon_item_cell">
-      <view class="icon_content" data-title="红色声音" data-type="video" bindtap="toMarvellous">
-        <image mode="aspectFit" class="img" src="../../images/4.png"></image>
-        <view class="icon_title">
-          红色声音
-        </view>
-      </view>
-    </view>
-    <view class="icon_item_cell">
-      <view class="icon_content" data-title="延安印迹" data-id="28ee4e3e60bee3dc20a8a74e3e2d8b10" bindtap="toDetail">
-        <image class="img" src="../../images/5.png"></image>
-        <view class="icon_title">
-          延安印迹
-        </view>
-      </view>
-    </view>
-    <view class="icon_item_cell">
-      <view class="icon_content" data-title="疫情防控" data-id="cbddf0af60b042750c3ebf6b09f3e165" bindtap="toDetail">
-        <image mode="aspectFit" class="img" src="../../images/2.png"></image>
-        <view class="icon_title">
-          疫情防控
-        </view>
-      </view>
-    </view>
-  </view>
-
-  <mp-cell link hover value="新闻动态" footer="查看更多" url="/pages/interList/interList?type=news">
-  </mp-cell>
-  <view wx:key="_id" wx:for="{{newList}}">
-    <view wx:if="{{item.type != 'video'}}" data-id="{{item._id}}" data-title="{{item.title}}" class="newList"
-      bindtap="toDetail">
-      <image mode="aspectFit" class="newsImg" src="{{item.cover}}"></image>
-      <view class="newsTitle">
-        <text class="top">{{item.title}}</text>
-        <text class="subTitle">发布日期 {{item.create_time}}</text>
-      </view>
-    </view>
-    <view wx:if="{{item.type == 'video'}}">
-      <video custom-cache="{{false}}" id="newsVideo{{index}}" data-index="{{index}}" bindplay="play" wx:if="{{item && item.url}}" style="width: 100%" src="{{item.url}}"></video>
-    </view>
-    <view class="br"></view>
   </view>
 </view>

+ 1 - 4
miniprogram/pages/home/index.wxss

@@ -10,6 +10,7 @@
 
 .home .title {
   font-size: 16px;
+  text-indent: 2em;
 }
 
 .home .subTitle {
@@ -87,8 +88,4 @@
   -webkit-box-orient: vertical;
   -webkit-line-clamp: 3;
   overflow: hidden;
-}
-
-.videoEle {
-  width: 100%;
 }

+ 0 - 144
miniprogram/pages/interList/interList.js

@@ -1,144 +0,0 @@
-// miniprogram/pages/interList/interList.js
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    newsList: []
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: async function (options) {
-    if (options.type == "news") {
-      wx.setNavigationBarTitle({
-        title: '新闻列表'
-      })
-    } else {
-      wx.setNavigationBarTitle({
-        title: '视频列表'
-      })
-    }
-    const db = wx.cloud.database();
-    wx.showLoading()
-    let listAll = await db.collection('data_news').where({
-      type: 1
-    }).count();
-    let videoAll = await db.collection("data_asset").where({
-      type: "video"
-    }).count();
-
-    const videopage = Math.ceil(videoAll.total / 20);
-    const listpage = Math.ceil(listAll.total / 20);
-    let list = []
-    for (let i = 0; i < videopage; i++) {
-      let end = videoAll.total > (i + 1) * 20 ? (i + 1) * 20 : videoAll.total;
-      let li = await db.collection("data_asset").where({
-        type: "video"
-      }).skip(i * 20)
-        .limit(end)
-        .get() || { data: [] };
-      list = list.concat(...li.data)
-    }
-    for (let i = 0; i < listpage; i++) {
-      let end = listAll.total > (i + 1) * 20 ? (i + 1) * 20 : listAll.total;
-      let li = await db.collection('data_news').where({
-        type: 1
-      }).skip(i * 20)
-        .limit(end)
-        .get() || { data: [] };
-      list = list.concat(...li.data)
-    }
-
-    list = list.sort((a,b)=>{
-      if(a._createTime) a.create_time = a._createTime;
-      if(b._createTime) b.create_time = b._createTime;
-      return b.create_time - a.create_time
-    })
-    for (let i = 0; i < list.length; i++) {
-      const v = list[i];
-      if (v.create_time) v.create_time = this.format(v.create_time || 0)
-    }
-    console.log(list)
-    this.setData({
-      newsList: list || []
-    },()=>{
-    wx.hideLoading()
-    })
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  },
-
-  tolist: function (e) {
-    console.log(e)
-  },
-
-  format: function (res) {
-    if (!res) return ""
-    let num = (res || 0) -0
-    let T = new Date(num);
-    let year = T.getFullYear();
-    let month = T.getMonth() + 1;
-    let day = T.getDate();
-    let hour = T.getHours();
-    let min = T.getMinutes() + 1;
-    let sec = T.getSeconds();
-
-    return year + "-" + (month > 9 ? month : "0" + month) + "-" + day + " " + (hour > 9 ? hour : '0' + hour) + ":" + (min > 9 ? min : '0' + min) + ":" + (sec > 9 ? sec : '0' + sec);
-  },
-  toDetail:function(e){
-    let title = e.currentTarget.dataset.title, id = e.currentTarget.dataset.id;
-    wx.navigateTo({
-      url: '/pages/detail/detail?title=' + title + "&id=" + id,
-    })
-  }
-})

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

@@ -1,4 +0,0 @@
-{
-  "usingComponents": {},
-  "navigationBarTitleText": "列表"
-}

+ 0 - 20
miniprogram/pages/interList/interList.wxml

@@ -1,20 +0,0 @@
-<!--miniprogram/pages/interList/interList.wxml-->
-<view class="interList">
-  <view wx:for="{{newsList}}" style="margin-bottom: 20rpx" wx:key="_id" >
-    <view class="videoEle" wx:if="{{item.type == 'video'}}">
-      <text wx:if="{{item.title}}" class="top">{{item.title}}</text>
-      <video custom-cache="{{false}}" class="video" wx:if="{{item.headUrl || item.url}}" src="{{item.headUrl || item.url}}"></video>
-      <text wx:if="{{item.create_time}}" class="subTitle">发布日期 {{item.create_time}}</text>
-    </view>
-    <view wx:if="{{item.type == 1}}" bindtap="toDetail"  data-id="{{item._id}}" data-title="{{item.title}}">
-      <view class="newList">
-        <image mode="aspectFit" class="newsImg" src="{{item.cover}}" wx:if="{{item.cover}}"></image>
-        <view class="newsTitle">
-          <text wx:if="{{item.title}}" class="top">{{item.title}}</text>
-          <text wx:if="{{item.create_time}}" class="subTitle">发布日期 {{item.create_time}}</text>
-        </view>
-      </view>
-    </view>
-  </view>
-
-</view>

+ 0 - 56
miniprogram/pages/interList/interList.wxss

@@ -1,56 +0,0 @@
-/* miniprogram/pages/interList/interList.wxss */
-.interList {
-  padding: 10rpx;
-}
-
-.videoList {
-  margin-bottom: 20rpx;
-}
-
-.videoList .title {
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-
-.newList {
-  width: 100%;
-  font-size: 0;
-  height: 240rpx;
-  overflow: hidden;
-  margin-bottom: 20rpx;
-  border-radius: 22.5rpx;
-  box-shadow: 3rpx 3rpx 20rpx rgba(0, 0, 0, .1);
-}
-
-.newList .newsImg {
-  width: 240rpx;
-  height: 240rpx;
-}
-
-.newList .newsTitle {
-  width: 100%;
-  height: 240rpx;
-  font-size: 14px;
-  margin-top: -240rpx;
-  padding: 20rpx 10rpx 20rpx 250rpx;
-  box-sizing: border-box;
-}
-
- .top {
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 3;
-  overflow: hidden;
-}
-
-.videoEle {
-  box-shadow: 3rpx 3rpx 20rpx rgba(0, 0, 0, .1);
-  padding: 10rpx;
-}
-.videoEle .video{
-  width: 100%;
-}
-.videoEle .newsTitle{
-  padding: 10rpx;
-}

+ 4 - 4
miniprogram/pages/marvellous/components/videoAn/index.wxml

@@ -3,22 +3,22 @@
 <view class="door" bindtap="start" wx:if="show">
   <view class="transverse" wx:if="{{heng}}">
     <image class="left"
-      src="../../../../images/door_left.jpg"></image>
+      src="https://cxzx.smcic.net/topic/Applets/shengshizhongguo/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>
+      src="https://cxzx.smcic.net/topic/Applets/shengshizhongguo/door_right.jpg"></image>
   </view>
 
 
 
   <view class="portrait" wx:if="{{shu}}">
     <view class="port">
-      <image class="up" src="../../../../images/wood.jpg">
+      <image class="up" src="https://cxzx.smcic.net/topic/Applets/shengshizhongguo/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 class="down" src="https://cxzx.smcic.net/topic/Applets/shengshizhongguo/wood.jpg">
       </image>
     </view>
   </view>

+ 90 - 0
miniprogram/pages/mediaController/index.js

@@ -0,0 +1,90 @@
+// pages/imgController/index.js
+import { httpCloud } from "../../utils/httpFunc";
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    mediaList: [],
+  },
+  nameText: "",
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    const _this = this;
+    this.nameText = options.title || "";
+    this.mediaType = options.mediaType || 'image';
+    wx.setNavigationBarTitle({
+      title: this.nameText
+    })
+    httpCloud({
+      name: "server",
+      type: "getMediaController",
+      data: {
+        typeMedia: this.mediaType
+      },
+      call(res) {
+        _this.setData({
+          mediaList: (res || []).map(v=>{
+            return {
+              ...v,
+              mediaType: _this.mediaType,
+            }
+          })
+        })
+      }
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  onShareAppMessage: function () {
+    return {
+      title: this.nameText,  // 分享名称
+      path: 'pages/detail/detail?title=' + this.nameText,  // 点击分享后的链接要来到的页面的路径已经对应需要的参数
+    }
+  },
+})

+ 5 - 0
miniprogram/pages/mediaController/index.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "day-list": "../../components/dayList"
+  }
+}

+ 4 - 0
miniprogram/pages/mediaController/index.wxml

@@ -0,0 +1,4 @@
+<!--pages/imgController/index.wxml-->
+<view>
+  <day-list mediaList="{{mediaList}}" ></day-list>
+</view>

+ 1 - 0
miniprogram/pages/mediaController/index.wxss

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

+ 94 - 0
miniprogram/pages/videoDetail/index.js

@@ -0,0 +1,94 @@
+// pages/videoDetail/index.js
+import { httpCloud } from "../../utils/httpFunc";
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    media: {},
+    indexItem: {}
+  },
+
+  toNext(e){
+    wx.redirectTo({
+      url: "/pages/videoDetail/index?id=" + this.data.media.id + '&index=' + e.currentTarget.dataset.index
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    const _this = this;
+    console.log(options)
+    httpCloud({
+      name: "server",
+      type: "getMediaControllerOnce",
+      data: {
+        typeMedia: 'video',
+        id: options.id
+      },
+      call(res) {
+        const ori = res || {child: []};
+        _this.setData({
+          media: ori,
+          indexItem: ori.child[options.index]
+        })
+        console.log(res)
+        wx.setNavigationBarTitle({
+          title: ori.child[options.index].title
+        })
+      }
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 5 - 0
miniprogram/pages/videoDetail/index.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "mp-cell": "weui-miniprogram/cell/cell"
+  }
+}

+ 9 - 0
miniprogram/pages/videoDetail/index.wxml

@@ -0,0 +1,9 @@
+<!--pages/videoDetail/index.wxml-->
+<video class="video" src="{{indexItem.url}}" controls 	poster="{{indexItem.url + '?x-oss-process=video/snapshot,t_100,f_jpg,m_fast'}}" />
+<mp-cell title="{{indexItem.title}}"></mp-cell>
+
+<view class="list" wx:for="{{media.child || []}}" wx:key="index" bindtap="toNext" data-index="{{index}}">
+  <image class="imgage" src="{{item.url + '?x-oss-process=video/snapshot,t_100,f_jpg,m_fast'}}"  mode="aspectFit"/>
+  <view class="title">{{item.title}}</view>
+</view>
+

+ 22 - 0
miniprogram/pages/videoDetail/index.wxss

@@ -0,0 +1,22 @@
+/* pages/videoDetail/index.wxss */
+.video{
+  width: 750rpx;
+  max-height: 66vh;
+}
+
+.list{
+  height: 190rpx;
+  padding: 2rpx 5rpx 2rpx 180rpx;
+  position: relative;
+  border: 1rpx solid #eee;
+}
+.list .imgage{
+  height: 170rpx;
+  width: 170rpx;
+  position: absolute;
+  left: 5rpx;
+  top: 2rpx;
+}
+.list .title{
+  padding-left: 5rpx;
+}

+ 30 - 0
miniprogram/utils/httpFunc.js

@@ -0,0 +1,30 @@
+function httpError(err) {
+  console.error(err);
+  wx.hideLoading();
+  wx.showToast({
+    title: '请稍后再试!',
+  })
+}
+
+export function httpCloud(params) {
+  !params.noLoading && wx.showLoading();
+  const par = params || {};
+  wx.cloud.callFunction({
+    // 云函数名称
+    name: par.name,
+    // 传给云函数的参数
+    data: {
+      ...(par.data || {}),
+      type: par.type
+    },
+    success: function (res) {
+      wx.hideLoading();
+      if(!/ok/g.test(res.errMsg)) return httpError(res);
+      if(res.result.code != 0) return wx.showToast({
+        title: '请稍后再试!',
+      })
+      par.call && par.call(res.result.data);
+    },
+    fail: httpError
+  })
+}

+ 13 - 2
project.config.json

@@ -33,12 +33,13 @@
     "packNpmManually": false,
     "packNpmRelationList": [],
     "minifyWXSS": true,
-    "showES6CompileOption": false
+    "showES6CompileOption": false,
+    "ignoreUploadUnusedFiles": true
   },
   "appid": "wx0cf4e5aa4357576b",
   "projectname": "miniprogram-1",
   "libVersion": "2.14.1",
-  "cloudfunctionTemplateRoot": "cloudfunctionTemplate",
+  "cloudfunctionTemplateRoot": "cloudfunctionTemplate/",
   "condition": {
     "search": {
       "list": []
@@ -61,5 +62,15 @@
         }
       ]
     }
+  },
+  "compileType": "miniprogram",
+  "srcMiniprogramRoot": "miniprogram/",
+  "packOptions": {
+    "ignore": [],
+    "include": []
+  },
+  "editorSetting": {
+    "tabIndent": "insertSpaces",
+    "tabSize": 2
   }
 }

+ 2 - 33
project.private.config.json

@@ -1,36 +1,5 @@
 {
   "setting": {},
-  "condition": {
-    "plugin": {
-      "list": []
-    },
-    "game": {
-      "list": []
-    },
-    "gamePlugin": {
-      "list": []
-    },
-    "miniprogram": {
-      "list": [
-        {
-          "name": "pages/marvellous/index",
-          "pathName": "pages/marvellous/index",
-          "query": "title=%E7%B2%BE%E5%BD%A9%E7%9E%AC%E9%97%B4",
-          "scene": null
-        },
-        {
-          "name": "pages/ruins/index",
-          "pathName": "pages/ruins/index",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/provincialArea/index",
-          "pathName": "pages/provincialArea/index",
-          "query": "title=%E4%B8%8A%E6%B5%B7",
-          "scene": null
-        }
-      ]
-    }
-  }
+  "condition": {},
+  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
 }