提交 5e1bf3b8 authored 作者: zhenglide's avatar zhenglide

外部参会人员 修改问题

上级 13fc9683
......@@ -283,16 +283,78 @@ Page({
onLoad: function(query) {
var _this=this;
//获取是否已有添加外部人员记录
if(query.signListJson!=null && JSON.parse(query.signListJson).length!=0){
var signList=JSON.parse(query.signListJson);
var cacheSignList
dd.getStorage({
key: 'signList',
success: function(res) {
//console.log(res.data);
if(res.data==null) {
cacheSignList =[];
}else {
cacheSignList=res.data;
for(var i=0;i<cacheSignList.length;i++){
if(cacheSignList[i].signId!=null){
cacheSignList.splice(i,1);
}
}
}
//添加参会人员
for(var i=0;i<signList.length;i++){
cacheSignList.push(signList[i]);
}
//将新加的参会人员加入缓存中
dd.setStorage({
key: 'signList',
data:cacheSignList,
success: function() {
//提示添加成功
dd.setStorage({
key:'signList',
data:cacheSignList
})
// var signList2= _this.data.signList;
// signList2=signList;
_this.setData({
cacheSignList
})
//添加一个外部人员是否添加成功标
}
});
},
fail: function(res){
dd.alert({content: res.errorMessage});
}
});
}
dd.getStorage({
key:'signList',
success:function(res){
var signList=res.data;
var signList=res.data;
_this.setData({
signList
})
}
})
},
onReady(query) {
......
......@@ -53,7 +53,7 @@
<text>公司参与人员</text>
<text class='left'>〉</text>
</navigator>
<navigator url="../ex_visitor/ex_visitor?mid={{mid}}" open-type="navigate" class='item-avatar-xs'>
<navigator url="../ex_visitor/ex_visitor?signListJson={{signListJson}}" open-type="navigate" class='item-avatar-xs'>
<text>邀请外部人员</text>
<text class='left'>〉</text>
</navigator>
......
......@@ -21,7 +21,7 @@ Page({
showView: false,
dates: dateFtt("yyyy-MM-dd", new Date()),
topicList: [],
// signList:'',
signListJson:'',
text: '',
cnum:'',
allTime: {
......@@ -996,12 +996,14 @@ clearBox:(startTime,endTime,startIndex,endIndex,timeList,_this)=>{
topicList.push(list[t].topicName);
}
var signListJson=JSON.stringify(res.data.result.signsList);
console.log("topicList",topicList)
_this.setData({
message: res.data.result,
mid:res.data.result.messageId,
messageContent: res.data.result.messageContent,
topicList:topicList
topicList:topicList,
signListJson:signListJson
});
var noticeList= _this.data.noticeList;
......
......@@ -93,10 +93,17 @@ Page({
},
onReady() {
// 页面加载完成
},
onShow() {
// 页面显示
dd.removeStorage({
key:'signList',
success:function(res){
//console.log('清除已添加外部人员记录成功');
}
})
var that = this;
var userId = app.globalData.userId;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论