wangyx 1 month ago
parent
commit
1fb05c6f5a
  1. 20
      App.vue
  2. 2
      main.js
  3. 15
      manifest.json

20
App.vue

@ -1,8 +1,24 @@
<script> <script>
export default { export default {
onLaunch: function() { onLaunch: function() {
console.log('App Launch') console.log('App Launch');
}, // uni.logincode
uni.login({
provider:'weixin',
success: function(loginRes) {
// code
console.log('获取的用户code是:' + loginRes.code);
uni.request({
url:'',
method:'POST'
})
},
fail: function(error) {
//
console.error('登录失败:', error);
}
});
},
onShow: function() { onShow: function() {
console.log('App Show') console.log('App Show')
}, },

2
main.js

@ -1,6 +1,6 @@
import App from './App' import App from './App'
import uView from "uview-ui"; import uView from "uview-ui";
import Vconsole from "vconsole"; // import Vconsole from "vconsole";
Vue.use(uView); Vue.use(uView);
// new Vconsole(); // new Vconsole();
// #ifndef VUE3 // #ifndef VUE3

15
manifest.json

@ -50,11 +50,13 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "", "appid" : "wxf2be6aacdcd579c6",
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false,
"minified" : true
}, },
"usingComponents" : true "usingComponents" : true,
"lazyCodeLoading" : "requiredComponents"
}, },
"mp-alipay" : { "mp-alipay" : {
"usingComponents" : true "usingComponents" : true
@ -68,5 +70,10 @@
"uniStatistics" : { "uniStatistics" : {
"enable" : false "enable" : false
}, },
"vueVersion" : "2" "vueVersion" : "2",
"h5" : {
"router" : {
"base" : "/epmet-apartment-mp-work/"
}
}
} }

Loading…
Cancel
Save