| @@ -23,9 +23,9 @@ android { | |||
| versionName "3.0.3" | |||
| testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | |||
| ndk { | |||
| abiFilters "armeabi-v7a", "arm64-v8a", "x86" | |||
| } | |||
| // ndk { | |||
| // abiFilters "armeabi-v7a", "arm64-v8a", "x86" | |||
| // } | |||
| } | |||
| signingConfigs { | |||
| yzx { | |||
| @@ -76,6 +76,39 @@ android { | |||
| // buildConfigField "String", "BASE_URL", '"http://192.168.69.99:9009"' | |||
| // buildConfigField "String", "M_URL", '"http://192.168.69.99:8098"' | |||
| // buildConfigField "String", "APP_NAME", '"家校互通(测试)"' | |||
| buildConfigField "String", "MP_ID",'"4"' | |||
| buildConfigField "String", "ENV_NAME",'"qbj"' | |||
| buildConfigField "String", "APP_ID",'"701"' | |||
| } | |||
| cszxy { | |||
| minifyEnabled false | |||
| proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |||
| signingConfig signingConfigs.release | |||
| buildConfigField "String", "BASE_URL", '"https://oa.educlouddata.com/api"' | |||
| buildConfigField "String", "M_URL", '"https://m.educlouddata.com"' | |||
| buildConfigField "String", "OA_URL", '"https://oa.educlouddata.com"' | |||
| buildConfigField "String", "APP_NAME", '"一体化平台"' | |||
| buildConfigField "String", "MP_APPID", '"wxbb397ddae71bb14c"' | |||
| buildConfigField "String", "WS_URL", '"wss://oa.educlouddata.com/ws2api/"' | |||
| buildConfigField "String", "MP_ID",'"2"' | |||
| buildConfigField "String", "ENV_NAME",'"cszxy"' | |||
| buildConfigField "String", "APP_ID",'"701"' | |||
| } | |||
| kz { | |||
| minifyEnabled false | |||
| proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |||
| signingConfig signingConfigs.release | |||
| buildConfigField "String", "BASE_URL", '"https://oa.educlouddata.com/api"' | |||
| buildConfigField "String", "M_URL", '"https://m.educlouddata.com"' | |||
| buildConfigField "String", "OA_URL", '"https://oa.educlouddata.com"' | |||
| buildConfigField "String", "APP_NAME", '"一体化平台"' | |||
| buildConfigField "String", "MP_APPID", '"wx8f1f33673a8e9de4"' | |||
| buildConfigField "String", "WS_URL", '"wss://oa.educlouddata.com/ws2api/"' | |||
| buildConfigField "String", "MP_ID",'"101"' | |||
| buildConfigField "String", "ENV_NAME",'"kz"' | |||
| buildConfigField "String", "APP_ID",'"7011"' | |||
| } | |||
| debug { | |||
| @@ -96,6 +129,10 @@ android { | |||
| buildConfigField "String", "MP_APPID", '"wxbb397ddae71bb14c"' | |||
| // buildConfigField "String", "WS_URL", '"ws://192.168.69.114:9801/"' | |||
| buildConfigField "String", "WS_URL", '"wss://oa.live.educlouddata.com/ws2api/"' | |||
| applicationIdSuffix ".live" | |||
| buildConfigField "String", "MP_ID",'"2"' | |||
| buildConfigField "String", "ENV_NAME",'"qbj"' | |||
| buildConfigField "String", "APP_ID",'"602"' | |||
| } | |||
| yzx_test { | |||
| @@ -189,7 +226,7 @@ dependencies { | |||
| // implementation deps.reactivex.rxandroid | |||
| // implementation deps.reactivex.rxjava2 | |||
| implementation 'es.voghdev.pdfviewpager:library:1.1.2' | |||
| // implementation 'es.voghdev.pdfviewpager:library:1.1.2' | |||
| implementation 'io.github.h07000223:flycoTabLayout:3.0.0' | |||
| implementation 'com.qmuiteam:qmui:2.0.0-alpha10' | |||
| @@ -13,6 +13,7 @@ import com.qmuiteam.qmui.widget.dialog.QMUITipDialog.Builder.ICON_TYPE_FAIL | |||
| import com.yzx.ebrand.MainActivity | |||
| import com.yzx.ebrand.R | |||
| import com.yzx.ebrand.activity.base.BaseActivity | |||
| import com.yzx.ebrand.config.Config | |||
| import com.yzx.ebrand.model.BaseUser | |||
| import com.yzx.ebrand.model.TabEntity | |||
| import com.yzx.ebrand.model.User | |||
| @@ -22,6 +23,8 @@ import com.yzx.ebrand.utils.hideNavigationBar | |||
| import com.yzx.ebrand.utils.setSrc | |||
| import kotlinx.android.synthetic.main.activity_login.accountEdit | |||
| import kotlinx.android.synthetic.main.activity_login.accountLayout | |||
| import kotlinx.android.synthetic.main.activity_login.img1 | |||
| import kotlinx.android.synthetic.main.activity_login.img2 | |||
| import kotlinx.android.synthetic.main.activity_login.loginBtn | |||
| import kotlinx.android.synthetic.main.activity_login.pswCheckbox | |||
| import kotlinx.android.synthetic.main.activity_login.pswEdit | |||
| @@ -88,6 +91,11 @@ class LoginActivity : BaseActivity<LoginPresenter>(), LoginView { | |||
| } else { | |||
| pswCheckbox.isChecked = false | |||
| } | |||
| var env = Config.getEvn() | |||
| img1.setSrc(env.LOGO) | |||
| LogUtils.d("env.APP_NAME",env.APP_NAME) | |||
| img2.setSrc(env.APP_NAME) | |||
| } | |||
| private fun doLogin() { | |||
| @@ -163,22 +171,16 @@ class LoginActivity : BaseActivity<LoginPresenter>(), LoginView { | |||
| mPresenter?.loginQuery(ticket) | |||
| } | |||
| private var mBindDialog: QMUIDialog? = null | |||
| private var mOverTimeDialog: QMUIDialog? = null | |||
| private var mRun = Runnable { | |||
| if(isPageShow){ | |||
| mPresenter?.loginQuery(mTicket) | |||
| override fun onDestroy() { | |||
| qrCodeImg?.apply { | |||
| removeCallbacks(mRun) | |||
| } | |||
| super.onDestroy() | |||
| } | |||
| override fun onResume() { | |||
| super.onResume() | |||
| this.isPageShow = true | |||
| if(this.mTicket.isNotEmpty()){ | |||
| qrCodeImg?.apply { | |||
| postDelayed(mRun,1000) | |||
| } | |||
| } | |||
| } | |||
| override fun onStop() { | |||
| @@ -186,11 +188,13 @@ class LoginActivity : BaseActivity<LoginPresenter>(), LoginView { | |||
| this.isPageShow = false | |||
| } | |||
| override fun onDestroy() { | |||
| qrCodeImg?.apply { | |||
| removeCallbacks(mRun) | |||
| private var mBindDialog: QMUIDialog? = null | |||
| private var mOverTimeDialog: QMUIDialog? = null | |||
| private var mRun = Runnable { | |||
| if(isPageShow){ | |||
| mPresenter?.loginQuery(mTicket) | |||
| } | |||
| super.onDestroy() | |||
| } | |||
| override fun onLoginQuerySuccess(user: BaseUser, code: Int) { | |||
| @@ -217,12 +221,10 @@ class LoginActivity : BaseActivity<LoginPresenter>(), LoginView { | |||
| } else if (!mBindDialog!!.isShowing) { | |||
| mBindDialog?.show() | |||
| } | |||
| qrCodeImg.removeCallbacks(mRun) | |||
| qrCodeImg.postDelayed(mRun, 1000) | |||
| } | |||
| 452 -> { | |||
| qrCodeImg.removeCallbacks(mRun) | |||
| qrCodeImg.postDelayed(mRun, 1000) | |||
| } | |||
| @@ -10,7 +10,54 @@ object Config { | |||
| var OA_URL = BuildConfig.OA_URL | |||
| var WS_URL = BuildConfig.WS_URL | |||
| var MP_APPID = BuildConfig.MP_APPID | |||
| val APP_ID = 701 | |||
| val APP_ID = BuildConfig.APP_ID | |||
| var MP_ID = BuildConfig.MP_ID | |||
| var ENV_NAME = BuildConfig.ENV_NAME | |||
| fun getEvn(): YzxEnv { | |||
| when (ENV_NAME) { | |||
| "qbj" -> { | |||
| return YzxEnv( | |||
| APP_NAME = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/app/base-logo-txt-qbj.png", | |||
| LOGO = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/app/login-logo.png", | |||
| ENV_NAME = ENV_NAME, | |||
| MP_APPID = MP_APPID, | |||
| MP_ID = MP_ID, | |||
| WS_URL = WS_URL | |||
| ) | |||
| } | |||
| "cszxy" -> { | |||
| return YzxEnv( | |||
| APP_NAME = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/app/base-logo-txt-cszxy.png", | |||
| LOGO = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/app/login-logo.png", | |||
| ENV_NAME = ENV_NAME, | |||
| MP_APPID = MP_APPID, | |||
| MP_ID = MP_ID, | |||
| WS_URL = WS_URL | |||
| ) | |||
| } | |||
| "kz" -> { | |||
| return YzxEnv( | |||
| APP_NAME = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/logo/name-kezhong.png", | |||
| LOGO = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/logo/logo-kezhong.png", | |||
| ENV_NAME = ENV_NAME, | |||
| MP_APPID = MP_APPID, | |||
| MP_ID = "101", | |||
| WS_URL = WS_URL | |||
| ) | |||
| } | |||
| else -> return YzxEnv( | |||
| APP_NAME = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/app/base-logo-txt-qbj.png", | |||
| LOGO = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/app/login-logo.png", | |||
| ENV_NAME = ENV_NAME, | |||
| MP_APPID = MP_APPID, | |||
| MP_ID = MP_ID, | |||
| WS_URL = WS_URL | |||
| ) | |||
| } | |||
| } | |||
| const val STU_CHANGE_STATUS_DROP_OUT = 42001 | |||
| @@ -36,4 +83,13 @@ object Config { | |||
| StuChangeType(STU_CHANGE_STATUS_INTROSPECTION,"回家反省","反省"), | |||
| StuChangeType(STU_CHANGE_STATUS_INTERNSHIP,"实习","反省") | |||
| ) | |||
| } | |||
| } | |||
| data class YzxEnv( | |||
| var APP_NAME: String, | |||
| var LOGO: String, | |||
| var ENV_NAME: String, | |||
| var MP_APPID: String, | |||
| var MP_ID: String, | |||
| var WS_URL: String | |||
| ) | |||
| @@ -265,7 +265,7 @@ class ClassBrandFragment : BaseFragment<ClassBrandPresenter>(), ClassBrandView { | |||
| classTeaNameTv?.let { | |||
| classTeaNameTv.text = info.class_teacher.user_name | |||
| classStuCountTv.text = "本班人数:${info.class_student_num}人" | |||
| faceCountTv.text = "刷脸入校:${info.brushed_face_num}人" | |||
| faceCountTv.text = "实到:${info.brushed_face_num}人" | |||
| noFaceCountTv.text = "未刷脸:${info.unbrushed_face_num}人" | |||
| leaveCountTv.text = "请假:${info.leave_num}人" | |||
| @@ -14,8 +14,8 @@ import android.widget.ImageView | |||
| import android.widget.TextView | |||
| import androidx.recyclerview.widget.LinearLayoutManager | |||
| import com.blankj.utilcode.util.* | |||
| import com.huantansheng.easyphotos.EasyPhotos | |||
| import com.huantansheng.easyphotos.models.album.entity.Photo | |||
| //import com.huantansheng.easyphotos.EasyPhotos | |||
| //import com.huantansheng.easyphotos.models.album.entity.Photo | |||
| import com.qmuiteam.qmui.widget.dialog.QMUIDialog | |||
| import com.qmuiteam.qmui.widget.dialog.QMUITipDialog | |||
| import com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton | |||
| @@ -271,9 +271,9 @@ class HomeFragment : BaseFragment<HomePresenter>(), HomeView, | |||
| } | |||
| private fun openCamera() { | |||
| EasyPhotos.createCamera(this, true) | |||
| .setFileProviderAuthority("${activity?.packageName}.fileProvider") | |||
| .start(CAMER_REQUEST_CODE)//也可以选择链式调用写法 | |||
| // EasyPhotos.createCamera(this, true) | |||
| // .setFileProviderAuthority("${activity?.packageName}.fileProvider") | |||
| // .start(CAMER_REQUEST_CODE)//也可以选择链式调用写法 | |||
| } | |||
| @@ -527,17 +527,17 @@ class HomeFragment : BaseFragment<HomePresenter>(), HomeView, | |||
| override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { | |||
| if (resultCode == Activity.RESULT_OK) { | |||
| if (requestCode == CAMER_REQUEST_CODE) { | |||
| val photos = data?.getParcelableArrayListExtra<Photo>(EasyPhotos.RESULT_PHOTOS) | |||
| LogUtils.d("photos", photos) | |||
| photos?.apply { | |||
| if (this.size > 0) { | |||
| mVacationAttachment.name = this[0].name | |||
| FileUpload.upload(this[0].path, this@HomeFragment) | |||
| } | |||
| } | |||
| } | |||
| // if (requestCode == CAMER_REQUEST_CODE) { | |||
| // val photos = data?.getParcelableArrayListExtra<Photo>(EasyPhotos.RESULT_PHOTOS) | |||
| // LogUtils.d("photos", photos) | |||
| // photos?.apply { | |||
| // if (this.size > 0) { | |||
| // mVacationAttachment.name = this[0].name | |||
| // FileUpload.upload(this[0].path, this@HomeFragment) | |||
| // } | |||
| // } | |||
| // | |||
| // } | |||
| } | |||
| super.onActivityResult(requestCode, resultCode, data) | |||
| @@ -156,9 +156,10 @@ class LoginPresenter(view: LoginView) : BasePresenter<LoginView>(view) { | |||
| fun getWXQrCode() { | |||
| val url = Config.BASE_URL + YzxInterface.INTERFACE_GENERATE_WX_QR_TICKET | |||
| var env = Config.getEvn() | |||
| OkGo.post<YzxResponse<WxQrTicket>>(url) | |||
| .tag(this) | |||
| .params("mp_id", 4) | |||
| .params("mp_id", env.MP_ID) | |||
| .execute(object : JsonCallBack<YzxResponse<WxQrTicket>>() { | |||
| override fun onSuccess(response: Response<YzxResponse<WxQrTicket>>?) { | |||
| if (response?.isSuccessful == true) { | |||
| @@ -6,27 +6,38 @@ import android.widget.ImageView | |||
| import com.blankj.utilcode.util.TimeUtils | |||
| import com.bumptech.glide.Glide | |||
| import com.yzx.ebrand.R | |||
| import com.yzx.ebrand.config.Config | |||
| import java.text.SimpleDateFormat | |||
| import java.util.TimeZone | |||
| fun ImageView.setSrc(identity: String, key: String) { | |||
| val url = "https://${identity.ifEmpty { "filea" }}.oa.qbjjyyun.net/edufile/imageView?uniqueKey=${key}" | |||
| var url = | |||
| "https://${identity.ifEmpty { "filea" }}.oa.qbjjyyun.net/edufile/imageView?uniqueKey=${key}" | |||
| if ("cszxy" == Config.ENV_NAME || "kz" == Config.ENV_NAME) { | |||
| url = "https://file.educlouddata.com/edufile/imageView?uniqueKey=${key}" | |||
| } | |||
| Glide.with(this) | |||
| .load(url) | |||
| .placeholder(R.color.gray_1) | |||
| .into(this) | |||
| this.setTag(R.id.image_src_tag,url) | |||
| this.setTag(R.id.image_src_tag, url) | |||
| } | |||
| fun String.getImgUrl(key: String):String{ | |||
| return "https://${this.ifEmpty { "filea" }}.oa.qbjjyyun.net/edufile/imageView?uniqueKey=${key}" | |||
| var url = | |||
| "https://${this.ifEmpty { "filea" }}.oa.qbjjyyun.net/edufile/imageView?uniqueKey=${key}" | |||
| if ("cszxy" == Config.ENV_NAME || "kz" == Config.ENV_NAME) { | |||
| url = "https://file.educlouddata.com/edufile/imageView?uniqueKey=${key}" | |||
| } | |||
| return url | |||
| } | |||
| fun ImageView.setSrc(url: String) { | |||
| Glide.with(this) | |||
| .load(url) | |||
| .placeholder(R.color.gray_1) | |||
| .centerInside() | |||
| .into(this) | |||
| } | |||
| fun Int.toTime(format:String = "yyyy-MM-dd HH:mm"): String { | |||
| @@ -1,26 +0,0 @@ | |||
| package com.yzx.ebrand.widget | |||
| import android.content.Context | |||
| import android.view.MotionEvent | |||
| import es.voghdev.pdfviewpager.library.PDFViewPager | |||
| class YzxPDFViewPager(context:Context,path:String):PDFViewPager(context,path){ | |||
| override fun setCurrentItem(item: Int, smoothScroll: Boolean) { | |||
| super.setCurrentItem(item, false) | |||
| } | |||
| override fun setCurrentItem(item: Int) { | |||
| super.setCurrentItem(item,false) | |||
| } | |||
| override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean { | |||
| return false | |||
| } | |||
| override fun onTouchEvent(ev: MotionEvent?): Boolean { | |||
| return false | |||
| } | |||
| } | |||
| @@ -0,0 +1,9 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <shape xmlns:android="http://schemas.android.com/apk/res/android"> | |||
| <gradient android:angle="0" | |||
| android:startColor="#b2CAE2FF" | |||
| android:endColor="#b200A2FF"/> | |||
| <corners android:radius="10dp" | |||
| android:bottomRightRadius="0dp" | |||
| android:topRightRadius="0dp"></corners> | |||
| </shape> | |||
| @@ -2,7 +2,7 @@ | |||
| <bitmap xmlns:android="http://schemas.android.com/apk/res/android" | |||
| android:gravity="bottom" | |||
| android:dither="true" | |||
| android:src="@mipmap/login_bg" | |||
| android:src="@mipmap/login_bg_v2" | |||
| android:tileMode="disabled"> | |||
| </bitmap> | |||
| @@ -1,6 +1,7 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <shape xmlns:android="http://schemas.android.com/apk/res/android"> | |||
| <corners android:radius="10dp"></corners> | |||
| <corners android:radius="10dp" | |||
| android:bottomLeftRadius="0dp" | |||
| android:topLeftRadius="0dp"></corners> | |||
| <solid android:color="@color/white"></solid> | |||
| <stroke android:width="@dimen/d_30" android:color="#01000000"></stroke> | |||
| </shape> | |||
| @@ -11,171 +11,185 @@ | |||
| android:src="@drawable/login_bg" | |||
| android:scaleType="centerCrop"/> | |||
| <ScrollView | |||
| <!-- <ScrollView--> | |||
| <!-- android:layout_width="match_parent"--> | |||
| <!-- android:layout_height="match_parent">--> | |||
| <LinearLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="match_parent"> | |||
| android:layout_height="wrap_content" | |||
| android:layout_centerInParent="true" | |||
| android:gravity="center"> | |||
| <LinearLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginTop="200dp" | |||
| android:gravity="center"> | |||
| <androidx.appcompat.widget.LinearLayoutCompat | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:orientation="horizontal"> | |||
| <androidx.appcompat.widget.LinearLayoutCompat | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:orientation="vertical"> | |||
| android:layout_width="500dp" | |||
| android:layout_height="400dp" | |||
| android:orientation="vertical" | |||
| android:gravity="center" | |||
| android:background="@drawable/bg_left"> | |||
| <ImageView | |||
| android:id="@+id/img1" | |||
| android:layout_width="279dp" | |||
| android:layout_height="179dp"/> | |||
| <TextView | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="center_horizontal" | |||
| android:text="成都市青白江区教育一体化综合平台" | |||
| android:textColor="#3ca0e9" | |||
| android:textSize="40dp" | |||
| android:textStyle="bold" /> | |||
| android:text="------------------------ 欢迎登录 ------------------------" | |||
| android:textColor="#fff" | |||
| android:textSize="20dp" | |||
| android:textStyle="normal" | |||
| android:layout_marginTop="20dp"/> | |||
| <ImageView | |||
| android:id="@+id/img2" | |||
| android:layout_width="380dp" | |||
| android:layout_height="65dp" | |||
| android:layout_marginTop="20dp"/> | |||
| <TextView | |||
| android:layout_width="wrap_content" | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| <androidx.appcompat.widget.LinearLayoutCompat | |||
| android:layout_width="500dp" | |||
| android:layout_height="400dp" | |||
| android:layout_gravity="center_horizontal" | |||
| android:background="@drawable/shape_login_form" | |||
| android:orientation="vertical" | |||
| android:gravity="center" | |||
| android:padding="0dp"> | |||
| <com.flyco.tablayout.CommonTabLayout | |||
| android:id="@+id/tabLayout" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="50dp" | |||
| app:tl_iconVisible="false" | |||
| app:tl_indicator_color="#3ca0e9" | |||
| app:tl_indicator_height="@dimen/dp_4" | |||
| app:tl_indicator_width="150dp" | |||
| app:tl_textSelectColor="#3ca0e9" | |||
| app:tl_textUnselectColor="#333" | |||
| app:tl_textsize="18dp" /> | |||
| <androidx.appcompat.widget.LinearLayoutCompat | |||
| android:id="@+id/qrLayout" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="center_horizontal" | |||
| android:layout_marginTop="14dp" | |||
| android:text="---------- Chengdu Qingbaijiang Integrated Education Platform ---------" | |||
| android:textColor="#3ca0e9" | |||
| android:textSize="16dp" | |||
| android:textStyle="normal" /> | |||
| android:layout_marginTop="@dimen/d_20" | |||
| android:orientation="vertical" | |||
| android:gravity="center_horizontal" | |||
| android:paddingHorizontal="@dimen/d_30" | |||
| android:visibility="gone"> | |||
| <ImageView | |||
| android:id="@+id/qrCodeImg" | |||
| android:layout_width="200dp" | |||
| android:layout_height="200dp" | |||
| android:background="@color/blue2"/> | |||
| <TextView | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:text="扫码 > 关注 > 登录" | |||
| android:layout_marginTop="@dimen/d_20" | |||
| android:background="@drawable/shape_login_round" | |||
| android:textColor="@color/white" | |||
| android:paddingVertical="@dimen/d_10" | |||
| android:paddingHorizontal="@dimen/d_30"/> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| <androidx.appcompat.widget.LinearLayoutCompat | |||
| android:layout_width="500dp" | |||
| android:layout_height="400dp" | |||
| android:layout_gravity="center_horizontal" | |||
| android:layout_marginTop="@dimen/d_30" | |||
| android:background="@drawable/shape_login_form" | |||
| android:id="@+id/accountLayout" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginTop="@dimen/d_20" | |||
| android:orientation="vertical" | |||
| android:padding="@dimen/d_20"> | |||
| android:paddingHorizontal="@dimen/d_30" | |||
| android:visibility="visible"> | |||
| <com.flyco.tablayout.CommonTabLayout | |||
| android:id="@+id/tabLayout" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="50dp" | |||
| app:tl_iconVisible="false" | |||
| app:tl_indicator_color="#3ca0e9" | |||
| app:tl_indicator_height="@dimen/dp_4" | |||
| app:tl_indicator_width="150dp" | |||
| app:tl_textSelectColor="#3ca0e9" | |||
| app:tl_textUnselectColor="#333" | |||
| app:tl_textsize="18dp" /> | |||
| <androidx.appcompat.widget.LinearLayoutCompat | |||
| android:id="@+id/qrLayout" | |||
| <LinearLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginTop="@dimen/d_20" | |||
| android:orientation="vertical" | |||
| android:gravity="center_horizontal" | |||
| android:paddingHorizontal="@dimen/d_30" | |||
| android:visibility="gone"> | |||
| android:background="#f0f3f5" | |||
| android:padding="@dimen/d_10" | |||
| android:gravity="center_vertical"> | |||
| <ImageView | |||
| android:id="@+id/qrCodeImg" | |||
| android:layout_width="200dp" | |||
| android:layout_height="200dp" | |||
| android:background="@color/blue2"/> | |||
| <TextView | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:text="扫码 > 关注 > 登录" | |||
| android:layout_marginTop="@dimen/d_20" | |||
| android:background="@drawable/shape_login_round" | |||
| android:textColor="@color/white" | |||
| android:paddingVertical="@dimen/d_10" | |||
| android:paddingHorizontal="@dimen/d_30"/> | |||
| android:src="@mipmap/ic_psw" /> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| <androidx.appcompat.widget.LinearLayoutCompat | |||
| android:id="@+id/accountLayout" | |||
| <EditText | |||
| android:id="@+id/accountEdit" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginLeft="@dimen/d_10" | |||
| android:layout_weight="1" | |||
| android:background="@null" | |||
| android:hint="账号" | |||
| android:text="" | |||
| android:inputType="phone" | |||
| android:singleLine="true" /> | |||
| </LinearLayout> | |||
| <LinearLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginTop="@dimen/d_20" | |||
| android:orientation="vertical" | |||
| android:paddingHorizontal="@dimen/d_30" | |||
| android:visibility="visible"> | |||
| android:layout_marginTop="@dimen/d_30" | |||
| android:background="#f0f3f5" | |||
| android:padding="@dimen/d_10" | |||
| android:gravity="center_vertical"> | |||
| <LinearLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:background="#f0f3f5" | |||
| android:padding="@dimen/d_10" | |||
| android:gravity="center_vertical"> | |||
| <ImageView | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:src="@mipmap/ic_psw" /> | |||
| <EditText | |||
| android:id="@+id/accountEdit" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginLeft="@dimen/d_10" | |||
| android:layout_weight="1" | |||
| android:background="@null" | |||
| android:hint="账号" | |||
| android:text="" | |||
| android:inputType="phone" | |||
| android:singleLine="true" /> | |||
| </LinearLayout> | |||
| <LinearLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginTop="@dimen/d_30" | |||
| android:background="#f0f3f5" | |||
| android:padding="@dimen/d_10" | |||
| android:gravity="center_vertical"> | |||
| <ImageView | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:src="@mipmap/ic_account" /> | |||
| <EditText | |||
| android:id="@+id/pswEdit" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginLeft="@dimen/d_10" | |||
| android:layout_weight="1" | |||
| android:background="@null" | |||
| android:inputType="textPassword" | |||
| android:hint="密码" | |||
| android:text="" | |||
| android:singleLine="true" /> | |||
| </LinearLayout> | |||
| <CheckBox | |||
| android:id="@+id/pswCheckbox" | |||
| <ImageView | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:text="记住账号密码" | |||
| android:checked="true" | |||
| android:layout_marginTop="@dimen/d_20"/> | |||
| android:src="@mipmap/ic_account" /> | |||
| <androidx.appcompat.widget.AppCompatButton | |||
| android:id="@+id/loginBtn" | |||
| android:layout_width="match_parent" | |||
| <EditText | |||
| android:id="@+id/pswEdit" | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:text="登 录" | |||
| android:layout_marginTop="@dimen/d_20" | |||
| android:background="@drawable/btn_blue_select" | |||
| android:textColor="@color/white" | |||
| android:textSize="@dimen/d_20"/> | |||
| android:layout_marginLeft="@dimen/d_10" | |||
| android:layout_weight="1" | |||
| android:background="@null" | |||
| android:inputType="textPassword" | |||
| android:hint="密码" | |||
| android:text="" | |||
| android:singleLine="true" /> | |||
| </LinearLayout> | |||
| <CheckBox | |||
| android:id="@+id/pswCheckbox" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:text="记住账号密码" | |||
| android:checked="true" | |||
| android:layout_marginTop="@dimen/d_20"/> | |||
| <androidx.appcompat.widget.AppCompatButton | |||
| android:id="@+id/loginBtn" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:text="登 录" | |||
| android:layout_marginTop="@dimen/d_20" | |||
| android:background="@drawable/btn_blue_select" | |||
| android:textColor="@color/white" | |||
| android:textSize="@dimen/d_20"/> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| </LinearLayout> | |||
| </ScrollView> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| </LinearLayout> | |||
| <!-- </ScrollView>--> | |||
| </RelativeLayout> | |||
| @@ -9,7 +9,7 @@ | |||
| <LinearLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_height="155dp" | |||
| android:orientation="horizontal"> | |||
| <com.qmuiteam.qmui.widget.QMUIRadiusImageView | |||
| @@ -2,7 +2,7 @@ | |||
| buildscript { | |||
| apply from: 'versions.gradle' | |||
| ext.kotlin_version = '1.3.71' | |||
| ext.kotlin_version = '1.6.21' | |||
| ext.anko_version='0.10.8' | |||
| repositories { | |||
| google() | |||