商店账号未绑定优化

feat/task1-c-wallet
gongfuxiang 2021-11-28 11:44:05 +08:00
parent 37248aaf96
commit 158bc4a19e
5 changed files with 20 additions and 10 deletions

View File

@ -104,12 +104,18 @@ class Plugins extends Common
return ApiService::ApiDataReturn(($ret['code'] == 0) ? $ret['data'] : $ret);
}
// 正确则返回视图内容
if($ret['code'] == 0)
{
// 默认则是视图内容
return $ret['data'];
}
// 是否未绑定商店账号
if($ret['code'] == -300)
{
MyViewAssign('ext_html', '<p class="am-margin-top-sm"><button type="button" class="am-btn am-btn-secondary am-radius am-btn-xs am-margin-left-xs am-icon-gg store-accounts-event"> 绑定ShopXO商店账户</button></p>');
}
// 调用失败
MyViewAssign('msg', $ret['msg']);
return MyView('public/tips_error');

View File

@ -3,11 +3,15 @@
<!-- right content start -->
<div class="content-right">
<div class="content">
<div class="table-no"><i class="am-icon-warning cr-999"></i>
{{if isset($msg)}}
{{$msg}}
{{else /}}
异常错误
<div class="table-no">
<p>
<i class="am-icon-warning cr-999"></i>
{{if isset($msg)}}{{$msg}}{{else /}}异常错误{{/if}}
</p>
<!-- 扩展内容 -->
{{if !empty($ext_html)}}
{{$ext_html|raw}}
{{/if}}
</div>
</div>

View File

@ -188,7 +188,7 @@ class PluginsUpgradeService
$password = MyC('common_store_password');
if(empty($accounts) || empty($password))
{
return DataReturn('请先绑定应用商店帐号', -1);
return DataReturn('请先绑定应用商店帐号', -300);
}
// 获取信息

View File

@ -217,7 +217,7 @@ class StoreService
$password = MyC('common_store_password');
if(empty($accounts) || empty($password))
{
return DataReturn('请先绑定应用商店帐号', -1);
return DataReturn('请先绑定应用商店帐号', -300);
}
// 获取信息
@ -249,7 +249,7 @@ class StoreService
$password = MyC('common_store_password');
if(empty($accounts) || empty($password))
{
return DataReturn('请先绑定应用商店帐号', -1);
return DataReturn('请先绑定应用商店帐号', -300);
}
// 获取更新信息

View File

@ -305,7 +305,7 @@ class SystemUpgradeService
$password = MyC('common_store_password');
if(empty($accounts) || empty($password))
{
return DataReturn('请先绑定应用商店帐号', -1);
return DataReturn('请先绑定应用商店帐号', -300);
}
// 获取信息