1:修改在帮助中,使用平台的客服功能,如果对方是客服,自己不用充值可以聊天
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package com.xscm.moduleutil.bean
|
||||
|
||||
/**
|
||||
* 项目名称:羽声语音
|
||||
* 时间:2026/1/14 18:47
|
||||
* 用途:app配置的客服用户id和name
|
||||
*/
|
||||
class AppCustomerBean {
|
||||
var user_id: String = ""
|
||||
var user_name: String = ""
|
||||
}
|
||||
@@ -449,6 +449,9 @@ public interface ApiServer {
|
||||
@GET(Constants.GET_MY_INFO)
|
||||
Call<BaseModel<UserInfo>> getMyInfo();
|
||||
|
||||
@GET(Constants.GET_APP_CUSTOMER_SERVICE)
|
||||
Call<BaseModel<AppCustomerBean>> appCustomerService();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_DEL_SONG)
|
||||
Call<BaseModel<String>> delSong(@Field("room_id") String room_id, @Field("did") String did);
|
||||
|
||||
@@ -2757,6 +2757,32 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void appCustomerService(BaseObserver<AppCustomerBean> observer) {
|
||||
sApiServer.appCustomerService().enqueue(new Callback<BaseModel<AppCustomerBean>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<AppCustomerBean>> call, Response<BaseModel<AppCustomerBean>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<AppCustomerBean> listBaseModel = response.body();
|
||||
if (listBaseModel.getCode() == 1)
|
||||
observer.onNext(listBaseModel.getData());
|
||||
else if (listBaseModel.getCode() == 301) {
|
||||
setCode301(listBaseModel.getMsg());
|
||||
} else if (listBaseModel.getCode() == 0) {
|
||||
ToastUtils.showShort(listBaseModel.getMsg());
|
||||
}
|
||||
}else {
|
||||
ToastUtils.showLong("客服信息不正确");
|
||||
LogUtils.e("appCustomerService", response.message());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<AppCustomerBean>> call, Throwable t) {
|
||||
LogUtils.e("appCustomerService", t.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getUserTagList(BaseObserver<List<UserTagBean>> observer) {
|
||||
sApiServer.getUserTagList().enqueue(new Callback<BaseModel<List<UserTagBean>>>() {
|
||||
@Override
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.text.TextUtils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.blankj.utilcode.util.SPUtils;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.AppCustomerBean;
|
||||
import com.xscm.moduleutil.bean.UserBean;
|
||||
import com.xscm.moduleutil.bean.UserInfo;
|
||||
|
||||
@@ -233,6 +234,16 @@ public class SpUtil {
|
||||
return SPUtils.getInstance(SPConstants.PREFERENCE_NAME).getString(SPConstants.TOKEN);
|
||||
}
|
||||
|
||||
public static void setAppCustomerBean(AppCustomerBean appCustomerBean) {
|
||||
String s = JSON.toJSONString(appCustomerBean);
|
||||
SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put("appCustomerBean", s, true);
|
||||
}
|
||||
|
||||
public static AppCustomerBean getAppCustomerBean() {
|
||||
String s = SPUtils.getInstance(SPConstants.PREFERENCE_NAME).getString("appCustomerBean");
|
||||
return JSON.parseObject(s, AppCustomerBean.class);
|
||||
}
|
||||
|
||||
public static void setBoolean(String key, boolean value) {
|
||||
SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put(key, value, true);
|
||||
}
|
||||
|
||||
@@ -244,6 +244,7 @@ public class Constants {
|
||||
public static final String CANCEL = "/api/Login/cancel";//注销账号
|
||||
public static final String POST_MODIFY_HIDE_STATUS = "/api/UserData/modify_hide_status";//设置隐身进入
|
||||
public static final String GET_MY_INFO = "/api/User/get_user_info";//点击我的获取个人数据
|
||||
public static final String GET_APP_CUSTOMER_SERVICE = "/api/banner/app_customer_service";//获取平台客服用户Id
|
||||
public static final String GET_USER_HOME = "/api/User/get_user_home";//点击获取个人数据
|
||||
public static final String POST_DEL_SONG = "/api/RoomSong/del_song";//删除已点歌曲
|
||||
public static final String POST_SEARCH_USER = "/api/RoomSong/search_song";//已点列表搜索
|
||||
|
||||
Reference in New Issue
Block a user