上月我提過一個發展計劃, 有以下一個構圖:
今次我做了以下的伺服器PORTAL, 由我系統建立了兩間SHOP的DEMO, 編號為1和2. 大家需要開發ANDROID或IPHONE, call 以下API:
http://memdb.dyndns.org:800/?page=getShop&id=1
OK Return: {"status":"ok","ip":"59.188.7.70","port":"8302","name":"MemDB Demo"}
FAIL Return: {"status":"fail"}
http://memdb.dyndns.org:800/?page=getShop&id=2
OK Return: {"status":"ok","ip":"59.188.7.70","port":"8191","name":"MemDB"}
FAIL Return: {"status":"fail"}
以上ID是SHOP ID, 取得了POS SERVER的IP和PORT, 然後用以下的API取得其他資料, 如下:
http://59.188.7.70:8302/?page=categoryQListJ
http://59.188.7.70:8191/?page=categoryQListJ
OK Return: {"total":"14","Items":[{"oid":"8315","name":"雜項","qty":"25"},{"oid":"8396","......
FAIL Return: {"total":"0"}
http://59.188.7.70:8302/?page=productListJ&category=8315&index=1&len=9999
OK Return: {"total":"25","Items":[{"oid":"22301","name":"無字藥袋 7CM*9CM","qty":"200","price":"1.00","photo":"22301S.jpg"},{"oid":"21901",...
FAIL Return: {"total":"0"}
http://59.188.7.70:8302/?page=productInfoJ&oid=22301
OK Return: {"oid":"22301","photo":"22301.jpg","category":"雜項","barcode":"123456","id":"80000035","description1":"","description2":"","quantity":"200","price":"1.00"}
FAIL Return: {"oid":"0"}
Get Photo (Need to add photo folder): http://59.188.7.70:8302/photo/22301S.jpg (144X256)
http://59.188.7.70:8302/photo/22301.jpg (720X1280)
用以上的API, 可以做一個簡單的PRODUCT LIST APP, 和做一個SHOPPING CART (可以讓MOBILE USER (MU) 加FAVOUR SHOP入他的LIST, 然後按貨品, 加入CART) 的APP, 今次改用了JSON, 應該更容易做, 我的建議是一個介面讓MU輸入SHOP ID, 1 OR 2 和加入他們的 [我的店舖], 然後CLICK入每間店可看貨品和加入購買車.
有興趣加入我們, 可試試展示自己的能力, 先做了以上的APP, 大家再談如何合作吧.
Good attempt to get high caliber.
回覆刪除Should you have a uri to get a list of available shops first if you would give MU a chance to add favour shop?
回覆刪除zac :
回覆刪除Should you have a uri to get a list of available shops first if you would give MU a chance to add favour shop?
暫時不用, 因為會由店舖告知MU, 他們店的ID, 讓他們會員加入...
當然, 之後會有一個版本做這功能.
YY :
回覆刪除http://59.188.7.70:8302/?page=productListJ&category=8315&index=1&len=9999
以上新加了一個細圖, 如"photo":"22301S.jpg"
Get Photo: http://59.188.7.70:8302/photo/2230...
此外你可以打開我之前發出的Android App看看,入面的模組是會同步更新的,不需要重新安裝。