|
@@ -5,12 +5,13 @@
|
|
const util = require('@/utils/util.js').default;
|
|
const util = require('@/utils/util.js').default;
|
|
const config = require('@/services/urlConfig.js');
|
|
const config = require('@/services/urlConfig.js');
|
|
import router from "@/router";
|
|
import router from "@/router";
|
|
|
|
+ import touchHandle from '@/mixins/touchHandle.js';
|
|
// const app = getApp(); //获取应用实例
|
|
// const app = getApp(); //获取应用实例
|
|
// import requestConfig from '@/static/lib/requestConfig.js';
|
|
// import requestConfig from '@/static/lib/requestConfig.js';
|
|
// import commonPageMethod from '@/common/commonPageMethod.js';
|
|
// import commonPageMethod from '@/common/commonPageMethod.js';
|
|
// import commonMethod from '@/common/commonMethod.js';
|
|
// import commonMethod from '@/common/commonMethod.js';
|
|
export default {
|
|
export default {
|
|
- // mixins: [commonPageMethod,commonMethod],
|
|
|
|
|
|
+ mixins: [touchHandle],
|
|
/**
|
|
/**
|
|
* 页面的初始数据
|
|
* 页面的初始数据
|
|
*/
|
|
*/
|
|
@@ -64,10 +65,7 @@ export default {
|
|
// this.spaceId = this.$route.query.spaceId?this.$route.query.spaceId:'';
|
|
// this.spaceId = this.$route.query.spaceId?this.$route.query.spaceId:'';
|
|
this.id = this.$route.query.id?this.$route.query.id:'6523d91af65c626211ee21c8';
|
|
this.id = this.$route.query.id?this.$route.query.id:'6523d91af65c626211ee21c8';
|
|
if(!this.id){
|
|
if(!this.id){
|
|
- uni.showToast({
|
|
|
|
- icon: "none",
|
|
|
|
- title: "没有数据!",
|
|
|
|
- });
|
|
|
|
|
|
+ this.showToast("没有数据!");
|
|
return false;
|
|
return false;
|
|
}else{
|
|
}else{
|
|
this.getIdData();
|
|
this.getIdData();
|
|
@@ -85,8 +83,23 @@ export default {
|
|
this.currImgIdx = e.detail ? e.detail.current : e;
|
|
this.currImgIdx = e.detail ? e.detail.current : e;
|
|
this.gsImage = this.hardboundEffect[this.currImgIdx];//获取高斯模糊的图片
|
|
this.gsImage = this.hardboundEffect[this.currImgIdx];//获取高斯模糊的图片
|
|
},
|
|
},
|
|
|
|
+ rightScroll(){//右滑
|
|
|
|
+ if(this.currImgIdx <= (this.hardboundEffect.length - 1) && this.currImgIdx > 0){
|
|
|
|
+ this.$refs.carousel.prev();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ leftScroll(){//继续生成
|
|
|
|
+ if(this.currImgIdx != this.hardboundEffect.length - 1){
|
|
|
|
+ if(this.currImgIdx<this.hardboundEffect.length - 1){
|
|
|
|
+ this.$refs.carousel.next();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
navigateFuc(){
|
|
navigateFuc(){
|
|
-
|
|
|
|
|
|
+ this.showToast("敬请期待!");
|
|
|
|
+ },
|
|
|
|
+ optionChange(){
|
|
|
|
+ this.showToast("敬请期待!");
|
|
},
|
|
},
|
|
async getIdData(){
|
|
async getIdData(){
|
|
let userId = this.userId || '';
|
|
let userId = this.userId || '';
|
|
@@ -163,18 +176,6 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
toMode(){
|
|
toMode(){
|
|
- // uni.navigateTo({
|
|
|
|
- // url: '/webgl/pages/webgl_rxdz_look/webgl_rxdz_look?houseId='+this.houseId,
|
|
|
|
- // success: (res)=> {
|
|
|
|
- // // 通过eventChannel向被打开页面传送数据
|
|
|
|
- // res.eventChannel.emit('acceptDataFromOpenerPage', {
|
|
|
|
- // layoutStruct:this.layoutStruct,
|
|
|
|
- // })
|
|
|
|
- // },
|
|
|
|
- // fail: function(res) {
|
|
|
|
- // console.log(res)
|
|
|
|
- // },
|
|
|
|
- // })
|
|
|
|
let data = {
|
|
let data = {
|
|
houseId:this.houseId,
|
|
houseId:this.houseId,
|
|
id:this.id,
|
|
id:this.id,
|
|
@@ -193,64 +194,13 @@ export default {
|
|
};
|
|
};
|
|
util.trackRequest(param);
|
|
util.trackRequest(param);
|
|
},
|
|
},
|
|
- async afterShareOptionHandle(e) {
|
|
|
|
- let sign = await app.setShareToken({
|
|
|
|
- subtype: 'project',
|
|
|
|
- houseId: this.houseId,
|
|
|
|
- attrs: {
|
|
|
|
- shareType: 'qrcode',
|
|
|
|
- fromProject: app.globalData.projectShare,
|
|
|
|
- id: this.id,
|
|
|
|
- shareUserId:this.shareUserId,
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- let shareImg = this.gsImage;
|
|
|
|
- let obj = {
|
|
|
|
- type: 8,
|
|
|
|
- path: '/webgl/pages/webgl_rxdz_customize/webgl_rxdz_customize',
|
|
|
|
- shareToken: sign || app.globalData.shareToken,
|
|
|
|
- houseId: (this.houseId || ''),
|
|
|
|
- logo: app.globalData.houseProject.logo || "",
|
|
|
|
- gpName: app.globalData.houseProject.projectName || '',
|
|
|
|
- mountHuangXcx:true,
|
|
|
|
- };
|
|
|
|
- if(shareImg){
|
|
|
|
- obj.defaultImage = shareImg
|
|
|
|
- }
|
|
|
|
- app.globalData.shareCardData = JSON.stringify(obj);
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/shareCard/shareCard?houseId=' + (this.houseId || ''),
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- /**
|
|
|
|
- * 用户点击右上角分享
|
|
|
|
- */
|
|
|
|
- onShareAppMessage(options) {
|
|
|
|
- let param = {
|
|
|
|
- type: 'CLK', //埋点类型
|
|
|
|
- clkId: 'clk_2cmina_18', //点击ID
|
|
|
|
- clkName: 'system-share', //点击前往的页面名称
|
|
|
|
- clkParams: {
|
|
|
|
- from: options.from
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
- util.trackRequest(param);
|
|
|
|
- let sharePath = this.shareInitPath();
|
|
|
|
- let shareUserParam = "";
|
|
|
|
- shareUserParam = ('&shareUserId='+((app.globalData.single && app.globalData.single.id) ? app.globalData.single.id : ''));
|
|
|
|
- if(app.globalData.executeToHelpShare){//帮好友转发分享
|
|
|
|
- shareUserParam = ('&shareUserId='+this.shareUserId);
|
|
|
|
- }
|
|
|
|
- app.globalData.executeToHelpShare = false;
|
|
|
|
- let path = '/webgl/pages/webgl_rxdz_customize/webgl_rxdz_customize?' + sharePath + shareUserParam + '&id=' + this.id;
|
|
|
|
- console.log(path)
|
|
|
|
- let shareImg = this.gsImage;
|
|
|
|
- return {
|
|
|
|
- imageUrl: shareImg || app.globalData.shareImage || '',
|
|
|
|
- title: app.globalData.projectName || '',
|
|
|
|
- path: path
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ showToast(title){
|
|
|
|
+ this.$store.state.loading = true;
|
|
|
|
+ this.$store.state.loadingMsg = title || "";
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ this.$store.state.loading = false;
|
|
|
|
+ }, 1500);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|