master
kira 6 years ago
parent e472c81f5e
commit 89d1d26a4a

@ -37,8 +37,6 @@ public class OpenimClient {
private String appkey; private String appkey;
@Value("${im.openim.secret}") @Value("${im.openim.secret}")
private String secret; private String secret;
// private final String appkey = "24962653";
// private final String secret = "1c1a1320c4e6f24df24e3fe41c3fc00a";
private final String url = "https://eco.taobao.com/router/rest"; private final String url = "https://eco.taobao.com/router/rest";
public JSONObject getUser(String userId) { public JSONObject getUser(String userId) {

@ -14,6 +14,7 @@ import com.alibaba.fastjson.JSONObject;
import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
@ -41,6 +42,8 @@ public class CustomerServiceServiceImpl implements CustomerServiceService {
@Resource @Resource
private SysCustomerServiceMapper sysCustomerServiceMapper; private SysCustomerServiceMapper sysCustomerServiceMapper;
@Value("${im.openim.appkey}")
private String appkey;
@Override @Override
public JSONObject checkAndSave(JSONObject account) { public JSONObject checkAndSave(JSONObject account) {
JSONObject client = null; JSONObject client = null;
@ -68,6 +71,7 @@ public class CustomerServiceServiceImpl implements CustomerServiceService {
saveRecord.put("user_id", uid); saveRecord.put("user_id", uid);
} }
openimApi.addUser(saveRecord); openimApi.addUser(saveRecord);
saveRecord.put("appkey",appkey);
return saveRecord; return saveRecord;
} }

@ -112,11 +112,9 @@ mail.mailgun.default.merchantlist=merchants@mail.royalpay.com.au
royalpay.sms.appid=1400094878 royalpay.sms.appid=1400094878
royalpay.sms.appkey=43390d81e20c5191c278fbf4cd275be2 royalpay.sms.appkey=43390d81e20c5191c278fbf4cd275be2
im.openim.appkey=24960261 im.openim.appkey=24980715
im.openim.secret=7639427973bd671be15c9d0c1e9c90b4 im.openim.secret=60b1ba680a6f27ffc701f10b6d5be00e
#im.openim.appkey=24962653
#im.openim.secret=1c1a1320c4e6f24df24e3fe41c3fc00a
#清算银行配置 #清算银行配置
settle.abafile.default-bank=CBA settle.abafile.default-bank=CBA

@ -10,21 +10,17 @@
charset="utf-8"></script> charset="utf-8"></script>
<script src="https://g.alicdn.com/aliww/h5.openim.sdk/1.0.6/scripts/wsdk.js"></script> <script src="https://g.alicdn.com/aliww/h5.openim.sdk/1.0.6/scripts/wsdk.js"></script>
<script> <script>
window.uid = 'imuser123';
window.touid = 'imuser1234';
window.onload = function () { window.onload = function () {
if(getQueryString('uid')){
window.uid = getQueryString('uid'); window.uid = getQueryString('uid');
window.touid = getQueryString('uid'); window.touid = getQueryString('uid');
window.password = getQueryString('p'); window.password = getQueryString('p');
} window.appKey = getQueryString('key');
WKIT.init({ WKIT.init({
container: document.getElementById('J_demo'), container: document.getElementById('J_demo'),
width: 700, width: 700,
height: 500, height: 500,
uid: window.uid, uid: window.uid,
appkey: 24960261, appkey: window.appKey,
credential: window.password, credential: window.password,
touid: window.touid, touid: window.touid,
pluginUrl: '/service_contact_list.html?uid=' pluginUrl: '/service_contact_list.html?uid='

@ -12,10 +12,10 @@
container: document.getElementById('J_demo'), container: document.getElementById('J_demo'),
width: 700, width: 700,
height: 500, height: 500,
uid: 'huangjin', uid: 'imuser123',
appkey: 24960261, appkey: 24960261,
credential: 'xxxxxx', credential: 'xxxxxx',
touid: 'imuser123', touid: 'dalong',
logo: 'http://img.alicdn.com/tps/i3/TB12LD9IFXXXXb3XpXXSyFWJXXX-82-82.png', logo: 'http://img.alicdn.com/tps/i3/TB12LD9IFXXXXb3XpXXSyFWJXXX-82-82.png',
}); });
} }

@ -178,7 +178,7 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
} }
$scope.customerService = function () { $scope.customerService = function () {
$http.put('/sys/openim/check').then(function (resp) { $http.put('/sys/openim/check').then(function (resp) {
window.open('/service_client.html?p='+resp.data.password+'&uid='+resp.data.user_id,'_blank'); window.open('/service_client.html?key='+resp.data.appkey+'&p='+resp.data.password+'&uid='+resp.data.user_id,'_blank');
}); });
} }

Loading…
Cancel
Save