Page({ data: { link:[], notice: [ "测试时间预计5-15分钟", "请在心态平的情况下开始答题", "选项间无对错好坏之分", "请选择与你实际做法相符的", "而不是你认为怎样做是对的" ], resu: [ "ENFP", "INTJ", "ESFP", "INFP", "ESTJ", "ENFJ", "ENTJ", "ENTP", "ESTP", "INFJ", "ESFJ", "INTP", "ISFJ", "ISFP", "ISTJ", "ISTP", "more" ], tests: [ { a: " 简洁版[28道] ", b: 28 }, { a: " 通用版[48道] ", b: 48 }, { a: " 完整版[93道] ", b: 93 } ], bit11: "", bit12: "其他推荐" }, onLoad: function() { this.uLink() }, onShow:function(){ getApp().getTotal(); }, onHide: function() {}, onUnload: function() {}, onPullDownRefresh: function() {}, onReachBottom: function() {}, onShareAppMessage: function() {}, onShareTimeline: function() {}, uLink:function(){ var that = this var o = "https://a1.miniappapi.com/api/65d0a827276be"; wx.request({ url: o, method: "GET", data: { app_appid : getApp().globalData.appid }, header: { 'Access-Token': getApp().globalData.AccessToken }, success: function(t) { that.data.link = t.data.data; that.setData({ link : t.data.data }); }, }); }, goLink: function(e) { console.log(e.currentTarget.id); let index = e.currentTarget.id wx.vibrateShort(), wx.openEmbeddedMiniProgram({ appId: this.data.link[index].app_wx_appid, path: this.data.link[index].app_wx_path }); }, });