| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- import common from '../../utils/util';
- import main from '../../utils/main';
- const app = getApp();
- Page({
- data: {
- IsIPhoneX:app.globalData.IsIPhoneX,
- ProgramName:app.globalData.ProgramName,
- Version:app.globalData.Version,
- },
- onLoad: function (options) {
- let that = this;
- that.setData({
- Containnerheight: main.getWindowHeight(),
- });
- },
- onReady:function(){
- let that = this;
- main.getData('GetProgramList', function (data) {
- if (data) {
- for(let i=0;i<data.length;i++){
- if (data[i].ID==app.globalData.ProgramID){
- wx.setNavigationBarColor({
- frontColor: data[i].FColor,
- backgroundColor: data[i].BGColor,
- });
- wx.setBackgroundColor({
- backgroundColorTop: data[i].BGColor,
- backgroundColorBottom: data[i].BGColor,
- })
- that.setData({
- BGColor:data[i].BGColor,
- FColor:data[i].FColor,
- ProgramList:data,
- });
- break;
- }
- }
- }
- });
- },
- goto: function (e) {
- let that=this;
- var url=e.currentTarget.dataset.url;
- wx.navigateTo({
- url: url,
- });
- },
- gotoRedirectTo: function (e) {
- let that=this;
- var url=e.currentTarget.dataset.url;
- wx.redirectTo({
- url: url,
- });
- },
- switchProgram:function(e) {
- var list = this.data.ProgramList;
- for(let i=0;i<list.length;i++){
- if (list[i].ID==e.currentTarget.dataset.id){
- wx.navigateToMiniProgram({
- appId: list[i].AppID,
- path: list[i].PathUrl+"?SourceID="+app.globalData.ProgramID,
- });
- break;
- }
- }
- },
- onShareAppMessage: function () {
- return {
- title: app.globalData.ShareTitle,
- path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
- imageUrl: app.globalData.ShareImage,
- }
- },
- })
|