- inc 使用报错?请问到底是什么原因
[代码]guest:[代码][代码]function[代码][代码](e){[代码][代码] [代码] [代码] [代码][代码]var[代码] [代码]num[代码][代码] [代码][代码]const db = wx.cloud.database()[代码][代码] [代码][代码]db.collection([代码][代码]'guest'[代码][代码]).doc([代码][代码] [代码][代码]'xxxxxxxxxxxxx'[代码][代码]).update({[代码][代码] [代码][代码]data: {[代码][代码] [代码] [代码] [代码][代码]num:_inc(1)[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]console.log(res.data)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码] [代码] [代码][代码]},[代码]VM267:1 thirdScriptError _inc is not defined; [Component] Event Handler Error @ pages/index2/index2#bound guest ReferenceError: _inc is not defined
2019-09-14 - 云函数调用查询数据?怎么优先查询最新录入的数据
希望能提供一个解决思路
2019-09-09 - 关于云数库使用的问题?数据库中100条数据,第一次调用20条数据,下拉再次调用2
关于云数库使用的问题?数据库中100条数据,第一次调用20条数据,下拉再次调用20条数据,以后每次下拉调用20调数据。 希望能提供一个解决思路
2019-09-08 - 小程序 同一个js文件,两个不同的funtion如何传递数值?
小程序 同一个JS页面,不同funtion如何传值 [代码]const app = getApp()[代码] [代码]Page({[代码] [代码] [代码][代码]data: {[代码][代码] [代码][代码]key1:[代码][代码]''[代码][代码],[代码][代码] [代码][代码]key2: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]testid:[代码][代码]''[代码][代码] [代码][代码]},[代码][代码] [代码][代码]bindTextAreaChange: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]const db = wx.cloud.database({});[代码][代码] [代码][代码]const cont = db.collection([代码][代码]'test'[代码][代码]);[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]db.collection([代码][代码]'test'[代码][代码]).add({[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]key1: [代码][代码]'2'[代码][代码],[代码][代码] [代码][代码]key2: [代码][代码]'dasjjfksfksjdhkjfhkdfhj'[代码] [代码] [代码][代码]},[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]console.log(res)[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]testid: res._id[代码][代码] [代码] [代码] [代码][代码]})[代码][代码] [代码][代码]return[代码] [代码]testid[代码] [代码] [代码][代码]},[代码] [代码] [代码][代码]})[代码][代码] [代码] [代码] [代码][代码]},[代码][代码] [代码][代码]queryData: [代码][代码]function[代码] [代码]() {[代码] [代码] [代码][代码]console.log(testid)[代码] [代码] [代码][代码]const db = wx.cloud.database({});[代码][代码] [代码][代码]const cont = db.collection([代码][代码]'test'[代码][代码]);[代码][代码] [代码][代码]cont.doc([代码][代码]" "[代码][代码]).get({[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]console.log(res.data)[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]key2: res.data.key2[代码][代码] [代码][代码]})[代码] [代码] [代码][代码]}[代码] [代码] [代码][代码]})[代码][代码] [代码][代码]}[代码] [代码]})[代码]
2019-08-30