store_info['store_id']); $goodsevallist = $evaluategoods_model->getEvaluategoodsList($condition, 5, 'geval_id desc'); foreach ($goodsevallist as $key => $val) { $goodsevallist[$key]['geval_goodsimage_url'] = goods_cthumb($val['geval_goodsimage']); } $result = array_merge(array('goodsevallist' => $goodsevallist), mobile_page($evaluategoods_model->page_info)); ds_json_encode(10000, '', $result); } /** * @api {POST} api/Sellerevaluate/explain_save 解释来自买家的评价 * @apiVersion 1.0.0 * @apiGroup Sellerevaluate * * @apiHeader {String} X-DS-KEY 卖家授权token * * @apiParam {Int} geval_id 评论ID * @apiParam {String} geval_explain 解释 * * @apiSuccess {String} code 返回码,10000为成功 * @apiSuccess {String} message 返回消息 * @apiSuccess {Object} result 返回数据 */ public function explain_save() { $geval_id = intval(input('post.geval_id')); $geval_explain = trim(input('post.geval_explain')); //验证表单 if (!$geval_explain) { ds_json_encode(10001, lang('member_evaluation_explain_nullerror')); } $data = array(); $data['result'] = true; $evaluategoods_model = model('evaluategoods'); $evaluate_info = $evaluategoods_model->getEvaluategoodsInfoByID($geval_id, $this->store_info['store_id']); if (empty($evaluate_info)) { ds_json_encode(10001, lang('param_error')); } $update = array('geval_explain' => $geval_explain); $condition = array('geval_id' => $geval_id); $result = $evaluategoods_model->editEvaluategoods($update, $condition); if ($result) { ds_json_encode(10000, lang('ds_common_op_succ')); } else { ds_json_encode(10001, lang('ds_common_op_fail')); } } } ?>