liyongli 1 vuosi sitten
vanhempi
commit
25a6ba9521

+ 3 - 1
app.json

@@ -7,7 +7,9 @@
     "pages/expert/index",
     "pages/admin/index",
     "pages/downZS/index",
-    "pages/userData/index"
+    "pages/userData/index",
+    "pages/webview/index",
+    "pages/sph/index"
   ],
   "window": {
     "navigationBarTextStyle": "white",

BIN
images/shgl.png


+ 1 - 2
pages/application/index.js

@@ -14,7 +14,7 @@ Page({
    * 页面的初始数据
    */
   data: {
-    selectArea: [0, 0, 0],
+    multiIndex: [0, 0, 0],
     multiArray: [],
     uploadheight: 0,
     local_image_url: ''
@@ -23,7 +23,6 @@ Page({
   changeSelectArea: [0, 0, 0],
 
   bindMultiPickerChange: function (e) {
-    console.log('picker发送选择改变,携带值为', e.detail.value)
     this.setData({
       multiIndex: e.detail.value
     })

+ 1 - 2
pages/expert/index.json

@@ -3,7 +3,6 @@
   "usingComponents": {
     "Container": "../../component/container/index",
     "van-row": "@vant/weapp/row/index",
-    "van-col": "@vant/weapp/col/index",
-    "van-image": "@vant/weapp/image/index"
+    "van-col": "@vant/weapp/col/index"
   }
 }

+ 0 - 1
pages/index/index.js

@@ -14,7 +14,6 @@ Page({
       api: "/topic/tool/img/%E5%B0%91%E5%84%BF%E4%B9%A6%E7%94%BB%E5%A4%A7%E8%B5%9B/home.json?data=" +
         Date.now()
     }).then(res => {
-      console.log(res)
       this.setData({
         ori: res || {}
       })

+ 33 - 1
pages/previousEditions/index.js

@@ -14,7 +14,39 @@ Page({
    * 页面的初始数据
    */
   data: {
-    line_height: 0
+    line_height: 0,
+    list: [
+      {
+        title: "标题",
+        url: "https://mp.weixin.qq.com/s/wu39DuMtudT1wtHWz50Caw",
+        cover: "",
+        type: "gzh", // gzh - 公众号; sph - 视频号;
+      },
+      {
+        title: "标题",
+        url: "https://mp.weixin.qq.com/s/wu39DuMtudT1wtHWz50Caw",
+        sph_id: "sph7mSoe3G6cQ1t",
+        sp_id: "export/UzFfAgtgekIEAQAAAAAADbYVpu2JywAAAAstQy6ubaLX4KHWvLEZgBPEwYMEKDMcUJyFzNPgMJo0tEtDS5McWvLoxfegJKYu",
+        type: "sph", // gzh - 公众号; sph - 视频号;
+      },
+    ]
+  },
+
+  toNext(e){
+    const item = this.data.list[e.currentTarget.dataset.index]
+    if (item.type === 'gzh'){
+      wx.navigateTo({
+        url: "/pages/webview/index?url=" + item.url
+      })
+      return
+    }
+    if (item.type === 'sph'){
+      wx.openChannelsActivity({
+        finderUserName: item.sph_id,
+        feedId: item.sp_id,
+      })
+      return
+    }
   },
 
   loadimge(e) {

+ 6 - 3
pages/previousEditions/index.wxml

@@ -3,10 +3,13 @@
   <view class="index_main">
     <Container style="margin-top: -100rpx;">
       <view class="list">
-        <view class="item">
-          <view class="title">这是标题</view>
+        <view bind:tap="toNext" data-index="{{index}}" style="margin-bottom: 15rpx;" wx:for="{{list}}" wx:key="index">
+          <view class="item">
+            <image wx:if="{{item.cover}}" src="{{item.cover}}" />
+            <view class="title">{{item.title}}</view>
+          </view>
+          <image wx:if="{{index <= list.length - 1}}" class="image" src="../../images/Line.png" bindload="loadimge" style="{{'height:' + line_height + 'px'}}" />
         </view>
-        <image class="image" src="../../images/Line.png" bindload="loadimge" style="{{'height:' + line_height + 'px'}}"/>
       </view>
     </Container>
   </view>

+ 4 - 0
pages/previousEditions/index.wxss

@@ -35,6 +35,10 @@
   line-height: 1.5em;
   padding: 0 10rpx;
   box-sizing: border-box;
+  font-size: 30rpx;
+  white-space: nowrap; /* 防止文本换行 */  
+  overflow: hidden; /* 隐藏超出容器的内容 */  
+  text-overflow: ellipsis; /* 在超出内容的地方显示省略号 */  
 }
 
 .image {

+ 72 - 0
pages/sph/index.js

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

+ 3 - 0
pages/sph/index.json

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

+ 2 - 0
pages/sph/index.wxml

@@ -0,0 +1,2 @@
+<!--pages/sph/index.wxml-->
+<channel-video binderror="error" class="cvideo" autoplay="{{true}}" feed-id="{{sp_id}}" finder-user-name="{{sph_id}}"></channel-video>

+ 5 - 0
pages/sph/index.wxss

@@ -0,0 +1,5 @@
+/* pages/sph/index.wxss */
+.cvideo{
+  width: 750rpx;
+  height: 100vh;
+}

+ 1 - 1
pages/us/index.wxml

@@ -25,7 +25,7 @@
       </van-cell>
       <van-cell is-link url="/pages/admin/index">
         <view slot="title" class="title">
-          <image src="../../images/expert.png" class="icon" />
+          <image src="../../images/shgl.png" class="icon" />
           管理员审核
         </view>
       </van-cell>

+ 68 - 0
pages/webview/index.js

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

+ 4 - 0
pages/webview/index.json

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

+ 2 - 0
pages/webview/index.wxml

@@ -0,0 +1,2 @@
+<!--pages/webview/index.wxml-->
+<web-view src="{{url}}"></web-view>

+ 1 - 0
pages/webview/index.wxss

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

+ 15 - 2
project.private.config.json

@@ -2,7 +2,20 @@
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
   "projectname": "shaoershuhuaxiaochengxu",
   "setting": {
-    "compileHotReLoad": true
+    "compileHotReLoad": true,
+    "urlCheck": true
   },
-  "condition": {}
+  "condition": {
+    "miniprogram": {
+      "list": [
+        {
+          "name": "pages/sph/index",
+          "pathName": "pages/sph/index",
+          "query": "sph_id=sph7mSoe3G6cQ1t&sp_id=export%2FUzFfAgtgekIEAQAAAAAADbYVpu2JywAAAAstQy6ubaLX4KHWvLEZgBPEwYMEKDMcUJyFzNPgMJo0tEtDS5McWvLoxfegJKYu",
+          "launchMode": "default",
+          "scene": null
+        }
+      ]
+    }
+  }
 }