问题修复

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 }) { onLaunch({ path, query, scene }) {
console.log(this.$route); console.log(this.$route);
// #ifdef H5 // #ifdef H5
const storeId = this.getQueryString('storeId'); const storeId = this.$route.query.storeId || this.getQueryString('storeId') || '';
console.log(storeId); console.log(storeId);
uni.setStorageSync('storeId', storeId || ''); if (storeId) {
uni.setStorageSync('storeId', storeId || '');
}
// #endif // #endif
// #ifdef MP // #ifdef MP
// //

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

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

Loading…
Cancel
Save