抵扣/新增余额
<h1>会员积分新增/抵扣</h1>
<h2>请求URL</h2>
<p>POST 域名/addons/yun_shop/api.php?route=plugin.member-common-sync.open.balance.index&i=1</p>
<h2>请求参数</h2>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>是否必需</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>body.timestamp</td>
<td>string</td>
<td>是</td>
<td>当前时间戳(秒级10位) *参加签名</td>
</tr>
<tr>
<td>body.notstr</td>
<td>string</td>
<td>是</td>
<td>a-z A-Z 1-9, 随机12位字符串 *参加签名</td>
</tr>
<tr>
<td>body.mobile</td>
<td>string</td>
<td>是</td>
<td>会员手机号</td>
</tr>
<tr>
<td>body.type</td>
<td>string</td>
<td>是</td>
<td>更变类型: deduction = 抵扣, addiction = 新增</td>
</tr>
<tr>
<td>body.balance</td>
<td>string</td>
<td>是</td>
<td>余额</td>
</tr>
<tr>
<td>body.serial_no</td>
<td>string</td>
<td>是</td>
<td>16位以内唯一流水号</td>
</tr>
<tr>
<td>sign</td>
<td>string</td>
<td>是</td>
<td>签名</td>
</tr>
</tbody>
</table>
<h3>请求示例</h3>
<pre><code>localhost/addons/yun_shop/api.php?route=plugin.member-common-sync.open.balance.index&amp;i=1
{
&quot;body&quot;: {
&quot;mobile&quot;: &quot;17620803841&quot;,
&quot;balance&quot;: &quot;1.00&quot;,
&quot;type&quot;: &quot;addiction&quot;,
&quot;remark&quot;: &quot;备注&quot;,
&quot;notstr&quot;: &quot;kutciyozow64&quot;,
&quot;timestamp&quot;: 1713890387
},
&quot;sign&quot;: &quot;c81995f4b91877d97ee3051bb7e4c37c&quot;
}
示例字段page不参与加密.</code></pre>
<h2>响应参数</h2>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>result</td>
<td>int</td>
<td>结果. 0 = 失败, 1成功</td>
</tr>
<tr>
<td>msg</td>
<td>string</td>
<td>信息。</td>
</tr>
<tr>
<td>data</td>
<td>object</td>
<td>-</td>
</tr>
</tbody>
</table>
<h3>响应成功</h3>
<pre><code class="language-json">{
&quot;result&quot;: 1,
&quot;msg&quot;: &quot;操作成功&quot;,
&quot;data&quot;: []
}</code></pre>
<h3>响应失败</h3>
<pre><code class="language-json">{
&quot;result&quot;: 0,
&quot;msg&quot;: &quot;用户(21)余额2234(2.00)不足(-6)&quot;,
&quot;data&quot;: []
}</code></pre>