Home > front end >  I have a crush on a js, want to do a bit of improvement, I too like the js, great spirit into
I have a crush on a js, want to do a bit of improvement, I too like the js, great spirit into

Time:09-22

The function RefusedApply (uid) {
Var refuseurl='{PHP echo wmurl (" group/members ", array (" submit "=& gt;" Yes ", "status"=& gt; 2, "gid"=& gt; The $group (" id ")))} & amp; Uid='+ uid;
Var btnArray=[' cancel ', 'sure'];
Mui. Prompt (" please enter descr ', 'such as the reason of delete', '{$_W (" account ")/" name "}', btnArray, function (e) {
If (e.i ndex==1) {
If (e.v alue!=' ') {
Refuseurl +='& amp; Remark='+ e.v alue.//remark to descr field
Var Callback=function (obj) {
If (obj type=='success') {
$(' groupmemberitem '+ uid), remove ();//remove to delete
}
}
AjaxView (refuseurl, Callback);
} else {
Util. Toast (' please enter descr ', ' 'and' error ');
return false;
}
}
})
}


HTML code:



A great god, and this is a use delete data operation,
And I want to achieve is a modified data operation,
I now have a "yuangong" field of the default value is 0,
I want to use such a js to amend the "yuangong" the value of the field to 1
Because don't know how to write the operation to modify the data, since the consult becoming
Thank god!

CodePudding user response:

Wasn't a great god to help ah, maybe you will feel js modify data is not achieve them, but the js member can delete data, that attracts me now this js function to modify the data effect
The function RefusedApply (uid) {
Var refuseurl='{PHP echo wmurl (" group/members ", array (" submit "=& gt;" Yes ", "status"=& gt; 2, "gid"=& gt; The $group (" id ")))} & amp; Uid='+ uid;
Var btnArray=[' cancel ', 'sure'];
Mui. Prompt (" please enter descr ', 'such as the reason of delete', '{$_W (" account ")/" name "}', btnArray, function (e) {
If (e.i ndex==1) {
If (e.v alue!=' ') {
Refuseurl +='& amp; Remark='+ e.v alue.//remark to descr field
Var Callback=function (obj) {
If (obj type=='success') {
$(' groupmemberitem '+ uid), remove ();//remove to delete
}
}
AjaxView (refuseurl, Callback);
} else {
Util. Toast (' please enter descr ', ' 'and' error ');
return false;
}
}
})
}


HTML code:

This code is deleted members don't have any problems
What a great god, and to help change, make the js can modify the data,
Thank you for the great god

CodePudding user response:

No problem you can't directly use the
 



Change interface to edit, click the edit button request API mandatory change yuangong field to 1 and then to obtain the list data

CodePudding user response:

A great god, and I don't know should how to delete the interface for editing interface
Still hope the great god help some directions, how should the interface for editing
Thanks for a great god

CodePudding user response:

All say so clearly on the ground floor, add a judgment, change submitted address not to go, I don't know what you are entangled with the

CodePudding user response:

This address how to write ah, I don't know, since I don't know what ask you these great god

CodePudding user response:

refer to the second floor jio can reply:
no problem you can't directly use the
 



Change interface to edit, click the edit button request API mandatory change yuangong field to 1 and then to obtain the list data



A great god, and I don't know how to write, help bai

CodePudding user response:

 
The function RefusedApply (uid) {
//group/members API path to edit parameters, API through uid modify the corresponding employee data
Var refuseurl='{PHP echo wmurl (" group/members ", array (" submit "=& gt;" Yes ", "status"=& gt; 2, "gid"=& gt; The $group (" id ")))} & amp; Uid='+
Uid;
Var btnArray=[' cancel ', 'sure'];
Mui. Prompt (' confirm changes state employees? ', 'prompt', btnArray, function (e) {
If (e.i ndex==1) {
Refuseurl +='& amp; Remark='+ e.v alue.
Var Callback=function (obj) {
If (obj type=='success') {
//edit success to reload data
}
}
//request API
AjaxView (refuseurl, Callback);
}
})
}

CodePudding user response:

Refuseurl +='& amp; Remark='+ e.v alue.
Don't need this line

CodePudding user response:

Thanks to the great god is trying to help, but still won't do, prompt as if there is something wrong with the post, I think it should be a wrong path
Help me write a path again, ok?
I posted a path of writing with reference to the, to help write a edit paths, thank humbly great god!
According to the code below, write a edit group_members yuangong field values in the table data path
 

The public function main () {
Global $_W, $_GPC, $_S;
if(! $this - & gt; Group) wmessage (' msg_dialog_nofound, wmurl (), "info");
The $group=$this - & gt; Group;
$groupname=$group [' ischannel]? $_S [' channel '] [' text '] : lang (' text_groupname ');
If ($_GPC [' submit ']=='yes') {
If ($group [' uid]!=$_W [' member '] [' uid]) wmessage (' msg_illegal_operation ', ' ', 'info');
$the userinfo=m (' member ') - & gt; Getmember ($_GPC [' uid]);
if(! $the userinfo) wmessage (' msg_account_nofound ');
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related