|
baasData 保存数据saveData()成功,但是数据库里并没有新增数. ,我 是不是漏了什么。。请大神帮我看下。我这功能很间单。
一个报名页。存商家的信息。- Model.prototype.saveBtnClick = function(event) {
- var sData = this.comp("mainData");
- var scData = this.comp("scData");
- var SName = sData.val("SName");
- var Address = sData.val("SAddress");
- var SDescribe = sData.val("SDescribe");
- var SCoverImg = "";
- var SR1 = "";
- var SR2 = "";
- var SR3 = "";
- var row = this.comp("data1").getCurrentRow();
- var jsonList = eval("(" + row.val('fAttachment') + ")");
- var ownerID = row.getID();
- var realFileName ="";
- var storeFileName="";
- var operateType = "browse";
- if(jsonList.length>0)
- {
- realFileName = jsonList[0]["realFileName"];
- storeFileName = jsonList[0]["storeFileName"];
-
- SCoverImg = this.comp("attachmentSimple1").getFileUrl(realFileName, storeFileName, ownerID, operateType);
- }
- else
- {
- justep.Util.hint("请上传封面图片!");
- return;
- }
- // $(this.getElementsByXid("img1")).attr("src",SCoverImg);
- if (jsonList.length>1) {
- realFileName = jsonList[1]["realFileName"];
- storeFileName = jsonList[1]["storeFileName"];
- SR1 = this.comp("attachmentSimple1").getFileUrl(realFileName, storeFileName, ownerID, operateType);
- }
- if (jsonList.length>2) {
- realFileName = jsonList[2]["realFileName"];
- storeFileName = jsonList[2]["storeFileName"];
- SR2 = this.comp("attachmentSimple1").getFileUrl(realFileName, storeFileName, ownerID, operateType);
- }
- if (jsonList.length>3) {
- realFileName = jsonList[3]["realFileName"];
- storeFileName = jsonList[3]["storeFileName"];
- SR3 = this.comp("attachmentSimple1").getFileUrl(realFileName, storeFileName, ownerID, operateType);
- }
- if ((SName == "") || (Address == "") || (SDescribe == "")) {
- justep.Util.hint("信息填写不完全!");
- return;
- }
- if (SCoverImg == "") {
- justep.Util.hint("图片没有上传成功!");
- return
-
- }
- sData.setValue("SCoverImg", SCoverImg);
- sData.setValue("SRImg1", SR1);
- sData.setValue("SRImg2", SR2);
- sData.setValue("SRImg3", SR3);
- sData.setValue("ShopOpenID", "0");
- sData.saveData({
- "onSuccess":function()
- {
- justep.Util.hint("报名成功,等待审核通过")
- }
- });
复制代码
|
-
-
提示成功了
|