1234567891011121314151617181920212223242526272829 |
- import { hideLoading, showLoading } from '../utils/plugIn/globalLoading.js'
- // const NET = require('../utils/request')
- const API = require('../config/api')
- export function doPointRequest(data) {
- // return NET.request(API.doPointer, data, 'post')
- return new Promise((resolve, reject) => {
- const header = {
- 'Content-Type': 'application/json'
- }
- const res = uni.getStorageSync('storage_key')
- const token = res.token
- if (token) {
- header.Authorization = token
- }
- uni.request({
- url: API.doPointer,
- data,
- method: 'post',
- header,
- success: (res) => {
- resolve(res)
- },
- fail: (res) => {
- reject(res)
- }
- })
- })
- }
|