Commit fc194110 authored by ziyu's avatar ziyu

improvement: eslint修改

parent 72df9cb8
This diff is collapsed.
...@@ -15,7 +15,7 @@ import promisify from '@wepy/use-promisify'; ...@@ -15,7 +15,7 @@ import promisify from '@wepy/use-promisify';
wepy.use(promisify); wepy.use(promisify);
wepy.use(vuex); wepy.use(vuex);
import { checkUpdateVersion } from './common/raffleProbability' import { checkUpdateVersion } from './common/raffleProbability';
wepy.app({ wepy.app({
hooks: { hooks: {
......
...@@ -23,14 +23,14 @@ function getProbability (quantity, coinQuantity) { ...@@ -23,14 +23,14 @@ function getProbability (quantity, coinQuantity) {
} }
function checkUpdateVersion() { function checkUpdateVersion() {
//创建 UpdateManager 实例 // 创建 UpdateManager 实例
const updateManager = wx.getUpdateManager(); const updateManager = wx.getUpdateManager();
//检测版本更新 // 检测版本更新
updateManager.onCheckForUpdate(function(res) { updateManager.onCheckForUpdate(function(res) {
console.log(res,'版本更新'); console.log(res, '版本更新');
// 请求完新版本信息的回调 // 请求完新版本信息的回调
if (res.hasUpdate) { if (res.hasUpdate) {
//监听小程序有版本更新事件 // 监听小程序有版本更新事件
updateManager.onUpdateReady(function() { updateManager.onUpdateReady(function() {
wx.showModal({ wx.showModal({
title: '更新提示', title: '更新提示',
...@@ -41,20 +41,20 @@ function checkUpdateVersion() { ...@@ -41,20 +41,20 @@ function checkUpdateVersion() {
updateManager.applyUpdate(); updateManager.applyUpdate();
} }
} }
}) });
}) });
updateManager.onUpdateFailed(function() { updateManager.onUpdateFailed(function() {
// 新版本下载失败 // 新版本下载失败
wx.showModal({ wx.showModal({
title: '已经有新版本咯~', title: '已经有新版本咯~',
content: '请您删除当前小程序,到微信 “发现-小程序” 页,重新搜索打开呦~', content: '请您删除当前小程序,到微信 “发现-小程序” 页,重新搜索打开呦~'
}) });
}) });
} }
}) });
} }
module.exports = { module.exports = {
getProbability, getProbability,
checkUpdateVersion, checkUpdateVersion
}; };
...@@ -10,10 +10,10 @@ if (env === 'test') { ...@@ -10,10 +10,10 @@ if (env === 'test') {
const request = async (url, options) => { const request = async (url, options) => {
const pages = getCurrentPages() || []; const pages = getCurrentPages() || [];
let safeAreaInsetTop = false; let safeAreaInsetTop = false;
if(pages.length === 0) { if (pages.length === 0) {
// 如果页面还没加载出来,只能说明现在刚进入首页 // 如果页面还没加载出来,只能说明现在刚进入首页
safeAreaInsetTop = true; safeAreaInsetTop = true;
}else if(pages[pages.length - 1].route === 'pages/index') { } else if (pages[pages.length - 1].route === 'pages/index') {
safeAreaInsetTop = true; safeAreaInsetTop = true;
} }
const defaultOptions = { const defaultOptions = {
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
activityList(val) { activityList(val) {
let list = val || []; let list = val || [];
this.list = list; this.list = list;
if(list.length && list.length < 3) { if (list.length && list.length < 3) {
this.onActivityChange(); this.onActivityChange();
} }
} }
......
...@@ -12,21 +12,21 @@ ...@@ -12,21 +12,21 @@
wepy.component({ wepy.component({
props: { props: {
show:{ show: {
type:Boolean, type: Boolean,
default: false, default: false
} }
}, },
data: { data: {
overLayStyle: 'background-color:transparent', overLayStyle: 'background-color:transparent'
}, },
watch: { watch: {
show(val) { show(val) {
if(val){ if (val) {
this.overLayStyle = 'background-color:transparent'; this.overLayStyle = 'background-color:transparent';
setTimeout(()=>{ setTimeout(() => {
this.overLayStyle = ''; this.overLayStyle = '';
},500) }, 500);
} }
} }
}, },
......
...@@ -40,8 +40,10 @@ ...@@ -40,8 +40,10 @@
</template> </template>
<script> <script>
import wepy from '@wepy/core'; import wepy from '@wepy/core';
import { getGoodsList, getGoodsUrl } from '../../common/api' import { getGoodsList, getGoodsUrl } from '../../common/api';
let touchDotX = 0, touchDotY = 0, page = 0; let touchDotX = 0;
let touchDotY = 0;
let page = 0;
wepy.component({ wepy.component({
data: { data: {
swiperItem: 2, swiperItem: 2,
...@@ -49,8 +51,8 @@ ...@@ -49,8 +51,8 @@
currentIndex: 1, // 商品当前滑动到第几个 currentIndex: 1, // 商品当前滑动到第几个
circular: false, // 商品是否无限循环 circular: false, // 商品是否无限循环
list: [], list: [],
showLoading:false, showLoading: false,
isListDone:false, isListDone: false
}, },
attached() { attached() {
this.getList(); this.getList();
...@@ -82,32 +84,32 @@ ...@@ -82,32 +84,32 @@
debounce(setTimeout(function() { debounce(setTimeout(function() {
that.getList(); that.getList();
// 当新得到的list长度不足20个时,表明商品全部得到,开启无限循环 // 当新得到的list长度不足20个时,表明商品全部得到,开启无限循环
/*if(nextlist.length < goodsNum) { /* if(nextlist.length < goodsNum) {
that.circular = true; that.circular = true;
} }
that.list = [...that.list, ...nextlist];*/ that.list = [...that.list, ...nextlist]; */
}, 1000), 500); }, 1000), 500);
} }
} }
}, },
getList() { getList() {
if(this.isListDone) return; if (this.isListDone) return;
page++; page++;
getGoodsList(page).then(data => { getGoodsList(page).then(data => {
// 没有更多了 // 没有更多了
if(!data.hasMore) { if (!data.hasMore) {
//如果小于4个商品,一行就能显示,不用循环 // 如果小于4个商品,一行就能显示,不用循环
this.list.length>4 && (this.circular = true); this.list.length > 4 && (this.circular = true);
this.isListDone = true; this.isListDone = true;
} }
this.list = [...this.list,...data.items]; this.list = [...this.list, ...data.items];
}); });
}, },
toViewPage(e) { toViewPage(e) {
let item = e.$wx.currentTarget.dataset.item; let item = e.$wx.currentTarget.dataset.item;
if(this.showLoading) return; if (this.showLoading) return;
this.showLoading = true; this.showLoading = true;
getGoodsUrl({skuId:item.sourceId,couponUrl:item.couponUrl||null}).then(data=>{ getGoodsUrl({skuId: item.sourceId, couponUrl: item.couponUrl || null}).then(data => {
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', appId: 'wx91d27dbf599dff74',
path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(data), // 跳转小程序的路径 path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(data), // 跳转小程序的路径
...@@ -117,9 +119,9 @@ ...@@ -117,9 +119,9 @@
} }
}); });
this.showLoading = false; this.showLoading = false;
}).catch(()=>{ }).catch(() => {
this.showLoading = false; this.showLoading = false;
}) });
}, },
touchStart (event) { touchStart (event) {
touchDotX = event.touches[0].pageX; // 获取触摸时的原点 touchDotX = event.touches[0].pageX; // 获取触摸时的原点
......
...@@ -55,10 +55,10 @@ ...@@ -55,10 +55,10 @@
}, },
goNextPage: function(path) { goNextPage: function(path) {
this.$emit('showMenu', false); this.$emit('showMenu', false);
if(path === 'jd') { if (path === 'jd') {
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', appId: 'wx91d27dbf599dff74',
path:'pages/order/list/list', path: 'pages/order/list/list',
// 有效值 develop(开发版),trial(体验版),release(正式版) // 有效值 develop(开发版),trial(体验版),release(正式版)
envVersion: 'release', envVersion: 'release',
success(res) { success(res) {
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
inviteinfo: { inviteinfo: {
type: Array type: Array
}, },
type: String, type: String
}, },
computed: { computed: {
goldNum() { goldNum() {
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
lotteryUrl: '/static/images/lottery@2x.png', lotteryUrl: '/static/images/lottery@2x.png',
containerStyle: '', containerStyle: '',
flyAnimation: false, flyAnimation: false,
isFirst:true, isFirst: true
}, },
props: { props: {
title: '', title: '',
......
...@@ -64,9 +64,9 @@ ...@@ -64,9 +64,9 @@
} }
}, },
options: { options: {
styleIsolation: 'shared', styleIsolation: 'shared'
}, },
data:{ data: {
nextQueue: [], nextQueue: [],
prevQueue: [], prevQueue: [],
curQueue: [], curQueue: [],
...@@ -75,10 +75,10 @@ ...@@ -75,10 +75,10 @@
_invalidUp: 0, _invalidUp: 0,
_invalidDown: 0, _invalidDown: 0,
_videoContexts: [], _videoContexts: [],
currentIndex:1, currentIndex: 1,
videoPause: false, videoPause: false,
showPopup: false, showPopup: false,
videoLoading: true, videoLoading: true
}, },
watch: { watch: {
videoList (list) { videoList (list) {
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
this.compute(newVal); this.compute(newVal);
} }
}, },
attached(){ attached() {
this._videoContexts = [ this._videoContexts = [
wx.createVideoContext('video_0', this.$wx), wx.createVideoContext('video_0', this.$wx),
wx.createVideoContext('video_1', this.$wx), wx.createVideoContext('video_1', this.$wx),
...@@ -116,23 +116,23 @@ ...@@ -116,23 +116,23 @@
_videoListChanged (newVal) { _videoListChanged (newVal) {
const _this = this; const _this = this;
if (this.curQueue.length === 0) { if (this.curQueue.length === 0) {
//因为列表默认展示1的位置,而后端逻辑会把要展示的放在0的位置,所以交换位置,展示出来 // 因为列表默认展示1的位置,而后端逻辑会把要展示的放在0的位置,所以交换位置,展示出来
//同时展示的元素只有三个,curQueue中始终只有三个元素,用来解决吧video过多时,资源加载问题 // 同时展示的元素只有三个,curQueue中始终只有三个元素,用来解决吧video过多时,资源加载问题
//当前的资源加载解决方案是参考小程序的video-swiper源码 // 当前的资源加载解决方案是参考小程序的video-swiper源码
newVal.forEach(function (item,index) { newVal.forEach(function (item, index) {
if(index === 1) { if (index === 1) {
_this.curQueue[0] = item; _this.curQueue[0] = item;
}else if (index === 0){ } else if (index === 0) {
_this.curQueue[1] = item; _this.curQueue[1] = item;
}else if (index === 2) { } else if (index === 2) {
_this.curQueue[2] = item; _this.curQueue[2] = item;
} else { } else {
_this.nextQueue.push(item); _this.nextQueue.push(item);
} }
}); });
this.playCurrent(1); this.playCurrent(1);
}else{ } else {
//新进入的数组要去重,新进入的数组去重是需求的逻辑 // 新进入的数组要去重,新进入的数组去重是需求的逻辑
const curIds = this.curQueue.map(item => item.id); const curIds = this.curQueue.map(item => item.id);
const nextIds = _this.nextQueue.map(item => item.id); const nextIds = _this.nextQueue.map(item => item.id);
const allIds = [...curIds, ...nextIds]; const allIds = [...curIds, ...nextIds];
...@@ -147,36 +147,36 @@ ...@@ -147,36 +147,36 @@
this.videoPause = false; this.videoPause = false;
this.videoLoading = true; this.videoLoading = true;
if (e.$wx.detail.source === 'touch') { if (e.$wx.detail.source === 'touch') {
//增加一个透明遮罩层,控制用户滑动速度,500ms内只能滑动一次,解决用户滑动过快,不触发animationfinish的bug // 增加一个透明遮罩层,控制用户滑动速度,500ms内只能滑动一次,解决用户滑动过快,不触发animationfinish的bug
this.showPopup = true; this.showPopup = true;
setTimeout(()=>{ setTimeout(() => {
this.showPopup = false this.showPopup = false;
},500); }, 500);
const current = e.$wx.detail.current; const current = e.$wx.detail.current;
this.currentIndex = current; this.currentIndex = current;
//如果next中如果就剩下4个了,请求下一页 // 如果next中如果就剩下4个了,请求下一页
if(this.nextQueue.length === 4) { if (this.nextQueue.length === 4) {
getPrizeList().then(data=>{ getPrizeList().then(data => {
this._videoListChanged(data); this._videoListChanged(data);
}) });
} }
} }
}, },
animationfinish (e) { animationfinish (e) {
var _last = this._last, let _last = this._last;
curQueue = this.curQueue, let curQueue = this.curQueue;
prevQueue = this.prevQueue, let prevQueue = this.prevQueue;
nextQueue = this.nextQueue; let nextQueue = this.nextQueue;
//一共三个数组,curQueue是要显示的数组,prevQueue放上滑过去的元素,nextQueue放即将进入的元素 // 一共三个数组,curQueue是要显示的数组,prevQueue放上滑过去的元素,nextQueue放即将进入的元素
//一次最多只展示3个video标签,提高加载视频的速度 // 一次最多只展示3个video标签,提高加载视频的速度
const current = e.$wx.detail.current; const current = e.$wx.detail.current;
const diff = current - _last; const diff = current - _last;
if (diff === 0) return; if (diff === 0) return;
this._last = current; this._last = current;
this.playCurrent(current); this.playCurrent(current);
// 如果上滑的时候,当前滑动到第0元素,那么被划走,放入prevQueue是第一个元素,这个要自己画图才会更理解 // 如果上滑的时候,当前滑动到第0元素,那么被划走,放入prevQueue是第一个元素,这个要自己画图才会更理解
const upChange = [1,2,0]; const upChange = [1, 2, 0];
const downChange = [2,0,1]; const downChange = [2, 0, 1];
this.$emit('change', { activeId: curQueue[current].id }); this.$emit('change', { activeId: curQueue[current].id });
const direction = (diff === 1 || diff === -2) ? 'up' : 'down'; const direction = (diff === 1 || diff === -2) ? 'up' : 'down';
if (direction === 'up') { if (direction === 'up') {
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
this._invalidUp -= 1; this._invalidUp -= 1;
} }
} }
//当滑动到头时,circular改成false // 当滑动到头时,circular改成false
let circular = true; let circular = true;
if (nextQueue.length === 0 && current !== 0) { if (nextQueue.length === 0 && current !== 0) {
circular = false; circular = false;
...@@ -222,31 +222,31 @@ ...@@ -222,31 +222,31 @@
}, },
playCurrent (current) { playCurrent (current) {
this.curQueue[current] && this.getProgress(this.curQueue[current].id); this.curQueue[current] && this.getProgress(this.curQueue[current].id);
//滑动到当前元素时,其他video都暂停,只播放当前video // 滑动到当前元素时,其他video都暂停,只播放当前video
this._videoContexts.forEach(function (ctx, index) { this._videoContexts.forEach(function (ctx, index) {
if(ctx) { if (ctx) {
if(index !== current) { if (index !== current) {
ctx.pause() ctx.pause();
}else { } else {
ctx.play(); ctx.play();
} }
} }
}); });
this.updateAwardsInfo(current) this.updateAwardsInfo(current);
}, },
videoTap(e) { videoTap(e) {
const current = e.currentTarget.dataset.index; const current = e.currentTarget.dataset.index;
const ctx = this._videoContexts[current]; const ctx = this._videoContexts[current];
if(this.videoPause) { if (this.videoPause) {
ctx.play(); ctx.play();
this.videoPause = false; this.videoPause = false;
}else { } else {
ctx.pause(); ctx.pause();
this.videoPause = true; this.videoPause = true;
} }
}, },
updateAwardsInfo(current) { updateAwardsInfo(current) {
if(this.curQueue[current]) { if (this.curQueue[current]) {
const { id, photoUrl, name, probability } = this.curQueue[current]; const { id, photoUrl, name, probability } = this.curQueue[current];
this.$emit('getAwardsInfo', { this.$emit('getAwardsInfo', {
id, id,
...@@ -276,9 +276,9 @@ ...@@ -276,9 +276,9 @@
this.curQueue = [...this.curQueue]; this.curQueue = [...this.curQueue];
}, },
loadMedia() { loadMedia() {
//如果只是视频数据加载完触发,则当再滑到这个视频的视频loading还在,如果只是paly的时候触发,初始化的时候会有问题 // 如果只是视频数据加载完触发,则当再滑到这个视频的视频loading还在,如果只是paly的时候触发,初始化的时候会有问题
this.videoLoading = false; this.videoLoading = false;
}, }
} }
}); });
</script> </script>
...@@ -372,4 +372,3 @@ ...@@ -372,4 +372,3 @@
background-color: transparent; background-color: transparent;
} }
</style> </style>
...@@ -253,9 +253,9 @@ ...@@ -253,9 +253,9 @@
cornCode: '', // 克币充值码 cornCode: '', // 克币充值码
cornText: '', cornText: '',
cornTextShow: true, cornTextShow: true,
searchStyle:'', searchStyle: '',
avtivityModal: false, //展示活动弹窗 avtivityModal: false, // 展示活动弹窗
awardsInfo:{}, awardsInfo: {}
}, },
computed: { computed: {
...@@ -394,7 +394,7 @@ ...@@ -394,7 +394,7 @@
this.mainInfo.account.quantity = quantity + v.quantity; this.mainInfo.account.quantity = quantity + v.quantity;
this.isReceive = true; this.isReceive = true;
setTimeout(() => { setTimeout(() => {
if(this.mainInfo.buyRecord && this.mainInfo.buyRecord.length && modal !== 4) { if (this.mainInfo.buyRecord && this.mainInfo.buyRecord.length && modal !== 4) {
this.showModal = 4; this.showModal = 4;
return; return;
} }
...@@ -414,17 +414,17 @@ ...@@ -414,17 +414,17 @@
wx.setStorageSync('innerActivity', ''); wx.setStorageSync('innerActivity', '');
} }
// 弹窗有多个,展示顺序 活动弹窗->邀请好友->购买获得克币->开奖宝箱 // 弹窗有多个,展示顺序 活动弹窗->邀请好友->购买获得克币->开奖宝箱
if(this.mainInfo.activity && this.mainInfo.activity.id && this.mainInfo.activity.id !== +activityId) { if (this.mainInfo.activity && this.mainInfo.activity.id && this.mainInfo.activity.id !== +activityId) {
//活动弹窗 // 活动弹窗
this.avtivityModal = true; this.avtivityModal = true;
} else if (this.mainInfo.inviteRecord && this.mainInfo.inviteRecord.length) { } else if (this.mainInfo.inviteRecord && this.mainInfo.inviteRecord.length) {
//邀请好友 // 邀请好友
this.showModal = 1; this.showModal = 1;
} else if (this.mainInfo.buyRecord && this.mainInfo.buyRecord.length) { } else if (this.mainInfo.buyRecord && this.mainInfo.buyRecord.length) {
//购买获得金币 // 购买获得金币
this.showModal = 4; this.showModal = 4;
} else if (this.mainInfo.joinRecord && this.mainInfo.joinRecord.id) { } else if (this.mainInfo.joinRecord && this.mainInfo.joinRecord.id) {
//开奖宝箱 // 开奖宝箱
this.showModal = 2; this.showModal = 2;
} }
}, },
...@@ -457,7 +457,7 @@ ...@@ -457,7 +457,7 @@
}, },
ModalClose() { ModalClose() {
this.cornModal && (this.cornModal = false); this.cornModal && (this.cornModal = false);
if(this.avtivityModal) { if (this.avtivityModal) {
wx.setStorageSync('activityId', this.mainInfo.activity.id); wx.setStorageSync('activityId', this.mainInfo.activity.id);
this.avtivityModal = false; this.avtivityModal = false;
if (this.mainInfo.inviteRecord && this.mainInfo.inviteRecord.length) { if (this.mainInfo.inviteRecord && this.mainInfo.inviteRecord.length) {
...@@ -506,7 +506,7 @@ ...@@ -506,7 +506,7 @@
// 获取头像安全距离 // 获取头像安全距离
let statusHeight = this.$app.$options.globalData.statusBarHeight || ''; let statusHeight = this.$app.$options.globalData.statusBarHeight || '';
this.setSafeAreaStyle('top:' + statusHeight + 'px'); this.setSafeAreaStyle('top:' + statusHeight + 'px');
this.searchStyle = 'top:' + (statusHeight+12) + 'px'; this.searchStyle = 'top:' + (statusHeight + 12) + 'px';
// 获取openid // 获取openid
await this.getOpenId(); await this.getOpenId();
...@@ -535,7 +535,7 @@ ...@@ -535,7 +535,7 @@
}, },
async onShow() { async onShow() {
// 获取主页信息 // 获取主页信息
if(flag) { if (flag) {
this.getMainInfo(); this.getMainInfo();
} }
......
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
import Dialog from '../components/vant/dialog/dialog'; import Dialog from '../components/vant/dialog/dialog';
import { updateUserPhone, confirmRaffle, register, login, getAwardsDetail, checkInnerCode } from '../common/api'; import { updateUserPhone, confirmRaffle, register, login, getAwardsDetail, checkInnerCode } from '../common/api';
import store from '../store'; import store from '../store';
let innerActivity= ''; let innerActivity = '';
wepy.page({ wepy.page({
store, store,
data: { data: {
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
errorText: '', errorText: '',
errorBtn: '确定', errorBtn: '确定',
hasPhone: false, hasPhone: false,
batchId: null, batchId: null
}, },
methods: { methods: {
check() { check() {
...@@ -341,7 +341,7 @@ ...@@ -341,7 +341,7 @@
title: title[code], title: title[code],
message: message[code] message: message[code]
}).then(() => { }).then(() => {
wx.navigateBack({delta: 1}) wx.navigateBack({delta: 1});
}); });
}).catch(() => { }).catch(() => {
this.btnfont = '立即参与'; this.btnfont = '立即参与';
...@@ -386,7 +386,7 @@ ...@@ -386,7 +386,7 @@
this.code = ''; this.code = '';
}, },
toAgreement() { toAgreement() {
wx.navigateTo({url:'/pages/agreement'}); wx.navigateTo({url: '/pages/agreement'});
}, },
checkCode () { checkCode () {
if (this.code === '') { if (this.code === '') {
......
...@@ -31,17 +31,17 @@ ...@@ -31,17 +31,17 @@
</template> </template>
<script> <script>
import wepy from '@wepy/core'; import wepy from '@wepy/core';
import { getSearchList, getGoodsUrl } from '../common/api' import { getSearchList, getGoodsUrl } from '../common/api';
let page = 1; let page = 1;
wepy.page({ wepy.page({
data: { data: {
list:[], list: [],
isDone:false, isDone: false,
isLoading:false, isLoading: false,
showLoading:false, showLoading: false,
value:'' value: ''
}, },
methods:{ methods: {
setValue(event) { setValue(event) {
this.value = event.$wx.detail || ''; this.value = event.$wx.detail || '';
}, },
...@@ -53,23 +53,22 @@ ...@@ -53,23 +53,22 @@
getList() { getList() {
this.isLoading = true; this.isLoading = true;
this.isDone = false; this.isDone = false;
getSearchList({keyword:this.value,page:page}).then(data=>{ getSearchList({keyword: this.value, page: page}).then(data => {
this.isLoading = false; this.isLoading = false;
if(!data.hasMore) { if (!data.hasMore) {
this.isDone = true; this.isDone = true;
} }
this.list = [...this.list,...data.items]; this.list = [...this.list, ...data.items];
}).catch(() => {
}).catch(()=>{
this.isLoading = false; this.isLoading = false;
}); });
}, },
toJingdong(event) { toJingdong(event) {
const item = event.$wx.currentTarget.dataset.item; const item = event.$wx.currentTarget.dataset.item;
if(item === undefined) return; if (item === undefined) return;
if(this.showLoading) return; if (this.showLoading) return;
this.showLoading = true; this.showLoading = true;
getGoodsUrl({skuId:item.sourceId,couponUrl:item.couponUrl||null}).then(data=>{ getGoodsUrl({skuId: item.sourceId, couponUrl: item.couponUrl || null}).then(data => {
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', appId: 'wx91d27dbf599dff74',
path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(data), // 跳转小程序的路径 path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(data), // 跳转小程序的路径
...@@ -79,16 +78,16 @@ ...@@ -79,16 +78,16 @@
} }
}); });
this.showLoading = false; this.showLoading = false;
}).catch(()=>{ }).catch(() => {
this.showLoading = false; this.showLoading = false;
}) });
} }
}, },
onReachBottom() { onReachBottom() {
if(this.isDone) return; if (this.isDone) return;
page++; page++;
this.getList(); this.getList();
}, }
}); });
</script> </script>
<config> <config>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment