真机报错
Error:Expect START descriptor with depth 2 but get another /wxf.../0/page_frame.html:15:6835
由下面的方法触发的
setModalStatus(e) {
this.timers && clearTimeout(this.timers);
const animation = wx.createAnimation({
duration: 200,
timingFunction: 'linear',
delay: 0,
});
this.animation = animation;
const window_height = getIn(getApp(), ['globalData', 'window_height']);
animation.translateY(window_height).step();
const _height = 0;
this.setData({ animationData: animation.export() });
if (e.currentTarget.dataset.status == 1) {
//获取弹出数据
let idx = e.currentTarget.dataset.index;
if (getIn(this.data.orderObject,['coupon',idx])){
const coupon = {
selected: this.data.coupon.selected,
list: this.data.orderObject.coupon[idx].coupon_list,
muid_mtype: idx
}
this.setData({ coupon, showModalStatus: true });
}else{
return false;
}
}
this.times = setTimeout(() => {
animation.translateY(_height).step();
this.setData({
animationData: animation.export(),
});
if (e.currentTarget.dataset.status == 0) {
//刷新每个店铺的结算价格
let total_member_total = 0.00;
Object.values(this.data.orderObject.data).map((o)=>{
total_member_total += parseFloat(o.member_total, 2);
});
this.setData(
{
'orderObject.total_member_total': total_member_total,
showModalStatus: false
}
);
this.getTotalPrice(this.data.countMoney, this.freight);
}
}, 200);
},
// 提交订单
submitOrder() {
const token = getIn(this.data, ['auth', 'token']);
// const token = "8e401730f575dc80f4b612fc8f85f7d8";
const address_id = getIn(this.data, ['addressObject', 'id']);
const _this = this;
if (!address_id) {
showFail('请选择收货地址');
}
if (!this.data.isAreaAddress) {
showFail('收货地址不在产品销售区域');
}
wx.showLoading();
const order_client = 5;
const exchange_score = this.data.scoreValue;
const cart = getIn(this.data, ['orderObject', 'cart_product']);
const remark = []; // 留言
//处理选择的优惠券---begin
const selected = this.data.coupon.selected;
const selected_arr = [];
Object.keys(selected).map((x) => {
selected_arr.push(selected[x]+'-'+x);
})
const coupon = selected_arr.join(',');
//---over
const params = {
token, address_id, order_client, exchange_score, cart, remark, coupon, shipping_type: 1
};
this.createOrder(params, (status, result) => {
if (status == SUCCESS) {
const order_id = result.data.order_ids.join && result.data.order_ids.join(',');
const pay_way = 2;
const trade_type = 'JSAPI';
const domain = getIn(config, ['domain']);
const openid = getIn(this.data.auth, ['user', 'openid']);
const payParams = {
token, order_id, pay_way, trade_type, domain, openid,
};
const queryString = `id=${order_id}`;
// 刷新购物车
notify && notify('updateShippingCart');
this.fetchPayOrder(token, payParams, (status, result) => {
if (status == SUCCESS) {
wx.requestPayment({
timeStamp: getIn(result, ['data', 'times']),
nonceStr: getIn(result, ['data', 'nonce_str']),
package: getIn(result, ['data', 'prepay_id']),
signType: 'MD5',
paySign: getIn(result, ['data', 'sign']),
success(res) {
_this.onRedirectToOrder(ORDER_DETAIL_PATH, queryString);
},
fail(res) {
_this.onRedirectToOrder(ORDER_DETAIL_PATH, queryString);
},
complete(res) {
wx.hideLoading();
},
});
} else if (status == FAIL) {
wx.hideLoading();
_this.onRedirectToOrder(ORDER_DETAIL_PATH, queryString);
}
});
} else if (status == FAIL) {
本文网址:http://www.91bianli.com/kaifazhinan/74345.html