mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-05-30 13:45:16 +08:00
修改环境变量配置,app目录-->uniapp
This commit is contained in:
6
uniapp/src/utils/auth.ts
Normal file
6
uniapp/src/utils/auth.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { TOKEN_KEY } from '@/enums/cacheEnums'
|
||||
import cache from './cache'
|
||||
|
||||
export function getToken() {
|
||||
return cache.get(TOKEN_KEY)
|
||||
}
|
||||
50
uniapp/src/utils/cache.ts
Normal file
50
uniapp/src/utils/cache.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
const cache = {
|
||||
key: 'app_',
|
||||
//设置缓存(expire为缓存时效)
|
||||
set(key: string, value: any, expire?: string) {
|
||||
key = this.getKey(key)
|
||||
let data: any = {
|
||||
expire: expire ? this.time() + expire : '',
|
||||
value
|
||||
}
|
||||
|
||||
if (typeof data === 'object') {
|
||||
data = JSON.stringify(data)
|
||||
}
|
||||
try {
|
||||
uni.setStorageSync(key, data)
|
||||
} catch (e) {
|
||||
return null
|
||||
}
|
||||
},
|
||||
get(key: string) {
|
||||
key = this.getKey(key)
|
||||
try {
|
||||
const data = uni.getStorageSync(key)
|
||||
if (!data) {
|
||||
return null
|
||||
}
|
||||
const { value, expire } = JSON.parse(data)
|
||||
if (expire && expire < this.time()) {
|
||||
uni.removeStorageSync(key)
|
||||
return null
|
||||
}
|
||||
return value
|
||||
} catch (e) {
|
||||
return null
|
||||
}
|
||||
},
|
||||
//获取当前时间
|
||||
time() {
|
||||
return Math.round(new Date().getTime() / 1000)
|
||||
},
|
||||
remove(key: string) {
|
||||
key = this.getKey(key)
|
||||
uni.removeStorageSync(key)
|
||||
},
|
||||
getKey(key: string) {
|
||||
return this.key + key
|
||||
}
|
||||
}
|
||||
|
||||
export default cache
|
||||
66
uniapp/src/utils/client.ts
Normal file
66
uniapp/src/utils/client.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
import { ClientEnum } from '@/enums/appEnums'
|
||||
|
||||
/**
|
||||
* @description 判断是否为微信环境
|
||||
* @return { Boolean }
|
||||
*/
|
||||
export const isWeixinClient = () => {
|
||||
// #ifdef H5
|
||||
return /MicroMessenger/i.test(navigator.userAgent)
|
||||
// #endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 判断是否为安卓环境
|
||||
* @return { Boolean }
|
||||
*/
|
||||
export function isAndroid() {
|
||||
const u = navigator.userAgent
|
||||
return u.indexOf('Android') > -1 || u.indexOf('Adr') > -1
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取当前是什么端
|
||||
* @return { Object }
|
||||
*/
|
||||
|
||||
export const getClient = () => {
|
||||
//@ts-ignore
|
||||
return handleClientEvent({
|
||||
// 微信小程序
|
||||
MP_WEIXIN: () => ClientEnum['MP_WEIXIN'],
|
||||
// 微信公众号
|
||||
OA_WEIXIN: () => ClientEnum['OA_WEIXIN'],
|
||||
// H5
|
||||
H5: () => ClientEnum['H5'],
|
||||
// APP
|
||||
IOS: () => ClientEnum['IOS'],
|
||||
ANDROID: () => ClientEnum['ANDROID'],
|
||||
// 其它
|
||||
OTHER: () => null
|
||||
})
|
||||
}
|
||||
|
||||
// 根据端处理事件
|
||||
//@ts-ignore
|
||||
export const handleClientEvent = ({ MP_WEIXIN, OA_WEIXIN, H5, IOS, ANDROID, OTHER }) => {
|
||||
// #ifdef MP-WEIXIN
|
||||
return MP_WEIXIN()
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
return isWeixinClient() ? OA_WEIXIN() : H5()
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
const system = uni.getSystemInfoSync()
|
||||
if (system.platform == 'ios') {
|
||||
return IOS()
|
||||
} else {
|
||||
return ANDROID()
|
||||
}
|
||||
// #endif
|
||||
return OTHER()
|
||||
}
|
||||
|
||||
export const client = getClient()
|
||||
13
uniapp/src/utils/env.ts
Normal file
13
uniapp/src/utils/env.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @description: 开发模式
|
||||
*/
|
||||
export function isDevMode(): boolean {
|
||||
return import.meta.env.DEV
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 生成模式
|
||||
*/
|
||||
export function isProdMode(): boolean {
|
||||
return import.meta.env.PROD
|
||||
}
|
||||
20
uniapp/src/utils/file.ts
Normal file
20
uniapp/src/utils/file.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export async function saveImageToPhotosAlbum(url: string) {
|
||||
if (!url) return uni.$u.toast('图片错误')
|
||||
//#ifdef H5
|
||||
uni.$u.toast('长按图片保存')
|
||||
//#endif
|
||||
//#ifndef H5
|
||||
try {
|
||||
const res: any = await uni.downloadFile({ url, timeout: 10000 })
|
||||
await uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath
|
||||
})
|
||||
uni.showToast({
|
||||
title: '保存成功',
|
||||
icon: 'success'
|
||||
})
|
||||
} catch (error: any) {
|
||||
uni.$u.toast(error.errMsg || '保存失败')
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
28
uniapp/src/utils/request/cancel.ts
Normal file
28
uniapp/src/utils/request/cancel.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { RequestTask } from './type'
|
||||
|
||||
const cancelerMap = new Map<string, RequestTask>()
|
||||
|
||||
export class RequestCancel {
|
||||
private static instance?: RequestCancel
|
||||
|
||||
static createInstance() {
|
||||
return this.instance ?? (this.instance = new RequestCancel())
|
||||
}
|
||||
add(url: string, requestTask: RequestTask) {
|
||||
this.remove(url)
|
||||
if (!cancelerMap.has(url)) {
|
||||
cancelerMap.set(url, requestTask)
|
||||
}
|
||||
}
|
||||
remove(url: string) {
|
||||
if (cancelerMap.has(url)) {
|
||||
const requestTask = cancelerMap.get(url)
|
||||
requestTask && requestTask.abort()
|
||||
cancelerMap.delete(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const requestCancel = RequestCancel.createInstance()
|
||||
|
||||
export default requestCancel
|
||||
72
uniapp/src/utils/request/http.ts
Normal file
72
uniapp/src/utils/request/http.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
import { merge } from 'lodash-es'
|
||||
import { isFunction } from '@vue/shared'
|
||||
import { HttpRequestOptions, RequestConfig, RequestOptions } from './type'
|
||||
import { RequestMethodsEnum } from '@/enums/requestEnums'
|
||||
import requestCancel from './cancel'
|
||||
|
||||
export default class HttpRequest {
|
||||
private readonly options: HttpRequestOptions
|
||||
constructor(options: HttpRequestOptions) {
|
||||
this.options = options
|
||||
}
|
||||
|
||||
/**
|
||||
* @description get请求
|
||||
*/
|
||||
get<T = any>(options: RequestOptions, config?: Partial<RequestConfig>): Promise<T> {
|
||||
return this.request({ ...options, method: RequestMethodsEnum.GET }, config)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description post请求
|
||||
*/
|
||||
post<T = any>(options: RequestOptions, config?: Partial<RequestConfig>): Promise<T> {
|
||||
return this.request({ ...options, method: RequestMethodsEnum.POST }, config)
|
||||
}
|
||||
/**
|
||||
* @description 请求函数
|
||||
*/
|
||||
async request(options: RequestOptions, config?: Partial<RequestConfig>): Promise<any> {
|
||||
let mergeOptions: RequestOptions = merge({}, this.options.requestOptions, options)
|
||||
const mergeConfig: RequestConfig = merge({}, this.options, config)
|
||||
const { requestInterceptorsHook, responseInterceptorsHook, responseInterceptorsCatchHook } =
|
||||
mergeConfig.requestHooks || {}
|
||||
if (requestInterceptorsHook && isFunction(requestInterceptorsHook)) {
|
||||
mergeOptions = requestInterceptorsHook(options, mergeConfig)
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
const requestTask = uni.request({
|
||||
...mergeOptions,
|
||||
success(response) {
|
||||
if (responseInterceptorsHook && isFunction(responseInterceptorsHook)) {
|
||||
try {
|
||||
response = responseInterceptorsHook(response, mergeConfig)
|
||||
resolve(response)
|
||||
} catch (error) {
|
||||
reject(error)
|
||||
}
|
||||
return
|
||||
}
|
||||
resolve(response)
|
||||
},
|
||||
fail(err) {
|
||||
if (
|
||||
responseInterceptorsCatchHook &&
|
||||
isFunction(responseInterceptorsCatchHook)
|
||||
) {
|
||||
reject(responseInterceptorsCatchHook(err, mergeConfig))
|
||||
return
|
||||
}
|
||||
reject(err)
|
||||
},
|
||||
complete(err) {
|
||||
if (err.errMsg !== 'request:fail abort') {
|
||||
requestCancel.remove(options.url)
|
||||
}
|
||||
}
|
||||
})
|
||||
const { ignoreCancel } = mergeConfig
|
||||
!ignoreCancel && requestCancel.add(options.url, requestTask)
|
||||
})
|
||||
}
|
||||
}
|
||||
96
uniapp/src/utils/request/index.ts
Normal file
96
uniapp/src/utils/request/index.ts
Normal file
@@ -0,0 +1,96 @@
|
||||
import HttpRequest from './http'
|
||||
import { merge } from 'lodash-es'
|
||||
import { HttpRequestOptions, RequestHooks } from './type'
|
||||
import { getToken } from '../auth'
|
||||
import { RequestCodeEnum } from '@/enums/requestEnums'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
|
||||
const requestHooks: RequestHooks = {
|
||||
requestInterceptorsHook(options, config) {
|
||||
const { urlPrefix, baseUrl, withToken } = config
|
||||
options.header = options.header ?? {}
|
||||
if (urlPrefix) {
|
||||
options.url = `${urlPrefix}${options.url}`
|
||||
}
|
||||
if (baseUrl) {
|
||||
options.url = `${baseUrl}${options.url}`
|
||||
}
|
||||
const token = getToken()
|
||||
// 添加token
|
||||
if (withToken && token) {
|
||||
options.header.token = token
|
||||
}
|
||||
return options
|
||||
},
|
||||
responseInterceptorsHook(response, config) {
|
||||
const { isTransformResponse, isReturnDefaultResponse, isAuth } = config
|
||||
|
||||
//返回默认响应,当需要获取响应头及其他数据时可使用
|
||||
if (isReturnDefaultResponse) {
|
||||
return response
|
||||
}
|
||||
// 是否需要对数据进行处理
|
||||
if (!isTransformResponse) {
|
||||
return response.data
|
||||
}
|
||||
const { logout } = useUserStore()
|
||||
const { code, data, msg } = response.data as any
|
||||
switch (code) {
|
||||
case RequestCodeEnum.SUCCESS:
|
||||
return data
|
||||
case RequestCodeEnum.PARAMS_TYPE_ERROR:
|
||||
case RequestCodeEnum.PARAMS_VALID_ERROR:
|
||||
case RequestCodeEnum.REQUEST_METHOD_ERROR:
|
||||
case RequestCodeEnum.ASSERT_ARGUMENT_ERROR:
|
||||
case RequestCodeEnum.ASSERT_MYBATIS_ERROR:
|
||||
case RequestCodeEnum.LOGIN_ACCOUNT_ERROR:
|
||||
case RequestCodeEnum.LOGIN_DISABLE_ERROR:
|
||||
case RequestCodeEnum.NO_PERMISSTION:
|
||||
case RequestCodeEnum.FAILED:
|
||||
case RequestCodeEnum.SYSTEM_ERROR:
|
||||
uni.$u.toast(msg)
|
||||
return Promise.reject(msg)
|
||||
|
||||
case RequestCodeEnum.TOKEN_INVALID:
|
||||
case RequestCodeEnum.TOKEN_EMPTY:
|
||||
logout()
|
||||
if (isAuth && !getToken()) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
return Promise.reject()
|
||||
|
||||
default:
|
||||
return data
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const defaultOptions: HttpRequestOptions = {
|
||||
requestOptions: {
|
||||
timeout: 10 * 1000
|
||||
},
|
||||
baseUrl: `${import.meta.env.VITE_APP_BASE_URL}/`,
|
||||
//是否返回默认的响应
|
||||
isReturnDefaultResponse: false,
|
||||
// 需要对返回数据进行处理
|
||||
isTransformResponse: true,
|
||||
// 接口拼接地址
|
||||
urlPrefix: 'api',
|
||||
// 忽略重复请求
|
||||
ignoreCancel: false,
|
||||
// 是否携带token
|
||||
withToken: true,
|
||||
isAuth: false,
|
||||
requestHooks: requestHooks
|
||||
}
|
||||
|
||||
function createRequest(opt?: HttpRequestOptions) {
|
||||
return new HttpRequest(
|
||||
// 深度合并
|
||||
merge(defaultOptions, opt || {})
|
||||
)
|
||||
}
|
||||
const request = createRequest()
|
||||
export default request
|
||||
24
uniapp/src/utils/request/type.d.ts
vendored
Normal file
24
uniapp/src/utils/request/type.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
export type RequestOptions = UniApp.RequestOptions
|
||||
export type ResponseResult = UniApp.RequestSuccessCallbackResult
|
||||
export type ResponseError = UniApp.GeneralCallbackResult
|
||||
export type RequestTask = UniApp.RequestTask
|
||||
export interface HttpRequestOptions extends RequestConfig {
|
||||
requestOptions: Partial<RequestOptions>
|
||||
}
|
||||
|
||||
export interface RequestConfig {
|
||||
baseUrl: string
|
||||
requestHooks: RequestHooks
|
||||
isReturnDefaultResponse: boolean
|
||||
isTransformResponse: boolean
|
||||
urlPrefix: string
|
||||
ignoreCancel: boolean
|
||||
withToken: boolean
|
||||
isAuth: boolean
|
||||
}
|
||||
|
||||
export interface RequestHooks {
|
||||
requestInterceptorsHook?(options: RequestOptions, config: RequestConfig): RequestOptions
|
||||
responseInterceptorsHook?(response: ResponseResult, config: RequestConfig): any
|
||||
responseInterceptorsCatchHook?(error: ResponseError, config: RequestConfig): any
|
||||
}
|
||||
128
uniapp/src/utils/util.ts
Normal file
128
uniapp/src/utils/util.ts
Normal file
@@ -0,0 +1,128 @@
|
||||
import { isObject } from '@vue/shared'
|
||||
import { getToken } from './auth'
|
||||
|
||||
/**
|
||||
* @description 获取元素节点信息(在组件中的元素必须要传ctx)
|
||||
* @param { String } selector 选择器 '.app' | '#app'
|
||||
* @param { Boolean } all 是否多选
|
||||
* @param { ctx } context 当前组件实例
|
||||
*/
|
||||
export const getRect = (selector: string, all = false, context?: any) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
let qurey = uni.createSelectorQuery()
|
||||
if (context) {
|
||||
qurey = uni.createSelectorQuery().in(context)
|
||||
}
|
||||
qurey[all ? 'selectAll' : 'select'](selector)
|
||||
.boundingClientRect(function (rect) {
|
||||
if (all && Array.isArray(rect) && rect.length) {
|
||||
return resolve(rect)
|
||||
}
|
||||
if (!all && rect) {
|
||||
return resolve(rect)
|
||||
}
|
||||
reject('找不到元素')
|
||||
})
|
||||
.exec()
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取当前页面实例
|
||||
*/
|
||||
export function currentPage() {
|
||||
const pages = getCurrentPages()
|
||||
const currentPage = pages[pages.length - 1]
|
||||
return currentPage || {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 后台选择链接专用跳转
|
||||
*/
|
||||
interface Link {
|
||||
path: string
|
||||
name?: string
|
||||
type: string
|
||||
isTab: boolean
|
||||
query?: Record<string, any>
|
||||
}
|
||||
|
||||
export enum LinkTypeEnum {
|
||||
'SHOP_PAGES' = 'shop',
|
||||
'CUSTOM_LINK' = 'custom'
|
||||
}
|
||||
|
||||
export function navigateTo(link: Link, navigateType: 'navigateTo' | 'reLaunch' = 'navigateTo') {
|
||||
const url = link.query ? `${link.path}?${objectToQuery(link.query)}` : link.path
|
||||
navigateType == 'navigateTo' && uni.navigateTo({ url })
|
||||
navigateType == 'reLaunch' && uni.reLaunch({ url })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 是否为空
|
||||
* @param {unknown} value
|
||||
* @return {Boolean}
|
||||
*/
|
||||
export const isEmpty = (value: unknown) => {
|
||||
return value == null && typeof value == 'undefined'
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 对象格式化为Query语法
|
||||
* @param { Object } params
|
||||
* @return {string} Query语法
|
||||
*/
|
||||
export function objectToQuery(params: Record<string, any>): string {
|
||||
let query = ''
|
||||
for (const props of Object.keys(params)) {
|
||||
const value = params[props]
|
||||
const part = encodeURIComponent(props) + '='
|
||||
if (!isEmpty(value)) {
|
||||
console.log(encodeURIComponent(props), isObject(value))
|
||||
if (isObject(value)) {
|
||||
for (const key of Object.keys(value)) {
|
||||
if (!isEmpty(value[key])) {
|
||||
const params = props + '[' + key + ']'
|
||||
const subPart = encodeURIComponent(params) + '='
|
||||
query += subPart + encodeURIComponent(value[key]) + '&'
|
||||
}
|
||||
}
|
||||
} else {
|
||||
query += part + encodeURIComponent(value) + '&'
|
||||
}
|
||||
}
|
||||
}
|
||||
return query.slice(0, -1)
|
||||
}
|
||||
/**
|
||||
* @description 上传图片
|
||||
* @param { String } path 选择的本地地址
|
||||
*/
|
||||
export function uploadFile(path: any) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const token = getToken()
|
||||
uni.uploadFile({
|
||||
url: `${import.meta.env.VITE_APP_BASE_URL}/api/upload/image`,
|
||||
filePath: path,
|
||||
name: 'file',
|
||||
header: {
|
||||
token
|
||||
},
|
||||
fileType: 'image',
|
||||
success: (res) => {
|
||||
console.log('uploadFile res ==> ', res)
|
||||
const data = JSON.parse(res.data)
|
||||
console.log('data.code', data.code)
|
||||
if (data.code == 200) {
|
||||
resolve(data.data)
|
||||
} else {
|
||||
reject()
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
reject()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
114
uniapp/src/utils/wechat.ts
Normal file
114
uniapp/src/utils/wechat.ts
Normal file
@@ -0,0 +1,114 @@
|
||||
import weixin from 'weixin-js-sdk'
|
||||
import { getWxCodeUrl, OALogin } from '@/api/account'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import { isAndroid } from './client'
|
||||
|
||||
const wechatOa = {
|
||||
getSignLink() {
|
||||
if (typeof window.signLink === 'undefined' || window.signLink === '') {
|
||||
window.signLink = location.href.split('#')[0]
|
||||
}
|
||||
return isAndroid() ? location.href.split('#')[0] : window.signLink
|
||||
},
|
||||
getUrl() {
|
||||
getWxCodeUrl().then((res) => {
|
||||
location.href = res.url
|
||||
})
|
||||
},
|
||||
authLogin(code: string) {
|
||||
return new Promise((resolve, reject) => {
|
||||
OALogin({
|
||||
code
|
||||
})
|
||||
.then((res) => {
|
||||
resolve(res)
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
ready() {
|
||||
return new Promise((resolve) => {
|
||||
weixin.ready(() => {
|
||||
resolve('success')
|
||||
})
|
||||
})
|
||||
},
|
||||
share(options: Record<any, any>) {
|
||||
this.ready().then(() => {
|
||||
const { shareTitle, shareLink, shareImage, shareDesc } = options
|
||||
weixin.updateTimelineShareData({
|
||||
title: shareTitle, // 分享标题
|
||||
link: shareLink, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
||||
imgUrl: shareImage // 分享图标
|
||||
})
|
||||
// 发送给好友
|
||||
weixin.updateAppMessageShareData({
|
||||
title: shareTitle, // 分享标题
|
||||
link: shareLink, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
||||
imgUrl: shareImage, // 分享图标
|
||||
desc: shareDesc
|
||||
})
|
||||
// 发送到tx微博
|
||||
weixin.onMenuShareWeibo({
|
||||
title: shareTitle, // 分享标题
|
||||
link: shareLink, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
||||
imgUrl: shareImage, // 分享图标
|
||||
desc: shareDesc
|
||||
})
|
||||
})
|
||||
},
|
||||
getAddress() {
|
||||
return new Promise((reslove, reject) => {
|
||||
this.ready().then(() => {
|
||||
weixin.openAddress({
|
||||
success: (res: any) => {
|
||||
reslove(res)
|
||||
},
|
||||
fail: (res: any) => {
|
||||
reject(res)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
getLocation() {
|
||||
return new Promise((reslove, reject) => {
|
||||
this.ready().then(() => {
|
||||
weixin.getLocation({
|
||||
type: 'gcj02',
|
||||
success: (res: any) => {
|
||||
reslove(res)
|
||||
},
|
||||
fail: (res: any) => {
|
||||
reject(res)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default wechatOa
|
||||
// export function wxOaConfig() {
|
||||
// return new Promise((resolve, reject) => {
|
||||
// apiJsConfig().then((res) => {
|
||||
// console.log(res) //微信配置
|
||||
// weixin.config({
|
||||
// debug: false, // 开启调试模式
|
||||
// appId: res.appId, // 必填,公众号的唯一标识
|
||||
// timestamp: res.timestamp, // 必填,生成签名的时间戳
|
||||
// nonceStr: res.nonceStr, // 必填,生成签名的随机串
|
||||
// signature: res.signature, // 必填,签名
|
||||
// jsApiList: res.jsApiList, // 必填,需要使用的JS接口列表
|
||||
// success: () => {
|
||||
// resolve('success')
|
||||
// },
|
||||
// fail: (res: any) => {
|
||||
// reject('weixin config is fail')
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
Reference in New Issue
Block a user