我选了osticket作为我的工单系统,然后使用osticket的restful api,完成工单系统,UI使用FrozenUI作为手机端的输入。

DEMO: http://mticket.xujialiang.net

1.使用DaoCloud搭建一个MySql

用户名:osticket
密码:osticket
数据库:osticket

2.使用DaoCloud搭建osticket,下面是YML

`osticket:
image: campbellsoftwaresolutions/osticket:latest
privileged: false
restart: always
external_links:

  • dao_mysql_1:MySQL
    ports:
  • 30014:80
    environment:
  • MYSQL_PASSWORD=osticket
  • MYSQL_USER=osticket
  • MYSQL_DATABASE=osticket
  • MYSQL_HOST=MySQL
    `
3.js提交

var request = require('request'), default_headers, site_root = 'http://osticket'; default_headers = { 'User-Agent': 'My osTicket Client', 'X-API-Key': osticket_key, 'Expect': '' }; request({ url: site_root + '/api/tickets.json', headers: default_headers, method: 'POST', body: JSON.stringify({ alert: true, autorespond: true, source: 'API', name: message.nickname, email: message.mail, phone: message.mobile, subject: message.subject, message: message.detail, attachments: attachments }) }, function(err, res, body) { if (!err && res.statusCode == 200) { console.log(body); } else { console.log(err); console.log(res); } });

4.osticket配置

邮件外发