kaiqigong / erplite Goto Github PK
View Code? Open in Web Editor NEWThis is a ERP for small business
This is a ERP for small business
We can use the current auth system in django. However, two problems need to be solved.
return:
success:302 or 200
{
token:"xxxxx"
username:"xxxxxx"
screenname:"xxxx"
...
}
fail:403,401
{
reason:"xxxx"
}
response header,没有Access-Control-Allow-Origin
We need an api mapping, so that I can post data upon.
Currently, I hard coded in js.
this.postUrl = erpSettings.apiHost+'/contactdata/';
create: function(success,fail) {
$http.post(this.postUrl, this).success(success).error(fail);
},
What I need should be like this:
get /apilist/
result:
[{name:"Contact",postUrl:"http://localhost:8000/contacts/"},
{name:"ContactData",postUrl:"http://localhost:8000/contactdata/"},
{name:"ContactLink",postUrl:"http://localhost:8000/contactlink/"},
{name:"ContactTag",postUrl:"http://localhost:8000/contacttag/"}
]
data有点奇怪。。
我的想法是把data 转换为object。不知道后台能不能实现。
不行的话我就在前端实现吧。
{
"name": "\u51ef\u5947",
"avator": "./img/128px/bag_128px.png",
"tags": [
"user"
],
"data": [
"ContactData object",
"ContactData object",
"ContactData object",
"ContactData object",
"ContactData object",
"ContactData object"
],
"links": [],
"description": "\u8bf7\u95ee\u513f\u7ae5",
"createdDate": "2014-03-25",
"createdBy": "cage",
"modifiedDate": "2014-03-25",
"modifiedBy": "cage"
}
We do not need data, links, we only need tags in array. When step into detail, contacts/id, we want those datas.
Import cache/localstorage system to app
cache the unsaved changes, token, entities.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.