liyongli 1 jaar geleden
bovenliggende
commit
0136cefca2

+ 48 - 7
cloudfunctions/server/controller/article/index.js

@@ -1,14 +1,17 @@
-
-
-const { formmat } = require("../../utils/http");
-const { ArticleService} = require("../../service/index");
+const {
+  formmat
+} = require("../../utils/http");
+const {
+  ArticleService
+} = require("../../service/index");
 async function getArticleController(data) {
   let article = {};
   let code = 0;
   let msg = "ok";
-  try{
+  try {
     article = await ArticleService(data);
-  }catch{
+  } catch (err) {
+    console.log(err)
     code = 500;
     msg = "err";
   }
@@ -16,6 +19,44 @@ async function getArticleController(data) {
 }
 
 
+const {
+  db,
+  _
+} = require("../../utils/http");
+async function test(data) {
+  console.log('------------------')
+  try {
+    await db.collection('article').where({
+      _id: _.neq(0)
+    }).update({
+      data: {
+        activity_name: '盛世中华 何以中国',
+        activice_name: _.remove()
+      }
+    });
+    await db.collection('schedule').where({
+      _id: _.neq(0)
+    }).update({
+      data: {
+        activity_name: '盛世中华 何以中国',
+        activice_name: _.remove()
+      }
+    });
+    await db.collection('live').where({
+      _id: _.neq(0)
+    }).update({
+      data: {
+        activity_name: '盛世中华 何以中国',
+        activice_name: _.remove()
+      }
+    });
+  } catch (error) {
+    console.log(error)
+  }
+  return formmat({}, 0, '')
+}
+
 module.exports = {
-  getArticleController
+  getArticleController,
+  test
 }

+ 10 - 4
cloudfunctions/server/index.js

@@ -9,11 +9,13 @@ const {
   getArticleController,
   getScheduleController,
   getLiveController,
-  getLiveListController
+  getLiveListController,
+  test
 } = require("./controller/index");
 cloud.init({
-  env: 'shengshi-5gwo482xaec28676'
+  env: 'medium-4gx7s66sd1698f5a'
 })
+const { db, _ } = require("./utils/http");
 // 云函数入口函数
 exports.main = async (event, context) => {
   switch (event.type) {
@@ -22,12 +24,12 @@ exports.main = async (event, context) => {
       return MediaController(event);
     }
 
-    case "getMediaOnceController": {
+    case "getMediaOnceController": { // 1
       delete event.type
       return MediaOnceController(event)
     }
 
-    case "getArticle": {
+    case "getArticle": { // 1
       delete event.type;
       return getArticleController(event)
     }
@@ -47,6 +49,10 @@ exports.main = async (event, context) => {
       return getLiveListController(event);
     }
 
+    case 'test': {
+      return test()
+    }
+
     default: {
       return {}
     }

+ 6 - 3
cloudfunctions/server/service/live/index.js

@@ -4,13 +4,16 @@ const {
 } = require("../../utils/http");
 async function LiveService(data) {
   const orilist = await db.collection('live').where({
-    live_type: _.eq('live'),
+    _id: _.eq(data.id),
+    activity_name: _.eq(data.activityName)
   }).get();
   return orilist.data[0] || {}
 }
 
-async function LiveServiceList() {
-  const orilist = await db.collection('live').get();
+async function LiveServiceList(data) {
+  const orilist = await db.collection('live').where({
+    activity_name: _.eq(data.activityName)
+  }).get();
   return orilist.data
 }
 

+ 5 - 2
cloudfunctions/server/service/media/index.js

@@ -5,8 +5,10 @@ const {
 async function MediaService(data) {
   const list = [];
   const skip = (data.skip || 0) * (data.limit || 100);
+  console.log('---------------',data)
   const orilist = await db.collection('AudioAndVideo').where({
-    type: _.eq(data.typeMedia)
+    type: _.eq(data.typeMedia),
+    activity_name: _.eq(data.activityName)
   }).skip(skip).limit(data.limit || 100).get();
   const keysOir = {};
 
@@ -45,7 +47,8 @@ async function MediaOnceService(data) {
   const list = [];
   const orilist = await db.collection('AudioAndVideo').where({
     type: _.eq(data.typeMedia),
-    localtion: _.eq(data.group)
+    localtion: _.eq(data.group),
+    activity_name: _.eq(data.activityName)
   }).get();
   const keysOir = {};
   for (let i = 0; i < orilist.data.length; i++) {

+ 2 - 1
cloudfunctions/server/service/schedule/index.js

@@ -7,7 +7,8 @@ async function ScheduleService(data) {
     const startTime = T.getTime();
     const endTime = startTime + 86400000;
     orilist = await db.collection('schedule').where({
-      startTime: _.and(_.gte(startTime), _.lte(endTime))
+      startTime: _.and(_.gte(startTime), _.lte(endTime)),
+      activity_name: _.eq(data.activityName)
     }).get();
   } else {
     orilist = await db.collection('schedule').limit(100).get();

+ 1 - 1
cloudfunctions/server/utils/http.js

@@ -1,6 +1,6 @@
 const cloud = require('wx-server-sdk')
 cloud.init({
-  env: 'shengshi-5gwo482xaec28676'
+  env: 'medium-4gx7s66sd1698f5a'
 })
 const db = cloud.database();
 

+ 1 - 1
miniprogram/app.js

@@ -10,7 +10,7 @@ App({
         //   env 参数决定接下来小程序发起的云开发调用(wx.cloud.xxx)会默认请求到哪个云环境的资源
         //   此处请填入环境 ID, 环境 ID 可打开云控制台查看
         //   如不填则使用默认环境(第一个创建的环境)
-        env: 'shengshi-5gwo482xaec28676',
+        env: 'medium-4gx7s66sd1698f5a',
         traceUser: true,
       })
     }

+ 3 - 2
miniprogram/app.json

@@ -6,13 +6,14 @@
     "pages/videoDetail/index",
     "pages/schedule/index",
     "pages/live/live",
-    "pages/livelist/index"
+    "pages/livelist/index",
+    "pages/activityDetail/index"
   ],
   "window": {
     "backgroundColor": "#F6F6F6",
     "backgroundTextStyle": "light",
     "navigationBarBackgroundColor": "#F6F6F6",
-    "navigationBarTitleText": "盛世中华 何以中国",
+    "navigationBarTitleText": "",
     "navigationBarTextStyle": "black"
   },
   "requiredBackgroundModes": [

+ 13 - 0
miniprogram/list.json

@@ -0,0 +1,13 @@
+{
+  "code": 0,
+  "msg": "ok",
+  "data": {
+    "showList": true,
+    "list": [
+      {
+        "title": "盛世中华 何以中国",
+        "cover": "https://djweb.smcic.net/img/302306190.jpg"
+      }
+    ] 
+  }
+}

+ 114 - 0
miniprogram/pages/activityDetail/index.js

@@ -0,0 +1,114 @@
+import {
+  httpOrther
+} from "../../utils/httpFunc";
+// miniprogram/pages/home/index.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    iconList: [],
+    headTitle: ""
+  },
+  activity: "",
+  clickFunc(data) {
+    const index = data.currentTarget.dataset.index;
+    const item = this.data.iconList[index];
+    let url = ""
+    if (!item.type) return;
+    const parames = `?title=${item.text}&activity=${this.activity}`
+    switch (item.type) {
+      case 'live':
+        url = '/pages/livelist/index' + parames + "&mediaType=" + item.type;
+        break;
+      case 'image':
+      case 'video':
+        url = '/pages/mediaController/index' + parames + "&mediaType=" + item.type;
+        break;
+      case "schedule":
+        url = '/pages/schedule/index' + parames + '&noToday=1';
+        break;
+      default:
+        url = '/pages/detail/detail' + parames + "&id=" + item.id;
+        break;
+    }
+    wx.navigateTo({
+      url
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    if (options.title) {
+      this.activity = decodeURIComponent(options.title)
+      wx.setNavigationBarTitle({
+        title: this.activity
+      });
+    }
+
+    const _this = this;
+    httpOrther({
+      url: `/Applets/shengshizhongguo/json/${options.url}.json?${Date.now()}`,
+      call(res) {
+        _this.setData({
+          iconList: res.list || [],
+          headTitle: res.headTitle || '',
+          headImage: res.headImage || ''
+        })
+      }
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+    wx.hideHomeButton()
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+
+})

+ 4 - 0
miniprogram/pages/activityDetail/index.json

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

+ 21 - 0
miniprogram/pages/activityDetail/index.wxml

@@ -0,0 +1,21 @@
+<!--miniprogram/pages/home/index.wxml-->
+<view class="home">
+  <image class="headImg"	lazy-load mode="scaleToFill" src="{{headImage}}"></image>
+  <view class="title">
+    {{headTitle}}
+  </view>
+  <view class="subTitle" style="height: 20rpx">
+    <!-- 2021年6月16日至19日 -->
+  </view>
+
+  <view class="icon_container">
+    <view class="icon_item_cell" wx:for="{{iconList}}" wx:key="index">
+      <view class="icon_content" data-index="{{index}}" bindtap="clickFunc">
+        <image	lazy-load mode="aspectFit" class="img" src="{{item.url}}"></image>
+        <view class="icon_title">
+          {{item.text}}
+        </view>
+      </view>
+    </view>
+  </view>
+</view>

+ 91 - 0
miniprogram/pages/activityDetail/index.wxss

@@ -0,0 +1,91 @@
+/* miniprogram/pages/home/index.wxss */
+
+.home {
+  padding: 10rpx;
+}
+
+.br {
+  height: 1em;
+}
+
+.home .title {
+  font-size: 16px;
+  text-indent: 2em;
+}
+
+.home .subTitle {
+  font-size: 12px;
+  margin: 10rpx 0;
+  color: #999;
+}
+
+.icon_container {
+  width: 750rpx;
+  margin-left: -10rpx;
+  font-size: 12px;
+  color: #666;
+}
+
+.icon_container .icon_item_cell {
+  box-sizing: border-box;
+  display: inline-block;
+  width: 250rpx;
+  padding: 5rpx;
+}
+
+.icon_container .icon_content {
+  text-align: center;
+  border-radius: 10rpx;
+  padding: 46rpx 0 20rpx 0;
+  box-shadow: 3rpx 3rpx 20rpx rgba(0, 0, 0, .1);
+}
+
+.icon_container .icon_title {
+  padding: 15rpx 0;
+}
+
+.icon_container .img {
+  width: 4em;
+  height: 4em;
+}
+
+.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;
+}
+
+.newList .top {
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 3;
+  overflow: hidden;
+}

+ 7 - 4
miniprogram/pages/detail/detail.js

@@ -1,5 +1,7 @@
 // miniprogram/pages/detail/detail.js
-import { httpCloud } from "../../utils/httpFunc";
+import {
+  httpCloud
+} from "../../utils/httpFunc";
 Page({
 
   /**
@@ -17,7 +19,8 @@ Page({
     const _this = this;
     this.nameText = decodeURIComponent(options.title || "详情");
     this.idText = options.id || "";
-    wx.setNavigationBarTitle({
+
+    options.title && wx.setNavigationBarTitle({
       title: this.nameText
     })
 
@@ -85,8 +88,8 @@ Page({
    */
   onShareAppMessage: function () {
     return {
-      title: this.nameText,  // 分享名称
-      path: 'pages/detail/detail?title=' + this.nameText + '&id=' + this.data.id,  // 点击分享后的链接要来到的页面的路径已经对应需要的参数
+      title: this.nameText, // 分享名称
+      path: 'pages/detail/detail?title=' + this.nameText + '&id=' + this.data.id, // 点击分享后的链接要来到的页面的路径已经对应需要的参数
     }
   },
 

+ 47 - 43
miniprogram/pages/home/index.js

@@ -1,106 +1,110 @@
+// pages/home/index.js
+const {
+  globalData
+} = getApp();
 import {
   httpOrther
 } from "../../utils/httpFunc";
-// miniprogram/pages/home/index.js
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-    iconList: [],
-    headTitle: ""
+    list: [],
+    heights: []
+  },
+  title: '',
+  showBack() {
+    const _this = this;
+    httpOrther({
+      url: `/Applets/shengshizhongguo/json/list.json?${Date.now()}`,
+      call(res) {
+        const defaultItem = (res.list || [])[0]
+        if (!res.showList) {
+          wx.redirectTo({
+            url: `/pages/activityDetail/index?url=${defaultItem.fileName}&title=${defaultItem.title}`
+          })
+          return
+        }
+        _this.setData({
+          list: res.list || []
+        })
+      }
+    })
   },
 
-  clickFunc(data) {
-    const index = data.currentTarget.dataset.index;
-    const item = this.data.iconList[index];
-    let url = ""
-    if (!item.type) return
-    switch (item.type) {
-      case 'live':
-        url = '/pages/livelist/index?title=' + item.text + "&mediaType=" + item.type;
-        break;
-      case 'image':
-      case 'video':
-        url = '/pages/mediaController/index?title=' + item.text + "&mediaType=" + item.type;
-        break;
-      case "schedule":
-        url = '/pages/schedule/index?noToday=1&title=' + item.text;
-        break;
-      default:
-        url = '/pages/detail/detail?title=' + item.text + "&id=" + item.id;
-        break;
-    }
+  toDetail(e) {
     wx.navigateTo({
-      url
+      url: '/pages/activityDetail/index?url=' + e.currentTarget.dataset.file + '&title=' + e.currentTarget.dataset.title
+    })
+  },
+
+  imageload(e) {
+    let width = globalData.client.screenWidth * 73 / 75;
+    const ori = JSON.parse(JSON.stringify(this.data.heights));
+    ori[e.currentTarget.dataset.index || 0] = width * e.detail.height / globalData.client.screenWidth;
+    this.setData({
+      heights: ori
     })
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad: function () {
-    const _this = this;
-    httpOrther({
-      url: '/Applets/shengshizhongguo/json/shengshi.json?' + Date.now(),
-      call(res) {
-        _this.setData({
-          iconList: res.list || [],
-          headTitle: res.headTitle || '',
-          headImage: res.headImage || ''
-        })
-      }
+  onLoad(options) {
+    wx.setNavigationBarTitle({
+      title: '媒体行',
     })
+    this.showBack();
   },
 
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
-  onReady: function () {
+  onReady() {
 
   },
 
   /**
    * 生命周期函数--监听页面显示
    */
-  onShow: function () {
+  onShow() {
 
   },
 
   /**
    * 生命周期函数--监听页面隐藏
    */
-  onHide: function () {
+  onHide() {
 
   },
 
   /**
    * 生命周期函数--监听页面卸载
    */
-  onUnload: function () {
+  onUnload() {
 
   },
 
   /**
    * 页面相关事件处理函数--监听用户下拉动作
    */
-  onPullDownRefresh: function () {
+  onPullDownRefresh() {
 
   },
 
   /**
    * 页面上拉触底事件的处理函数
    */
-  onReachBottom: function () {
+  onReachBottom() {
 
   },
 
   /**
    * 用户点击右上角分享
    */
-  onShareAppMessage: function () {
+  onShareAppMessage() {
 
   }
-
 })

+ 1 - 2
miniprogram/pages/home/index.json

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

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

@@ -1,21 +1,5 @@
-<!--miniprogram/pages/home/index.wxml-->
-<view class="home">
-  <image class="headImg"	lazy-load mode="scaleToFill" src="{{headImage}}"></image>
-  <view class="title">
-    {{headTitle}}
-  </view>
-  <view class="subTitle" style="height: 20rpx">
-    <!-- 2021年6月16日至19日 -->
-  </view>
-
-  <view class="icon_container">
-    <view class="icon_item_cell" wx:for="{{iconList}}" wx:key="index">
-      <view class="icon_content" data-index="{{index}}" bindtap="clickFunc">
-        <image	lazy-load mode="aspectFit" class="img" src="{{item.url}}"></image>
-        <view class="icon_title">
-          {{item.text}}
-        </view>
-      </view>
-    </view>
-  </view>
-</view>
+<!--pages/home/index.wxml-->
+<view class="homelist" wx:for="{{list}}" wx:key="title" data-file="{{item.fileName}}" data-title="{{item.title}}" bind:tap="toDetail">
+  <image bindload="imageload" style="{{heights[index] + 'px'}}" data-index="{{index}}" class="image" wx:if="{{item.cover}}" src="{{item.cover}}" />
+  <view class="title">{{item.title}}</view>
+</view>

+ 22 - 81
miniprogram/pages/home/index.wxss

@@ -1,91 +1,32 @@
-/* miniprogram/pages/home/index.wxss */
-
-.home {
-  padding: 10rpx;
-}
-
-.br {
-  height: 1em;
-}
-
-.home .title {
-  font-size: 16px;
-  text-indent: 2em;
-}
-
-.home .subTitle {
-  font-size: 12px;
-  margin: 10rpx 0;
-  color: #999;
-}
-
-.icon_container {
-  width: 750rpx;
-  margin-left: -10rpx;
-  font-size: 12px;
-  color: #666;
-}
-
-.icon_container .icon_item_cell {
-  box-sizing: border-box;
-  display: inline-block;
-  width: 250rpx;
-  padding: 5rpx;
-}
-
-.icon_container .icon_content {
-  text-align: center;
-  border-radius: 10rpx;
-  padding: 46rpx 0 20rpx 0;
-  box-shadow: 3rpx 3rpx 20rpx rgba(0, 0, 0, .1);
-}
-
-.icon_container .icon_title {
-  padding: 15rpx 0;
-}
-
-.icon_container .img {
-  width: 4em;
-  height: 4em;
+/* pages/home/index.wxss */
+.homelist{
+  position: relative;
+  width: 730rpx;
+  overflow: hidden;
+  margin: 0 auto;
+  border-radius: 15rpx;
+  box-shadow: #ccc 0  0  10rpx;
 }
 
-.videoList {
-  margin-bottom: 20rpx;
+.image{
+  min-height: 400rpx;
+  width: 730rpx;
 }
 
-.videoList .title {
-  overflow: hidden;
-  text-overflow: ellipsis;
+.title{
+  padding: 15rpx 10rpx;
   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;
+  text-overflow: ellipsis;
 }
 
-.newList .newsTitle {
-  width: 100%;
-  height: 240rpx;
+.tag{
+  position: absolute;
+  border-radius: 15rpx;
+  color: #fff;
+  background-color: #aaaaaa;
+  padding: 5rpx 10rpx;
   font-size: 14px;
-  margin-top: -240rpx;
-  padding: 20rpx 10rpx 20rpx 250rpx;
-  box-sizing: border-box;
-}
-
-.newList .top {
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 3;
-  overflow: hidden;
+  top: 5rpx;
+  left: 5rpx;
 }

+ 11 - 5
miniprogram/pages/live/live.js

@@ -12,18 +12,25 @@ Page({
     liveData: {},
     list: []
   },
-
+  activity: "",
+  id: "",
   getDate() {
     const _this = this;
     httpCloud({
       name: "server",
       type: "getLiveData",
-      data: {},
+      data: {
+        activityName: _this.activity,
+        id: _this.id
+      },
       call(res) {
         const obj = res || {};
         _this.setData({
           liveData: obj
         })
+        wx.setNavigationBarTitle({
+          title: decodeURIComponent(obj.title)
+        })
       }
     })
   },
@@ -42,9 +49,8 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-    wx.setNavigationBarTitle({
-      title: decodeURIComponent(options.title || "盛世中华 何以中国")
-    })
+    this.activity = options.activityName;
+    this.id = options.id;
     this.getDate();
   },
 

+ 9 - 4
miniprogram/pages/livelist/index.js

@@ -10,16 +10,17 @@ Page({
   data: {
     list: []
   },
-  title: '',
+  activity: '',
   showBack() {
     const _this = this;
     httpCloud({
       name: "server",
       type: "getLiveListData",
-      data: {},
+      data: {
+        activityName: _this.activity
+      },
       call(res) {
         const r = res || [];
-        console.log(r)
         _this.setData({
           list: r,
         })
@@ -30,7 +31,7 @@ Page({
   toDetail(e){
     if(!e.currentTarget.dataset.id) return
     wx.navigateTo({
-      url: '/pages/live/live?title=' + this.title + '&id=' + e.currentTarget.dataset.id
+      url: '/pages/live/live?id=' + e.currentTarget.dataset.id + '&activityName=' + this.activity
     })
   },
 
@@ -38,6 +39,10 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
+    this.activity = options.activity;
+    options.title && wx.setNavigationBarTitle({
+      title: decodeURIComponent(options.title)
+    })
     this.showBack();
   },
 

+ 4 - 1
miniprogram/pages/mediaController/index.js

@@ -17,6 +17,7 @@ Page({
   nameText: "",
   page: 0,
   limit: 100,
+  activityName: '',
 
   getDate() {
     const _this = this;
@@ -26,7 +27,8 @@ Page({
       data: {
         typeMedia: this.mediaType,
         page: this.page,
-        limit: this.limit
+        limit: this.limit,
+        activityName: this.activityName
       },
       call(res) {
         if (!res.length) {
@@ -53,6 +55,7 @@ Page({
   onLoad(options) {
     this.nameText = decodeURIComponent(options.title || "详情");
     this.mediaType = options.mediaType || 'image';
+    this.activityName = options.activity;
     wx.setNavigationBarTitle({
       title: this.nameText
     })

+ 12 - 6
miniprogram/pages/schedule/index.js

@@ -1,6 +1,10 @@
 // pages/schedule/index.js
-import { httpCloud } from "../../utils/httpFunc";
-import { dateFormmat } from "../../utils/tool";
+import {
+  httpCloud
+} from "../../utils/httpFunc";
+import {
+  dateFormmat
+} from "../../utils/tool";
 Page({
 
   /**
@@ -9,18 +13,20 @@ Page({
   data: {
     list: []
   },
-
+  activity: "",
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-    wx.setNavigationBarTitle({
+    options.title && wx.setNavigationBarTitle({
       title: decodeURIComponent(options.title || "详情")
     })
     const _this = this;
     let ST = dateFormmat();
-    let p = {};
-    if(!options.noToday) p.start = ST.year + '-' + ST.month + '-' + ST.day + ' 00:00:00'
+    let p = {
+      activityName: options.activity
+    };
+    if (!options.noToday) p.start = ST.year + '-' + ST.month + '-' + ST.day + ' 00:00:00'
     httpCloud({
       name: "server",
       type: "getSchedule",

+ 8 - 10
project.config.json

@@ -20,8 +20,6 @@
     "uploadWithSourceMap": true,
     "compileHotReLoad": false,
     "useMultiFrameRuntime": false,
-    "useApiHook": false,
-    "useApiHostProcess": false,
     "babelSetting": {
       "ignore": [],
       "disablePlugins": [],
@@ -37,11 +35,10 @@
     "ignoreUploadUnusedFiles": true,
     "condition": false,
     "skylineRenderEnable": false,
-    "minifyWXML": true
+    "minifyWXML": true,
+    "useApiHook": false,
+    "useApiHostProcess": false
   },
-  "appid": "wxcbc23a7780c48db2",
-  "projectname": "miniprogram-1",
-  "libVersion": "2.14.1",
   "cloudfunctionTemplateRoot": "cloudfunctionTemplate/",
   "condition": {
     "search": {
@@ -68,12 +65,13 @@
   },
   "compileType": "miniprogram",
   "srcMiniprogramRoot": "miniprogram/",
+  "editorSetting": {
+    "tabIndent": "insertSpaces",
+    "tabSize": 2
+  },
   "packOptions": {
     "ignore": [],
     "include": []
   },
-  "editorSetting": {
-    "tabIndent": "insertSpaces",
-    "tabSize": 2
-  }
+  "appid": "wx2f9a2289b067525d"
 }

+ 1 - 1
project.private.config.json

@@ -25,5 +25,5 @@
   },
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
   "libVersion": "2.14.1",
-  "projectname": "%E7%9B%9B%E4%B8%96%E4%B8%AD%E5%8D%8E%EF%BC%8C%E4%BD%95%E4%BB%A5%E4%B8%AD%E5%9B%BD"
+  "projectname": "trafficBroadcast-xibuxinchuanmei"
 }