Loading…

Dynamic password redemption coupon

```javascript WXAPI.exchangeCoupons(token, number, pwd, extJsonStr) ``` + token login user credentials + number dynamic password number + pwd dynamic password password + extJsonStr extended data JSON, this json data will be saved after conversion If the front-end does not want users to enter two input boxes for numbers and passwords respectively, it can be made into one input box during front-end development, and then according to the length of the number and password set in the backend, the value entered by the user into one input box is split into two values and passed to the interface. In this way, user interaction only requires inputting a string of coupon numbers. At the same time, when making cards or printing, you can also print only one data (number and password are spliced together). ```json { code: 0, msg: 'success'. data: { "dateAdd": "2021-12-02 18:46:44", "dateEnd": "2021-12-18 00:00:00", "dateStart": "2021-12-02 18:46:44", "id": 427331, "money": 40, "moneyHreshold": 3000, "moneyType": 0, "name": "New store discount", "pid": 223, "pwd": "", "status": 0, "statusStr": "Normal", "type": "" } } ``` + dateStart effective time + dateEnd expiration time + money Coupon denomination + moneyType 0 Fixed amount 1 Proportional deduction + moneyHreshold is the amount of money you need to spend before you can use it. + name Coupon name + pid coupon rule id + status Coupon status, please refer to statusStr