@@ -8,7 +8,7 @@ public final class BoxUrlContainer {
|
||
| 8 | 8 |
|
| 9 | 9 |
public static final String SESSION_END_URL = BASE_URL+"session_end"; |
| 10 | 10 |
|
| 11 |
- public static final String DELETE_PHOTO_URL = BASE_URL+"delete"; |
|
| 11 |
+ public static final String DELETE_PHOTO_URL = BASE_URL+"delete_photo"; |
|
| 12 | 12 |
|
| 13 | 13 |
public static final String FETCH_THUMBNAIL_URL = BASE_URL+"fetch_thumbnail"; |
| 14 | 14 |
|
@@ -32,7 +32,7 @@ public class LoginActivity extends FragmentActivity implements LoginContract.Vie |
||
| 32 | 32 |
|
| 33 | 33 |
@OnClick(R.id.btn_login) |
| 34 | 34 |
public void login(){
|
| 35 |
- presenter.login(); |
|
| 35 |
+ presenter.start(); |
|
| 36 | 36 |
} |
| 37 | 37 |
|
| 38 | 38 |
@Override |
@@ -17,7 +17,7 @@ public class LoginPresenter implements LoginContract.Presenter,BaseInteractor.In |
||
| 17 | 17 |
private Context context; |
| 18 | 18 |
private LoginContract.View view; |
| 19 | 19 |
private LoginInteractor interactor; |
| 20 |
- private static final String APP_ID = ""; |
|
| 20 |
+ private static final String APP_ID = "wxf4832536d9dda70a"; |
|
| 21 | 21 |
|
| 22 | 22 |
public LoginPresenter(Context context,LoginContract.View view){
|
| 23 | 23 |
this.view = view; |
@@ -251,10 +251,13 @@ public class SessionInteractor {
|
||
| 251 | 251 |
listener.onSessionEnd(sessionBean.sessionId); |
| 252 | 252 |
} |
| 253 | 253 |
|
| 254 |
- public void deletePhoto(){
|
|
| 254 |
+ public void deletePhoto(PhotoBean photoBean){
|
|
| 255 | 255 |
HashMap<String,String> params = new HashMap<>(); |
| 256 |
- params.put("lensman",sessionBean.lensmanId);
|
|
| 257 |
- params.put("session",sessionBean.sessionId);
|
|
| 256 |
+ params.put("lensman",photoBean.lensmanId);
|
|
| 257 |
+ params.put("session",photoBean.sessionId);
|
|
| 258 |
+ params.put("id",String.valueOf(photoBean.photoId));
|
|
| 259 |
+ params.put("name",photoBean.photoName);
|
|
| 260 |
+ params.put("path",photoBean.photoPath);
|
|
| 258 | 261 |
HttpPostTask deleteTask = new HttpPostTask(params); |
| 259 | 262 |
deleteTask.executeOnExecutor(ThreadExecutor.getInstance().getExecutor(), BoxUrlContainer.DELETE_PHOTO_URL); |
| 260 | 263 |
} |
@@ -84,6 +84,6 @@ public class SessionPresenter implements SessionContract.Presenter, SessionInter |
||
| 84 | 84 |
PhotoBean photoBean = photoList.get(index); |
| 85 | 85 |
photoList.remove(photoBean); |
| 86 | 86 |
DBService.getInstance().deletePhotoBean(photoBean); |
| 87 |
- interactor.deletePhoto(); |
|
| 87 |
+ interactor.deletePhoto(photoBean); |
|
| 88 | 88 |
} |
| 89 | 89 |
} |
@@ -18,7 +18,7 @@ public class WXEntryActivity extends Activity implements IWXAPIEventHandler {
|
||
| 18 | 18 |
@Override |
| 19 | 19 |
public void onCreate(Bundle savedInstanceState) {
|
| 20 | 20 |
super.onCreate(savedInstanceState); |
| 21 |
- api = WXAPIFactory.createWXAPI(this, "APP_ID"); |
|
| 21 |
+ api = WXAPIFactory.createWXAPI(this, "wxf4832536d9dda70a"); |
|
| 22 | 22 |
api.handleIntent(getIntent(), this); |
| 23 | 23 |
} |
| 24 | 24 |
|