{"size": 1276, "ext": "js", "max_stars_repo_path": "pages/blackboard/blackboard.js", "max_stars_repo_name": "zslzhaoshuli/wechatMap", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "pages/blackboard/blackboard.js", "max_issues_repo_name": "zslzhaoshuli/wechatMap", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "pages/blackboard/blackboard.js", "max_forks_repo_name": "zslzhaoshuli/wechatMap", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.380952381, "max_line_length": 101, "alphanum_fraction": 0.4631661442}
// pages/blackboard/blackboard.js
var path = require('../../utils/util.js');
Page({
    data: {
        institutionid:'',
        schoolid:'',
        link:'',
        content:''
    },
    onLoad: function (options) {
        this.setData({
            institutionid: options.institutionid,
            schoolid: options.schoolid 
        })
        this.blackboardInfo();
    },
    //查询小黑板信息
    blackboardInfo:function() {
        let that = this;
        wx.request({
            url: path.serverPath + path.path + 'artmap/selectBlackboardByAddressId', //仅为示例，并非真实的接口地址
            method: 'POST',
            header: { "Content-Type": "application/x-www-form-urlencoded" },
            success: function (res) {
                console.log(res);
                if (res.data.success) {
                    let DataList = res.data.body.DataList;
                    let content = DataList[0].desc1;
                    let link = DataList[0].link;
                   that.setData({
                       content: content,
                       link: link
                   })
                }
            },
            data: {
                'institutionId': that.data.institutionid,
                'addressId': that.data.schoolid
            }
        })
    }
})