123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- import {
- getOpenidSessionKey
- } from '../../utils/httpUtil';
- Page({
-
- data: {
- index: undefined
- },
-
- onLoad: function (options) {
- if(options.index){
- this.setData({
- index: options.index
- })
- }
- },
- impower: function (e) {
- console.log(e)
- var myEventDetail = {}
- var myEventOption = {}
- getOpenidSessionKey((res) => {
- console.log(res)
- wx.showToast({
- title: '登录成功',
- icon: 'fail',
- duration: 1000,
- success: () => {
- const pages = getCurrentPages();
- const prevPage = pages[pages.length - 2];
- prevPage.setData({
- fromLoginIndex: this.data.index,
- }, () => {
- wx.navigateBack({
- delta: 1
- })
- })
- }
- })
- }, (error) => {
- wx.showToast({
- title: '登录失败',
- icon: 'fail',
- duration: 1000,
- success: () => {
- wx.navigateBack()
- }
- })
- });
- },
- touchMove: function () {
- return false
- },
-
- onReady: function () {
- },
-
- onShow: function () {
- },
-
- onHide: function () {
- },
-
- onUnload: function () {
- },
-
- onPullDownRefresh: function () {
- },
-
- onReachBottom: function () {
- },
-
- onShareAppMessage: function () {
- }
- })
|