【订单详情】

1. onLoad 的注释补全
2. onReady 的注释补全
pull/1/MERGE
YunaiV 2023-06-07 23:07:57 +08:00
parent dcbe6241f0
commit ed2ea5876c
2 changed files with 48 additions and 47 deletions

View File

@ -59,7 +59,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "123",
"appid" : "wx63c280fe3248a3e7",
"setting" : {
"urlCheck" : true,
"minified" : true,

View File

@ -15,7 +15,6 @@
<view id="home" class="home acea-row row-center-wrapper iconfont icon-xiangzuo" :class="opacity > 0.5?'on':''"
:style="{ top: homeTop + 'rpx' }" v-if="returnShow" @tap="returns">
</view>
<!-- <view class='iconfont icon-xiangzuo' :style="'top:'+navH/2+'rpx'" @tap='returns'></view> -->
<view>
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true"
:style='"height:"+height+"px;"' @scroll="scroll">
@ -384,7 +383,6 @@
weixinStatus: false, // TODO
H5ShareBox: false, // TODO
activityH5: [], // TODO
retunTop: true, // TODO
navH: "", // nav
navList: [], // nav
navActive: 0, // nav
@ -406,7 +404,7 @@
imagePath: '', // TODO
imgTop: '', // TODO
errT: '', // TODO
homeTop: 20, // TODO
homeTop: 20, // top
navbarRight: 0, // TODO
returnShow: true, // // TODO
type: "" // TODO
@ -426,13 +424,16 @@
}
},
onLoad(options) {
let that = this
var pages = getCurrentPages();
that.returnShow = pages.length !== 1;
if (pages.length <= 1) {
that.retunTop = false
// nav
const pages = getCurrentPages();
this.returnShow = pages.length !== 1;
this.navH = app.globalData.navHeight;
uni.getSystemInfo({
success: ( res ) => {
this.height = res.windowHeight;
}
that.navH = app.globalData.navHeight;
});
// #ifdef MP || APP-PLUS
// id
// TODO
@ -443,11 +444,8 @@
}
},2000)
// #endif
uni.getSystemInfo({
success: function(res) {
that.height = res.windowHeight;
},
});
//
if (!options.scene && !options.id) {
this.$util.Tips({
title: '缺少参数无法查看商品'
@ -456,47 +454,53 @@
});
return;
}
let that = this
// id
if (options.hasOwnProperty('id') || options.scene) {
if (options.scene) { //
let qrCodeValue = that.$util.getUrlParams(decodeURIComponent(options.scene));
let mapeMpQrCodeValue = that.$util.formatMpQrCodeData(qrCodeValue);
// TODO code
let qrCodeValue = this.$util.getUrlParams(decodeURIComponent(options.scene));
let mapeMpQrCodeValue = this.$util.formatMpQrCodeData(qrCodeValue);
app.globalData.spread = mapeMpQrCodeValue.spread;
this.id = mapeMpQrCodeValue.id;
// TODO code
setTimeout(()=>{
spread(mapeMpQrCodeValue.spread).then(res => {}).catch(res => {})
},2000)
} else {
this.id = options.id;
}
options.type == undefined || options.type == null ? that.type = 'normal' : that.type = options.type;
that.$store.commit("PRODUCT_TYPE", that.type);
// type
if (options.type === undefined || options.type == null) {
this.type = 'normal'
} else {
this.type = options.type
}
this.$store.commit("PRODUCT_TYPE", that.type);
}
//
this.getGoodsDetails();
if (true) {
return;
}
this.getCouponList();
this.getProductReplyList();
this.getProductReplyCount();
this.getGoods();
},
onReady() {
this.$nextTick(function() {
this.$nextTick(() => {
// top
// #ifdef MP
const menuButton = uni.getMenuButtonBoundingClientRect();
const query = uni.createSelectorQuery().in(this);
query
.select('#home')
query.select('#home')
.boundingClientRect(data => {
this.homeTop = menuButton.top * 2 + menuButton.height - data.height;
})
.exec();
// #endif
// #ifdef H5
// const clipboard = new ClipboardJS('.copy-data');
// clipboard.on('success', () => {
// this.$util.Tips({
// title: ''
// });
// });
// #endif
});
},
/**
@ -627,7 +631,6 @@
}
//
if (item.activityH5 && item.activityH5.type == 1) {
debugger
uni.redirectTo({
url: `/pages/activity/goods_seckill_details/index?id=${item.activityH5.id}`
})
@ -770,14 +773,13 @@
that.infoScroll();
}, 500);
// #ifdef MP
that.imgTop = res.data.productInfo.image
that.imgTop = spu.picUrl
// #endif
// #ifndef H5
that.downloadFilestoreImage();
// #endif
that.selectDefaultSku();
}).catch(err => {
//
return that.$util.Tips({
title: err.toString()
}, {
@ -1055,7 +1057,6 @@
}
// #endif
this.posters = true;
}
},
closePosters: function() {