1234567891011121314151617181920212223242526272829303132333435363738394041 |
- const app = getApp();
- const util = require("../../../utils/util");
- Page({
- data: {
- status: 0,
- vid: '',
- articleType: 0
- },
- onLoad: function (options) {
- this.setData({ status: options.status, vid: options.vid, articleType: options.articleType })
- },
- seeCard() {
- if (app.globalData.userInfo) {
- wx.navigateTo({
- url: '/pages/account/safe/index'
- })
- } else {
- // 静默登录
- util.silentLogin().then(res => {
- wx.navigateTo({
- url: '/pages/account/safe/index'
- })
- })
- }
- },
- goUse() {
- if (app.globalData.userInfo) {
- wx.navigateTo({
- url: this.data.articleType == 1 ? '/pages/product/goods/index' : ('/pages/growthCard/activity?vid=' + this.data.vid)
- })
- } else {
- // 静默登录
- let that =this
- util.silentLogin().then(res => {
- wx.navigateTo({
- url: that.data.articleType == 1 ? '/pages/product/goods/index' : ('/pages/growthCard/activity?vid=' + that.data.vid)
- })
- })
- }
- }
- })
|