问题修复

h5
wangdong 2 months ago
parent aaeeb7e1d0
commit cab79f7346
  1. 6
      App.vue
  2. 30
      pages/goods/list.vue
  3. 6
      pages/wallet/recharge/index.vue

@ -17,9 +17,11 @@
onLaunch({ path, query, scene }) {
console.log(this.$route);
// #ifdef H5
const storeId = this.getQueryString('storeId');
const storeId = this.$route.query.storeId || this.getQueryString('storeId') || '';
console.log(storeId);
uni.setStorageSync('storeId', storeId || '');
if (storeId) {
uni.setStorageSync('storeId', storeId || '');
}
// #endif
// #ifdef MP
//

@ -3,7 +3,7 @@
<mescroll-body ref="mescrollRef" :sticky="true" @init="mescrollInit"
:down="{ native: true,auto: true, use: true}" @down="downCallback" :up="upOption" @up="upCallback">
<!-- 页面头部 -->
<view class="head">
<view class="head" ref="head">
<view class="header">
<view class="search">
<search :tips="options.search ? options.search : '搜索商品'" @event="handleSearch" />
@ -467,14 +467,26 @@
return new Promise((resolve, reject) => {
GoodsApi.list(param)
.then(result => {
selectorQuery.selectAll('.head').boundingClientRect((rects) => {
app.blheight = rects[0].height
}).exec();
const newList = result.data.list
let arr = getMoreListData(newList, app.list, pageNo);
// app.list.data = app.arrayUnique(arr, 'goods_id')
app.list.data = arr;
app.total = result.data.list.total;
console.log(result);
try{
// #ifdef H5
console.log(this.$refs.head.$el.offsetHeight);
app.blheight = this.$refs.head.$el.offsetHeight;
// #endif
// #ifndef H5
selectorQuery.selectAll('.head').boundingClientRect((rects) => {
app.blheight = rects[0].height
}).exec();
// #endif
const newList = result.data.list
let arr = getMoreListData(newList, app.list, pageNo);
// app.list.data = app.arrayUnique(arr, 'goods_id')
app.list.data = arr;
app.total = result.data.list.total;
}catch(e){
console.log(e);
//TODO handle the exception
}
resolve(newList)
})
.catch(reject)

@ -373,18 +373,20 @@ import * as UploadApi from '@/api/upload'
app.$toast('请上传支付凭证');
return
}
params = { ...params, ...app.voucherForm};
params = { ...params, extra: {...app.voucherForm}};
console.log(params);
app.disabled = true
// #endif
RechargeApi.submit(params)
.then(result => {
console.log(result);
if (app.curPaymentItem.method === 'huifu') {
const { miniPayRequest, out_trade_no } = result.data.payment;
app.miniPayRequest = miniPayRequest;
app.miniPayRequest.out_trade_no = out_trade_no;
} else {
// #ifdef H5
this.onShowSuccess(result)
// #endif
app.onSubmitCallback(result)
}
})

Loading…
Cancel
Save