12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //index.js
- // 引入 QCloud 小程序增强 SDK
- var qcloud = require('../../vendor/qcloud-weapp-client-sdk/index');
- // 引入配置
- var config = require('../../config');
- // 显示繁忙提示
- var showBusy = text => wx.showToast({
- title: text,
- icon: 'loading',
- duration: 10000
- });
- // 显示成功提示
- var showSuccess = text => {
- wx.hideToast();
- wx.showToast({
- title: text,
- icon: 'success'
- });
- };
- // 显示失败提示
- var showModel = (title, content) => {
- wx.hideToast();
- wx.showModal({
- title,
- content: JSON.stringify(content),
- showCancel: false
- });
- };
- //获取应用实例
- var app = getApp()
- Page({
- data: {
- },
- onLoad: function () {
- console.log('onLoad');
- },
- onShow: function () {
- console.log('onShow');
- app.getUserInfo(function(userInfo){
- console.log(userInfo);
- });
- },
- onShareAppMessage: function () {
- return {
- title: '密件',
- desc: '密件',
- path: 'pages/index/index'
- }
- }
- })
|