├── App
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── icon_scan.png
│ │ │ │ ├── bg_me_header.png
│ │ │ │ ├── icon_address.png
│ │ │ │ ├── icon_order.png
│ │ │ │ ├── icon_setting.png
│ │ │ │ ├── icon_share.png
│ │ │ │ ├── icon_special.png
│ │ │ │ ├── home_container_bg.jpeg
│ │ │ │ ├── icon_order_wait_pay.png
│ │ │ │ ├── icon_order_completed.png
│ │ │ │ └── icon_order_wait_confirm.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ └── colors.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ └── layout
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── activity_setting.xml
│ │ │ │ └── layout_topic_item.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── kotlin
│ │ │ │ └── mall
│ │ │ │ ├── common
│ │ │ │ └── MainApplication.kt
│ │ │ │ └── ui
│ │ │ │ ├── fragment
│ │ │ │ └── MessageFragment.kt
│ │ │ │ ├── activity
│ │ │ │ └── SettingActivity.kt
│ │ │ │ └── adapter
│ │ │ │ └── TopicAdapter.kt
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── kotlin
│ │ │ └── mall
│ │ │ └── ExampleUnitTest.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── kotlin
│ │ └── mall
│ │ └── ExampleInstrumentedTest.kt
├── proguard-rules.pro
└── build.gradle
├── PaySDK
├── .gitignore
├── libs
│ └── alipaySdk-20170725.jar
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── drawable-xxhdpi
│ │ │ │ ├── pay_type_bank.png
│ │ │ │ ├── pay_type_alipay.png
│ │ │ │ └── pay_type_weixin.png
│ │ └── java
│ │ │ └── com
│ │ │ └── kotlin
│ │ │ └── pay
│ │ │ ├── data
│ │ │ ├── protocol
│ │ │ │ ├── PayOrderReq.kt
│ │ │ │ └── GetPaySignReq.kt
│ │ │ ├── api
│ │ │ │ └── PayApi.kt
│ │ │ └── repository
│ │ │ │ └── PayRepository.kt
│ │ │ ├── c.kt
│ │ │ ├── ui
│ │ │ └── cc.kt
│ │ │ ├── presenter
│ │ │ ├── view
│ │ │ │ └── PayView.kt
│ │ │ └── PayPresenter.kt
│ │ │ ├── service
│ │ │ ├── PayService.kt
│ │ │ └── impl
│ │ │ │ └── PayServiceImpl.kt
│ │ │ └── injection
│ │ │ ├── module
│ │ │ └── PayModule.kt
│ │ │ └── component
│ │ │ └── PayComponent.kt
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── kotlin
│ │ │ └── pay
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── kotlin
│ │ └── pay
│ │ └── ExampleInstrumentedTest.java
└── proguard-rules.pro
├── BaseLibrary
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── ids.xml
│ │ │ │ ├── attrs.xml
│ │ │ │ ├── strings.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ └── colors.xml
│ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── icon_back.png
│ │ │ │ ├── loading0.png
│ │ │ │ ├── loading1.png
│ │ │ │ ├── loading2.png
│ │ │ │ ├── loading3.png
│ │ │ │ ├── loading4.png
│ │ │ │ ├── loading5.png
│ │ │ │ ├── loading6.png
│ │ │ │ ├── loading7.png
│ │ │ │ ├── icon_arrow.png
│ │ │ │ ├── icon_search.png
│ │ │ │ ├── icon_box_nor.png
│ │ │ │ ├── default_loading.png
│ │ │ │ ├── icon_box_checked.png
│ │ │ │ ├── icon_state_error.png
│ │ │ │ ├── btn_nav_cart_normal.png
│ │ │ │ ├── btn_nav_cart_press.png
│ │ │ │ ├── btn_nav_home_normal.png
│ │ │ │ ├── btn_nav_home_press.png
│ │ │ │ ├── btn_nav_msg_normal.png
│ │ │ │ ├── btn_nav_msg_press.png
│ │ │ │ ├── btn_nav_user_normal.png
│ │ │ │ ├── btn_nav_user_press.png
│ │ │ │ ├── icon_default_user.png
│ │ │ │ ├── icon_favorite_nor.png
│ │ │ │ ├── icon_favorite_checked.png
│ │ │ │ ├── btn_nav_category_normal.png
│ │ │ │ ├── btn_nav_category_press.png
│ │ │ │ ├── light_progress_loading1.png
│ │ │ │ ├── light_progress_loading10.png
│ │ │ │ ├── light_progress_loading11.png
│ │ │ │ ├── light_progress_loading2.png
│ │ │ │ ├── light_progress_loading3.png
│ │ │ │ ├── light_progress_loading4.png
│ │ │ │ ├── light_progress_loading5.png
│ │ │ │ ├── light_progress_loading6.png
│ │ │ │ ├── light_progress_loading7.png
│ │ │ │ ├── light_progress_loading8.png
│ │ │ │ └── light_progress_loading9.png
│ │ │ ├── drawable
│ │ │ │ ├── btn_common_nor.xml
│ │ │ │ ├── btn_common_disable.xml
│ │ │ │ ├── btn_common_pressed.xml
│ │ │ │ ├── border_all.xml
│ │ │ │ ├── border_corner_all.xml
│ │ │ │ ├── border_corner_all_blue.xml
│ │ │ │ ├── bottom_nav_text_selector.xml
│ │ │ │ ├── corner_blue_white_bg.xml
│ │ │ │ ├── corner_gray_white_bg.xml
│ │ │ │ ├── tab_selector.xml
│ │ │ │ ├── home_header_corner_bg.xml
│ │ │ │ ├── progress_dialog_bg.xml
│ │ │ │ ├── btn_common_selector.xml
│ │ │ │ ├── common_check_selector.xml
│ │ │ │ ├── border_top.xml
│ │ │ │ ├── border_bottom.xml
│ │ │ │ ├── border_bottom_gray.xml
│ │ │ │ ├── collect_selector.xml
│ │ │ │ ├── bottom_nav_cart_selector.xml
│ │ │ │ ├── state_loading.xml
│ │ │ │ └── progress_dialog_anim.xml
│ │ │ ├── anim
│ │ │ │ ├── push_bottom_in.xml
│ │ │ │ └── push_bottom_out.xml
│ │ │ └── layout
│ │ │ │ ├── layout_state_empty.xml
│ │ │ │ ├── progress_dialog.xml
│ │ │ │ ├── layout_state_error.xml
│ │ │ │ ├── layout_label_textview.xml
│ │ │ │ ├── layout_state_loading.xml
│ │ │ │ └── layout_header_bar.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── kotlin
│ │ │ │ └── base
│ │ │ │ ├── rx
│ │ │ │ ├── BaseException.kt
│ │ │ │ ├── BaseFunc.kt
│ │ │ │ ├── BaseSubscriber.kt
│ │ │ │ └── BaseFuncBoolean.kt
│ │ │ │ ├── ui
│ │ │ │ ├── fragment
│ │ │ │ │ └── BaseFragment.kt
│ │ │ │ ├── activity
│ │ │ │ │ └── BaseActivity.kt
│ │ │ │ └── adapter
│ │ │ │ │ └── BaseRecyclerViewAdapter.kt
│ │ │ │ ├── presenter
│ │ │ │ ├── view
│ │ │ │ │ └── BaseView.kt
│ │ │ │ └── BasePresenter.kt
│ │ │ │ ├── common
│ │ │ │ ├── ResultCode.kt
│ │ │ │ ├── BaseConstant.kt
│ │ │ │ └── BaseApplication.kt
│ │ │ │ ├── injection
│ │ │ │ ├── ActivityScope.kt
│ │ │ │ ├── PerComponentScope.kt
│ │ │ │ ├── component
│ │ │ │ │ ├── AppComponent.kt
│ │ │ │ │ └── ActivityComponent.kt
│ │ │ │ └── module
│ │ │ │ │ ├── LifecycleProviderModule.kt
│ │ │ │ │ ├── AppModule.kt
│ │ │ │ │ └── ActivityModule.kt
│ │ │ │ ├── data
│ │ │ │ └── protocol
│ │ │ │ │ └── BaseResp.kt
│ │ │ │ ├── widgets
│ │ │ │ ├── DefaultTextWatcher.kt
│ │ │ │ ├── BannerImageLoader.kt
│ │ │ │ └── LabelTextView.kt
│ │ │ │ └── utils
│ │ │ │ ├── NetWorkUtils.kt
│ │ │ │ └── GlideUtils.kt
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── kotlin
│ │ │ └── base
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── kotlin
│ │ └── base
│ │ └── ExampleInstrumentedTest.java
└── proguard-rules.pro
├── GoodsCenter
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ └── strings.xml
│ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── icon_gray_more.png
│ │ │ │ ├── category_banner.png
│ │ │ │ └── icon_search_history.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ │ └── add_cart_pop_close.png
│ │ │ ├── drawable
│ │ │ │ ├── sku_text_selector.xml
│ │ │ │ ├── top_category_bg_selector.xml
│ │ │ │ ├── top_category_text_selector.xml
│ │ │ │ └── sku_bg_selector.xml
│ │ │ └── layout
│ │ │ │ ├── activity_cart.xml
│ │ │ │ ├── layout_top_category_item.xml
│ │ │ │ ├── layout_search_history_item.xml
│ │ │ │ ├── layout_second_category_item.xml
│ │ │ │ ├── fragment_goods_detail_tab_two.xml
│ │ │ │ ├── layout_sku_view.xml
│ │ │ │ ├── layout_sku_item.xml
│ │ │ │ ├── activity_goods.xml
│ │ │ │ └── layout_goods_item.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── kotlin
│ │ │ │ └── goods
│ │ │ │ ├── event
│ │ │ │ ├── AddCartEvent.kt
│ │ │ │ ├── SkuChangedEvent.kt
│ │ │ │ ├── UpdateCartSizeEvent.kt
│ │ │ │ ├── UpdateTotalPriceEvent.kt
│ │ │ │ ├── CartAllCheckedEvent.kt
│ │ │ │ └── GoodsDetailImageEvent.kt
│ │ │ │ ├── data
│ │ │ │ ├── protocol
│ │ │ │ │ ├── GetGoodsDetailReq.kt
│ │ │ │ │ ├── GetCategoryReq.kt
│ │ │ │ │ ├── GetGoodsListReq.kt
│ │ │ │ │ ├── DeleteCartReq.kt
│ │ │ │ │ ├── SubmitCartReq.kt
│ │ │ │ │ ├── GetGoodsListByKeywordReq.kt
│ │ │ │ │ ├── GoodsSku.kt
│ │ │ │ │ ├── Category.kt
│ │ │ │ │ ├── AddCartReq.kt
│ │ │ │ │ ├── CartGoods.kt
│ │ │ │ │ └── Goods.kt
│ │ │ │ ├── a.kt
│ │ │ │ ├── api
│ │ │ │ │ ├── CategoryApi.kt
│ │ │ │ │ ├── GoodsApi.kt
│ │ │ │ │ └── CartApi.kt
│ │ │ │ └── repository
│ │ │ │ │ ├── CategoryRepository.kt
│ │ │ │ │ └── GoodsRepository.kt
│ │ │ │ ├── ui
│ │ │ │ ├── a.kt
│ │ │ │ ├── activity
│ │ │ │ │ └── CartActivity.kt
│ │ │ │ └── adapter
│ │ │ │ │ ├── GoodsDetailVpAdapter.kt
│ │ │ │ │ ├── SearchHistoryAdapter.kt
│ │ │ │ │ ├── SecondCategoryAdapter.kt
│ │ │ │ │ └── TopCategoryAdapter.kt
│ │ │ │ ├── Ext.kt
│ │ │ │ ├── service
│ │ │ │ ├── CategoryService.kt
│ │ │ │ ├── GoodsService.kt
│ │ │ │ ├── impl
│ │ │ │ │ ├── CategoryServiceImpl.kt
│ │ │ │ │ └── GoodsServiceImpl.kt
│ │ │ │ └── CartService.kt
│ │ │ │ ├── presenter
│ │ │ │ ├── view
│ │ │ │ │ ├── GoodsListView.kt
│ │ │ │ │ ├── CategoryView.kt
│ │ │ │ │ ├── GoodsDetailView.kt
│ │ │ │ │ └── CartListView.kt
│ │ │ │ └── CategoryPresenter.kt
│ │ │ │ ├── injection
│ │ │ │ ├── module
│ │ │ │ │ ├── GoodsModule.kt
│ │ │ │ │ ├── CategoryModule.kt
│ │ │ │ │ └── CartModule.kt
│ │ │ │ └── component
│ │ │ │ │ ├── CategoryComponent.kt
│ │ │ │ │ ├── CartComponent.kt
│ │ │ │ │ └── GoodsComponent.kt
│ │ │ │ └── common
│ │ │ │ └── GoodsConstant.kt
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── kotlin
│ │ │ └── goods
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── kotlin
│ │ └── goods
│ │ └── ExampleInstrumentedTest.java
└── proguard-rules.pro
├── OrderCenter
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ ├── drawable-xxhdpi
│ │ │ │ └── icon_shop.png
│ │ │ └── layout
│ │ │ │ ├── fragment_order.xml
│ │ │ │ ├── activity_order.xml
│ │ │ │ └── activity_address.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── kotlin
│ │ │ │ └── order
│ │ │ │ ├── data
│ │ │ │ ├── protocol
│ │ │ │ │ ├── CancelOrderReq.kt
│ │ │ │ │ ├── SubmitOrderReq.kt
│ │ │ │ │ ├── ConfirmOrderReq.kt
│ │ │ │ │ ├── DeleteShipAddressReq.kt
│ │ │ │ │ ├── GetOrderByIdReq.kt
│ │ │ │ │ ├── GetOrderListReq.kt
│ │ │ │ │ ├── AddShipAddressReq.kt
│ │ │ │ │ ├── EditShipAddressReq.kt
│ │ │ │ │ ├── Order.kt
│ │ │ │ │ ├── OrderGoods.kt
│ │ │ │ │ └── ShipAddress.kt
│ │ │ │ └── api
│ │ │ │ │ ├── OrderApi.kt
│ │ │ │ │ └── ShipAddressApi.kt
│ │ │ │ ├── a.kt
│ │ │ │ ├── event
│ │ │ │ └── SelectAddressEvent.kt
│ │ │ │ ├── presenter
│ │ │ │ ├── view
│ │ │ │ │ ├── OrderDetailView.kt
│ │ │ │ │ ├── OrderConfirmView.kt
│ │ │ │ │ ├── EditShipAddressView.kt
│ │ │ │ │ ├── OrderListView.kt
│ │ │ │ │ └── ShipAddressView.kt
│ │ │ │ └── OrderDetailPresenter.kt
│ │ │ │ ├── common
│ │ │ │ ├── OrderStatus.kt
│ │ │ │ └── OrderConstant.kt
│ │ │ │ ├── injection
│ │ │ │ ├── module
│ │ │ │ │ ├── OrderModule.kt
│ │ │ │ │ └── ShipAddressModule.kt
│ │ │ │ └── component
│ │ │ │ │ ├── ShipAddressComponent.kt
│ │ │ │ │ └── OrderComponent.kt
│ │ │ │ ├── service
│ │ │ │ ├── ShipAddressService.kt
│ │ │ │ └── OrderService.kt
│ │ │ │ └── ui
│ │ │ │ ├── adapter
│ │ │ │ └── OrderVpAdapter.kt
│ │ │ │ └── activity
│ │ │ │ └── OrderActivity.kt
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── kotlin
│ │ │ └── order
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── kotlin
│ │ └── order
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
└── build.gradle
├── Provider
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ └── values
│ │ │ │ └── strings.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── kotlin
│ │ │ └── provider
│ │ │ ├── v.kt
│ │ │ ├── common
│ │ │ ├── ProviderConstant.kt
│ │ │ └── CommonUtils.kt
│ │ │ └── router
│ │ │ └── RouterPath.kt
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── kotlin
│ │ │ └── provider
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── kotlin
│ │ └── provider
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
└── build.gradle
├── UserCenter
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── icon_phone.png
│ │ │ │ ├── icon_pwd.png
│ │ │ │ ├── icon_user_name.png
│ │ │ │ └── icon_verify_code.png
│ │ │ └── drawable
│ │ │ │ ├── gender_bg_selector.xml
│ │ │ │ ├── gender_nor_bg.xml
│ │ │ │ ├── gender_checked_bg.xml
│ │ │ │ └── gender_text_selector.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── kotlin
│ │ │ │ └── user
│ │ │ │ ├── data
│ │ │ │ ├── protocol
│ │ │ │ │ ├── ResetPwdReq.kt
│ │ │ │ │ ├── ForgetPwdReq.kt
│ │ │ │ │ ├── LoginReq.kt
│ │ │ │ │ ├── RegisterReq.kt
│ │ │ │ │ ├── EditUserReq.kt
│ │ │ │ │ └── UserInfo.kt
│ │ │ │ ├── api
│ │ │ │ │ ├── UploadApi.kt
│ │ │ │ │ └── UserApi.kt
│ │ │ │ └── respository
│ │ │ │ │ └── UploadRepository.kt
│ │ │ │ ├── test.java
│ │ │ │ ├── ui
│ │ │ │ └── a.java
│ │ │ │ ├── service
│ │ │ │ ├── UploadService.kt
│ │ │ │ ├── impl
│ │ │ │ │ └── UploadServiceImpl.kt
│ │ │ │ └── UserService.kt
│ │ │ │ ├── presenter
│ │ │ │ ├── view
│ │ │ │ │ ├── RegisterView.kt
│ │ │ │ │ ├── ResetPwdView.kt
│ │ │ │ │ ├── LoginView.kt
│ │ │ │ │ ├── ForgetPwdView.kt
│ │ │ │ │ └── UserInfoView.kt
│ │ │ │ ├── ForgetPwdPresenter.kt
│ │ │ │ ├── LoginPresenter.kt
│ │ │ │ ├── ResetPwdPresenter.kt
│ │ │ │ └── RegisterPresenter.kt
│ │ │ │ ├── injection
│ │ │ │ ├── module
│ │ │ │ │ ├── UserModule.kt
│ │ │ │ │ └── UploadModule.kt
│ │ │ │ └── component
│ │ │ │ │ └── UserComponent.kt
│ │ │ │ └── utils
│ │ │ │ └── UserPrefsUtils.kt
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── kotlin
│ │ │ └── user
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── kotlin
│ │ └── user
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
└── build.gradle
├── MessageCenter
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ └── dimens.xml
│ │ │ ├── drawable-xxhdpi
│ │ │ │ └── icon_news.png
│ │ │ ├── anim
│ │ │ │ ├── news_bottom_out.xml
│ │ │ │ └── news_bottom_in.xml
│ │ │ ├── drawable
│ │ │ │ └── corner_news_bg.xml
│ │ │ └── layout
│ │ │ │ └── layout_news_flipper.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── kotlin
│ │ │ └── message
│ │ │ └── a.kt
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── kotlin
│ │ │ └── message
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── kotlin
│ │ └── message
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
└── build.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .idea
├── dictionaries
│ └── guiyanbing.xml
├── runConfigurations.xml
└── gradle.xml
├── settings.gradle
├── .gitignore
└── gradle.properties
/App/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/PaySDK/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/BaseLibrary/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/GoodsCenter/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/OrderCenter/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/Provider/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/UserCenter/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/MessageCenter/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/PaySDK/libs/alipaySdk-20170725.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/PaySDK/libs/alipaySdk-20170725.jar
--------------------------------------------------------------------------------
/PaySDK/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | PaySDK
3 |
4 |
--------------------------------------------------------------------------------
/Provider/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Provider
3 |
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/UserCenter/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | UserCenter
3 |
4 |
--------------------------------------------------------------------------------
/.idea/dictionaries/guiyanbing.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | GoodsCenter
3 |
4 |
--------------------------------------------------------------------------------
/MessageCenter/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | MessageCenter
3 |
4 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | OrderCenter
3 |
4 |
--------------------------------------------------------------------------------
/App/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/App/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':App', ':BaseLibrary', ':UserCenter', ':Provider', ':MessageCenter', ':OrderCenter', ':GoodsCenter', ':PaySDK'
2 |
--------------------------------------------------------------------------------
/App/src/main/res/drawable-xxhdpi/icon_scan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/drawable-xxhdpi/icon_scan.png
--------------------------------------------------------------------------------
/App/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/App/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/App/src/main/res/drawable-xxhdpi/bg_me_header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/drawable-xxhdpi/bg_me_header.png
--------------------------------------------------------------------------------
/App/src/main/res/drawable-xxhdpi/icon_address.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/drawable-xxhdpi/icon_address.png
--------------------------------------------------------------------------------
/App/src/main/res/drawable-xxhdpi/icon_order.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/drawable-xxhdpi/icon_order.png
--------------------------------------------------------------------------------
/App/src/main/res/drawable-xxhdpi/icon_setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/drawable-xxhdpi/icon_setting.png
--------------------------------------------------------------------------------
/App/src/main/res/drawable-xxhdpi/icon_share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/drawable-xxhdpi/icon_share.png
--------------------------------------------------------------------------------
/App/src/main/res/drawable-xxhdpi/icon_special.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/drawable-xxhdpi/icon_special.png
--------------------------------------------------------------------------------
/App/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Provider/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/App/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/App/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/App/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/event/AddCartEvent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.event
2 |
3 | /*
4 | 加入购物车事件
5 | */
6 | class AddCartEvent
7 |
--------------------------------------------------------------------------------
/MessageCenter/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/App/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/App/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/icon_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/icon_back.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/loading0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/loading0.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/loading1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/loading1.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/loading2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/loading2.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/loading3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/loading3.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/loading4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/loading4.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/loading5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/loading5.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/loading6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/loading6.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/loading7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/loading7.png
--------------------------------------------------------------------------------
/OrderCenter/src/main/res/drawable-xxhdpi/icon_shop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/OrderCenter/src/main/res/drawable-xxhdpi/icon_shop.png
--------------------------------------------------------------------------------
/PaySDK/src/main/res/drawable-xxhdpi/pay_type_bank.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/PaySDK/src/main/res/drawable-xxhdpi/pay_type_bank.png
--------------------------------------------------------------------------------
/UserCenter/src/main/res/drawable-xxhdpi/icon_phone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/UserCenter/src/main/res/drawable-xxhdpi/icon_phone.png
--------------------------------------------------------------------------------
/UserCenter/src/main/res/drawable-xxhdpi/icon_pwd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/UserCenter/src/main/res/drawable-xxhdpi/icon_pwd.png
--------------------------------------------------------------------------------
/App/src/main/res/drawable-xxhdpi/home_container_bg.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/drawable-xxhdpi/home_container_bg.jpeg
--------------------------------------------------------------------------------
/App/src/main/res/drawable-xxhdpi/icon_order_wait_pay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/drawable-xxhdpi/icon_order_wait_pay.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/icon_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/icon_arrow.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/icon_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/icon_search.png
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/event/SkuChangedEvent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.event
2 |
3 | /*
4 | SKU变化事件
5 | */
6 | class SkuChangedEvent
7 |
--------------------------------------------------------------------------------
/MessageCenter/src/main/res/drawable-xxhdpi/icon_news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/MessageCenter/src/main/res/drawable-xxhdpi/icon_news.png
--------------------------------------------------------------------------------
/PaySDK/src/main/res/drawable-xxhdpi/pay_type_alipay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/PaySDK/src/main/res/drawable-xxhdpi/pay_type_alipay.png
--------------------------------------------------------------------------------
/PaySDK/src/main/res/drawable-xxhdpi/pay_type_weixin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/PaySDK/src/main/res/drawable-xxhdpi/pay_type_weixin.png
--------------------------------------------------------------------------------
/App/src/main/res/drawable-xxhdpi/icon_order_completed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/drawable-xxhdpi/icon_order_completed.png
--------------------------------------------------------------------------------
/App/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | KotlinMall
3 | 登录/注册
4 |
5 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/icon_box_nor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/icon_box_nor.png
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/drawable-xxhdpi/icon_gray_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/GoodsCenter/src/main/res/drawable-xxhdpi/icon_gray_more.png
--------------------------------------------------------------------------------
/UserCenter/src/main/res/drawable-xxhdpi/icon_user_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/UserCenter/src/main/res/drawable-xxhdpi/icon_user_name.png
--------------------------------------------------------------------------------
/App/src/main/res/drawable-xxhdpi/icon_order_wait_confirm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/App/src/main/res/drawable-xxhdpi/icon_order_wait_confirm.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/default_loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/default_loading.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/icon_box_checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/icon_box_checked.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/icon_state_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/icon_state_error.png
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/event/UpdateCartSizeEvent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.event
2 |
3 | /*
4 | 更新购物车数量事件
5 | */
6 | class UpdateCartSizeEvent
7 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/event/UpdateTotalPriceEvent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.event
2 |
3 | /*
4 | 更新总价事件
5 | */
6 | class UpdateTotalPriceEvent
7 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/drawable-xxhdpi/category_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/GoodsCenter/src/main/res/drawable-xxhdpi/category_banner.png
--------------------------------------------------------------------------------
/UserCenter/src/main/res/drawable-xxhdpi/icon_verify_code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/UserCenter/src/main/res/drawable-xxhdpi/icon_verify_code.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_cart_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_cart_normal.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_cart_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_cart_press.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_home_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_home_normal.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_home_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_home_press.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_msg_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_msg_normal.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_msg_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_msg_press.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_user_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_user_normal.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_user_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_user_press.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/icon_default_user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/icon_default_user.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/icon_favorite_nor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/icon_favorite_nor.png
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/drawable-xxhdpi/icon_search_history.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/GoodsCenter/src/main/res/drawable-xxhdpi/icon_search_history.png
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/drawable-xxxhdpi/add_cart_pop_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/GoodsCenter/src/main/res/drawable-xxxhdpi/add_cart_pop_close.png
--------------------------------------------------------------------------------
/PaySDK/src/main/java/com/kotlin/pay/data/protocol/PayOrderReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.pay.data.protocol
2 |
3 | /*
4 | 支付订单
5 | */
6 | data class PayOrderReq(val orderId:Int)
7 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/icon_favorite_checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/icon_favorite_checked.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_category_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_category_normal.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_category_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/btn_nav_category_press.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading1.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading10.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading11.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading2.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading3.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading4.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading5.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading6.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading7.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading8.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guiyanbing/songster/HEAD/BaseLibrary/src/main/res/drawable-xxhdpi/light_progress_loading9.png
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/rx/BaseException.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.rx
2 |
3 | /*
4 | 定义通用异常
5 | */
6 | class BaseException(val status:Int,val msg:String) :Throwable()
7 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/event/CartAllCheckedEvent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.event
2 |
3 | /*
4 | 购物车全选事件
5 | */
6 | class CartAllCheckedEvent(val isAllChecked:Boolean)
7 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/data/protocol/CancelOrderReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.data.protocol
2 |
3 | /*
4 | 取消订单
5 | */
6 | data class CancelOrderReq(val orderId:Int)
7 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/data/protocol/SubmitOrderReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.data.protocol
2 |
3 | /*
4 | 提交订单
5 | */
6 | data class SubmitOrderReq(val order: Order)
7 |
--------------------------------------------------------------------------------
/PaySDK/src/main/java/com/kotlin/pay/c.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.pay
2 |
3 | /**
4 | * @author 桂雁彬
5 | * @date 2019/3/22.
6 | * GitHub:
7 | * email:yanbing.gui@zymobi.com
8 | * description:
9 | */
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/data/protocol/ConfirmOrderReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.data.protocol
2 |
3 | /*
4 | 确认订单
5 | */
6 | data class ConfirmOrderReq(val orderId:Int)
7 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/protocol/GetGoodsDetailReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.protocol
2 |
3 | /*
4 | 获取商品详情请求
5 | */
6 | data class GetGoodsDetailReq(val goodsId: Int)
7 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/a.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order
2 |
3 | /**
4 | * @author 桂雁彬
5 | * @date 2019/3/19.
6 | * GitHub:
7 | * email:yanbing.gui@zymobi.com
8 | * description:
9 | */
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/data/protocol/DeleteShipAddressReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.data.protocol
2 |
3 | /*
4 | 刪除收货地址
5 | */
6 | data class DeleteShipAddressReq(val id: Int)
7 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/data/protocol/GetOrderByIdReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.data.protocol
2 |
3 | /*
4 | 根据ID查询订单
5 | */
6 | data class GetOrderByIdReq(val orderId: Int)
7 |
--------------------------------------------------------------------------------
/PaySDK/src/main/java/com/kotlin/pay/ui/cc.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.pay.ui
2 |
3 | /**
4 | * @author 桂雁彬
5 | * @date 2019/3/22.
6 | * GitHub:
7 | * email:yanbing.gui@zymobi.com
8 | * description:
9 | */
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/ui/a.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.ui
2 |
3 | /**
4 | * @author 桂雁彬
5 | * @date 2019/3/20.
6 | * GitHub:
7 | * email:yanbing.gui@zymobi.com
8 | * description:
9 | */
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/data/protocol/GetOrderListReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.data.protocol
2 |
3 | /*
4 | 根据订单状态查询查询订单列表
5 | */
6 | data class GetOrderListReq(val orderStatus:Int)
7 |
--------------------------------------------------------------------------------
/Provider/src/main/java/com/kotlin/provider/v.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.provider
2 |
3 | /**
4 | * @author 桂雁彬
5 | * @date 2019/3/19.
6 | * GitHub:
7 | * email:yanbing.gui@zymobi.com
8 | * description:
9 | */
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/data/protocol/ResetPwdReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.data.protocol
2 |
3 | /*
4 | 重围密码请求体
5 | */
6 | data class ResetPwdReq(val mobile:String, val pwd:String)
7 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/a.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data
2 |
3 | /**
4 | * @author 桂雁彬
5 | * @date 2019/3/20.
6 | * GitHub:
7 | * email:yanbing.gui@zymobi.com
8 | * description:
9 | */
--------------------------------------------------------------------------------
/PaySDK/src/main/java/com/kotlin/pay/data/protocol/GetPaySignReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.pay.data.protocol
2 |
3 | /*
4 | 获取支付宝 支付签名
5 | */
6 | data class GetPaySignReq(val orderId: Int, val totalPrice: Long)
7 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/data/protocol/ForgetPwdReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.data.protocol
2 |
3 | /*
4 | 忘记密码请求体
5 | */
6 | data class ForgetPwdReq(val mobile:String, val verifyCode:String)
7 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/protocol/GetCategoryReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.protocol
2 |
3 | /*
4 | 获取分类列表请求,parentId为0是一级分类
5 | */
6 | data class GetCategoryReq (val parentId: Int)
7 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/protocol/GetGoodsListReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.protocol
2 |
3 | /*
4 | 按分类搜索商品
5 | */
6 | data class GetGoodsListReq(val categoryId: Int,val pageNo: Int)
7 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/event/GoodsDetailImageEvent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.event
2 |
3 | /*
4 | 商品详情Tab two 事件
5 | */
6 | class GoodsDetailImageEvent(val imgOne:String,val imgTwo:String)
7 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/data/protocol/LoginReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.data.protocol
2 |
3 | /*
4 | 登录请求体
5 | */
6 | data class LoginReq(val mobile:String, val pwd:String, val pushId:String)
7 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/protocol/DeleteCartReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.protocol
2 |
3 | /*
4 | 删除购物车商品请求
5 | */
6 | data class DeleteCartReq(val cartIdList: List = arrayListOf())
7 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/data/protocol/RegisterReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.data.protocol
2 |
3 | /*
4 | 注册请求体
5 | */
6 | data class RegisterReq(val mobile:String,val pwd:String,val verifyCode:String)
7 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/protocol/SubmitCartReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.protocol
2 |
3 | /*
4 | 提交购物车
5 | */
6 | data class SubmitCartReq(val goodsList: List,val totalPrice: Long)
7 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches/build_file_checksums.ser
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | .DS_Store
9 | /build
10 | /captures
11 | .externalNativeBuild
12 |
--------------------------------------------------------------------------------
/MessageCenter/src/main/java/com/kotlin/message/a.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.message
2 |
3 | /**
4 | * @author 桂雁彬
5 | * @date 2019/3/19.
6 | * GitHub:
7 | * email:yanbing.gui@zymobi.com
8 | * description:
9 | */
10 | class a {
11 | }
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/event/SelectAddressEvent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.event
2 |
3 | import com.kotlin.order.data.protocol.ShipAddress
4 |
5 | /*
6 | 选择收货人信息事件
7 | */
8 | class SelectAddressEvent(val address:ShipAddress)
9 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/data/protocol/EditUserReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.data.protocol
2 |
3 | /*
4 | 修改用户资料请求体
5 | */
6 | data class EditUserReq(val userIcon: String, val userName: String, val gender: String, val sign: String)
7 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/test.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.user;
2 |
3 | /**
4 | * @author 桂雁彬
5 | * @date 2019/3/15.
6 | * GitHub:
7 | * email:yanbing.gui@zymobi.com
8 | * description:
9 | */
10 | public class test {
11 | }
12 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/ui/a.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.ui;
2 |
3 | /**
4 | * @author 桂雁彬
5 | * @date 2019/3/15.
6 | * GitHub:
7 | * email:yanbing.gui@zymobi.com
8 | * description:
9 | */
10 | public class a {
11 | }
12 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/App/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/ui/fragment/BaseFragment.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.ui.fragment
2 |
3 | import com.trello.rxlifecycle.components.support.RxFragment
4 |
5 | /*
6 | Fragment基类,业务无关
7 | */
8 | open class BaseFragment : RxFragment()
9 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/data/protocol/AddShipAddressReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.data.protocol
2 |
3 | /*
4 | 添加收货地址
5 | */
6 | data class AddShipAddressReq(val shipUserName: String, val shipUserMobile: String, val shipAddress: String)
7 |
--------------------------------------------------------------------------------
/MessageCenter/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 45dp
4 | 45dip
5 | 45dip
6 |
7 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/presenter/view/BaseView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.presenter.view
2 |
3 | /*
4 | MVP中视图回调 基类
5 | */
6 | interface BaseView {
7 | fun showLoading()
8 | fun hideLoading()
9 | fun onError(text:String)
10 | }
11 |
--------------------------------------------------------------------------------
/MessageCenter/src/main/res/anim/news_bottom_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/service/UploadService.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.service
2 |
3 | import rx.Observable
4 |
5 | /*
6 | 上传业务接口
7 | */
8 | interface UploadService {
9 |
10 | fun getUploadToken(): Observable
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/protocol/GetGoodsListByKeywordReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.protocol
2 |
3 | /*
4 | 按关键字搜索商品
5 | */
6 | data class GetGoodsListByKeywordReq(
7 | val keyword: String,
8 | val pageNo: Int
9 | )
10 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/btn_common_nor.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MessageCenter/src/main/res/anim/news_bottom_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/btn_common_disable.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/data/protocol/EditShipAddressReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.data.protocol
2 |
3 | /*
4 | 修改收货地址
5 | */
6 | data class EditShipAddressReq(val id:Int,val shipUserName:String,val shipUserMobile:String,val shipAddress:String,val shipIsDefault:Int)
7 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/btn_common_pressed.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/anim/push_bottom_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/anim/push_bottom_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/presenter/view/RegisterView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 |
5 | /*
6 | 用户注册 视图回调
7 | */
8 | interface RegisterView:BaseView{
9 |
10 | fun onRegisterResult(result:String)
11 | }
12 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/protocol/GoodsSku.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.protocol
2 |
3 | /*
4 | 商品SKU数据类
5 | */
6 | data class GoodsSku(
7 | val id: Int,
8 | val skuTitle: String,//SKU标题
9 | val skuContent: List//SKU内容
10 | )
11 |
12 |
13 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/border_all.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/App/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/App/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/App/src/main/java/com/kotlin/mall/common/MainApplication.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.mall.common
2 |
3 | import com.kotlin.base.common.BaseApplication
4 |
5 | /*
6 | 主工程 Application
7 | */
8 | class MainApplication:BaseApplication() {
9 | override fun onCreate() {
10 | super.onCreate()
11 |
12 | }
13 | }
14 |
15 |
16 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/common/ResultCode.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.common
2 |
3 | /**
4 | * @author 桂雁彬
5 | * @date 2019/3/15.
6 | * GitHub:
7 | * email:yanbing.gui@zymobi.com
8 | * description:网络响应码
9 | */
10 | class ResultCode {
11 | companion object {
12 | const val SUCCESS = 0
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/injection/ActivityScope.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.injection
2 |
3 | import java.lang.annotation.Retention
4 | import java.lang.annotation.RetentionPolicy
5 | import javax.inject.Scope
6 |
7 | /*
8 | Activity级别 作用域
9 | */
10 | @Scope
11 | @Retention(RetentionPolicy.RUNTIME)
12 | annotation class ActivityScope
13 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/Ext.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods
2 |
3 | import android.widget.EditText
4 | import org.jetbrains.anko.find
5 | import ren.qinc.numberbutton.NumberButton
6 | import ren.qinc.numberbutton.R
7 |
8 | /*
9 | 三方控件扩展
10 | */
11 | fun NumberButton.getEditText():EditText{
12 | return find(R.id.text_count)
13 | }
14 |
--------------------------------------------------------------------------------
/UserCenter/src/main/res/drawable/gender_bg_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/injection/PerComponentScope.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.injection
2 |
3 | import java.lang.annotation.Retention
4 | import java.lang.annotation.RetentionPolicy
5 | import javax.inject.Scope
6 |
7 | /*
8 | 组件级别 作用域
9 | */
10 | @Scope
11 | @Retention(RetentionPolicy.RUNTIME)
12 | annotation class PerComponentScope
13 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/presenter/view/OrderDetailView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 | import com.kotlin.order.data.protocol.Order
5 |
6 | /*
7 | 订单详情页 视图回调
8 | */
9 | interface OrderDetailView : BaseView {
10 |
11 | fun onGetOrderByIdResult(result: Order)
12 | }
13 |
--------------------------------------------------------------------------------
/PaySDK/src/main/java/com/kotlin/pay/presenter/view/PayView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.pay.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 |
5 | /*
6 | 支付 视图回调
7 | */
8 | interface PayView : BaseView {
9 |
10 | //获取支付签名
11 | fun onGetSignResult(result: String)
12 | //同步支付成功状态
13 | fun onPayOrderResult(result: Boolean)
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/UserCenter/src/main/res/drawable/gender_nor_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/UserCenter/src/main/res/drawable/gender_checked_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/border_corner_all.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/border_corner_all_blue.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/service/CategoryService.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.service
2 |
3 | import com.kotlin.goods.data.protocol.Category
4 | import rx.Observable
5 |
6 | /*
7 | 商品分类 业务层 接口
8 | */
9 | interface CategoryService {
10 |
11 | /*
12 | 获取分类
13 | */
14 | fun getCategory(parentId:Int): Observable?>
15 | }
16 |
--------------------------------------------------------------------------------
/UserCenter/src/main/res/drawable/gender_text_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/protocol/Category.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.protocol
2 |
3 | /*
4 | 商品分类
5 | */
6 | data class Category(
7 | val id: Int, //分类ID
8 | val categoryName: String, //分类名称
9 | val categoryIcon: String = "", //分类图标
10 | val parentId: Int, //分类 父级ID
11 | var isSelected: Boolean = false//是否被选中
12 | )
13 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/presenter/view/GoodsListView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 | import com.kotlin.goods.data.protocol.Goods
5 |
6 | /*
7 | 商品列表 视图回调
8 | */
9 | interface GoodsListView : BaseView {
10 |
11 | //获取商品列表
12 | fun onGetGoodsListResult(result: MutableList?)
13 | }
14 |
--------------------------------------------------------------------------------
/MessageCenter/src/main/res/drawable/corner_news_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/bottom_nav_text_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/presenter/view/CategoryView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 | import com.kotlin.goods.data.protocol.Category
5 |
6 | /*
7 | 商品分类 视图回调
8 | */
9 | interface CategoryView : BaseView {
10 |
11 | //获取商品分类列表
12 | fun onGetCategoryResult(result: MutableList?)
13 | }
14 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/data/protocol/Order.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.data.protocol
2 |
3 | /*
4 | 订单数据类
5 | */
6 | data class Order(
7 | val id: Int,
8 | val payType: Int,
9 | var shipAddress: ShipAddress?,
10 | val totalPrice: Long,
11 | var orderStatus: Int,
12 | val orderGoodsList: MutableList
13 | )
14 |
15 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/data/protocol/BaseResp.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.data.protocol
2 |
3 | /**
4 | * @author 桂雁彬
5 | * @date 2019/3/15.
6 | * GitHub:
7 | * email:yanbing.gui@zymobi.com
8 | * description:
9 | * 能用响应对象
10 | @status:响应状态码
11 | @message:响应文字消息
12 | @data:具体响应业务对象
13 | */
14 | data class BaseResp(val status:Int, val message:String, val data:T)
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/presenter/view/ResetPwdView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 |
5 | /**
6 | * @author 桂雁彬
7 | * @date 2019/3/18.
8 | * GitHub:
9 | * email:yanbing.gui@zymobi.com
10 | * description:
11 | */
12 | interface ResetPwdView : BaseView {
13 |
14 | fun onResetPwdResult(result:String)
15 | }
16 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/drawable/sku_text_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/corner_blue_white_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/corner_gray_white_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/drawable/top_category_bg_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PaySDK/src/main/java/com/kotlin/pay/service/PayService.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.pay.service
2 |
3 | import rx.Observable
4 |
5 | /*
6 | 支付 业务接口
7 | */
8 | interface PayService {
9 |
10 | /*
11 | 获取支付宝支付签名
12 | */
13 | fun getPaySign(orderId: Int, totalPrice: Long): Observable
14 |
15 | /*
16 | 刷新订单状态已支付
17 | */
18 | fun payOrder(orderId: Int): Observable
19 | }
20 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/tab_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | -
5 |
6 |
7 | -
8 |
9 |
10 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/home_header_corner_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/progress_dialog_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
11 |
12 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/btn_common_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/protocol/AddCartReq.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.protocol
2 |
3 | /*
4 | 添加商品到购物车请求
5 | */
6 | data class AddCartReq(
7 | val goodsId: Int, //商品ID
8 | val goodsDesc: String, //商品描述
9 | val goodsIcon: String, //商品图标
10 | val goodsPrice: Long, //商品价格
11 | val goodsCount: Int, //商品数量
12 | val goodsSku: String //商品SKU
13 | )
14 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/drawable/top_category_text_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/common/OrderStatus.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.common
2 |
3 | /*
4 | 订单状态
5 | */
6 | class OrderStatus {
7 | companion object {
8 | const val ORDER_ALL = 0//全部
9 | const val ORDER_WAIT_PAY = 1//待支付
10 | const val ORDER_WAIT_CONFIRM = 2//待收货
11 | const val ORDER_COMPLETED = 3//已完成
12 | const val ORDER_CANCELED = 4//已取消
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/drawable/sku_bg_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/presenter/view/LoginView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 | import com.kotlin.user.data.protocol.UserInfo
5 |
6 | /**
7 | * @author 桂雁彬
8 | * @date 2019/3/18.
9 | * GitHub:
10 | * email:yanbing.gui@zymobi.com
11 | * description:
12 | */
13 | interface LoginView :BaseView {
14 | fun onLoginResult(result: UserInfo)
15 | }
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/presenter/view/GoodsDetailView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 | import com.kotlin.goods.data.protocol.Goods
5 |
6 | /*
7 | 商品详情 视图回调
8 | */
9 | interface GoodsDetailView : BaseView {
10 |
11 | //获取商品详情
12 | fun onGetGoodsDetailResult(result: Goods)
13 | //加入购物车
14 | fun onAddCartResult(result: Int)
15 | }
16 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/data/protocol/OrderGoods.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.data.protocol
2 |
3 | /*
4 | 订单中的商品
5 | */
6 | data class OrderGoods(
7 | val id: Int,
8 | var goodsId: Int,
9 | val goodsDesc: String,
10 | val goodsIcon: String,
11 | val goodsPrice: Long,
12 | val goodsCount: Int,
13 | val goodsSku: String,
14 | val orderId: Int
15 | )
16 |
17 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/data/protocol/ShipAddress.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.data.protocol
2 |
3 | import android.os.Parcelable
4 | import java.io.Serializable
5 |
6 | /*
7 | 收货地址
8 | */
9 | data class ShipAddress(
10 | val id: Int,
11 | var shipUserName: String,
12 | var shipUserMobile: String,
13 | var shipAddress: String,
14 | var shipIsDefault: Int
15 | ) : Serializable
16 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/presenter/view/OrderConfirmView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 | import com.kotlin.order.data.protocol.Order
5 |
6 | /*
7 | 订单确认页 视图回调
8 | */
9 | interface OrderConfirmView : BaseView {
10 |
11 | //获取订单回调
12 | fun onGetOrderByIdResult(result:Order)
13 | //提交订单回调
14 | fun onSubmitOrderResult(result:Boolean)
15 | }
16 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/presenter/view/ForgetPwdView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 |
5 | /**
6 | * @author 桂雁彬
7 | * @date 2019/3/18.
8 | * GitHub:
9 | * email:yanbing.gui@zymobi.com
10 | * description:
11 | */
12 | interface ForgetPwdView : BaseView {
13 |
14 | /*
15 | 忘记密码回调
16 | */
17 | fun onForgetPwdResult(result:String)
18 | }
19 |
--------------------------------------------------------------------------------
/App/src/test/java/com/kotlin/mall/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.mall
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/presenter/view/EditShipAddressView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 | import com.kotlin.order.data.protocol.Order
5 |
6 | /*
7 | 编辑收货人信息 视图回调
8 | */
9 | interface EditShipAddressView : BaseView {
10 | //添加收货人回调
11 | fun onAddShipAddressResult(result: Boolean)
12 | //修改收货人回调
13 | fun onEditShipAddressResult(result: Boolean)
14 | }
15 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/injection/component/AppComponent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.injection.component
2 |
3 | import android.content.Context
4 | import com.kotlin.base.injection.module.AppModule
5 | import dagger.Component
6 | import javax.inject.Singleton
7 |
8 | /*
9 | Application级别Component
10 | */
11 | @Singleton
12 | @Component(modules = arrayOf(AppModule::class))
13 | interface AppComponent {
14 |
15 | fun context():Context
16 | }
17 |
--------------------------------------------------------------------------------
/PaySDK/src/main/java/com/kotlin/pay/injection/module/PayModule.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.pay.injection.module
2 |
3 | import com.kotlin.pay.service.PayService
4 | import com.kotlin.pay.service.impl.PayServiceImpl
5 | import dagger.Module
6 | import dagger.Provides
7 |
8 | /*
9 | 支付 Module
10 | */
11 | @Module
12 | class PayModule {
13 |
14 | @Provides
15 | fun providePayService(payService: PayServiceImpl): PayService {
16 | return payService
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/PaySDK/src/test/java/com/kotlin/pay/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.pay;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/UserCenter/src/test/java/com/kotlin/user/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.user;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/BaseLibrary/src/test/java/com/kotlin/base/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.base;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/GoodsCenter/src/test/java/com/kotlin/goods/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/OrderCenter/src/test/java/com/kotlin/order/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.order;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/presenter/view/UserInfoView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 | import com.kotlin.user.data.protocol.UserInfo
5 |
6 | /*
7 | 编辑用户资料 视图回调
8 | */
9 | interface UserInfoView : BaseView {
10 |
11 | /*
12 | 获取上传凭证回调
13 | */
14 | fun onGetUploadTokenResult(result:String)
15 |
16 | /*
17 | 编辑用户资料回调
18 | */
19 | fun onEditUserResult(result:UserInfo)
20 | }
21 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/common_check_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/protocol/CartGoods.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.protocol
2 |
3 | /*
4 | 购物车商品数据类
5 | */
6 | data class CartGoods(
7 | val id: Int,//购物车单项商品ID
8 | val goodsId:Int,//具体商品ID
9 | val goodsDesc: String,//商品描述
10 | val goodsIcon: String,//商品图片
11 | val goodsPrice: Long,//商品价格
12 | var goodsCount: Int,//商品数量
13 | val goodsSku:String,//商品SKU
14 | var isSelected:Boolean//是否选中
15 | )
16 |
17 |
--------------------------------------------------------------------------------
/MessageCenter/src/test/java/com/kotlin/message/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.message;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/Provider/src/test/java/com/kotlin/provider/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.provider;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/data/protocol/UserInfo.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.data.protocol
2 |
3 | /**
4 | * @author 桂雁彬
5 | * @date 2019/3/18.
6 | * GitHub:
7 | * email:yanbing.gui@zymobi.com
8 | * description:用户实体类
9 | */
10 | data class UserInfo(val id:String,
11 | val userIcon:String,
12 | val userName:String,
13 | val userGender:String,
14 | val userMobile:String,
15 | val userSign:String)
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/injection/module/GoodsModule.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.injection.module
2 |
3 | import com.kotlin.goods.service.GoodsService
4 | import com.kotlin.goods.service.impl.GoodsServiceImpl
5 | import dagger.Module
6 | import dagger.Provides
7 |
8 | /*
9 | 商品Module
10 | */
11 | @Module
12 | class GoodsModule {
13 |
14 | @Provides
15 | fun provideGoodservice(goodsService: GoodsServiceImpl): GoodsService {
16 | return goodsService
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/injection/module/OrderModule.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.injection.module
2 |
3 | import com.kotlin.order.service.OrderService
4 | import com.kotlin.order.service.impl.OrderServiceImpl
5 | import dagger.Module
6 | import dagger.Provides
7 |
8 | /*
9 | 订单Module
10 | */
11 | @Module
12 | class OrderModule {
13 |
14 | @Provides
15 | fun provideOrderservice(orderService: OrderServiceImpl): OrderService {
16 | return orderService
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/data/api/UploadApi.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.data.api
2 |
3 | import com.kotlin.base.data.protocol.BaseResp
4 | import com.kotlin.user.data.protocol.*
5 | import retrofit2.http.Body
6 | import retrofit2.http.POST
7 | import rx.Observable
8 |
9 | /*
10 | 上传相关 接口
11 | */
12 | interface UploadApi {
13 |
14 | /*
15 | 获取七牛云上传凭证
16 | */
17 | @POST("Kotlin_war/common/getUploadToken")
18 | fun getUploadToken(): Observable>
19 | }
20 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/injection/module/LifecycleProviderModule.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.injection.module
2 |
3 | import com.trello.rxlifecycle.LifecycleProvider
4 | import dagger.Module
5 | import dagger.Provides
6 |
7 | /*
8 | Rx生命周期管理能用Module
9 | */
10 | @Module
11 | class LifecycleProviderModule(private val lifecycleProvider: LifecycleProvider<*>) {
12 |
13 | @Provides
14 | fun provideLifecycleProvider(): LifecycleProvider<*> {
15 | return this.lifecycleProvider
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/presenter/view/OrderListView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 | import com.kotlin.order.data.protocol.Order
5 |
6 | /*
7 | 订单列表 视图回调
8 | */
9 | interface OrderListView : BaseView {
10 |
11 | //获取订单列表回调
12 | fun onGetOrderListResult(result:MutableList?)
13 | //确认订单回调
14 | fun onConfirmOrderResult(result:Boolean)
15 | //取消订单回调
16 | fun onCancelOrderResult(result:Boolean)
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/injection/module/UserModule.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.injection.module
2 |
3 | import com.kotlin.user.service.UserService
4 | import com.kotlin.user.service.impl.UserServiceImpl
5 | import dagger.Module
6 | import dagger.Provides
7 | import javax.inject.Named
8 |
9 | /*
10 | 用户模块Module
11 | */
12 | @Module
13 | class UserModule {
14 |
15 | @Provides
16 | fun provideUserService(userService: UserServiceImpl): UserService {
17 | return userService
18 | }
19 |
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/injection/module/AppModule.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.injection.module
2 |
3 | import android.content.Context
4 | import com.kotlin.base.common.BaseApplication
5 | import dagger.Module
6 | import dagger.Provides
7 | import javax.inject.Singleton
8 |
9 | /*
10 | Application级别Module
11 | */
12 | @Module
13 | class AppModule(private val context:BaseApplication) {
14 |
15 | @Singleton
16 | @Provides
17 | fun provideContext():Context{
18 | return this.context
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/border_top.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | -
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/injection/module/CategoryModule.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.injection.module
2 |
3 | import com.kotlin.goods.service.CategoryService
4 | import com.kotlin.goods.service.impl.CategoryServiceImpl
5 | import dagger.Module
6 | import dagger.Provides
7 |
8 | /*
9 | 商品分类Module
10 | */
11 | @Module
12 | class CategoryModule {
13 |
14 | @Provides
15 | fun provideCategoryService(categoryService: CategoryServiceImpl): CategoryService {
16 | return categoryService
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/border_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | -
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/border_bottom_gray.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | -
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/presenter/view/ShipAddressView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 | import com.kotlin.order.data.protocol.ShipAddress
5 |
6 | /*
7 | 收货人列表 视图回调
8 | */
9 | interface ShipAddressView : BaseView {
10 |
11 | //获取收货人列表回调
12 | fun onGetShipAddressResult(result: MutableList?)
13 | //设置默认收货人回调
14 | fun onSetDefaultResult(result: Boolean)
15 | //删除收货人回调
16 | fun onDeleteResult(result: Boolean)
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/widgets/DefaultTextWatcher.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.widgets
2 |
3 | import android.text.Editable
4 | import android.text.TextWatcher
5 |
6 | /*
7 | 默认TextWatcher,空实现
8 | */
9 | open class DefaultTextWatcher:TextWatcher{
10 | override fun afterTextChanged(s: Editable?) {
11 | }
12 |
13 | override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
14 | }
15 |
16 | override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/injection/module/ShipAddressModule.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.injection.module
2 |
3 | import com.kotlin.order.service.ShipAddressService
4 | import com.kotlin.order.service.impl.ShipAddressServiceImpl
5 | import dagger.Module
6 | import dagger.Provides
7 |
8 | /*
9 | 收货人信息Module
10 | */
11 | @Module
12 | class ShipAddressModule {
13 |
14 | @Provides
15 | fun provideShipAddressservice(shipAddressService: ShipAddressServiceImpl): ShipAddressService {
16 | return shipAddressService
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/presenter/view/CartListView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.presenter.view
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 | import com.kotlin.goods.data.protocol.CartGoods
5 | import com.kotlin.goods.data.protocol.Category
6 |
7 | /*
8 | 购物车页面 视图回调
9 | */
10 | interface CartListView : BaseView {
11 |
12 | //获取购物车列表
13 | fun onGetCartListResult(result: MutableList?)
14 | //删除购物车
15 | fun onDeleteCartListResult(result: Boolean)
16 | //提交购物车
17 | fun onSubmitCartListResult(result: Int)
18 | }
19 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/layout/activity_cart.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/rx/BaseFunc.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.rx
2 |
3 | import com.kotlin.base.common.ResultCode
4 | import com.kotlin.base.data.protocol.BaseResp
5 | import rx.Observable
6 | import rx.functions.Func1
7 |
8 | /*
9 | 通用数据类型转换封装
10 | */
11 | class BaseFunc:Func1,Observable>{
12 | override fun call(t: BaseResp): Observable {
13 | if (t.status != ResultCode.SUCCESS){
14 | return Observable.error(BaseException(t.status,t.message))
15 | }
16 |
17 | return Observable.just(t.data)
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/layout/layout_top_category_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/layout/layout_state_empty.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/api/CategoryApi.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.api
2 |
3 | import com.kotlin.base.data.protocol.BaseResp
4 | import com.kotlin.goods.data.protocol.Category
5 | import com.kotlin.goods.data.protocol.GetCategoryReq
6 | import retrofit2.http.Body
7 | import retrofit2.http.POST
8 | import rx.Observable
9 |
10 | /*
11 | 商品分类接口
12 | */
13 | interface CategoryApi {
14 | /*
15 | 获取商品分类列表
16 | */
17 | @POST("Kotlin_war/category/getCategory")
18 | fun getCategory(@Body req: GetCategoryReq): Observable?>>
19 | }
20 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/injection/module/CartModule.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.injection.module
2 |
3 | import com.kotlin.goods.service.CartService
4 | import com.kotlin.goods.service.GoodsService
5 | import com.kotlin.goods.service.impl.CartServiceImpl
6 | import com.kotlin.goods.service.impl.GoodsServiceImpl
7 | import dagger.Module
8 | import dagger.Provides
9 |
10 | /*
11 | 购物车Module
12 | */
13 | @Module
14 | class CartModule {
15 |
16 | @Provides
17 | fun provideCartservice(cartService: CartServiceImpl): CartService {
18 | return cartService
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/rx/BaseSubscriber.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.rx
2 |
3 | import com.kotlin.base.presenter.view.BaseView
4 | import rx.Subscriber
5 |
6 | /*
7 | Rx订阅者默认实现
8 | */
9 | open class BaseSubscriber(val baseView:BaseView):Subscriber() {
10 |
11 | override fun onCompleted() {
12 | baseView.hideLoading()
13 | }
14 |
15 | override fun onNext(t: T) {
16 | }
17 |
18 | override fun onError(e: Throwable?) {
19 | baseView.hideLoading()
20 | if (e is BaseException){
21 | baseView.onError(e.msg)
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/injection/module/UploadModule.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.injection.module
2 |
3 | import com.kotlin.user.service.UploadService
4 | import com.kotlin.user.service.UserService
5 | import com.kotlin.user.service.impl.UploadServiceImpl
6 | import com.kotlin.user.service.impl.UserServiceImpl
7 | import dagger.Module
8 | import dagger.Provides
9 |
10 | /*
11 | 上传Module
12 | */
13 | @Module
14 | class UploadModule {
15 |
16 | @Provides
17 | fun provideUploadService(uploadService: UploadServiceImpl): UploadService {
18 | return uploadService
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/layout/progress_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/res/layout/fragment_order.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
8 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/rx/BaseFuncBoolean.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.rx
2 |
3 | import com.kotlin.base.common.ResultCode
4 | import com.kotlin.base.data.protocol.BaseResp
5 | import rx.Observable
6 | import rx.functions.Func1
7 |
8 | /*
9 | Boolean类型转换封装
10 | */
11 | class BaseFuncBoolean: Func1, Observable> {
12 | override fun call(t: BaseResp): Observable {
13 | if (t.status != ResultCode.SUCCESS){
14 | return Observable.error(BaseException(t.status, t.message))
15 | }
16 |
17 | return Observable.just(true)
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/widgets/BannerImageLoader.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.widgets
2 |
3 | import android.content.Context
4 | import android.widget.ImageView
5 | import com.kotlin.base.utils.GlideUtils
6 | import com.youth.banner.loader.ImageLoader
7 |
8 | /**
9 | * @author 桂雁彬
10 | * @date 2019/3/19.
11 | * GitHub:
12 | * email:yanbing.gui@zymobi.com
13 | * description:
14 | */
15 | class BannerImageLoader : ImageLoader() {
16 | override fun displayImage(context: Context, path: Any, imageView: ImageView) {
17 | GlideUtils.loadUrlImage(context, path.toString(), imageView)
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/PaySDK/src/main/java/com/kotlin/pay/injection/component/PayComponent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.pay.injection.component
2 |
3 | import com.kotlin.base.injection.PerComponentScope
4 | import com.kotlin.base.injection.component.ActivityComponent
5 | import com.kotlin.pay.injection.module.PayModule
6 | import com.kotlin.pay.ui.activity.CashRegisterActivity
7 | import dagger.Component
8 |
9 | /*
10 | 支付Component
11 | */
12 | @PerComponentScope
13 | @Component(dependencies = arrayOf(ActivityComponent::class),modules = arrayOf(PayModule::class))
14 | interface PayComponent {
15 | fun inject(activity: CashRegisterActivity)
16 | }
17 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/injection/module/ActivityModule.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.injection.module
2 |
3 | import android.app.Activity
4 | import android.content.Context
5 | import com.kotlin.base.common.BaseApplication
6 | import com.kotlin.base.injection.ActivityScope
7 | import dagger.Module
8 | import dagger.Provides
9 | import javax.inject.Singleton
10 |
11 | /*
12 | Activity级别Module
13 | */
14 | @Module
15 | class ActivityModule(private val activity: Activity) {
16 |
17 | @ActivityScope
18 | @Provides
19 | fun provideActivity(): Activity {
20 | return this.activity
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/service/impl/UploadServiceImpl.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.service.impl
2 |
3 | import com.kotlin.base.ext.convert
4 | import com.kotlin.user.data.respository.UploadRepository
5 | import com.kotlin.user.service.UploadService
6 | import rx.Observable
7 | import javax.inject.Inject
8 |
9 | /*
10 | 上传业务实现类
11 | */
12 | class UploadServiceImpl @Inject constructor(): UploadService {
13 |
14 | @Inject
15 | lateinit var repository: UploadRepository
16 |
17 | override fun getUploadToken(): Observable {
18 | return repository.getUploadToken().convert()
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/layout/layout_state_error.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/service/GoodsService.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.service
2 |
3 | import com.kotlin.goods.data.protocol.Goods
4 | import rx.Observable
5 |
6 | /*
7 | 商品 业务层 接口
8 | */
9 | interface GoodsService {
10 |
11 | /*
12 | 获取商品列表
13 | */
14 | fun getGoodsList(categoryId: Int, pageNo: Int): Observable?>
15 |
16 | /*
17 | 根据关键字查询商品
18 | */
19 | fun getGoodsListByKeyword(keyword: String, pageNo: Int): Observable?>
20 |
21 | /*
22 | 获取商品详情
23 | */
24 | fun getGoodsDetail(goodsId: Int): Observable
25 | }
26 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/common/BaseConstant.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.common
2 |
3 | /**
4 | * @author 桂雁彬
5 | * @date 2019/3/15.
6 | * GitHub:
7 | * email:yanbing.gui@zymobi.com
8 | * description:基础常量
9 | */
10 | class BaseConstant{
11 | companion object {
12 | //七牛服务地址
13 | const val IMAGE_SERVER_ADDRESS = "http://osea2fxp7.bkt.clouddn.com/"
14 | //本地服务器地址
15 | const val SERVER_ADDRESS = "http://192.168.1.150:8080"
16 |
17 |
18 |
19 | //SP表名
20 | const val TABLE_PREFS = "Kotlin_mall"
21 | //Token Key
22 | const val KEY_SP_TOKEN = "token"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/injection/component/CategoryComponent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.injection.component
2 |
3 | import com.kotlin.base.injection.PerComponentScope
4 | import com.kotlin.base.injection.component.ActivityComponent
5 | import com.kotlin.goods.injection.module.CategoryModule
6 | import com.kotlin.goods.ui.fragment.CategoryFragment
7 | import dagger.Component
8 |
9 | /*
10 | 商品分类Component
11 | */
12 | @PerComponentScope
13 | @Component(dependencies = arrayOf(ActivityComponent::class),modules = arrayOf(CategoryModule::class))
14 | interface CategoryComponent {
15 | fun inject(fragment: CategoryFragment)
16 | }
17 |
--------------------------------------------------------------------------------
/App/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
13 |
14 |
19 |
20 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/res/layout/activity_order.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
11 |
14 |
15 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/ui/activity/CartActivity.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.ui.activity
2 |
3 | import android.os.Bundle
4 | import com.kotlin.base.ui.activity.BaseActivity
5 | import com.kotlin.goods.R
6 | import com.kotlin.goods.ui.fragment.CartFragment
7 |
8 | /*
9 | 购物车Activity
10 | 只是Fragment一个壳
11 | */
12 | class CartActivity:BaseActivity() {
13 | override fun onCreate(savedInstanceState: Bundle?) {
14 | super.onCreate(savedInstanceState)
15 | setContentView(R.layout.activity_cart)
16 |
17 | val fragment = supportFragmentManager.findFragmentById(R.id.fragment_cart)
18 | (fragment as CartFragment).setBackVisible(true)
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/collect_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/bottom_nav_cart_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/data/respository/UploadRepository.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.data.respository
2 |
3 | import com.kotlin.base.data.net.RetrofitFactory
4 | import com.kotlin.base.data.protocol.BaseResp
5 | import com.kotlin.user.data.api.UploadApi
6 | import com.kotlin.user.data.api.UserApi
7 | import com.kotlin.user.data.protocol.*
8 | import rx.Observable
9 | import javax.inject.Inject
10 |
11 | /*
12 | 上传相关 数据层
13 | */
14 | class UploadRepository @Inject constructor(){
15 | /*
16 | 获取七牛云上传凭证
17 | */
18 | fun getUploadToken(): Observable> {
19 | return RetrofitFactory.instance.create(UploadApi::class.java).getUploadToken()
20 | }
21 |
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/PaySDK/src/main/java/com/kotlin/pay/data/api/PayApi.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.pay.data.api
2 |
3 | import com.kotlin.base.data.protocol.BaseResp
4 | import com.kotlin.pay.data.protocol.GetPaySignReq
5 | import com.kotlin.pay.data.protocol.PayOrderReq
6 | import retrofit2.http.Body
7 | import retrofit2.http.POST
8 | import rx.Observable
9 |
10 |
11 | /*
12 | 支付 接口
13 | */
14 | interface PayApi {
15 |
16 | /*
17 | 获取支付宝支付签名
18 | */
19 | @POST("Kotlin_war/pay/getPaySign")
20 | fun getPaySign(@Body req: GetPaySignReq): Observable>
21 |
22 | /*
23 | 刷新订单状态,已支付
24 | */
25 | @POST("Kotlin_war/order/pay")
26 | fun payOrder(@Body req: PayOrderReq): Observable>
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/Provider/src/main/java/com/kotlin/provider/common/ProviderConstant.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.provider.common
2 |
3 | /*
4 | 业务常量
5 | */
6 | class ProviderConstant {
7 | companion object {
8 | //用户名称
9 | const val KEY_SP_USER_NAME = "sp_user_name"
10 | //用户电话
11 | const val KEY_SP_USER_MOBILE = "sp_user_mobile"
12 | //用户头像
13 | const val KEY_SP_USER_ICON = "sp_user_icon"
14 | //用户性别
15 | const val KEY_SP_USER_GENDER = "sp_user_gender"
16 | //用户签名
17 | const val KEY_SP_USER_SIGN = "sp_user_sign"
18 |
19 | //订单ID
20 | const val KEY_ORDER_ID = "order_id"
21 | //订单价格
22 | const val KEY_ORDER_PRICE = "order_price"
23 | }
24 |
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/service/ShipAddressService.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.service
2 |
3 | import com.kotlin.order.data.protocol.ShipAddress
4 | import rx.Observable
5 |
6 | /*
7 | 收货人信息 业务接口
8 | */
9 | interface ShipAddressService {
10 |
11 | /*
12 | 添加收货地址
13 | */
14 | fun addShipAddress(shipUserName: String, shipUserMobile: String, shipAddress: String): Observable
15 |
16 | /*
17 | 获取收货地址列表
18 | */
19 | fun getShipAddressList(): Observable?>
20 |
21 | /*
22 | 修改收货地址
23 | */
24 | fun editShipAddress(address:ShipAddress): Observable
25 |
26 | /*
27 | 删除收货地址
28 | */
29 | fun deleteShipAddress(id: Int): Observable
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | BaseLibrary
3 |
4 | 敬请期待~~~
5 | 完成
6 | 确认
7 | 编辑
8 | 删除
9 | 下一步
10 | 保存
11 | 暂无数据~~~
12 |
13 | 主页
14 | 分类
15 | 购物车
16 | 消息
17 | 我的
18 |
19 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/layout/layout_search_history_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/layout/layout_second_category_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
9 |
15 |
16 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/protocol/Goods.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.protocol
2 |
3 | /*
4 | 商品数据类
5 | */
6 | data class Goods(
7 | val id: Int,//商品ID
8 | val categoryId: Int,//分类ID
9 | val goodsDesc: String,//商品描述
10 | val goodsDefaultIcon: String,//默认图标
11 | val goodsDefaultPrice: Long,//默认价格
12 | val goodsDetailOne: String,//商品详情一图
13 | val goodsDetailTwo: String,//商品详情二图
14 | val goodsSalesCount: Int,//商品销量
15 | val goodsStockCount: Int,//商品剩余量
16 | val goodsCode: String,//商品编号
17 | val goodsDefaultSku: String,//默认SKU
18 | val goodsBanner: String,//商品banner图
19 | val goodsSku:List,//商品SKU
20 | val maxPage:Int//最大页码
21 | )
22 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/layout/fragment_goods_detail_tab_two.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
10 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/service/OrderService.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.service
2 |
3 | import com.kotlin.order.data.protocol.Order
4 | import rx.Observable
5 |
6 | /*
7 | 订单业务 接口
8 | */
9 | interface OrderService {
10 |
11 | /*
12 | 根据ID查询订单
13 | */
14 | fun getOrderById(orderId: Int): Observable
15 |
16 | /*
17 | 提交订单
18 | */
19 | fun submitOrder(order: Order): Observable
20 |
21 | /*
22 | 根据状态查询订单列表
23 | */
24 | fun getOrderList(orderStatus: Int): Observable?>
25 |
26 | /*
27 | 取消订单
28 | */
29 | fun cancelOrder(orderId: Int): Observable
30 |
31 | /*
32 | 确认订单
33 | */
34 | fun confirmOrder(orderId: Int): Observable
35 | }
36 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/service/impl/CategoryServiceImpl.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.service.impl
2 |
3 | import com.kotlin.base.ext.convert
4 | import com.kotlin.goods.data.protocol.Category
5 | import com.kotlin.goods.data.repository.CategoryRepository
6 | import com.kotlin.goods.service.CategoryService
7 | import rx.Observable
8 | import javax.inject.Inject
9 |
10 | /*
11 | 商品分类 业务层 实现类
12 | */
13 | class CategoryServiceImpl @Inject constructor(): CategoryService{
14 | @Inject
15 | lateinit var repository: CategoryRepository
16 |
17 | /*
18 | 获取商品分类列表
19 | */
20 | override fun getCategory(parentId: Int): Observable?> {
21 | return repository.getCategory(parentId).convert()
22 | }
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/injection/component/ShipAddressComponent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.injection.component
2 |
3 | import com.kotlin.base.injection.PerComponentScope
4 | import com.kotlin.base.injection.component.ActivityComponent
5 | import com.kotlin.order.injection.module.ShipAddressModule
6 | import com.kotlin.order.ui.activity.ShipAddressActivity
7 | import com.kotlin.order.ui.activity.ShipAddressEditActivity
8 | import dagger.Component
9 |
10 | /*
11 | 收货人信息Component
12 | */
13 | @PerComponentScope
14 | @Component(dependencies = arrayOf(ActivityComponent::class),modules = arrayOf(ShipAddressModule::class))
15 | interface ShipAddressComponent {
16 | fun inject(activity: ShipAddressEditActivity)
17 | fun inject(activity: ShipAddressActivity)
18 | }
19 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/service/UserService.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.service
2 |
3 | import com.kotlin.user.data.protocol.UserInfo
4 | import rx.Observable
5 |
6 | /*
7 | 用户模块 业务接口
8 | */
9 | interface UserService {
10 |
11 | //用户注册
12 | fun register(mobile:String,pwd:String,verifyCode:String):Observable
13 |
14 | //用户登录
15 | fun login(mobile:String,pwd:String,pushId:String):Observable
16 |
17 | //忘记密码
18 | fun forgetPwd(mobile:String,verifyCode:String):Observable
19 |
20 | //重置密码
21 | fun resetPwd(mobile:String,pwd:String):Observable
22 |
23 | //编辑用户资料
24 | fun editUser(userIcon:String,userName:String,userGender:String,userSign:String):Observable
25 | }
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 |
15 |
--------------------------------------------------------------------------------
/App/src/androidTest/java/com/kotlin/mall/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.mall
2 |
3 | import android.support.test.InstrumentationRegistry
4 | import android.support.test.runner.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getTargetContext()
22 | assertEquals("com.kotlin.mall", appContext.packageName)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/repository/CategoryRepository.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.repository
2 |
3 | import com.kotlin.base.data.net.RetrofitFactory
4 | import com.kotlin.base.data.protocol.BaseResp
5 | import com.kotlin.goods.data.api.CategoryApi
6 | import com.kotlin.goods.data.protocol.Category
7 | import com.kotlin.goods.data.protocol.GetCategoryReq
8 | import rx.Observable
9 | import javax.inject.Inject
10 |
11 | /*
12 | 商品分类 数据层
13 | */
14 | class CategoryRepository @Inject constructor(){
15 | /*
16 | 获取商品分类
17 | */
18 | fun getCategory(parentId: Int): Observable?>> {
19 | return RetrofitFactory.instance.create(CategoryApi::class.java).getCategory(GetCategoryReq(parentId))
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/common/OrderConstant.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.common
2 |
3 | /*
4 | 订单常量
5 | */
6 | class OrderConstant {
7 | companion object {
8 | //订单状态
9 | const val KEY_ORDER_STATUS = "order_status"
10 | //收货地址
11 | const val KEY_SHIP_ADDRESS = "ship_address"
12 | //选择收货地址请求码
13 | const val REQ_SELECT_ADDRESS = 1001
14 | //是否选择收货地址
15 | const val KEY_IS_SELECT_ADDRESS = "is_select_address"
16 | //是否编辑地址
17 | const val KEY_ADDRESS_IS_EDIT = "address_is_edit"
18 | //支付订单操作
19 | const val OPT_ORDER_PAY = 1
20 | //确认订单操作
21 | const val OPT_ORDER_CONFIRM = 2
22 | //取消订单操作
23 | const val OPT_ORDER_CANCEL = 3
24 | }
25 |
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/injection/component/CartComponent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.injection.component
2 |
3 | import com.kotlin.base.injection.PerComponentScope
4 | import com.kotlin.base.injection.component.ActivityComponent
5 | import com.kotlin.goods.injection.module.CartModule
6 | import com.kotlin.goods.injection.module.GoodsModule
7 | import com.kotlin.goods.ui.activity.GoodsActivity
8 | import com.kotlin.goods.ui.fragment.CartFragment
9 | import com.kotlin.goods.ui.fragment.GoodsDetailTabOneFragment
10 | import dagger.Component
11 |
12 | /*
13 | 购物车Component
14 | */
15 | @PerComponentScope
16 | @Component(dependencies = arrayOf(ActivityComponent::class),modules = arrayOf(CartModule::class))
17 | interface CartComponent {
18 | fun inject(fragment: CartFragment)
19 | }
20 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/layout/layout_label_textview.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
12 |
14 |
15 |
--------------------------------------------------------------------------------
/PaySDK/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
15 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/service/CartService.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.service
2 |
3 | import com.kotlin.goods.data.protocol.CartGoods
4 | import rx.Observable
5 |
6 | /*
7 | 购物车 业务 接口
8 | */
9 | interface CartService {
10 | /*
11 | 添加商品到购物车
12 | */
13 | fun addCart(goodsId: Int, goodsDesc: String, goodsIcon: String, goodsPrice: Long,
14 | goodsCount: Int, goodsSku: String): Observable
15 |
16 | /*
17 | 获取购物车列表
18 | */
19 | fun getCartList(): Observable?>
20 |
21 | /*
22 | 删除购物车商品
23 | */
24 | fun deleteCartList(list: List): Observable
25 |
26 | /*
27 | 购物车结算
28 | */
29 | fun submitCart(list: MutableList, totalPrice: Long): Observable
30 | }
31 |
--------------------------------------------------------------------------------
/UserCenter/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/state_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/layout/layout_sku_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/App/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/PaySDK/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/BaseLibrary/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/GoodsCenter/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/layout/layout_sku_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
--------------------------------------------------------------------------------
/OrderCenter/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/Provider/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/UserCenter/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/MessageCenter/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/injection/component/OrderComponent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.injection.component
2 |
3 | import com.kotlin.base.injection.PerComponentScope
4 | import com.kotlin.base.injection.component.ActivityComponent
5 | import com.kotlin.order.injection.module.OrderModule
6 | import com.kotlin.order.ui.activity.OrderConfirmActivity
7 | import com.kotlin.order.ui.activity.OrderDetailActivity
8 | import com.kotlin.order.ui.fragment.OrderFragment
9 | import dagger.Component
10 |
11 | /*
12 | 订单Component
13 | */
14 | @PerComponentScope
15 | @Component(dependencies = arrayOf(ActivityComponent::class),modules = arrayOf(OrderModule::class))
16 | interface OrderComponent {
17 | fun inject(activity: OrderConfirmActivity)
18 | fun inject(fragment: OrderFragment)
19 |
20 | fun inject(activity: OrderDetailActivity)
21 | }
22 |
--------------------------------------------------------------------------------
/Provider/src/main/java/com/kotlin/provider/common/CommonUtils.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.provider.common
2 |
3 | import com.alibaba.android.arouter.launcher.ARouter
4 | import com.kotlin.base.common.BaseConstant
5 | import com.kotlin.base.utils.AppPrefsUtils
6 | import com.kotlin.provider.router.RouterPath
7 |
8 | /**
9 | * @author 桂雁彬
10 | * @date 2019/3/19.
11 | * GitHub:
12 | * email:yanbing.gui@zymobi.com
13 | * description:
14 | */
15 |
16 | /**
17 | * 判断是否登录
18 | */
19 | fun isLogined():Boolean{
20 | return AppPrefsUtils.getString(BaseConstant.KEY_SP_TOKEN).isNotEmpty()
21 | }
22 | /*
23 | 如果已经登录,进行传入的方法处理
24 | 如果没有登录,进入登录界面
25 | */
26 | fun afterLogin(method:()->Unit){
27 | if (isLogined()){
28 | method()
29 | }else{
30 | ARouter.getInstance().build(RouterPath.UserCenter.PATH_LOGIN).navigation()
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/common/GoodsConstant.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.common
2 |
3 | /*
4 | 商品模块 常量
5 | */
6 | class GoodsConstant {
7 | companion object {
8 | //搜索历史 本地存储
9 | const val SP_SEARCH_HISTORY = "search_history"
10 | //搜索商品类型
11 | const val KEY_SEARCH_GOODS_TYPE = "search_goods_type"
12 | //按分类搜索
13 | const val SEARCH_GOODS_TYPE_CATEGORY = 0
14 | //按关键字搜索
15 | const val SEARCH_GOODS_TYPE_KEYWORD = 1
16 | //商品分类ID
17 | const val KEY_CATEGORY_ID = "category_id"
18 | //商品关键字
19 | const val KEY_GOODS_KEYWORD = "goods_keyword"
20 | //商品ID
21 | const val KEY_GOODS_ID = "goods_id"
22 | //sku分隔标识
23 | const val SKU_SEPARATOR = ","
24 | //购物车数量
25 | const val SP_CART_SIZE = "cart_size"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/presenter/BasePresenter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.presenter
2 |
3 | import android.content.Context
4 | import com.kotlin.base.presenter.view.BaseView
5 | import com.kotlin.base.utils.NetWorkUtils
6 | import com.trello.rxlifecycle.LifecycleProvider
7 | import javax.inject.Inject
8 |
9 | /*
10 | MVP中P层 基类
11 | */
12 | open class BasePresenter{
13 |
14 | lateinit var mView:T
15 |
16 | //Dagger注入,Rx生命周期管理
17 | @Inject
18 | lateinit var lifecycleProvider: LifecycleProvider<*>
19 |
20 |
21 | @Inject
22 | lateinit var context:Context
23 |
24 | /*
25 | 检查网络是否可用
26 | */
27 | fun checkNetWork():Boolean{
28 | if(NetWorkUtils.isNetWorkAvailable(context)){
29 | return true
30 | }
31 | mView.onError("网络不可用")
32 | return false
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/injection/component/UserComponent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.injection.component
2 |
3 | import com.kotlin.base.injection.PerComponentScope
4 | import com.kotlin.base.injection.component.ActivityComponent
5 | import com.kotlin.user.injection.module.UploadModule
6 | import com.kotlin.user.injection.module.UserModule
7 | import com.kotlin.user.ui.activity.*
8 | import dagger.Component
9 |
10 | /*
11 | 用户模块Component
12 | */
13 | @PerComponentScope
14 | @Component(dependencies = arrayOf(ActivityComponent::class),modules = arrayOf(UserModule::class, UploadModule::class))
15 | interface UserComponent {
16 | fun inject(activity:RegisterActivity)
17 | fun inject(activity:LoginActivity)
18 | fun inject(activity:ForgetPwdActivity)
19 | fun inject(activity:ResetPwdActivity)
20 | fun inject(activity:UserInfoActivity)
21 |
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/PaySDK/src/androidTest/java/com/kotlin/pay/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.pay;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.kotlin.pay.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/BaseLibrary/src/androidTest/java/com/kotlin/base/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.base;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.kotlin.base.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/UserCenter/src/androidTest/java/com/kotlin/user/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.user;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.kotlin.user.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/injection/component/ActivityComponent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.injection.component
2 |
3 | import android.app.Activity
4 | import android.content.Context
5 | import com.kotlin.base.injection.ActivityScope
6 | import com.kotlin.base.injection.module.ActivityModule
7 | import com.kotlin.base.injection.module.LifecycleProviderModule
8 | import com.trello.rxlifecycle.LifecycleProvider
9 | import dagger.Component
10 |
11 | /**
12 | * @author 桂雁彬
13 | * @date 2019/3/15.
14 | * GitHub:
15 | * email:yanbing.gui@zymobi.com
16 | * description:
17 | */
18 | @ActivityScope
19 | @Component(dependencies = arrayOf(AppComponent::class),modules = arrayOf(ActivityModule::class, LifecycleProviderModule::class))
20 | interface ActivityComponent {
21 | fun activity(): Activity
22 | fun context(): Context
23 | fun lifecycleProvider(): LifecycleProvider<*>
24 | }
25 |
--------------------------------------------------------------------------------
/GoodsCenter/src/androidTest/java/com/kotlin/goods/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.kotlin.goods.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/OrderCenter/src/androidTest/java/com/kotlin/order/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.order;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.kotlin.order.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/MessageCenter/src/androidTest/java/com/kotlin/message/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.message;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.kotlin.message.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Provider/src/androidTest/java/com/kotlin/provider/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.kotlin.provider;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.kotlin.provider.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/api/GoodsApi.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.api
2 |
3 | import com.kotlin.base.data.protocol.BaseResp
4 | import com.kotlin.goods.data.protocol.*
5 | import retrofit2.http.Body
6 | import retrofit2.http.POST
7 | import rx.Observable
8 |
9 | /*
10 | 商品接口
11 | */
12 | interface GoodsApi {
13 | /*
14 | 获取商品列表
15 | */
16 | @POST("Kotlin_war/goods/getGoodsList")
17 | fun getGoodsList(@Body req: GetGoodsListReq): Observable?>>
18 |
19 | /*
20 | 获取商品列表
21 | */
22 | @POST("Kotlin_war/goods/getGoodsListByKeyword")
23 | fun getGoodsListByKeyword(@Body req: GetGoodsListByKeywordReq): Observable?>>
24 |
25 | /*
26 | 获取商品详情
27 | */
28 | @POST("Kotlin_war/goods/getGoodsDetail")
29 | fun getGoodsDetail(@Body req: GetGoodsDetailReq): Observable>
30 | }
31 |
--------------------------------------------------------------------------------
/PaySDK/src/main/java/com/kotlin/pay/service/impl/PayServiceImpl.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.pay.service.impl
2 |
3 | import com.kotlin.base.ext.convert
4 | import com.kotlin.base.ext.convertBoolean
5 | import com.kotlin.pay.data.repository.PayRepository
6 | import com.kotlin.pay.service.PayService
7 | import rx.Observable
8 | import javax.inject.Inject
9 |
10 | /*
11 | 支付 业务实现类
12 | */
13 | class PayServiceImpl @Inject constructor(): PayService{
14 |
15 | @Inject
16 | lateinit var repository: PayRepository
17 |
18 | /*
19 | 获取支付签名
20 | */
21 | override fun getPaySign(orderId: Int, totalPrice: Long): Observable {
22 | return repository.getPaySign(orderId,totalPrice).convert()
23 | }
24 |
25 | /*
26 | 支付订单,同步订单状态
27 | */
28 | override fun payOrder(orderId: Int): Observable {
29 | return repository.payOrder(orderId).convertBoolean()
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/injection/component/GoodsComponent.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.injection.component
2 |
3 | import com.kotlin.base.injection.PerComponentScope
4 | import com.kotlin.base.injection.component.ActivityComponent
5 | import com.kotlin.goods.injection.module.CartModule
6 | import com.kotlin.goods.injection.module.CategoryModule
7 | import com.kotlin.goods.injection.module.GoodsModule
8 | import com.kotlin.goods.ui.activity.GoodsActivity
9 | import com.kotlin.goods.ui.fragment.CategoryFragment
10 | import com.kotlin.goods.ui.fragment.GoodsDetailTabOneFragment
11 | import dagger.Component
12 |
13 | /*
14 | 商品Component
15 | */
16 | @PerComponentScope
17 | @Component(dependencies = arrayOf(ActivityComponent::class),modules = arrayOf(GoodsModule::class, CartModule::class))
18 | interface GoodsComponent {
19 | fun inject(activity: GoodsActivity)
20 | fun inject(fragment: GoodsDetailTabOneFragment)
21 | }
22 |
--------------------------------------------------------------------------------
/App/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Provider/src/main/java/com/kotlin/provider/router/RouterPath.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.provider.router
2 |
3 | /**
4 | * @author 桂雁彬
5 | * @date 2019/3/22.
6 | * GitHub:
7 | * email:yanbing.gui@zymobi.com
8 | * description:
9 | */
10 |
11 | object RouterPath{
12 | //用户模块
13 | class UserCenter{
14 | companion object {
15 | const val PATH_LOGIN = "/userCenter/login"
16 | }
17 | }
18 |
19 | //订单模块
20 | class OrderCenter{
21 | companion object {
22 | const val PATH_ORDER_CONFIRM = "/orderCenter/confirm"
23 | }
24 | }
25 |
26 | //支付模块
27 | class PaySDK{
28 | companion object {
29 | const val PATH_PAY = "/paySDK/pay"
30 | }
31 | }
32 |
33 | //消息模块
34 | class MessageCenter{
35 | companion object {
36 | const val PATH_MESSAGE_PUSH = "/messageCenter/push"
37 | const val PATH_MESSAGE_ORDER = "/messageCenter/order"
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/layout/layout_state_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
13 |
19 |
20 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/api/CartApi.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.api
2 |
3 | import com.kotlin.base.data.protocol.BaseResp
4 | import com.kotlin.goods.data.protocol.*
5 | import retrofit2.http.Body
6 | import retrofit2.http.POST
7 | import rx.Observable
8 |
9 | /*
10 | 购物车 接口
11 | */
12 | interface CartApi {
13 | /*
14 | 获取购物车列表
15 | */
16 | @POST("Kotlin_war/cart/getList")
17 | fun getCartList(): Observable?>>
18 |
19 | /*
20 | 添加商品到购物车
21 | */
22 | @POST("Kotlin_war/cart/add")
23 | fun addCart(@Body req: AddCartReq): Observable>
24 |
25 | /*
26 | 删除购物车商品
27 | */
28 | @POST("Kotlin_war/cart/delete")
29 | fun deleteCartList(@Body req: DeleteCartReq): Observable>
30 |
31 | /*
32 | 提交购物车商品
33 | */
34 | @POST("Kotlin_war/cart/submit")
35 | fun submitCart(@Body req: SubmitCartReq): Observable>
36 | }
37 |
--------------------------------------------------------------------------------
/App/src/main/java/com/kotlin/mall/ui/fragment/MessageFragment.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.mall.ui.fragment
2 |
3 | import android.os.Bundle
4 | import android.view.LayoutInflater
5 | import android.view.View
6 | import android.view.ViewGroup
7 | import com.kotlin.base.ui.fragment.BaseFragment
8 | import com.kotlin.mall.R
9 |
10 | /**
11 | * @author 桂雁彬
12 | * @date 2019/3/19.
13 | * GitHub:
14 | * email:yanbing.gui@zymobi.com
15 | * description:
16 | */
17 | class MessageFragment :BaseFragment(),View.OnClickListener {
18 | override fun onClick(v: View?) {
19 | }
20 |
21 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
22 | super.onCreateView(inflater, container, savedInstanceState)
23 | return inflater.inflate(R.layout.fragment_me, null)
24 |
25 | }
26 |
27 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
28 | super.onViewCreated(view, savedInstanceState)
29 | }
30 |
31 |
32 | }
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/ui/activity/BaseActivity.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.ui.activity
2 |
3 | import android.os.Bundle
4 | import android.view.View
5 | import android.widget.FrameLayout
6 | import com.kotlin.base.R
7 | import com.kotlin.base.common.AppManager
8 | import com.trello.rxlifecycle.components.support.RxAppCompatActivity
9 | import org.jetbrains.anko.find
10 |
11 | /*
12 | Activity基类,业务无关
13 | */
14 | open class BaseActivity:RxAppCompatActivity() {
15 |
16 | override fun onCreate(savedInstanceState: Bundle?) {
17 | super.onCreate(savedInstanceState)
18 |
19 | AppManager.instance.addActivity(this)
20 | }
21 |
22 | override fun onDestroy() {
23 | super.onDestroy()
24 | AppManager.instance.finishActivity(this)
25 | }
26 |
27 | //获取Window中视图content
28 | val contentView:View
29 | get() {
30 | val content = find(android.R.id.content)
31 | return content.getChildAt(0)
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/PaySDK/src/main/java/com/kotlin/pay/data/repository/PayRepository.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.pay.data.repository
2 |
3 |
4 | import com.kotlin.base.data.net.RetrofitFactory
5 | import com.kotlin.base.data.protocol.BaseResp
6 | import com.kotlin.pay.data.api.PayApi
7 | import com.kotlin.pay.data.protocol.GetPaySignReq
8 | import com.kotlin.pay.data.protocol.PayOrderReq
9 | import rx.Observable
10 | import javax.inject.Inject
11 |
12 |
13 | /*
14 | 支付数据层
15 | */
16 | class PayRepository @Inject constructor() {
17 |
18 | /*
19 | 获取支付宝支付签名
20 | */
21 | fun getPaySign(orderId: Int, totalPrice: Long): Observable> {
22 | return RetrofitFactory.instance.create(PayApi::class.java).getPaySign(GetPaySignReq(orderId, totalPrice))
23 | }
24 |
25 | /*
26 | 刷新订单状态已支付
27 | */
28 | fun payOrder(orderId: Int): Observable> {
29 | return RetrofitFactory.instance.create(PayApi::class.java).payOrder(PayOrderReq(orderId))
30 | }
31 |
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/utils/UserPrefsUtils.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.utils
2 |
3 | import com.kotlin.base.common.BaseConstant
4 | import com.kotlin.provider.common.ProviderConstant
5 | import com.kotlin.base.utils.AppPrefsUtils
6 | import com.kotlin.user.data.protocol.UserInfo
7 |
8 | /*
9 | 本地存储用户相关信息
10 | */
11 | object UserPrefsUtils {
12 |
13 | /*
14 | 退出登录时,传入null,清空存储
15 | */
16 | fun putUserInfo(userInfo: UserInfo?) {
17 | AppPrefsUtils.putString(BaseConstant.KEY_SP_TOKEN, userInfo?.id ?: "")
18 | AppPrefsUtils.putString(ProviderConstant.KEY_SP_USER_ICON, userInfo?.userIcon ?: "")
19 | AppPrefsUtils.putString(ProviderConstant.KEY_SP_USER_NAME, userInfo?.userName ?: "")
20 | AppPrefsUtils.putString(ProviderConstant.KEY_SP_USER_MOBILE, userInfo?.userMobile ?: "")
21 | AppPrefsUtils.putString(ProviderConstant.KEY_SP_USER_GENDER, userInfo?.userGender ?: "")
22 | AppPrefsUtils.putString(ProviderConstant.KEY_SP_USER_SIGN, userInfo?.userSign ?: "")
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/App/src/main/res/layout/activity_setting.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
12 |
16 |
20 |
26 |
27 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1px
4 | 1px
5 | 50dp
6 | 60dp
7 | 60dp
8 | 50dp
9 | 15dp
10 | 10dp
11 | 5dp
12 | 15dp
13 | 10dp
14 | 5dp
15 | 6dp
16 | 1px
17 |
18 | 12sp
19 | 14sp
20 | 16sp
21 | 18sp
22 |
23 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d3d3d
4 | #03a9f4
5 | #03a9f4
6 | #f5f5f5
7 | #000000
8 | #03a9f4
9 | #0288d1
10 | #039be5
11 | #d9d9d9
12 | #d4d4d4
13 | #dddddd
14 | #d500f9
15 | #f11919
16 | #ffffff
17 | #fe9c2f
18 |
19 | #999999
20 | #333333
21 | #666666
22 | #00000000
23 |
24 |
--------------------------------------------------------------------------------
/MessageCenter/src/main/res/layout/layout_news_flipper.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
14 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/layout/activity_goods.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
9 |
10 |
13 |
16 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/ui/adapter/OrderVpAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.ui.adapter
2 |
3 | import android.content.Context
4 | import android.os.Bundle
5 | import android.support.v4.app.Fragment
6 | import android.support.v4.app.FragmentManager
7 | import android.support.v4.app.FragmentPagerAdapter
8 | import com.kotlin.order.common.OrderConstant
9 | import com.kotlin.order.ui.fragment.OrderFragment
10 |
11 | /*
12 | 订单Tab对应ViewPager
13 | */
14 | class OrderVpAdapter(fm: FragmentManager, context: Context)
15 | : FragmentPagerAdapter(fm) {
16 |
17 | private val titles = arrayOf("全部","待付款","待收货","已完成","已取消")
18 |
19 | override fun getItem(position: Int): Fragment {
20 | val fragment = OrderFragment()
21 | val bundle = Bundle()
22 | bundle.putInt(OrderConstant.KEY_ORDER_STATUS,position)
23 | fragment.arguments = bundle
24 | return fragment
25 |
26 | }
27 |
28 | override fun getCount(): Int {
29 | return titles.size
30 | }
31 |
32 | override fun getPageTitle(position: Int): CharSequence {
33 | return titles[position]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/presenter/CategoryPresenter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.presenter
2 |
3 | import com.kotlin.base.ext.excute
4 | import com.kotlin.base.presenter.BasePresenter
5 | import com.kotlin.base.rx.BaseSubscriber
6 | import com.kotlin.goods.data.protocol.Category
7 | import com.kotlin.goods.presenter.view.CategoryView
8 | import com.kotlin.goods.service.CategoryService
9 | import javax.inject.Inject
10 |
11 | /*
12 | 商品分类 Presenter
13 | */
14 | class CategoryPresenter @Inject constructor() : BasePresenter() {
15 |
16 | @Inject
17 | lateinit var categoryService: CategoryService
18 |
19 |
20 | /*
21 | 获取商品分类列表
22 | */
23 | fun getCategory(parentId:Int) {
24 | if (!checkNetWork()) {
25 | return
26 | }
27 | mView.showLoading()
28 | categoryService.getCategory(parentId).excute(object : BaseSubscriber?>(mView) {
29 | override fun onNext(t: MutableList?) {
30 | mView.onGetCategoryResult(t)
31 | }
32 | }, lifecycleProvider)
33 |
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/App/src/main/java/com/kotlin/mall/ui/activity/SettingActivity.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.mall.ui.activity
2 |
3 | import android.os.Bundle
4 | import com.kotlin.base.ext.onClick
5 | import com.kotlin.base.ui.activity.BaseActivity
6 | import com.kotlin.mall.R
7 | import com.kotlin.user.utils.UserPrefsUtils
8 | import kotlinx.android.synthetic.main.activity_setting.*
9 | import org.jetbrains.anko.toast
10 |
11 | /**
12 | * @author 桂雁彬
13 | * @date 2019/3/20.
14 | * GitHub:
15 | * email:yanbing.gui@zymobi.com
16 | * description:设置界面
17 | */
18 | class SettingActivity : BaseActivity() {
19 | override fun onCreate(savedInstanceState: Bundle?) {
20 | super.onCreate(savedInstanceState)
21 | setContentView(R.layout.activity_setting)
22 |
23 | mUserProtocolTv.onClick {
24 | toast("用户协议")
25 | }
26 | mFeedBackTv.onClick {
27 | toast("反馈意见")
28 | }
29 | mAboutTv.onClick {
30 | toast("关于")
31 | }
32 |
33 | //退出登录,清空本地用户数据
34 | mLogoutBtn.onClick {
35 | UserPrefsUtils.putUserInfo(null)
36 | finish()
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/presenter/OrderDetailPresenter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.presenter
2 |
3 | import com.kotlin.base.ext.excute
4 | import com.kotlin.base.presenter.BasePresenter
5 | import com.kotlin.base.rx.BaseSubscriber
6 | import com.kotlin.order.data.protocol.Order
7 | import com.kotlin.order.presenter.view.OrderConfirmView
8 | import com.kotlin.order.presenter.view.OrderDetailView
9 | import com.kotlin.order.service.OrderService
10 | import javax.inject.Inject
11 |
12 | /*
13 | 订单详情页Presenter
14 | */
15 | class OrderDetailPresenter @Inject constructor() : BasePresenter() {
16 |
17 | @Inject
18 | lateinit var orderService: OrderService
19 |
20 | /*
21 | 根据ID查询订单
22 | */
23 | fun getOrderById(orderId: Int) {
24 | if (!checkNetWork()) {
25 | return
26 | }
27 | mView.showLoading()
28 | orderService.getOrderById(orderId).excute(object : BaseSubscriber(mView) {
29 | override fun onNext(t: Order) {
30 | mView.onGetOrderByIdResult(t)
31 | }
32 | }, lifecycleProvider)
33 |
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/Provider/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android'
3 |
4 | android {
5 | compileSdkVersion 28
6 |
7 |
8 |
9 | defaultConfig {
10 | minSdkVersion 15
11 | targetSdkVersion 28
12 | versionCode 1
13 | versionName "1.0"
14 |
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 |
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 |
26 | }
27 |
28 | dependencies {
29 | implementation fileTree(dir: 'libs', include: ['*.jar'])
30 |
31 | implementation 'com.android.support:appcompat-v7:28.0.0'
32 | testImplementation 'junit:junit:4.12'
33 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
34 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
35 | compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
36 |
37 | api project(':BaseLibrary')
38 | }
39 | repositories {
40 | mavenCentral()
41 | }
42 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/presenter/ForgetPwdPresenter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.presenter
2 |
3 | import com.kotlin.base.ext.excute
4 | import com.kotlin.base.presenter.BasePresenter
5 | import com.kotlin.base.rx.BaseSubscriber
6 | import com.kotlin.user.presenter.view.ForgetPwdView
7 | import com.kotlin.user.service.UserService
8 | import javax.inject.Inject
9 |
10 | /**
11 | * @author 桂雁彬
12 | * @date 2019/3/18.
13 | * GitHub:
14 | * email:yanbing.gui@zymobi.com
15 | * description:忘记密码Presenter
16 | */
17 | class ForgetPwdPresenter @Inject constructor() : BasePresenter() {
18 |
19 | @Inject
20 | lateinit var userService: UserService
21 |
22 |
23 | fun forgetPwd(mobile: String, verifyCode: String) {
24 | if (!checkNetWork()) {
25 | return
26 | }
27 | mView.showLoading()
28 |
29 | userService.forgetPwd(mobile, verifyCode).excute(object : BaseSubscriber(mView) {
30 | override fun onNext(t: Boolean) {
31 | if (t)
32 | mView.onForgetPwdResult("验证成功")
33 | }
34 | }, lifecycleProvider)
35 |
36 | }
37 |
38 | }
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/data/api/UserApi.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.data.api
2 |
3 | import com.kotlin.base.data.protocol.BaseResp
4 | import com.kotlin.user.data.protocol.*
5 | import retrofit2.http.Body
6 | import retrofit2.http.POST
7 | import rx.Observable
8 |
9 | /*
10 | 用户相关 接口
11 | */
12 | interface UserApi{
13 |
14 | /*
15 | 用户注册
16 | */
17 | @POST("Kotlin_war/userCenter/register")
18 | fun register(@Body req:RegisterReq):Observable>
19 |
20 | /*
21 | 用户登录
22 | */
23 | @POST("Kotlin_war/userCenter/login")
24 | fun login(@Body req:LoginReq):Observable>
25 |
26 |
27 | /*
28 | 忘记密码
29 | */
30 | @POST("Kotlin_war/userCenter/forgetPwd")
31 | fun forgetPwd(@Body req:ForgetPwdReq):Observable>
32 |
33 |
34 | /*
35 | 重置密码
36 | */
37 | @POST("Kotlin_war/userCenter/resetPwd")
38 | fun resetPwd(@Body req:ResetPwdReq):Observable>
39 | /*
40 | 编辑用户资料
41 | */
42 | @POST("Kotlin_war/userCenter/editUser")
43 | fun editUser(@Body req:EditUserReq):Observable>
44 | }
45 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/presenter/LoginPresenter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.presenter
2 |
3 | import com.kotlin.base.ext.excute
4 | import com.kotlin.base.presenter.BasePresenter
5 | import com.kotlin.base.rx.BaseSubscriber
6 | import com.kotlin.user.data.protocol.UserInfo
7 | import com.kotlin.user.presenter.view.LoginView
8 | import com.kotlin.user.service.UserService
9 | import javax.inject.Inject
10 |
11 | /**
12 | * @author 桂雁彬
13 | * @date 2019/3/18.
14 | * GitHub:
15 | * email:yanbing.gui@zymobi.com
16 | * description:
17 | */
18 | class LoginPresenter @Inject constructor():BasePresenter(){
19 | @Inject
20 | lateinit var userService: UserService
21 |
22 | /*
23 | 登录
24 | */
25 | fun login(mobile: String, pwd: String, pushId: String) {
26 | if (!checkNetWork()) {
27 | return
28 | }
29 | mView.showLoading()
30 | userService.login(mobile, pwd, pushId).excute(object : BaseSubscriber(mView) {
31 | override fun onNext(t: UserInfo) {
32 | mView.onLoginResult(t)
33 | }
34 | }, lifecycleProvider)
35 |
36 | }
37 |
38 | }
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/presenter/ResetPwdPresenter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.presenter
2 |
3 | import com.kotlin.base.ext.excute
4 | import com.kotlin.base.presenter.BasePresenter
5 | import com.kotlin.base.rx.BaseSubscriber
6 | import com.kotlin.user.presenter.view.ResetPwdView
7 | import com.kotlin.user.service.UserService
8 | import javax.inject.Inject
9 |
10 | /**
11 | * @author 桂雁彬
12 | * @date 2019/3/18.
13 | * GitHub:
14 | * email:yanbing.gui@zymobi.com
15 | * description:
16 | */
17 | class ResetPwdPresenter @Inject constructor() : BasePresenter() {
18 |
19 | @Inject
20 | lateinit var userService: UserService
21 |
22 |
23 | /*
24 | 重置密码
25 | */
26 | fun resetPwd(mobile: String, pwd: String) {
27 | if (!checkNetWork()) {
28 | return
29 | }
30 | mView.showLoading()
31 |
32 | userService.resetPwd(mobile, pwd).excute(object : BaseSubscriber(mView) {
33 | override fun onNext(t: Boolean) {
34 | if (t)
35 | mView.onResetPwdResult("重置密码成功")
36 | }
37 | }, lifecycleProvider)
38 |
39 | }
40 |
41 | }
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/ui/adapter/GoodsDetailVpAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.ui.adapter
2 |
3 | import android.content.Context
4 | import android.support.v4.app.Fragment
5 | import android.support.v4.app.FragmentManager
6 | import android.support.v4.app.FragmentPagerAdapter
7 | import com.kotlin.goods.ui.fragment.GoodsDetailTabOneFragment
8 | import com.kotlin.goods.ui.fragment.GoodsDetailTabTwoFragment
9 |
10 | /**
11 | * @author 桂雁彬
12 | * @date 2019/3/20.
13 | * GitHub:
14 | * email:yanbing.gui@zymobi.com
15 | * description:商品详情ViewPager Adapter
16 | */
17 |
18 | class GoodsDetailVpAdapter(fm: FragmentManager, context: Context)
19 | : FragmentPagerAdapter(fm) {
20 |
21 | private val titles = arrayOf("商品","详情")
22 |
23 | override fun getItem(position: Int): Fragment {
24 | return if (position == 0){
25 | GoodsDetailTabOneFragment()
26 | }else{
27 | GoodsDetailTabTwoFragment()
28 | }
29 | }
30 |
31 | override fun getCount(): Int {
32 | return titles.size
33 | }
34 |
35 | override fun getPageTitle(position: Int): CharSequence {
36 | return titles[position]
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/UserCenter/src/main/java/com/kotlin/user/presenter/RegisterPresenter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.user.presenter
2 |
3 | import com.kotlin.base.ext.excute
4 | import com.kotlin.base.presenter.BasePresenter
5 | import com.kotlin.base.rx.BaseSubscriber
6 | import com.kotlin.user.presenter.view.RegisterView
7 | import com.kotlin.user.service.UserService
8 | import javax.inject.Inject
9 |
10 | /*
11 | 用户注册Presenter
12 | */
13 | class RegisterPresenter @Inject constructor() : BasePresenter() {
14 |
15 | @Inject
16 | lateinit var userService: UserService
17 |
18 |
19 | fun register(mobile: String, pwd: String, verifyCode: String) {
20 | if (!checkNetWork()) {
21 | return
22 | }
23 | mView.showLoading()
24 |
25 | userService.register(mobile, pwd, verifyCode).excute(object : BaseSubscriber(mView) {
26 | override fun onNext(t: Boolean) {
27 | if (t){
28 | mView.onRegisterResult("注册成功")
29 | }else{
30 | mView.onRegisterResult("注册失败")
31 |
32 | }
33 |
34 | }
35 | }, lifecycleProvider)
36 |
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/ui/activity/OrderActivity.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.ui.activity
2 |
3 | import android.os.Bundle
4 | import android.support.design.widget.TabLayout
5 | import com.kotlin.base.ui.activity.BaseActivity
6 | import com.kotlin.order.R
7 | import com.kotlin.order.common.OrderConstant
8 | import com.kotlin.order.common.OrderStatus
9 | import com.kotlin.order.ui.adapter.OrderVpAdapter
10 | import kotlinx.android.synthetic.main.activity_order.*
11 |
12 | /*
13 | 订单Activity
14 | 主要包括不同订单状态的Fragment
15 | */
16 | class OrderActivity:BaseActivity() {
17 | override fun onCreate(savedInstanceState: Bundle?) {
18 | super.onCreate(savedInstanceState)
19 | setContentView(R.layout.activity_order)
20 |
21 | initView()
22 | }
23 |
24 | /*
25 | 初始化视图
26 | */
27 | private fun initView() {
28 | mOrderTab.tabMode = TabLayout.MODE_FIXED
29 | mOrderVp.adapter = OrderVpAdapter(supportFragmentManager,this)
30 | mOrderTab.setupWithViewPager(mOrderVp)
31 |
32 | //根据订单状态设置当前页面
33 | mOrderVp.currentItem = intent.getIntExtra(OrderConstant.KEY_ORDER_STATUS,OrderStatus.ORDER_ALL)
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
22 |
23 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/service/impl/GoodsServiceImpl.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.service.impl
2 |
3 | import com.kotlin.base.ext.convert
4 | import com.kotlin.goods.data.protocol.Goods
5 | import com.kotlin.goods.data.repository.GoodsRepository
6 | import com.kotlin.goods.service.GoodsService
7 | import rx.Observable
8 | import javax.inject.Inject
9 |
10 | /*
11 | 商品 业务层 实现类
12 | */
13 | class GoodsServiceImpl @Inject constructor(): GoodsService {
14 |
15 | @Inject
16 | lateinit var repository: GoodsRepository
17 |
18 | /*
19 | 获取商品列表
20 | */
21 | override fun getGoodsList(categoryId: Int, pageNo: Int): Observable?> {
22 | return repository.getGoodsList(categoryId,pageNo).convert()
23 | }
24 |
25 | /*
26 | 根据关键字查询商品
27 | */
28 | override fun getGoodsListByKeyword(keyword: String, pageNo: Int): Observable?> {
29 | return repository.getGoodsListByKeyword(keyword,pageNo).convert()
30 | }
31 |
32 | /*
33 | 获取商品详情
34 | */
35 | override fun getGoodsDetail(goodsId: Int): Observable {
36 | return repository.getGoodsDetail(goodsId).convert()
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/drawable/progress_dialog_anim.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/data/api/OrderApi.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.data.api
2 |
3 | import com.kotlin.base.data.protocol.BaseResp
4 | import com.kotlin.order.data.protocol.*
5 | import retrofit2.http.Body
6 | import retrofit2.http.POST
7 | import rx.Observable
8 |
9 |
10 | /*
11 | 订单 接口
12 | */
13 | interface OrderApi {
14 |
15 | /*
16 | 取消订单
17 | */
18 | @POST("Kotlin_war/order/cancel")
19 | fun cancelOrder(@Body req: CancelOrderReq): Observable>
20 |
21 | /*
22 | 确认订单
23 | */
24 | @POST("Kotlin_war/order/confirm")
25 | fun confirmOrder(@Body req: ConfirmOrderReq): Observable>
26 |
27 | /*
28 | 根据ID获取订单
29 | */
30 | @POST("Kotlin_war/order/getOrderById")
31 | fun getOrderById(@Body req: GetOrderByIdReq): Observable>
32 |
33 | /*
34 | 根据订单状态查询查询订单列表
35 | */
36 | @POST("Kotlin_war/order/getOrderList")
37 | fun getOrderList(@Body req: GetOrderListReq): Observable?>>
38 |
39 | /*
40 | 提交订单
41 | */
42 | @POST("Kotlin_war/order/submitOrder")
43 | fun submitOrder(@Body req: SubmitOrderReq): Observable>
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/App/src/main/java/com/kotlin/mall/ui/adapter/TopicAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.mall.ui.adapter
2 |
3 | import android.content.Context
4 | import android.support.v4.view.PagerAdapter
5 | import android.view.LayoutInflater
6 | import android.view.View
7 | import android.view.ViewGroup
8 | import com.kotlin.base.ext.loadUrl
9 | import com.kotlin.mall.R
10 | import kotlinx.android.synthetic.main.layout_topic_item.view.*
11 |
12 | /*
13 | 话题数据
14 | */
15 | class TopicAdapter(private val context: Context, private val list: List) : PagerAdapter() {
16 |
17 | override fun destroyItem(parent: ViewGroup, paramInt: Int, paramObject: Any) {
18 | parent.removeView(paramObject as View)
19 | }
20 |
21 | override fun getCount(): Int {
22 | return this.list.size
23 | }
24 |
25 | override fun instantiateItem(parent: ViewGroup, position: Int): Any {
26 | val rooView = LayoutInflater.from(this.context).inflate(R.layout.layout_topic_item, null)
27 | rooView.mTopicIv.loadUrl(list[position])
28 | parent.addView(rooView)
29 | return rooView
30 | }
31 |
32 | override fun isViewFromObject(paramView: View, paramObject: Any): Boolean {
33 | return paramView === paramObject
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/java/com/kotlin/order/data/api/ShipAddressApi.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.order.data.api
2 |
3 | import com.kotlin.base.data.protocol.BaseResp
4 | import com.kotlin.order.data.protocol.AddShipAddressReq
5 | import com.kotlin.order.data.protocol.DeleteShipAddressReq
6 | import com.kotlin.order.data.protocol.EditShipAddressReq
7 | import com.kotlin.order.data.protocol.ShipAddress
8 | import retrofit2.http.Body
9 | import retrofit2.http.POST
10 | import rx.Observable
11 |
12 |
13 | /*
14 | 地址管理 接口
15 | */
16 | interface ShipAddressApi {
17 |
18 | /*
19 | 添加收货地址
20 | */
21 | @POST("Kotlin_war/shipAddress/add")
22 | fun addShipAddress(@Body req: AddShipAddressReq): Observable>
23 |
24 | /*
25 | 删除收货地址
26 | */
27 | @POST("Kotlin_war/shipAddress/delete")
28 | fun deleteShipAddress(@Body req: DeleteShipAddressReq): Observable>
29 |
30 | /*
31 | 修改收货地址
32 | */
33 | @POST("Kotlin_war/shipAddress/modify")
34 | fun editShipAddress(@Body req: EditShipAddressReq): Observable>
35 |
36 | /*
37 | 查询收货地址列表
38 | */
39 | @POST("Kotlin_war/shipAddress/getList")
40 | fun getShipAddressList(): Observable?>>
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/common/BaseApplication.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.common
2 |
3 | import android.app.Application
4 | import android.content.Context
5 | import com.alibaba.android.arouter.launcher.ARouter
6 | import com.kotlin.base.injection.component.AppComponent
7 | import com.kotlin.base.injection.component.DaggerAppComponent
8 | import com.kotlin.base.injection.module.AppModule
9 |
10 | /**
11 | * @author 桂雁彬
12 | * @date 2019/3/15.
13 | * GitHub:
14 | * email:yanbing.gui@zymobi.com
15 | * description:
16 | */
17 | open class BaseApplication : Application() {
18 |
19 | lateinit var appComponent: AppComponent
20 |
21 | override fun onCreate() {
22 | super.onCreate()
23 |
24 | initAppInjection()
25 |
26 | context = this
27 |
28 | //ARouter初始化
29 | ARouter.openLog() // 打印日志
30 | ARouter.openDebug()
31 | ARouter.init(this)
32 | }
33 |
34 |
35 | /*
36 | Application Component初始化
37 | */
38 | private fun initAppInjection() {
39 |
40 |
41 |
42 | appComponent = DaggerAppComponent.builder().appModule(AppModule(this)).build()
43 | }
44 |
45 | /*
46 | 全局伴生对象
47 | */
48 | companion object {
49 | lateinit var context: Context
50 | }
51 |
52 |
53 | }
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/data/repository/GoodsRepository.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.data.repository
2 |
3 | import com.kotlin.base.data.net.RetrofitFactory
4 | import com.kotlin.base.data.protocol.BaseResp
5 | import com.kotlin.goods.data.api.GoodsApi
6 | import com.kotlin.goods.data.protocol.*
7 |
8 | import javax.inject.Inject
9 |
10 | import rx.Observable
11 |
12 | /*
13 | 商品数据层
14 | */
15 | class GoodsRepository @Inject constructor() {
16 |
17 | /*
18 | 根据分类搜索商品
19 | */
20 | fun getGoodsList(categoryId: Int, pageNo: Int): Observable?>> {
21 | return RetrofitFactory.instance.create(GoodsApi::class.java).getGoodsList(GetGoodsListReq(categoryId, pageNo))
22 | }
23 |
24 | /*
25 | 根据关键字搜索商品
26 | */
27 | fun getGoodsListByKeyword(keyword: String, pageNo: Int): Observable?>> {
28 | return RetrofitFactory.instance.create(GoodsApi::class.java).getGoodsListByKeyword(GetGoodsListByKeywordReq(keyword, pageNo))
29 | }
30 |
31 | /*
32 | 商品详情
33 | */
34 | fun getGoodsDetail(goodsId: Int): Observable> {
35 | return RetrofitFactory.instance.create(GoodsApi::class.java).getGoodsDetail(GetGoodsDetailReq(goodsId))
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/ui/adapter/SearchHistoryAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.ui.adapter
2 |
3 | import android.content.Context
4 | import android.support.v7.widget.RecyclerView
5 | import android.view.LayoutInflater
6 | import android.view.View
7 | import android.view.ViewGroup
8 | import com.kotlin.base.ui.adapter.BaseRecyclerViewAdapter
9 | import com.kotlin.goods.R
10 | import kotlinx.android.synthetic.main.layout_search_history_item.view.*
11 |
12 | /*
13 | 搜索历史记录
14 | */
15 | class SearchHistoryAdapter(context: Context) : BaseRecyclerViewAdapter(context) {
16 |
17 | override fun onCreateViewHolder(parent: ViewGroup,
18 | viewType: Int): ViewHolder {
19 | val view = LayoutInflater.from(mContext)
20 | .inflate(R.layout.layout_search_history_item,
21 | parent,
22 | false)
23 | return ViewHolder(view)
24 | }
25 |
26 | override fun onBindViewHolder(holder: ViewHolder, position: Int) {
27 | super.onBindViewHolder(holder, position)
28 | val model = dataList[position]
29 | holder.itemView.mSearchHistoryTv.text = model
30 |
31 | }
32 |
33 | class ViewHolder(view: View) : RecyclerView.ViewHolder(view)
34 | }
35 |
--------------------------------------------------------------------------------
/UserCenter/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
19 |
20 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/utils/NetWorkUtils.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.utils
2 |
3 | import android.content.Context
4 | import android.net.ConnectivityManager
5 | import android.net.NetworkInfo
6 |
7 | /*
8 | 网络工具
9 | */
10 | object NetWorkUtils {
11 |
12 | /*
13 | 判断网络是否可用
14 | */
15 | fun isNetWorkAvailable(context: Context): Boolean {
16 | val connectivityManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
17 | val networkInfo = connectivityManager.activeNetworkInfo
18 | return networkInfo != null && networkInfo.isConnected
19 | }
20 |
21 | /*
22 | 检测wifi是否连接
23 | */
24 | fun isWifiConnected(context: Context): Boolean {
25 | val cm = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
26 | val networkInfo = cm.activeNetworkInfo
27 | return networkInfo != null && networkInfo.type == ConnectivityManager.TYPE_WIFI
28 | }
29 |
30 | /*
31 | 检测3G是否连接
32 | */
33 | fun is3gConnected(context: Context): Boolean {
34 | val cm = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
35 | val networkInfo = cm.activeNetworkInfo
36 | return networkInfo != null && networkInfo.type == ConnectivityManager.TYPE_MOBILE
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/res/layout/layout_header_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
11 |
17 |
27 |
28 |
--------------------------------------------------------------------------------
/App/src/main/res/layout/layout_topic_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
20 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/UserCenter/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-android-extensions'
4 | apply plugin: 'kotlin-kapt'
5 | android {
6 | compileSdkVersion 28
7 |
8 |
9 |
10 | defaultConfig {
11 | minSdkVersion 15
12 | targetSdkVersion 28
13 | versionCode 1
14 | versionName "1.0"
15 |
16 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
17 |
18 | }
19 |
20 | buildTypes {
21 | release {
22 | minifyEnabled false
23 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
24 | }
25 | }
26 |
27 | }
28 |
29 | dependencies {
30 | implementation fileTree(dir: 'libs', include: ['*.jar'])
31 |
32 | implementation 'com.android.support:appcompat-v7:28.0.0'
33 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
34 | testImplementation 'junit:junit:4.12'
35 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
36 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
37 | compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
38 | api project(':BaseLibrary')
39 | api project(':Provider')
40 | //Dagger2
41 | kapt "com.google.dagger:dagger-compiler:$dagger_version"
42 |
43 | }
44 | repositories {
45 | mavenCentral()
46 | }
47 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/ui/adapter/BaseRecyclerViewAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.ui.adapter
2 |
3 | import android.content.Context
4 | import android.support.v7.widget.RecyclerView
5 |
6 | /*
7 | RecyclerViewAdapter基类
8 | */
9 | abstract class BaseRecyclerViewAdapter(var mContext: Context) : RecyclerView.Adapter() {
10 |
11 | //ItemClick事件
12 | var mItemClickListener: OnItemClickListener? = null
13 |
14 | //数据集合
15 | var dataList: MutableList = mutableListOf()
16 |
17 | /*
18 | 设置数据
19 | Presenter处理过为null的情况,所以为不会为Null
20 | */
21 | fun setData(sources: MutableList) {
22 | dataList = sources
23 | notifyDataSetChanged()
24 | }
25 |
26 | override fun onBindViewHolder(holder: VH, position: Int) {
27 | holder.itemView.setOnClickListener {
28 | if (mItemClickListener != null)
29 | mItemClickListener!!.onItemClick(dataList[position], position)
30 | }
31 | }
32 |
33 | override fun getItemCount(): Int {
34 | return dataList.size
35 | }
36 |
37 | /*
38 | ItemClick事件声明
39 | */
40 | interface OnItemClickListener {
41 | fun onItemClick(item: T, position: Int)
42 | }
43 |
44 | fun setOnItemClickListener(listener: OnItemClickListener) {
45 | this.mItemClickListener = listener
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/OrderCenter/src/main/res/layout/activity_address.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
9 |
14 |
17 |
18 |
28 |
29 |
--------------------------------------------------------------------------------
/MessageCenter/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-kapt'
4 | apply plugin: 'kotlin-android-extensions'
5 |
6 | kapt {
7 | arguments {
8 | arg("moduleName", project.getName())
9 | }
10 | }
11 |
12 | android {
13 | compileSdkVersion 28
14 |
15 |
16 |
17 | defaultConfig {
18 | minSdkVersion 15
19 | targetSdkVersion 28
20 | versionCode 1
21 | versionName "1.0"
22 |
23 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
24 |
25 | }
26 |
27 | buildTypes {
28 | release {
29 | minifyEnabled false
30 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
31 | }
32 | }
33 |
34 | }
35 |
36 | dependencies {
37 | implementation fileTree(dir: 'libs', include: ['*.jar'])
38 |
39 | implementation 'com.android.support:appcompat-v7:28.0.0'
40 | testImplementation 'junit:junit:4.12'
41 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
42 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
43 | compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
44 | api project(':BaseLibrary')
45 |
46 | //ARouter
47 | kapt "com.alibaba:arouter-compiler:$arouter_compiler_version"
48 | }
49 | repositories {
50 | mavenCentral()
51 | }
52 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/ui/adapter/SecondCategoryAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.ui.adapter
2 |
3 | import android.content.Context
4 | import android.support.v7.widget.RecyclerView
5 | import android.view.LayoutInflater
6 | import android.view.View
7 | import android.view.ViewGroup
8 | import com.kotlin.base.ext.loadUrl
9 | import com.kotlin.base.ui.adapter.BaseRecyclerViewAdapter
10 | import com.kotlin.goods.R
11 | import com.kotlin.goods.data.protocol.Category
12 | import kotlinx.android.synthetic.main.layout_second_category_item.view.*
13 |
14 | /*
15 | 二级商品分类Adapter
16 | */
17 | class SecondCategoryAdapter(context: Context): BaseRecyclerViewAdapter(context) {
18 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
19 | val view = LayoutInflater.from(mContext)
20 | .inflate(R.layout.layout_second_category_item,parent,false)
21 |
22 | return ViewHolder(view)
23 | }
24 |
25 | override fun onBindViewHolder(holder: ViewHolder, position: Int) {
26 | super.onBindViewHolder(holder, position)
27 | val model = dataList[position]
28 | //分类图片
29 | holder.itemView.mCategoryIconIv.loadUrl(model.categoryIcon)
30 | //分类名称
31 | holder.itemView.mSecondCategoryNameTv.text = model.categoryName
32 |
33 | }
34 |
35 | class ViewHolder(view: View): RecyclerView.ViewHolder(view)
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/PaySDK/src/main/java/com/kotlin/pay/presenter/PayPresenter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.pay.presenter
2 |
3 | import com.kotlin.base.ext.excute
4 | import com.kotlin.base.presenter.BasePresenter
5 | import com.kotlin.base.rx.BaseSubscriber
6 | import com.kotlin.pay.presenter.view.PayView
7 | import com.kotlin.pay.service.PayService
8 | import javax.inject.Inject
9 |
10 | /*
11 | 支付Presenter
12 | */
13 | class PayPresenter @Inject constructor() : BasePresenter() {
14 | @Inject
15 | lateinit var service: PayService
16 |
17 | /*
18 | 获取支付签名
19 | */
20 | fun getPaySign(orderId: Int, totalPrice: Long) {
21 | if (!checkNetWork()) {
22 | return
23 | }
24 | mView.showLoading()
25 | service.getPaySign(orderId,totalPrice).excute(object : BaseSubscriber(mView) {
26 | override fun onNext(t: String) {
27 | mView.onGetSignResult(t)
28 | }
29 | }, lifecycleProvider)
30 |
31 | }
32 |
33 | /*
34 | 订单支付,同步订单状态
35 | */
36 | fun payOrder(orderId: Int) {
37 | if (!checkNetWork()) {
38 | return
39 | }
40 | mView.showLoading()
41 | service.payOrder(orderId).excute(object : BaseSubscriber(mView) {
42 | override fun onNext(t: Boolean) {
43 | mView.onPayOrderResult(t)
44 | }
45 | }, lifecycleProvider)
46 |
47 | }
48 |
49 |
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/utils/GlideUtils.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.utils
2 |
3 | import android.content.Context
4 | import android.widget.ImageView
5 | import com.bumptech.glide.Glide
6 | import com.bumptech.glide.load.resource.drawable.GlideDrawable
7 | import com.bumptech.glide.request.animation.GlideAnimation
8 | import com.bumptech.glide.request.target.SimpleTarget
9 | import com.kotlin.base.R
10 |
11 | /*
12 | Glide工具类
13 | */
14 | object GlideUtils {
15 | fun loadImage(context: Context, url: String, imageView: ImageView) {
16 | Glide.with(context).load(url).centerCrop().into(imageView)
17 | }
18 |
19 | fun loadImageFitCenter(context: Context, url: String, imageView: ImageView) {
20 | Glide.with(context).load(url).fitCenter().into(imageView)
21 | }
22 |
23 | /*
24 | 当fragment或者activity失去焦点或者destroyed的时候,Glide会自动停止加载相关资源,确保资源不会被浪费
25 | */
26 | fun loadUrlImage(context: Context, url: String, imageView: ImageView){
27 | Glide.with(context).load(url).placeholder(R.drawable.icon_back).error(R.drawable.icon_back).centerCrop().into(
28 | object : SimpleTarget() {
29 | override fun onResourceReady(resource: GlideDrawable,
30 | glideAnimation: GlideAnimation) {
31 | imageView.setImageDrawable(resource)
32 | }
33 | })
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/BaseLibrary/src/main/java/com/kotlin/base/widgets/LabelTextView.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.base.widgets
2 |
3 | import android.content.Context
4 | import android.util.AttributeSet
5 | import android.view.View
6 | import android.widget.FrameLayout
7 | import com.kotlin.base.R
8 | import kotlinx.android.synthetic.main.layout_label_textview.view.*
9 |
10 |
11 | /*
12 | * LabelTextView封装
13 | */
14 | class LabelTextView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : FrameLayout(context, attrs, defStyleAttr) {
15 |
16 | private var mLabelText: CharSequence? = null
17 | private var mContentText: CharSequence? = null
18 |
19 | //初始化属性
20 | init {
21 | val typedArray = context.obtainStyledAttributes(attrs, R.styleable.LabelText)
22 | this.mLabelText = typedArray.getText(R.styleable.LabelText_labelText)
23 | this.mContentText = typedArray.getText(R.styleable.LabelText_contentText)
24 | initView()
25 | typedArray.recycle()
26 | }
27 |
28 | //初始化视图
29 | private fun initView() {
30 | View.inflate(context, R.layout.layout_label_textview, this)
31 |
32 | mLabelText?.let {
33 | mLabelTv.text = it
34 | }
35 |
36 | mContentText?.let {
37 | mContentTv.text = it
38 | }
39 |
40 | }
41 |
42 | /*
43 | 设置内容文本
44 | */
45 | fun setContentText(text:String){
46 | mContentTv.text = text
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/res/layout/layout_goods_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
13 |
20 |
25 |
31 |
32 |
--------------------------------------------------------------------------------
/GoodsCenter/src/main/java/com/kotlin/goods/ui/adapter/TopCategoryAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.kotlin.goods.ui.adapter
2 |
3 | import android.content.Context
4 | import android.graphics.Paint
5 | import android.support.v7.widget.RecyclerView
6 | import android.view.LayoutInflater
7 | import android.view.View
8 | import android.view.ViewGroup
9 | import com.kotlin.base.ui.adapter.BaseRecyclerViewAdapter
10 | import com.kotlin.base.utils.GlideUtils
11 | import com.kotlin.goods.R
12 | import com.kotlin.goods.data.protocol.Category
13 | import kotlinx.android.synthetic.main.layout_top_category_item.view.*
14 |
15 | /*
16 | 一级商品分类 Adapter
17 | */
18 | class TopCategoryAdapter(context: Context): BaseRecyclerViewAdapter(context) {
19 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
20 | val view = LayoutInflater.from(mContext)
21 | .inflate(R.layout.layout_top_category_item,parent,false)
22 |
23 | return ViewHolder(view)
24 | }
25 |
26 | override fun onBindViewHolder(holder: ViewHolder, position: Int) {
27 | super.onBindViewHolder(holder, position)
28 | val model = dataList[position]
29 | //分类名称
30 | holder.itemView.mTopCategoryNameTv.text = model.categoryName
31 | //是否被选中
32 | holder.itemView.mTopCategoryNameTv.isSelected = model.isSelected
33 |
34 | }
35 |
36 | class ViewHolder(view: View): RecyclerView.ViewHolder(view)
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/App/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | apply plugin: 'kotlin-android'
4 | apply plugin: 'kotlin-kapt'
5 | apply plugin: 'kotlin-android-extensions'
6 |
7 | android {
8 | compileSdkVersion 28
9 | defaultConfig {
10 | applicationId "com.kotlin.mall"
11 | minSdkVersion 15
12 | targetSdkVersion 28
13 | versionCode 1
14 | versionName "1.0"
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 | }
24 |
25 | dependencies {
26 | implementation fileTree(dir: 'libs', include: ['*.jar'])
27 | implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
28 | implementation 'com.android.support:appcompat-v7:28.0.0'
29 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
30 | testImplementation 'junit:junit:4.12'
31 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
32 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
33 |
34 |
35 |
36 | implementation project(':MessageCenter')
37 | implementation project(':UserCenter')
38 | implementation project(':GoodsCenter')
39 |
40 | implementation project(':OrderCenter')
41 |
42 | implementation project(':PaySDK')
43 | }
44 |
--------------------------------------------------------------------------------
/OrderCenter/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-kapt'
4 | apply plugin: 'kotlin-android-extensions'
5 |
6 | kapt {
7 | arguments {
8 | arg("moduleName", project.getName())
9 | }
10 | }
11 | android {
12 | compileSdkVersion 28
13 |
14 |
15 |
16 | defaultConfig {
17 | minSdkVersion 15
18 | targetSdkVersion 28
19 | versionCode 1
20 | versionName "1.0"
21 |
22 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
23 |
24 | }
25 |
26 | buildTypes {
27 | release {
28 | minifyEnabled false
29 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
30 | }
31 | }
32 |
33 | }
34 |
35 | dependencies {
36 | implementation fileTree(dir: 'libs', include: ['*.jar'])
37 |
38 | implementation 'com.android.support:appcompat-v7:28.0.0'
39 | testImplementation 'junit:junit:4.12'
40 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
41 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
42 | compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
43 | api project(':BaseLibrary')
44 | api project(':Provider')
45 | //ARouter
46 | kapt "com.alibaba:arouter-compiler:$arouter_compiler_version"
47 |
48 | kapt "com.google.dagger:dagger-compiler:$dagger_version"
49 | }
50 | repositories {
51 | mavenCentral()
52 | }
53 |
--------------------------------------------------------------------------------