Commit e8c92d20 authored by houdong's avatar houdong

bug和文案修改

parent 893c9b87
...@@ -341,7 +341,28 @@ var AppBridge = { ...@@ -341,7 +341,28 @@ var AppBridge = {
console.log('closeActivity error:' + error); console.log('closeActivity error:' + error);
} }
}, },
openActivity: function (param, callback) {
var _this = AppBridge;
try {
if (_this.device == 1) {
console.log('openActivity:' + _this.device);
setupWebViewJavascriptBridge(function (bridge) {
bridge.callHandler('openActivity', param, function responseCallback(responseData) {
if (typeof (callback) == 'function') {
callback(responseData);
}
})
});
} else if (_this.device == 2) {
responseData = window.KoufuCallNative.openActivity(param);
if (typeof (callback) == 'function') {
responseData = callback(responseData);
}
}
} catch (error) {
console.log('openActivity error:' + error);
}
},
//原生分享 注意ios param(url,name,introduction)必须是json串,而不是json对象,安卓为json串 //原生分享 注意ios param(url,name,introduction)必须是json串,而不是json对象,安卓为json串
shareShow: function (param, callback) { shareShow: function (param, callback) {
var _this = AppBridge; var _this = AppBridge;
......
...@@ -5,29 +5,10 @@ class NiuModel extends Model{ ...@@ -5,29 +5,10 @@ class NiuModel extends Model{
public function getMoreDs($userId,$source='m') { public function getMoreDs($userId,$source='m') {
$STATUS_TXT =array('1'=>'未开赛','2'=>'进行中','3'=>'已结束'); $STATUS_TXT =array('1'=>'未开赛','2'=>'进行中','3'=>'已结束');
$ids = D('Group')->getGroupCache($userId); $ids = D('Group')->getGroupCache($userId);
// $MAP=[NIU_BAI_ID=>M_URL.'/Niubai',NIU_SAN_ID=>M_URL.'/Niusan',NIU_STRONG_ID=>M_URL.'/Strong',M2M_GROUP=>M_URL.'/M2m'];
// if($source=='m'){
// $MAP[PRIZE_GROUP_2021]='/PkTop';
// $MAP[ZHONGJIN_GROUP]=M_URL.'/Zjds';
// }else{
// $MAP[PRIZE_GROUP_2021]='/';
// $MAP[ZHONGJIN_GROUP]=WWW_URL.'/Zjds';
// }
// $MAP=[ZHONGJIN_GROUP=>1,PRIZE_GROUP_2021=>2,M2M_GROUP=>3,NIU_BAI_ID=>4,NIU_SAN_ID=>5,NIU_STRONG_ID=>6]; $MAP=[ZHONGJIN_GROUP=>[WWW_URL.'/Zjds',1],PRIZE_GROUP_2021=>['/',8],M2M_GROUP=>[M_URL.'/M2m',3],NIU_BAI_ID=>[M_URL.'/Niubai',4],
$MAP=[ZHONGJIN_GROUP=>[WWW_URL.'/Zjds',1],PRIZE_GROUP_2021=>['/',2],M2M_GROUP=>[M_URL.'/M2m',3],NIU_BAI_ID=>[M_URL.'/Niubai',4],
NIU_SAN_ID=>[M_URL.'/Niusan',5],NIU_STRONG_ID=>[M_URL.'/Strong',6]]; NIU_SAN_ID=>[M_URL.'/Niusan',5],NIU_STRONG_ID=>[M_URL.'/Strong',6]];
// $MAP=[NIU_BAI_ID=>[M_URL.'/Niubai',''],NIU_SAN_ID=>[M_URL.'/Niusan',''],NIU_STRONG_ID=>[M_URL.'/Strong',''],
// M2M_GROUP=>[M_URL.'/M2m','']];
//// if($source=='m'){
//// $MAP[PRIZE_GROUP_2021]=[VIP_URL.'/PkTop',''];
//// $MAP[ZHONGJIN_GROUP]=[M_URL.'/Zjds',''];
//// }else{
// $MAP[PRIZE_GROUP_2021]=[VIP_URL,''];
// $MAP[ZHONGJIN_GROUP]=['/Zjds',''];
// }
$where=['a.group_id'=>['in',array_keys($MAP)]]; $where=['a.group_id'=>['in',array_keys($MAP)]];
$gList = M('Group a')->join('left join cofool_group_info b on a.group_id=b.group_id') $gList = M('Group a')->join('left join cofool_group_info b on a.group_id=b.group_id')
->field('a.group_id,a.name,startTime,endTime,b.cover,introduction,a.web_id')->where($where)->select(); ->field('a.group_id,a.name,startTime,endTime,b.cover,introduction,a.web_id')->where($where)->select();
...@@ -41,6 +22,8 @@ class NiuModel extends Model{ ...@@ -41,6 +22,8 @@ class NiuModel extends Model{
$g['url']=$gUrl[0]; $g['url']=$gUrl[0];
$g['order']=$gUrl[1]; $g['order']=$gUrl[1];
$len=$source=='m'?40:60; $len=$source=='m'?40:60;
$g['introduction']=strip_tags($g['introduction']);
if(mb_strlen($g['introduction'])>$len){ if(mb_strlen($g['introduction'])>$len){
$g['introduction'] = msubstr($g['introduction'],0,$len,'utf-8').'...'; $g['introduction'] = msubstr($g['introduction'],0,$len,'utf-8').'...';
} }
...@@ -49,7 +32,8 @@ class NiuModel extends Model{ ...@@ -49,7 +32,8 @@ class NiuModel extends Model{
$g["startTime"] = date('Y-m-d',$startTime); $g["startTime"] = date('Y-m-d',$startTime);
$g["endTime"] = $endTime? date('Y-m-d',$endTime) : '长期'; $g["endTime"] = $endTime? date('Y-m-d',$endTime) : '长期';
$g["cover"]=str_replace('http://image.cofool.com/',IMAGE_URL,$g["cover"]); $g["cover"]=str_replace('https://cofool-image.oss-cn-beijing.aliyuncs.com/','',$g["cover"]);
$g["cover"]=IMAGE_URL.$g["cover"];
//进入交易需要的参数 //进入交易需要的参数
$gStatus=is_end($endTime)?3:($startTime>time()?1:2); $gStatus=is_end($endTime)?3:($startTime>time()?1:2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment