最近在做的web端项目,中间有个模块客户突然说没有借口,要用parse ,前端菜鸟表示很懵逼啊,从来没有接触过,网上也没找到相关的范例,下面这些代码是客户那边的架构给的,说是个例子。。看了之后很懵逼,求助。。。根本不知从何下手。
import Parse from 'parse';
import config from './config';
import request from './request';
const parseUrl = 'https://apitest.jibo.cn/parse';
/*
Parse API Initial
*/
Parse.initialize('tn9A5W25oq9YVgP2LfcbedPT3ydDubtOMoqjL6ib', 'A5WduRceGBQaaYx7R3FXPIwyVgiZSiTVJtezkSKW');
Parse.serverURL = parseUrl;
const query = new Parse.Query('LoggerRecord');
const UIThis = this;
query.equalTo('UserID', patientId).descending('RecordTime').find({
success(results) {
// results is an array of Parse.Object.
UIThis.setState({ list: results });
},
error(error) {
// error is an instance of Parse.Error.
throw error;
},
});
相关分类