Browse Source

屏蔽一些小程序审核不过的功能

master
xuxu 5 years ago
parent
commit
050b73b1a0
  1. 10
      app.js
  2. BIN
      images/temp_1.png
  3. 17
      pages/resource/list/index.js
  4. 2
      pages/resource/list/index.wxml
  5. 6
      pages/topics/interactive/submitTopic/index.js
  6. 36
      pages/topics/interactive/submitTopic/index.wxml

10
app.js

@ -18,6 +18,13 @@ App({
http.fetchAuthToken(res => { http.fetchAuthToken(res => {
// console.log(res) // console.log(res)
}) })
http.getConfig(res=>{
if(res.result.projectFlag == 1){
this.globalData.flag = 1;
}
})
}, },
globalData: { globalData: {
userInfo: null, userInfo: null,
@ -27,6 +34,7 @@ App({
faceImg:'', faceImg:'',
}, },
windowHeight:'', windowHeight:'',
screenHeight:'' screenHeight:'',
flag:0
} }
}) })

BIN
images/temp_1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

17
pages/resource/list/index.js

@ -34,13 +34,26 @@ Component({
} }
if(this.properties.tp == '1'){ // 资源列表 if(this.properties.tp == '1'){ // 资源列表
if(e.currentTarget.dataset.url){ if(e.currentTarget.dataset.url){ // 跳转网站
wx.navigateTo({ wx.navigateTo({
url: '/pages/resource/navigate/index?url=' + encodeURIComponent(e.currentTarget.dataset.url) url: '/pages/resource/navigate/index?url=' + encodeURIComponent(e.currentTarget.dataset.url)
}) })
return; return;
}else{ }else if(e.currentTarget.dataset.appid){ // 跳转小程序
wx.navigateToMiniProgram({
appId: e.currentTarget.dataset.appid,
// path: 'page/index/index?id=123',
extraData: {
// foo: 'bar'
},
envVersion: 'release',
success(res) {
// 打开成功
}
})
return;
}else{ // 查看详情
wx.navigateTo({ wx.navigateTo({
url: '/pages/resource/detail/index?id=' + e.currentTarget.dataset.id url: '/pages/resource/detail/index?id=' + e.currentTarget.dataset.id
}) })

2
pages/resource/list/index.wxml

@ -1,6 +1,6 @@
<!--pages/resource/list/index.wxml--> <!--pages/resource/list/index.wxml-->
<view class="container"> <view class="container">
<view class="column" wx:for="{{ list }}" bindtap="detail" data-id="{{item.id}}" data-url="{{item.url}}"> <view class="column" wx:for="{{ list }}" bindtap="detail" data-id="{{item.id}}" data-url="{{item.url}}" data-appid="{{item.appid}}">
<view class="left"> <view class="left">
<block wx:if="{{tp == '1'}}"> <block wx:if="{{tp == '1'}}">
<view class="articleImg"> <view class="articleImg">

6
pages/topics/interactive/submitTopic/index.js

@ -3,7 +3,7 @@ import { config } from '../../../../config.js'
import { store } from '../../../../utils/store.js' import { store } from '../../../../utils/store.js'
import { TopicModel } from '../../../../models/topic.js' import { TopicModel } from '../../../../models/topic.js'
let topicModel = new TopicModel() let topicModel = new TopicModel()
const app = getApp()
Page({ Page({
/** /**
@ -12,7 +12,8 @@ Page({
data: { data: {
topicTitle:"", topicTitle:"",
topicDetail:"", topicDetail:"",
files:[] files:[],
flag:0
}, },
/** /**
@ -20,6 +21,7 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
flag:app.globalData.flag,
uplaodFile: this.uplaodFile.bind(this) uplaodFile: this.uplaodFile.bind(this)
}) })
}, },

36
pages/topics/interactive/submitTopic/index.wxml

@ -1,22 +1,24 @@
<!--pages/topics/interactive/submitTopic/index.wxml--> <!--pages/topics/interactive/submitTopic/index.wxml-->
<view class="container"> <block wx:if="{{flag}}">
<view class="item"> <view class="container">
<view class="must_fill">*</view>
<input class="title" maxlength="95" value="{{topicTitle}}" bindinput="bindTextInput" placeholder="议题标题"></input>
</view>
<view class="line-view"></view>
<view class="item"> <view class="item">
<view class="must_fill">*</view> <view class="must_fill">*</view>
<textarea class="textArea" maxlength="1000" value="{{topicDetail}}" bindinput="bindTextAreaInput" placeholder="议题内容" /> <input class="title" maxlength="95" value="{{topicTitle}}" bindinput="bindTextInput" placeholder="议题标题"></input>
</view> </view>
<mp-cells ext-class="uploader_bd"> <view class="line-view"></view>
<mp-cell> <view class="item">
<mp-uploader ext-class="myUploader" binddelete="deleteFile" upload="{{uplaodFile}}" files="{{files}}" max-count="9" delete="true"></mp-uploader> <view class="must_fill">*</view>
</mp-cell> <textarea class="textArea" maxlength="1000" value="{{topicDetail}}" bindinput="bindTextAreaInput" placeholder="议题内容" />
</mp-cells> </view>
<view class="btnView">
<e-ibutton title="提交" bind:onTap="submit"/> <mp-cells ext-class="uploader_bd">
<mp-cell>
<mp-uploader ext-class="myUploader" binddelete="deleteFile" upload="{{uplaodFile}}" files="{{files}}" max-count="9" delete="true"></mp-uploader>
</mp-cell>
</mp-cells>
<view class="btnView">
<e-ibutton title="提交" bind:onTap="submit"/>
</view>
</view> </view>
</view> </block>
Loading…
Cancel
Save