对接接口

This commit is contained in:
2021-11-03 21:02:22 +08:00
parent 411ecf4c05
commit c5c2f661a0
71 changed files with 5436 additions and 145 deletions
+29
View File
@@ -0,0 +1,29 @@
let TMAP;
const defaultConfig = {
version: '1.exp',
key: ''
}
module.exports = {
load(config){
config = {
...defaultConfig,
...config
}
return new Promise((resolve) => {
if(TMAP){
resolve(TMAP)
return
}
const script = document.createElement('script');
script.src = `https://map.qq.com/api/gljs?v=${config.version}&key=${config.key}`;
document.head.appendChild(script)
console.log(script)
script.setAttribute('async', true)
script.setAttribute('charset', 'utf-8')
script.onload = () => {
TMAP = window.TMap;
resolve(TMAP)
}
})
}
}
+59 -10
View File
@@ -1,11 +1,60 @@
import Vue from 'vue'
import 'vant/lib/index.css';
import { Button, NavBar, Search, Swipe, SwipeItem, Grid, GridItem } from 'vant';
import Vue from "vue";
import "vant/lib/index.css";
import {
Button,
NavBar,
Search,
Swipe,
SwipeItem,
Grid,
GridItem,
NoticeBar,
Tabbar,
TabbarItem,
Cell,
CellGroup,
Tab, Tabs,
Progress,
Form,
Field,
Uploader,
Step, Steps,
Checkbox, CheckboxGroup,
Popup,
Stepper,
Radio,
RadioGroup,
Switch,
Cascader,
ActionSheet
} from "vant";
Vue.use(Button)
Vue.use(NavBar)
Vue.use(Search)
Vue.use(Swipe)
Vue.use(SwipeItem)
Vue.use(Grid)
Vue.use(GridItem)
Vue.use(Button);
Vue.use(NavBar);
Vue.use(Search);
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Grid);
Vue.use(GridItem);
Vue.use(NoticeBar);
Vue.use(Tabbar);
Vue.use(TabbarItem);
Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Progress);
Vue.use(Form);
Vue.use(Field);
Vue.use(Uploader);
Vue.use(Step);
Vue.use(Steps);
Vue.use(Checkbox);
Vue.use(CheckboxGroup);
Vue.use(Popup);
Vue.use(Stepper);
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(Switch)
Vue.use(ActionSheet)
Vue.use(Cascader)
+15
View File
@@ -0,0 +1,15 @@
export default {
install(Vue){
wx.config({
debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: '', // 必填,公众号的唯一标识
timestamp: 123, // 必填,生成签名的时间戳
nonceStr: '', // 必填,生成签名的随机串
signature: '',// 必填,签名
jsApiList: [] // 必填,需要使用的JS接口列表
});
wx.ready(function(){
Vue.prototype.$wx = wx;
})
}
}