Commit c5dfd262 by 徐健

增加flutterbase模块

parent c70759cb
......@@ -215,7 +215,6 @@ dependencies {
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
}
api rootProject.ext.dependencies["ydl-flutter"]
}
......
ext {
kotlin_version = "1.3.21"
dev_mode = true
dev_mode = false
ydl_app = [
appName : "心理咨询壹点灵",
......@@ -44,11 +44,12 @@ ext {
//第三步 若干
"m-confide" : "0.0.20",
"m-consultant" : "0.0.34",
"m-course" : "0.0.17",
"m-fm" : "0.0.15",
"m-muse" : "0.0.12",
"m-tests" : "0.0.10",
"m-user" : "0.0.31",
// 接入flutter的模块
"m-tests" : "0.0.1",
"m-muse" : "0.0.1",
"m-course" : "0.0.1",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.1",
......@@ -72,7 +73,7 @@ ext {
"router" : "0.0.1",
"ydl-net" : "0.0.2",
"ydl-utils" : "0.0.3",
"ydl-flutter-base": "0.0.3",
"ydl-flutter-base": "0.0.4",
]
ydlCompileVersion = [
......@@ -82,9 +83,13 @@ ext {
"m-consultant" : "0.0.26",
"m-course" : "0.0.22",
"m-fm" : "0.0.15",
"m-muse" : "0.0.7",
"m-tests" : "0.0.4",
"m-user" : "0.0.25",
// 以下为接入flutter的模块
"m-muse" : "0.0.7",
"m-muse" : "0.0.7",
"m-tests" : "0.0.4",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.1",
"m-confide-api" : "0.0.1",
......@@ -108,7 +113,7 @@ ext {
"router" : "0.0.1",
"ydl-net" : "0.0.2",
"ydl-utils" : "0.0.3",
"ydl-flutter-base": "0.0.3",
"ydl-flutter-base": "0.0.4",
]
dependencies = [
......@@ -245,7 +250,9 @@ ext {
"ydl-utils" : "com.ydl:ydl-utils:${ydlCompileVersion["ydl-utils"]}",
//flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.13@aar",
"ydl-flutter-base" : "com.ydl:ydl-utils:${ydlCompileVersion["ydl-flutter-base"]}", //组件化项目中的flutter base模块
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.1@aar", //flutter aar
"ydl-flutter-sp" : "com.ydl:ydl-flutter-sp:0.0.2@aar", //flutter 缓存 aar
//基础组件 <<--- 先发这个,发完改这里的版本号
"ydl-platform" : "com.ydl:ydl-platform:${ydlCompileVersion["ydl-platform"]}@aar",
......
......@@ -87,6 +87,7 @@ dependencies {
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
}
api rootProject.ext.dependencies["ydl-flutter"]
// implementation rootProject.ext.ydlPublishVersion["ydl-flutter-base"]
}
}
......@@ -70,11 +70,11 @@ dependencies {
} else {
//发布时使用
api rootProject.ext.dependencies["ydl-media"]
api rootProject.ext.dependencies["ydl-flutter"]
api (rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
}
//TODO xujian flutter
implementation rootProject.ext.dependencies["ydl-flutter-base"]
}
}
......@@ -82,9 +82,12 @@ dependencies {
//发布时使用
compileOnly rootProject.ext.dependencies["ydl-m-tests-api"]
compileOnly rootProject.ext.dependencies["ydl-m-user-api"]
api rootProject.ext.dependencies["ydl-webview"]
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
}
implementation rootProject.ext.dependencies["ydl-flutter-base"]
}
}
\ No newline at end of file
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 14
targetSdkVersion 28
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
flavorDimensions "versionCode"
}
lintOptions {
abortOnError false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
publishNonDefault true
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation project(":ydl-platform")
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
mavenCentral()
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package com.yidianling.router;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.yidianling.router.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yidianling.router" />
/*___Generated_by_IDEA___*/
package com.yidianling.router;
/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */
public final class BuildConfig {
public final static boolean DEBUG = Boolean.parseBoolean(null);
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.yidianling.router;
/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */
public final class Manifest {
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package com.yidianling.router;
/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */
public final class R {
}
\ No newline at end of file
package com.yidianling.router
/**
* 模块枚举
* Created by hgw on 2018/2/10.
*/
enum class RouterEnum {
APP, //主程序模块
TESTS, //测试模块
DYNAMIC, //动态模块
USER, //用户模块
IM, //im模块
CONSULTANT,//咨询模块
COURSE, //课程模块
PHONECALL, //倾诉模块
FM, //fm模块
}
\ No newline at end of file
package com.yidianling.router
import com.yidianling.router.app.IAppRouter
import com.yidianling.router.consultant.IConsultantRouter
import com.yidianling.router.course.ICourseRouter
import com.yidianling.router.dynamic.IDynamicRouter
import com.yidianling.router.fm.IFMRouter
import com.yidianling.router.iRouter.BaseRouter
import com.yidianling.router.im.IIMRouter
import com.yidianling.router.phoneCall.IPhoneCallRouter
import com.yidianling.router.tests.ITestsRouter
import com.yidianling.router.user.IUserRouter
/**
* 模块管理器
* Created by hgw on 2018/3/15.
*/
object RouterManager {
private val routerMap: HashMap<RouterEnum, BaseRouter> = HashMap()
/**
* 注册module
*/
fun registerRouter(router : BaseRouter, moudleEnum: RouterEnum){
routerMap.put(moudleEnum,router)
}
// 获取用户模块路由的实例
fun getUserRouter(): IUserRouter? {
return routerMap[RouterEnum.USER] as IUserRouter
}
fun getImRouter(): IIMRouter {
return routerMap[RouterEnum.IM] as IIMRouter
}
fun getCourseRouter() : ICourseRouter?{
return routerMap[RouterEnum.COURSE] as ICourseRouter
}
fun getConsultantRouter() : IConsultantRouter?{
return routerMap.get(RouterEnum.CONSULTANT) as IConsultantRouter
}
fun getDynamicRouter() : IDynamicRouter?{
return routerMap.get(RouterEnum.DYNAMIC) as IDynamicRouter
}
fun getFMRouter() : IFMRouter?{
return routerMap.get(RouterEnum.FM) as IFMRouter
}
fun getPhoneCallRouter() : IPhoneCallRouter?{
return routerMap.get(RouterEnum.PHONECALL) as IPhoneCallRouter
}
fun getTestsRouter() : ITestsRouter?{
return routerMap.get(RouterEnum.TESTS) as ITestsRouter
}
fun getAppRouter(): IAppRouter? {
return routerMap[RouterEnum.APP] as IAppRouter
}
}
\ No newline at end of file
package com.yidianling.router.app
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.yidianling.router.iRouter.BaseRouter
/**
* author : Zhangwenchao
* e-mail : zhangwch@yidianling.com
* time : 2018/05/04
*/
interface IAppRouter: BaseRouter {
fun mainIntent(activity: Activity): Intent
fun mainIntent(context: Context, selectTab: Int, animation: Boolean): Intent
fun myRedPockIntent(activity: Activity): Intent
fun receiverRedPacketIntent(activity: Activity, param: ReceiveRedPacketParam): Intent
fun personalInfoIntent(activity: Activity): Intent
fun rechargeIntent(activity: Activity): Intent
fun splashIntent(activity: Activity): Intent
fun cleanUnReadnum()
fun feedBackIntent(activity: Activity): Intent
fun sendRedPacketIntent(activity: Activity, toUid: String): Intent
}
\ No newline at end of file
package com.yidianling.router.app
import android.os.Parcel
import android.os.Parcelable
/**
* author : Zhangwenchao
* e-mail : zhangwch@yidianling.com
* time : 2018/05/04
*/
data class ReceiveRedPacketParam(
var status: Int = 0,
var money: String? = null,
var name: String? = null,
var headUrl: String? = null,
var expertUrl: String? = null,
var expertName: String? = null,
var expertTime: String? = null) : Parcelable {
constructor(parcel: Parcel) : this(
parcel.readInt(),
parcel.readString(),
parcel.readString(),
parcel.readString(),
parcel.readString(),
parcel.readString(),
parcel.readString()) {
}
override fun writeToParcel(parcel: Parcel, flags: Int) {
parcel.writeInt(status)
parcel.writeString(money)
parcel.writeString(name)
parcel.writeString(headUrl)
parcel.writeString(expertUrl)
parcel.writeString(expertName)
parcel.writeString(expertTime)
}
override fun describeContents(): Int {
return 0
}
companion object CREATOR : Parcelable.Creator<ReceiveRedPacketParam> {
override fun createFromParcel(parcel: Parcel): ReceiveRedPacketParam {
return ReceiveRedPacketParam(parcel)
}
override fun newArray(size: Int): Array<ReceiveRedPacketParam?> {
return arrayOfNulls(size)
}
}
}
\ No newline at end of file
package com.yidianling.router.consultant
import android.app.Activity
import android.content.Intent
import com.yidianling.router.iRouter.BaseRouter
interface IConsultantRouter : BaseRouter{
fun expertSearchIntent(activity: Activity, category: Int, showType: Int, isInitShowHot: Boolean): Intent
fun getHotSearch(): MutableList<Keyworks>
fun setHotSearch(hotSearch: MutableList<Keyworks>)
}
\ No newline at end of file
package com.yidianling.router.consultant
/**
* Created by haorui on 2019/3/3.
* Des:
*/
class Keyworks {
/**
* id
*/
var id: Int = 0
/**
* 跳转地址
*/
var url: String? = null
/**
* 关键字
*/
var keyword: String? = null
}
\ No newline at end of file
package com.yidianling.router.course
import android.app.Activity
import com.yidianling.router.iRouter.BaseRouter
/**
* Created by hgw on 2018/5/3.
*/
interface ICourseRouter : BaseRouter{
/**
* 课程专题页面
*/
fun courseTopic(activity: Activity,id : String)
fun closePlayer()
fun isPlaying(): Boolean
fun startCoursePlayPage(activity: Activity,from : Int) //from 1表示通知栏点进来,2表示右上角快捷按钮
fun play()
fun pause()
// fun courseIntent(activity: Activity, courseId: Int, courseType: Int)
}
\ No newline at end of file
package com.yidianling.router.dynamic
import android.app.Activity
import android.content.Context
import android.content.Intent
import com.yidianling.router.iRouter.BaseRouter
interface IDynamicRouter : BaseRouter {
fun membersIntent(activity: Activity, userId: String): Intent
fun replyInfoIntent(activity: Activity, replyId: String, aid: String): Intent
fun trendsDetailIntent(activity: Activity, trendId: Int): Intent
fun trendsDetailIntent(activity: Activity, trendId: Int, isScrollToZan: Boolean): Intent
fun trendsDetailIntent(activity: Activity, trendId: Int, isScrollToZan: Boolean, lastId: Int): Intent
fun publishTrendIntent(activity: Activity, url: String, cover: String, title: String): Intent
fun publishFmToTrend(activity: Activity, url: String, cover: String, title: String): Intent
fun topicDetailIntent(context: Context, isSplash: Boolean, topicId: String): Intent
fun publishArticleToTrend(activity: Activity, url: String, cover: String, title: String): Intent
}
\ No newline at end of file
package com.yidianling.router.fm
import android.app.Activity
import android.content.Intent
import com.yidianling.router.iRouter.BaseRouter
interface IFMRouter : BaseRouter{
fun fmDetailIntent(activity: Activity, id: Int): Intent
fun fmDetailIntent(activity: Activity, id: Int, isSplash: Boolean): Intent
fun getFmId(): Int
fun closePlayer()
fun isPlaying(): Boolean
fun replay()
fun pause()
}
\ No newline at end of file
package com.yidianling.router.iRouter
/**
* 路由接口
* Created by hgw on 2018/2/10.
*/
interface BaseRouter {
}
\ No newline at end of file
package com.yidianling.router.im
import android.app.Activity
import android.content.Context
import android.support.v7.app.AppCompatActivity
import com.yidianling.router.iRouter.BaseRouter
/**
* author : Zhangwenchao
* e-mail : zhangwch@yidianling.com
* time : 2018/04/23
*
* im 模块对外提供方法的接口
*/
interface IIMRouter : BaseRouter {
// 打开与小壹聊天界面
fun startP2PXiaoYi(context: Context)
// 打开私聊界面
fun startP2PSession(context: AppCompatActivity, toUid: String)
fun setAccount(account: String)
fun setChattingAccountAll()
fun setChattingAccountNone()
fun login(info: IMLoginInfo, callback: IMRequestCallback<IMLoginInfo>?)
/**
* 绑定手机后,重新登录IM
*/
fun imLogin(info: IMLoginInfo)
fun logout()
fun clear()
/**
* 创建一条普通文本消息
* @param sessionId 聊天对象ID
* @param content 文本消息内容
*/
fun createTextMessage(sessionId: String?, content: String, callback: IMRequestCallback<Void>)
fun sendSubscriptionTimeMessage(sessionId: String?, content: String, callback: IMRequestCallback<Void>)
fun showSelector(activity: Activity, requestCode: Int)
fun sendTestResultMessage(uid: String, content: String, title: String?, head: String?, url: String?, id: Int, share_url: String?, callback: IMRequestCallback<Void>)
fun startChat(context : AppCompatActivity ,toUid : String ,flag : Int , canTalk : Int)
}
\ No newline at end of file
package com.yidianling.router.im;
/**
* Created by xj on 2019/6/27.
*/
public class IMDoctorBriefInfo {
public String smallImage = "";
public double feedbackRate = 0.000;
public int orderNum = 0;
public int helpLong = 0;
}
package com.yidianling.router.im;
/**
* Created by hgw on 2018/3/13.
*/
public class IMExpertBuild {
public IMShareDataBuild shareData;
public String tips; //禁言提示内容
public String url;//禁言帮助URL
public IMDoctorBriefInfo doctorBriefInfo = new IMDoctorBriefInfo();
}
\ No newline at end of file
package com.yidianling.router.im
/**
* author : Zhangwenchao
* e-mail : zhangwch@yidianling.com
* time : 2018/03/23
* 登录 im 时传入的参数,对应 im 模块中的 IMLoginInfo
*/
data class IMLoginInfo(val account: String, val passWord: String)
\ No newline at end of file
package com.yidianling.router.im
/**
* author : Zhangwenchao
* e-mail : zhangwch@yidianling.com
* time : 2018/03/23
* 登录 im 时传入的接口,对应 im 模块中的 IMRequestCallback
*/
interface IMRequestCallback<in T> {
fun onSuccess(t: T?)
fun onFailed(i: Int)
fun onException(throwable: Throwable?)
}
\ No newline at end of file
package com.yidianling.router.im;
import com.google.gson.annotations.SerializedName;
/**
* Created by hgw on 2018/3/13.
*/
public class IMShareDataBuild {
public String toUid;
public String doctorId;
public String listenerId;
// public String name;
public String title;
@SerializedName(value = "isOnline", alternate = "is_online")
public int is_online;//专家倾述在线状态 1.在线 2.离线 3通话中 4-继续拨打 ,
public int isChatOnline;//专家私聊在线状态 1.在线 2.离线
public String cover;
public String desc;
@SerializedName(value = "urlShare", alternate = "url_share")
public String url_share;
public String price;
public String unitTxt;
public String url;
public String urlTitle;
public String blackStatus;
@SerializedName(value = "userType", alternate = "user_type")
public int user_type;//1用户,2专家,3助理
public int is_first;//1表示第一次聊天0不是
public paramsBuild params = new paramsBuild();
public int hasAvailableListenOrder;//是否还有未完成的倾诉订单 1、没有 2、有
public int listenOrderCommentStatus;//倾诉订单评论状态 1:未评价 9:已评价 ,
public String listenOrderCommentUrl;//倾诉订单评价页url
public String listenOrderUrl;//订单详情页面url
public String listenOrderDesc;//倾诉订单状态描述
public String listenOrderRemainTime;//未完成倾诉订单剩余时间
@SerializedName(value = "orderUrl", alternate = "order_url")
public String order_url;
@SerializedName(value = "name", alternate = "doctorName")
public String doctorName;
/**
* 是否开启电话倾诉
* 1.开启 2.关闭
*/
public int listenerIsOpen;
public static class paramsBuild {
//php接口此字段返回值始终为0,更换java接口后,服务端去掉了此字段,本地改动太多,先给默认值
public String orderid = "0";
}
public String tag1 = ""; //该字段是私聊改造项目新加的,用于在获取推荐专家列表的时候,catName字段
}
\ No newline at end of file
package com.yidianling.router.phoneCall
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.support.v4.app.DialogFragment
import com.yidianling.router.iRouter.BaseRouter
interface IPhoneCallRouter : BaseRouter{
fun phoneCallIntent(activity: Activity): Intent
fun phoneCallFragment(head: String, callId: String): DialogFragment
fun closePlayer()
//倾诉首页
fun openConfideHome(context: Context)
}
\ No newline at end of file
package com.yidianling.router.tests
import android.app.Activity
import android.content.Intent
import com.yidianling.router.iRouter.BaseRouter
interface ITestsRouter : BaseRouter{
fun testDetailIntent(activity: Activity, testId: Int): Intent
fun testResultIntent(activity: Activity, testResultId: Int): Intent
fun testAnswerIntent(activity: Activity): Intent
fun testDetailH5(testId: String)
fun testH5Result(testResultId: String)
}
\ No newline at end of file
package com.yidianling.router.user
import android.app.Activity
import android.content.Context
import android.content.Intent
import com.yidianling.router.iRouter.BaseRouter
/**
* author : Zhangwenchao
* e-mail : zhangwch@yidianling.com
* time : 2018/04/13
*/
interface IUserRouter : BaseRouter {
// 是否已登录
fun isLogin(): Boolean
fun isFirstLogin(): Boolean
fun setFirstLogin(first: Boolean)
fun isSafePrivacyClicked(): Boolean
fun putSafePrivacyClicked(clicked: Boolean)
fun setUserResponse(userInfo: UserResponse?)
fun getUserInfo(): UserResponse.UserInfo?
fun getUserResponse() : UserResponse?
fun getUserSetting():UserSetting?
fun isBindPhone(): Boolean
fun putUnlockCheckSuccessTime(time: Long)
fun getChatTeamHisShow(): Boolean
fun setChatTeamHisShowed(showed : Boolean)
// 跳转到隐私界面的 Activity
fun privacyIntent(activity: Activity): Intent
fun loginWayIntent(context: Context): Intent
fun inputPhoneIntent(activity: Activity, smsAction: String): Intent
fun safeTipViewGone(): Boolean
fun setTrendsSafeTip(status: Boolean)
fun errorAgainTime(): Long
fun isFirstStart(): Boolean
fun updateUserInfoSp(userInfo: UserResponse.UserInfo?)
fun updateUserSetingSp(userSetting: UserSetting?)
fun clearUserInfo()
}
\ No newline at end of file
package com.yidianling.router.user
import com.google.gson.annotations.SerializedName
import com.yidianling.router.RouterManager
/**
* author : hgw
* time : 2018/02/02
*/
class UserResponse {
var uid: String? = null
var accessToken: String? = null
var firstLogin: Int = 0 //1是 2否
var hxpwd: String? = null
var userInfo: UserInfo? = UserInfo()
set(value) {
field = value
RouterManager.getUserRouter()?.setUserResponse(this)
}
inner class UserInfo {
var uid: String = "0"
@field:SerializedName("userName")
var user_name: String? = null
var accessToken: String? = null//
@field:SerializedName("bindPhone")
var bind_phone: Int? = 0 //1为绑定
var phone: String? = null
set(value) {
if (!(value?.equals(phone) ?: false)) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
@field:SerializedName("realName")
var real_name: String? = null
@field:SerializedName("nickName")
var nick_name: String? = null
set(value) {
if (!(value?.equals(nick_name) ?: false)) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
var head: String? = null
set(value) {
if (!(value?.equals(head) ?: false)) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
var gender: Int = 0
//性别1男2女
set(value) {
if (value != gender) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
var birthday: String? = null
set(value) {
if (!(value?.equals(birthday) ?: false)) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
@field:SerializedName("availableMoney")
var available_money: String? = null
var address: String? = null
@field:SerializedName("unionId")
var union_id: String? = null//微信标识,
@field:SerializedName("openIdQqweb")
var open_id_qqapp: String? = null//qq标识
@field:SerializedName("bindWeixin")
var bind_weixin: Int = 0
//是否绑定微信1绑定0未绑定
set(value) {
if (value != bind_weixin) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
@field:SerializedName("bindQq")
var bind_qq: Int = 0
//是否绑定qq 1绑定0未绑定
set(value) {
if (value != bind_qq) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
@field:SerializedName("userType")
var user_type: Int = 0//1普通用户2心理专家
@field:SerializedName("listenCards")
var listen_cards: Int = 0//收听卡的次数
var profession: Int = 0
set(value) {
if (value != profession) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
var marriage: Int = 0
set(value) {
if (value != marriage) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
@field:SerializedName("countryCode")
var country_code: String? = null
@field:SerializedName("homeBg")
var home_bg: String? = null
//我的封面地址
set(value) {
if (!(value?.equals(home_bg) ?: false)) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
//是否同意过隐私权限 1同意过 0未同意
var privacyAgreementStatus: Int = 1
set(value) {
if (value != privacyAgreementStatus) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
var description: String? = null
//简介
set(value) {
if (!(value?.equals(description) ?: false)) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
@field:SerializedName("isSilenced")
var is_silenced: Int = 0 // 1 正常 2 禁言
set(value) {
if (value != is_silenced) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
var hasCoupon: Int = 0
var firstLogin: Int = 0 //1是2否
set(value) {
if (value != firstLogin) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
var trendNum: Int = 0 //我的动态
set(value) {
if (value != trendNum) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
var fansNum: Int = 0
//我的粉丝
set(value) {
if (value != fansNum) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
var testRecordNum: Int = 0
//测试记录
set(value) {
if (value != testRecordNum) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
var attentionNum: Int = 0
//我的关注
set(value) {
if (value != attentionNum) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
var registTime: String? = null
//你我相识已502天
set(value) {
if (!(value?.equals(registTime) ?: false)) {
field = value
RouterManager.getUserRouter()?.updateUserInfoSp(this)
}
}
var privacyArr: PrivacyArr? = null
override fun toString(): String {
return "UserInfo(uid='$uid', user_name=$user_name, accessToken=$accessToken, bind_phone=$bind_phone, phone=$phone, real_name=$real_name, nick_name=$nick_name, head=$head, gender=$gender, birthday=$birthday, available_money=$available_money, address=$address, union_id=$union_id, open_id_qqapp=$open_id_qqapp, bind_weixin=$bind_weixin, bind_qq=$bind_qq, user_type=$user_type, listen_cards=$listen_cards, profession=$profession, marriage=$marriage, country_code=$country_code, home_bg=$home_bg, description=$description, is_silenced=$is_silenced, hasCoupon=$hasCoupon, firstLogin=$firstLogin, trendNum=$trendNum, fansNum=$fansNum, testRecordNum=$testRecordNum, attentionNum=$attentionNum, registTime=$registTime)"
}
}
inner class PrivacyArr {
var time: String? = null
var content: String? = null
}
override fun toString(): String {
return "UserResponse(uid=$uid, accessToken=$accessToken, firstLogin=$firstLogin, hxpwd=$hxpwd, userInfo=$userInfo)"
}
}
\ No newline at end of file
<resources>
<string name="app_name">router</string>
</resources>
package com.yidianling.router;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
include ':app', ':ydl-flutter-base',":router", ':ydl-net', ':ydl-utils', ':ydl-platform', ':ydl-webview',
include ':app', ':ydl-flutter-base', ':ydl-net', ':ydl-utils', ':ydl-platform', ':ydl-webview',
':m-confide', ':m-audioim',':ydl-media',":m-user", ':m-consultant', ':m-muse',
':m-fm', ':m-tests',":m-course", ':ydl-pay'
......
......@@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply from: "../maven_push.gradle"
kapt {
arguments {
......@@ -59,13 +60,26 @@ dependencies {
//开发时使用
implementation project(":ydl-platform")
api fileTree(include: ['*.aar'], dir: 'aars')
// api fileTree(include: ['*.aar'], dir: 'aars')
api rootProject.ext.dependencies["ydl-flutter"]
api rootProject.ext.dependencies["ydl-flutter-sp"]
} else {
//发布时使用
api (rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
}
//TODO xujian 把flutteraar和spaar上传
//以下为flutter端的所有aar
api rootProject.ext.dependencies["ydl-flutter"]
api rootProject.ext.dependencies["ydl-flutter-sp"]
}
}
repositories {
flatDir {
dirs 'libs'
}
mavenCentral()
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment