| | |
| | | </activity> |
| | | <activity android:name="com.future.driver.ui.pub.ForgetPwdActivity" /> |
| | | <activity android:name="com.future.driver.ui.pub.BecomeDriverActivity" /> |
| | | <activity android:name="com.future.driver.ui.main.MainActivity" /> |
| | | <activity android:name="com.future.driver.ui.main.MainActivity" android:launchMode="singleTask"/> |
| | | <activity android:name="com.future.driver.ui.mine.MineActivity" /> |
| | | <activity android:name="com.future.driver.ui.mine.money_bag.MineIncomeActivity" /> |
| | | <activity android:name="com.future.driver.ui.mine.money_bag.MineAwardActivity" /> |
| | |
| | | |
| | | public static final int SELECT_SEARCH_SITE = 10029; // 搜索地点选择 |
| | | |
| | | public static final int FACE_SUC = 10030; // 人脸失败 |
| | | public static final int FACE_FAILED = 10031; // 人脸成功 |
| | | public static final int FACE_SUC = 10030; // 人脸成功 |
| | | public static final int FACE_FAILED = 10031; // 人脸失败 |
| | | |
| | | public static final int START_RECORD = 10032; //开始录音任务 |
| | | public static final int FINISH_RECORD = 10033; //结束录音任务 |
| | |
| | | public static boolean isTest = false; |
| | | public static final int SUCCESS = 200; |
| | | |
| | | //内网 |
| | | public static final String BASE_URL = "http://192.168.110.111:81/driver-server/"; |
| | | public static final String SOCKET_SERVER = "192.168.110.111"; |
| | | // //内网 |
| | | // public static final String BASE_URL = "http://192.168.110.111:81/driver-server/"; |
| | | // public static final String SOCKET_SERVER = "192.168.110.111"; |
| | | // public static final int SOCKET_PORT = 9999; |
| | | |
| | | //w网 |
| | | public static final String BASE_URL = "http://120.27.134.189:81/driver-server/"; |
| | | public static final String SOCKET_SERVER = "120.27.134.189"; |
| | | public static final int SOCKET_PORT = 9999; |
| | | |
| | | //开通城市 用的用户端接口需要单独处理 |
| | | public static String queryOpenCityUser = "http://192.168.110.111:81/user-server/base/openCity/queryOpenCity"; |
| | | public static String queryOpenCityUser = "http://120.27.134.189:81/user-server/base/openCity/queryOpenCity"; |
| | | |
| | | |
| | | //39.108.148.228 测试服务器 |
| | | // public static final String BASE_URL = "https://www.kuaiyuncx.com:81/driver/"; |
| | | // public static final String SOCKET_SERVER = "116.204.107.178"; |
| | | // public static final int SOCKET_PORT = 9999; |
| | | |
| | | //正式 |
| | | // public static final String BASE_URL = "https://fuban.net//driver/"; |
| | | // public static final String SOCKET_SERVER = "47.109.70.48"; |
| | | // public static final int SOCKET_PORT = 9999; |
| | | |
| | | public static final String strShare = "https://fuban.net/sharePage/share/shareIndex.html"; |
| | | public static final String strShareDriver = "https://fuban.net/sharePage/driverShare/qr.html"; |
| | |
| | | .titleTextSize(18) //标题文字大小 |
| | | .titleTextColor("#585858") //标题文字颜 色 |
| | | .titleBackgroundColor("#FFFFFF") //标题栏背景色 |
| | | .confirTextColor("#585858") //确认按钮文字颜色 |
| | | .confirmText("确定") //确认按钮文字 |
| | | .confirTextColor("#F48417") //确认按钮文字颜色 |
| | | .confirmText("确认") //确认按钮文字 |
| | | .confirmTextSize(16) //确认按钮文字大小 |
| | | .cancelTextColor("#585858") //取消按钮文字颜色 |
| | | .cancelText("取消") //取消按钮文字 |
| | |
| | | holder?.let { |
| | | it.itemView.tv_money.text = "¥"+ doubleTwo(item!!.amount).toString() |
| | | it.itemView.tv_time.text = item.day |
| | | it.itemView.tv_time.text = item.name |
| | | it.itemView.tv_name.text = item.name |
| | | } |
| | | } |
| | | |
| | |
| | | import com.future.driver.netUtls.Api |
| | | import com.future.driver.netUtls.callNet |
| | | import com.future.driver.netUtls.getMapByAny |
| | | import com.future.driver.ui.DialogUtil |
| | | import com.future.driver.utils.DateUtil |
| | | import kotlinx.android.synthetic.main.item_line_class.view.* |
| | | import java.util.* |
| | |
| | | callNet(context,Api.reservation,map){ |
| | | if (type == 1){ |
| | | item.state = 2 |
| | | DialogUtil.getOnlySureDialog(context,"预约成功!",{}) |
| | | } |
| | | if (type == 2){ |
| | | item.state = 3 |
| | |
| | | |
| | | return@clickDelay |
| | | } |
| | | if(item.type ==1 || item.type ==2){ //订单类型(1=专车,2=出租车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=包车) |
| | | if(item.type ==1 || item.type ==2|| item.type ==7){ //订单类型(1=专车,2=出租车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=包车) |
| | | when(item.state){ |
| | | 2,3,4,5 -> { |
| | | context.startActivity<TripActivity>("orderId" to item.id.toString() , "orderType" to item.type.toString()) |
| | |
| | | |
| | | override fun onBindItem(holder: BaseViewHolder?, view: View?, item: Calendar?) { |
| | | holder?.let { |
| | | var weekName = getWeekName(item!!) |
| | | holder.itemView.tv_time.text = (item!!.get(Calendar.MONTH)+1).toString()+"月"+item!!.get(Calendar.DAY_OF_MONTH).toString()+"日" |
| | | if (selectPosition == it.adapterPosition){ |
| | | holder.itemView.tv_time.textColor(context,R.color.main_yellow_qia) |
| | |
| | | |
| | | fun getAllDate(calendar: Calendar):MutableList<Calendar>{ |
| | | var list = mutableListOf<Calendar>() |
| | | for (position in 0..6){ |
| | | for (position in 0..2){ |
| | | var calendarIn = Calendar.getInstance() |
| | | calendarIn.timeInMillis = calendar.timeInMillis + position * 24 * 3600 * 1000 |
| | | list.add(calendarIn) |
| | |
| | | startActivity<FaceSucActivity>("isSuc" to true) |
| | | finish() |
| | | }){ |
| | | EventBus.getDefault().post(BaseEvent(BaseEvent.FACE_FAILED)) |
| | | if (it?.contains("主页") == true){ |
| | | startActivity<MainActivity>() |
| | | }else{ |
| | | startActivity<FaceSucActivity>() |
| | | } |
| | | EventBus.getDefault().post(BaseEvent(BaseEvent.FACE_FAILED)) |
| | | finish() |
| | | } |
| | | dismissDialog() |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | // map["id"] = CacheKey.getUserId() |
| | | callNet(Api.queryNewData, map) { |
| | | var data = gson.fromJson<VersionBean>(it, VersionBean::class.java) |
| | | if (data.data.version != "" && data.data.version != Utils.getAppVersion(this)) { |
| | | if (data.data.version != "" && data.data.version > Utils.getAppVersion(this)) { |
| | | if (data.data.mandatory == 2) { |
| | | DialogUtil.getDelAndSureDialog(this, "有新版本是否更新?", {}, { |
| | | DownloadUtil(this).downloadAPK(data.data.url, "未来出行司机端") |
| | |
| | | } |
| | | |
| | | |
| | | private fun initCall() { |
| | | private fun initCall(playVoice:Boolean = true) { |
| | | var map = getMapByAny() |
| | | callNet(Api.queryHomeData, map) { |
| | | var data = gson.fromJson<HomeDataBean>(it, HomeDataBean::class.java) |
| | |
| | | tv_lien_name.text = data.data.brand.toString() |
| | | tv_car.text = if (data.data.work == 1) "收车" else "出车" |
| | | if (data.data.work == 1){ |
| | | if (playVoice) |
| | | MyApplication.getTTsManager().setVideoText("您正在上班中") |
| | | beOnDuty(true) |
| | | }else{ |
| | | if (playVoice) |
| | | MyApplication.getTTsManager().setVideoText("您已收车") |
| | | beOnDuty(false) |
| | | } |
| | |
| | | }else{ |
| | | var map= getMapByAny() |
| | | map["type"] = bean[0].id |
| | | callNet(Api.work, map) { |
| | | callNet(Api.work, map,{ |
| | | toast("上班成功") |
| | | beOnDuty(true) |
| | | EventBus.getDefault().post(BaseEvent(BaseEvent.START_CAR)) |
| | | }){ |
| | | if (it?.contains("人脸") == true){ |
| | | tv_face.visible() |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | BaseEvent.FACE_FAILED -> { |
| | | tv_face.visible() |
| | | initCall(false) |
| | | } |
| | | BaseEvent.START_RECORD -> { |
| | | if (!MyApplication.isRecording) |
| | |
| | | EventBus.getDefault().post(BaseEvent(BaseEvent.FINISH_RECORD)) |
| | | ll_pay_result.gone() |
| | | tv_show_pay_over.gone() |
| | | iv_phone.gone() |
| | | } |
| | | |
| | | override fun initView() { |
| | |
| | | orderBean?.let { |
| | | tv_name.text = it.data.nickName |
| | | tv_car_num.text = it.data.historyNum.toString() + "次乘车" |
| | | iv_phone.visible() |
| | | iv_phone.clickDelay { |
| | | MyUtils.getInstans().CallPhone(this, it.data.phone.toString()) |
| | | } |
| | |
| | | package com.future.driver.ui.main |
| | | |
| | | import cn.sinata.xldutils.utils.clickDelay |
| | | import cn.sinata.xldutils.utils.visible |
| | | import com.future.driver.R |
| | | import com.future.driver.base.BaseEvent |
| | | import com.future.driver.base.MyBaseActivity |
| | |
| | | import com.future.driver.netUtls.callNet |
| | | import com.future.driver.netUtls.getMapByAny |
| | | import com.future.driver.ui.adapter.SelectServerModeAdapter |
| | | import kotlinx.android.synthetic.main.activity_main.* |
| | | import kotlinx.android.synthetic.main.activity_select_server.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.jetbrains.anko.toast |
| | |
| | | } |
| | | var map= getMapByAny() |
| | | map["type"] = adapter.getSelectId() |
| | | callNet(Api.work,map) { |
| | | callNet(Api.work,map, { |
| | | toast("上班成功") |
| | | EventBus.getDefault().post(BaseEvent(BaseEvent.START_CAR)) |
| | | onBackPressed() |
| | | }){ |
| | | if (it?.contains("人脸") == true){ |
| | | EventBus.getDefault().post(BaseEvent(BaseEvent.FACE_FAILED)) |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | data?.let { |
| | | when (it.orderType) { |
| | | 1, 2, 3,7 -> { |
| | | if (it.status == 10 || it.status == 12) { |
| | | if ((it.status == 10 || it.status == 12)&&MyApplication.currentOrderId.isNotEmpty()&&it.orderId.toString() == orderId) { |
| | | Handler(Looper.getMainLooper()).post { |
| | | toast("用户已取消订单") |
| | | MyApplication.getTTsManager().setVideoText("用户已取消订单") |
| | |
| | | "orderType" to orderType |
| | | ) |
| | | } else { |
| | | DialogUtil.getDelAndSureDialog( |
| | | val d = DialogUtil.getDelAndSureDialog( |
| | | this, |
| | | "现在改派将收取" + data.data.amount + "元改派费,您是否要进行改派?", |
| | | {}, |
| | |
| | | "money" to data.data.amount.toString() |
| | | ) |
| | | }) |
| | | val view = DialogUtil.getView(d) |
| | | view.tv_view_two_base.gravity = Gravity.CENTER |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | iv_move.setOnClickListener { |
| | |
| | | return@let |
| | | } |
| | | if (it.data.endAddress.isNullOrEmpty()&&it.data.orderState == 4){ |
| | | DialogUtil.getDelAndSureDialog(this,"去填写","取消","乘客未填写目的地,请代乘客填写目的地后开始行程",{ |
| | | val delAndSureDialog = DialogUtil.getDelAndSureDialog( |
| | | this, |
| | | "去填写", |
| | | "取消", |
| | | "乘客未填写目的地,请代乘客填写目的地后开始行程", |
| | | { |
| | | }){ |
| | | byChangeEnd = true |
| | | startActivity<SearchSiteActivity>("currentCityName" to (MyApplication.aMapLocation?.city?:""),"type" to "3") |
| | | startActivity<SearchSiteActivity>( |
| | | "currentCityName" to (MyApplication.aMapLocation?.city ?: ""), |
| | | "type" to "3" |
| | | ) |
| | | } |
| | | val view = DialogUtil.getView(delAndSureDialog) |
| | | view.tv_view_two_base.gravity = Gravity.CENTER |
| | | return@let |
| | | } |
| | | it.data.orderState++ |
| | |
| | | rl_login_out.setOnClickListener { |
| | | DialogUtil.getDelAndSureDialog(this,"是否退出登录?",{},{ |
| | | CacheUtil.get().clear() |
| | | CacheKey.putKeyStr("isAgreen", "1") |
| | | NettyClient.getInstance().stopService() |
| | | MyApplication.isLogin = false |
| | | startActivity<LoginActivity>() |
| | |
| | | // map["id"] = CacheKey.getUserId() |
| | | callNet(Api.queryNewData, map) { |
| | | var data = gson.fromJson<VersionBean>(it, VersionBean::class.java) |
| | | if (data.data.version != "" && data.data.version != Utils.getAppVersion(this)) { |
| | | if (data.data.version != "" && data.data.version > Utils.getAppVersion(this)) { |
| | | if (data.data.mandatory == 2) { |
| | | DialogUtil.getDelAndSureDialog(this, "有新版本是否更新?", {}, { |
| | | DownloadUtil(this).downloadAPK(data.data.url, "未来出行司机端") |
| | |
| | | setTitleText("已完成") |
| | | map_view.gone() |
| | | slide_btn.gone() |
| | | iv_police.gone() |
| | | iv_move.gone() |
| | | iv_to_gd.gone() |
| | | cl_over_view.visible() |
| | |
| | | |
| | | break; |
| | | case BaseResp.ErrCode.ERR_USER_CANCEL: |
| | | result = "发送取消"; |
| | | Toast.makeText(this, result, Toast.LENGTH_LONG).show(); |
| | | finish(); |
| | | break; |
| | | case BaseResp.ErrCode.ERR_AUTH_DENIED: |
| | | result = "发送被拒绝"; |
| | | Toast.makeText(this, result, Toast.LENGTH_LONG).show(); |
| | | |
| | | finish(); |
| | | break; |
| | | default: |
| | | result = "发送返回"; |
| | | Toast.makeText(this, result, Toast.LENGTH_LONG).show(); |
| | | |
| | | finish(); |
| | | break; |
| | | } |
| | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_time" |
| | | android:layout_width="63dp" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="18dp" |
| | | android:layout_alignParentEnd="true" |
| | | android:layout_marginTop="21dp" |
| | |
| | | android:layout_width="match_parent" |
| | | android:background="@color/white" |
| | | android:layout_height="50dp" |
| | | android:visibility="gone" |
| | | android:orientation="horizontal"> |
| | | |
| | | <TextView |
| | |
| | | |
| | | </LinearLayout> |
| | | |
| | | <include layout="@layout/include_line_14"/> |
| | | <include layout="@layout/include_line_14" |
| | | android:visibility="gone"/> |
| | | |
| | | |
| | | <LinearLayout |
| | |
| | | android:layout_below="@+id/view_hint_close_base" |
| | | android:layout_centerHorizontal="true" |
| | | android:layout_marginTop="30dp" |
| | | android:paddingStart="10dp" |
| | | android:paddingEnd="10dp" |
| | | android:paddingStart="14dp" |
| | | android:paddingEnd="14dp" |
| | | android:text="" |
| | | android:textColor="#ff666666" |
| | | android:textSize="15sp" /> |
| | |
| | | android:layout_marginTop="6dp" |
| | | android:layout_height="wrap_content" |
| | | android:gravity="center" |
| | | tools:text="感谢您选择加入未来出行大家庭,工作人员将在2小时内与您电话联系确认相关信息,请保持电话通畅,感恩支持与理解!" |
| | | android:text="感谢您选择加入未来出行大家庭,工作人员将在2小时内与您电话联系确认相关信息,请保持电话通畅,感恩支持与理解!" |
| | | android:textColor="#ff666666" |
| | | android:textSize="12sp" |
| | | /> |
| | |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="10dp" |
| | | android:text="可乐" |
| | | android:textColor="#ff27282d" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold" /> |
| | |
| | | android:layout_marginTop="2dp" |
| | | android:layout_marginBottom="9dp" |
| | | android:alpha="0.6" |
| | | android:text="123次乘车" |
| | | android:text="0次乘车" |
| | | android:textColor="#ff000000" |
| | | android:textSize="12sp" /> |
| | | |
| | |
| | | android:layout_marginBottom="11dp" |
| | | android:drawableStart="@mipmap/icon_time_gray" |
| | | android:drawablePadding="5dp" |
| | | android:text="4月3日 14:00" |
| | | android:textColor="#ff27282d" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" /> |
| | |
| | | android:layout_marginTop="11dp" |
| | | android:layout_marginBottom="11dp" |
| | | android:drawableStart="@mipmap/icon_starting_point" |
| | | android:text="柳州市政府" |
| | | android:textColor="#ff27282d" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" /> |
| | |
| | | android:layout_height="wrap_content" |
| | | android:paddingVertical="11dp" |
| | | android:drawableStart="@mipmap/icon_end_point" |
| | | android:text="柳州客运中心" |
| | | android:textColor="#ff27282d" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" /> |
| | |
| | | android:padding="10dp"/> |
| | | </LinearLayout> |
| | | |
| | | |
| | | |
| | | <include layout="@layout/include_line" /> |
| | | |
| | | <TextView |
| | |
| | | android:layout_marginBottom="11dp" |
| | | android:drawableStart="@mipmap/hongbao" |
| | | android:drawablePadding="6dp" |
| | | android:text="8元红包" |
| | | android:textColor="#ff27282d" |
| | | android:textSize="14sp" |
| | | android:textStyle="bold" /> |
| | |
| | | android:textSize="14sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_name" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_alignParentEnd="true" |
| | | android:layout_centerVertical="true" |
| | | android:text="快车" |
| | | android:text="专车" |
| | | android:textColor="#ff333333" |
| | | android:textSize="14sp" /> |
| | | |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:gravity="center" |
| | | android:visibility="gone" |
| | | android:orientation="vertical" |
| | | android:paddingTop="26dp"> |
| | | |
| | |
| | | android:layout_marginTop="12dp" |
| | | android:layout_marginBottom="12dp" |
| | | android:layout_marginStart="14dp" |
| | | android:text="注:默认只能预约近七天的班次" |
| | | android:text="注:默认只能预约近三天的班次" |
| | | android:textColor="#ff333333" |
| | | android:textSize="15sp" |
| | | /> |