现在小程序可以展示一个VR全景,请问如何更改配置,可以展示2个VR全景页?
APP.JS里给了两个ID,单独使用都可以展示,有没有办法在展示页分别展示不同ID的全景?
//index.js
const app = getApp()
const util = require('../../utils/util.js')
Page({
onLoad: function (options) {
if (app.AppName) {
wx.setNavigationBarTitle({ title: app.AppName });
} else {
wx.request({
url: app.site_path + app.app_name + app.pano_id,
success: result => {
let AppName = result.data;
// 本地存储
app.AppName = AppName;
wx.setStorageSync('local_app_name', AppName);
wx.setNavigationBarTitle({ title: AppName });
}
});
}
this.setData({
link: app.site_path + app.show_pano + app.pano_id
});
}
})
上面显示页的JS,下面是APP.JS
//app.js
App({
// pano_id: "60169",
pano_id: "77289",
site_path: 'https://1.wechatapp.upvr.net',
app_name: '/WeChatApp/Index/app_name/pano_id/',
show_pano: '/WeChatApp/Index/pano/pano_id/',
introduction: '/WeChatApp/Index/introduction/pano_id/',
contact: '/WeChatApp/Index/contact/pano_id/',
thumb_path: '/wechat_app_article_thumb/',
Article_list: '/WeChatApp/Article/article_list/pano_id/',
Article_show: '/WeChatApp/Article/show/',
onLaunch: function () {
this.NewsList = wx.getStorageSync('local_news') || false;
this.ProductList = wx.getStorageSync('local_Product') || false;
// this.AppName = wx.getStorageSync('local_app_name') || false;
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage']
})
}
});