|
本帖最后由 闰土 于 2016-9-18 13:36 编辑
我做了一个页面,用了一个pannel,在content1里面设置了一个按钮,这个按钮绑定了一个js代码,在按下的时候会执行这个js代码,更新content2里面一个label的显示。但是我现在执行了以后,发现label里面的内容根本就没有发生变化,是什么问题呢?
下面是绑定的代码
- Model.prototype.onClickStartBtn = function(event) {
- this.comp("contents1").to("content_question");
- var curpage = this;
- justep.Baas.sendRequest({
- "url" : "/asthma/ApplyQuestion",
- "action" : "getQuestion",
- "async" : false,
- "params" : {"type" : "self-test",
- "number" : 1,
- },
- "success" : function(data) {
- /* 获取对应的数据 */
- var topic = data.res.questionid + "." + data.res.question_context;
- curpage.comp("output_context").text = topic;
- }
- });
- };
复制代码 |
|