update @兑换接口渠道区分
This commit is contained in:
parent
04a5d95f23
commit
bb151608fb
|
@ -1,4 +1,5 @@
|
|||
import request from "@/utils/request";
|
||||
import { isWx } from "@/utils/datas";
|
||||
|
||||
export enum Api {
|
||||
// 登录
|
||||
|
@ -30,7 +31,7 @@ export const GET_SMS = (data?: any) => request.post(Api.GET_SMS, data);
|
|||
|
||||
export const GET_WXSCHEMA = (data?: any) => request.post(Api.GET_WXSCHEMA, data);
|
||||
|
||||
export const EXCHANGE = (data?: any) => request.post(Api.EXCHANGE, data);
|
||||
export const EXCHANGE = (data?: any) => request.post(Api.EXCHANGE, { ...data, channel: isWx ? 2 : 3 }); // 1 小程序 2 公众号 3 其他
|
||||
|
||||
export const DETAIL_QUERY = (data?: any) => request.get(Api.DETAIL_QUERY, data);
|
||||
|
||||
|
|
|
@ -478,7 +478,7 @@ export default {
|
|||
}
|
||||
})
|
||||
if (data.length) {
|
||||
this.dialogText = `${ errMsg ? '部分兑换成功' : '兑换成功' }`;
|
||||
// this.dialogText = `${ errMsg ? '部分兑换成功' : '兑换成功' }`;
|
||||
return await this.getData('');
|
||||
} else {
|
||||
showToast(errMsg);
|
||||
|
|
|
@ -38,10 +38,14 @@
|
|||
<van-field v-else :disabled="pollStatus" class="f-input" v-model="inputValAgain" label="再次输入" placeholder="请再次输入" />
|
||||
<p class="f-note">您可在{{ getInputText }}的个人信息中查看【{{ getInputText }}账号】</p>
|
||||
<div
|
||||
:class="['bt', 'inputBt', goods && goods.err_code && !btnHighLight.includes(goods.err_code) && 'btnPlacingAshes']"
|
||||
:class="['bt', 'inputBt', (pollStatus || (goods && goods.err_code && !btnHighLight.includes(goods.err_code))) && 'btnPlacingAshes']"
|
||||
@click="receive"
|
||||
>
|
||||
{{ goods && btnMap.get(goods.err_code) ? btnMap.get(goods.err_code) : '立即兑换' }}
|
||||
{{
|
||||
pollStatus
|
||||
? '领取中'
|
||||
: goods && btnMap.get(goods.err_code) ? btnMap.get(goods.err_code) : '立即兑换'
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="instruction-box">
|
||||
|
@ -214,7 +218,7 @@ export default {
|
|||
this.overlayLoad = false;
|
||||
if (res && res.code === 200 && res.data) {
|
||||
if (res.data[0].code === 200) {
|
||||
this.dialogText = '兑换成功';
|
||||
// this.dialogText = '兑换成功';
|
||||
this.pollStatus = true;
|
||||
return await this.orderPolling();
|
||||
} else {
|
||||
|
|
|
@ -264,7 +264,7 @@ export default {
|
|||
this.overlayLoad = false;
|
||||
if (res && res.code === 200 && res.data) {
|
||||
if (res.data[0].code === 200) {
|
||||
this.dialogText = '兑换成功';
|
||||
// this.dialogText = '兑换成功';
|
||||
this.pollStatus = true;
|
||||
return await this.orderPolling();
|
||||
} else {
|
||||
|
|
|
@ -209,7 +209,7 @@ export default {
|
|||
this.overlayLoad = false;
|
||||
if (res && res.code === 200 && res.data) {
|
||||
if (res.data[0].code === 200) {
|
||||
this.dialogText = '兑换成功';
|
||||
// this.dialogText = '兑换成功';
|
||||
this.pollStatus = true;
|
||||
return await this.orderPolling();
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue