|
@@ -38,10 +38,16 @@ class Task extends Api
|
|
$where["is_show"] = 1;
|
|
$where["is_show"] = 1;
|
|
|
|
|
|
$taskList = Db::name('task')
|
|
$taskList = Db::name('task')
|
|
- ->field("id,type_id,image,name,exp,number,".$jump_url." as jump_url,url_type")
|
|
|
|
|
|
+ ->field("id,type_id,image,name,exp,exp_woman,number,".$jump_url." as jump_url,url_type")
|
|
->where($where)
|
|
->where($where)
|
|
->autopage()
|
|
->autopage()
|
|
->select();
|
|
->select();
|
|
|
|
+ foreach($taskList as $key => &$val){
|
|
|
|
+ if($this->auth->gender == 0){
|
|
|
|
+ $val['exp'] = $val['exp_woman'];
|
|
|
|
+ }
|
|
|
|
+ unset($val['exp_woman']);
|
|
|
|
+ }
|
|
$taskList = list_domain_image($taskList,['image']);
|
|
$taskList = list_domain_image($taskList,['image']);
|
|
|
|
|
|
$today = strtotime(date("Y-m-d 00:00:00"));
|
|
$today = strtotime(date("Y-m-d 00:00:00"));
|
|
@@ -83,12 +89,18 @@ class Task extends Api
|
|
$where["a.type_id"] = 1;
|
|
$where["a.type_id"] = 1;
|
|
$where["a.is_show"] = 1;
|
|
$where["a.is_show"] = 1;
|
|
$taskList = Db::name('task')->alias("a")
|
|
$taskList = Db::name('task')->alias("a")
|
|
- ->field("a.id,a.type_id,a.image,a.name,a.exp,a.number,a.".$jump_url." as jump_url,a.url_type,l.pace,l.is_reward,l.is_finish,l.finish_number")
|
|
|
|
|
|
+ ->field("a.id,a.type_id,a.image,a.name,a.exp,a.exp_woman,a.number,a.".$jump_url." as jump_url,a.url_type,l.pace,l.is_reward,l.is_finish,l.finish_number")
|
|
->join("task_log l", "l.task_id = a.id and l.user_id = ".$this->auth->id, "left")
|
|
->join("task_log l", "l.task_id = a.id and l.user_id = ".$this->auth->id, "left")
|
|
->where($where)
|
|
->where($where)
|
|
->autopage()
|
|
->autopage()
|
|
->order("a.id","asc")
|
|
->order("a.id","asc")
|
|
->select();
|
|
->select();
|
|
|
|
+ foreach($taskList as $key => &$val){
|
|
|
|
+ if($this->auth->gender == 0){
|
|
|
|
+ $val['exp'] = $val['exp_woman'];
|
|
|
|
+ }
|
|
|
|
+ unset($val['exp_woman']);
|
|
|
|
+ }
|
|
$taskList = list_domain_image($taskList,['image']);
|
|
$taskList = list_domain_image($taskList,['image']);
|
|
|
|
|
|
|
|
|
|
@@ -140,7 +152,8 @@ class Task extends Api
|
|
Db::startTrans();
|
|
Db::startTrans();
|
|
try{
|
|
try{
|
|
// 增加用户金币
|
|
// 增加用户金币
|
|
- $res1 = model('wallet')->lockChangeAccountRemain($this->auth->id,'jewel',$taskInfo["exp"],32,$taskInfo['name'],'task_log',$tasklogInfo['id']);
|
|
|
|
|
|
+ $exp = $this->auth->gender == 0 ? $taskInfo['exp_woman'] : $taskInfo['exp'];
|
|
|
|
+ $res1 = model('wallet')->lockChangeAccountRemain($this->auth->id,'jewel',$exp,32,$taskInfo['name'],'task_log',$tasklogInfo['id']);
|
|
if($res1['status'] === false){
|
|
if($res1['status'] === false){
|
|
Db::rollback();
|
|
Db::rollback();
|
|
$this->error($res1['msg']);
|
|
$this->error($res1['msg']);
|