On_SearchCishu: function (jigou1) {
Var r=this;
Const db=wx. Cloud. The database ({env: 'vistor - ec2t7})
Db. Collection (' VisitStatistics'). The where ({jigou: jigou1}) get ({
Success: the function (res) {
The console. The log (' res. Data [0]. Cishu: '+ res. Data [0]. Cishu),
T.s etData ({
QueryCishu: res. Data [0]. Cishu
})
The console. The log (' res. Data [0]. Cishu: '+ res. Data [0]. Cishu +', queryCishu: '+ r.d ata. QueryCishu)
}
})
}
}
Calling code:
Enclosing onAdd_s (o, s, l, r, h, m, c, u, g));
Enclosing on_SearchCishu (enclosing data. Zhihang_array [this. Data. Zhihang_index]. Name);
The console. The log (' searchout1: '+ this. Data. QueryCishu)
Eventually the console results:
Searchout1:0 (why this is not a 1)
Bussiness. Js: 335 [database] [message] success, record _id: b5416b755f548cd4013d675e6a7e768f
Bussiness. Js: 387 res. Data [0]. Cishu: 1
Bussiness. Js: 391 res. Data [0]. Cishu: 1, queryCishu: 1
Bussiness. Js: 335 [database] [message] success, record _id: 6518 b7395f5487fc010c3c4060a1acdb is to perform this. OnAdd_s (o, s, l, r, h, m, c, u, g));
The database information is as follows:
CodePudding user response:
O solve! Thank you for your attention