Message authentication code Api platform connecting 👉 www.loktong.com/sms/index

One, register

When you register an account, this time you can enter the background management pageCopy the code

Second, the login

After entering the background management page, we come to do the preparatory work at the beginning stage, we should be patient to finish looking, you can light up ~

3. API documentation

The Api documentation connected 👉 yun.loktong.com/book/apimd/…

Configure the Api interface

  • package.json

  • scr/api/code.api.js
import request from "@/utils/request.js"; import md5 from "js-md5"; import qs from "qs"; Import moment from 'moment' // let action = "sendtemplate"; let url = "http://www.lokapi.cn/smsUTF8.aspx"; let rece = "json"; // let username = ""; // let password = ""; // SMS type token let token = "dsadsada"; Let param = 18555555555 | you are silly batch ` `; // let templateId = "dsadsada"; let dstime=`${moment().format("yyyy-MM-DD HH:mm:ss")}` let passwd = md5(password).toLocaleUpperCase(); let timestamp = Date.now(); console.log(dstime); let body = qs.stringify({ action, username, password:passwd, token, timestamp, }); let sign = md5(decodeURIComponent(body)); // let contents = qs.stringify({action, username, password:passwd, token, timestamp, sign: sign.toLocaleUpperCase(), rece, dstime, templateid, param, }); let options = { url, method: "POST", data: decodeURIComponent(contents), }; export const telCode = () => { return request({ ... options, }); };Copy the code
  • Remember to do a proxy