123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- mui.ready(function() {
- mui.plusReady(function() {
- var userid = plus.storage.getItem('userid');
- var ws = plus.webview.currentWebview();
- function personalMessage() {
- mui.ajax(baseUrl + "/ajax/resource/" + ws.rsId, {
- dataType: 'json',
- type: 'GET',
- timeout: 10000,
- success: function(data) {
- plus.nativeUI.closeWaiting();
- ws.show("slide-in-right", 150);
- var $data = data.data;
-
- if($data.descp)
- document.getElementsByClassName("textareabox ")[0].innerText = $data.descp;
- },
- error: function() {
- plus.nativeUI.toast("服务器链接超时", toastStyle);
- return;
- }
- });
- }
- document.getElementsByClassName("topsave")[0].addEventListener("tap", function() {
- mui.ajax(baseUrl + '/ajax/resource/descp', {
- data: {
- "resourceId": ws.rsId,
- "descp": document.getElementsByClassName("textareabox ")[0].value
- },
- dataType: 'json',
- async: true,
- type: 'POST',
- timeout: 10000,
- success: function(data) {
- console.log(data.success);
- if(data.success) {
- plus.nativeUI.showWaiting();
- var web = plus.webview.getWebviewById("resinforupdate.html");
- mui.fire(web, "resourceMess");
- mui.back();
- if(ws.reFlag==0) {
- var web1 = plus.webview.getWebviewById("html/proinforupdate.html");
- mui.fire(web1,"newId",{rd:1});
- }else if(ws.reFlag==1){
- var web2 = plus.webview.getWebviewById("html/companyUpdata.html");
- mui.fire(web2,"newId",{rd:1});
- }else if(ws.reFlag==2){
- var web2 = plus.webview.getWebviewById("html/studentUpdata.html");
- mui.fire(web2,"newId",{rd:1});
- }
-
- }
- },
- error: function() {
- plus.nativeUI.toast("服务器链接超时", toastStyle);
- return;
- }
- });
- });
- personalMessage();
- });
- })
|