|
|
@@ -3,7 +3,9 @@ const util = require("../../utils/util.js"); |
|
|
|
const Http = require("../../utils/HttpBasics"); |
|
|
|
const config = require("../../config/config"); |
|
|
|
const imgurl = require("../../utils/imgurl"); |
|
|
|
const { alipay } = require("../../utils/imgurl"); |
|
|
|
const { |
|
|
|
alipay |
|
|
|
} = require("../../utils/imgurl"); |
|
|
|
let app = getApp(); |
|
|
|
Page({ |
|
|
|
data: { |
|
|
@@ -12,16 +14,16 @@ Page({ |
|
|
|
noDataFlag: false, |
|
|
|
businePageNum: 1, |
|
|
|
businessData: null, |
|
|
|
Lsit:[], |
|
|
|
Lsit: [], |
|
|
|
}, |
|
|
|
goOrder(){ |
|
|
|
goOrder() { |
|
|
|
tt.navigateTo({ |
|
|
|
url: '/pages/order/index/index', |
|
|
|
success: (res) => { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
fail: (res) => { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}); |
|
|
|
}, |
|
|
@@ -60,8 +62,8 @@ Page({ |
|
|
|
let data = res.data.list |
|
|
|
data.map(item => { |
|
|
|
tempArr.push(item.id) |
|
|
|
|
|
|
|
item.discount = (((item.salePriceStr*1)/(item.priceStr*1))*10).toFixed(1) |
|
|
|
|
|
|
|
item.discount = (((item.salePriceStr * 1) / (item.priceStr * 1)) * 10).toFixed(1) |
|
|
|
}) |
|
|
|
if (this.data.businePageNum > 1) { |
|
|
|
this.setData({ |
|
|
@@ -122,7 +124,7 @@ Page({ |
|
|
|
let data = res.data.list |
|
|
|
data.map(item => { |
|
|
|
tempArr.push(item.id) |
|
|
|
item.discount = (((item.salePriceStr*1)/(item.priceStr*1))*10).toFixed(1) |
|
|
|
item.discount = (((item.salePriceStr * 1) / (item.priceStr * 1)) * 10).toFixed(1) |
|
|
|
}) |
|
|
|
if (this.data.businePageNum > 1) { |
|
|
|
this.setData({ |
|
|
@@ -168,7 +170,6 @@ Page({ |
|
|
|
|
|
|
|
//获取券列表的价格和库存(列表接口有缓存通过这个来获取) str 列表数组里面的所有id |
|
|
|
getPriceAndStock(str) { |
|
|
|
|
|
|
|
console.log(str); |
|
|
|
Http.get({ |
|
|
|
url: config.api.batchCouponPriceAndStock, |
|
|
@@ -210,7 +211,8 @@ Page({ |
|
|
|
}) |
|
|
|
}, |
|
|
|
onLoad: function (options) { |
|
|
|
app.globalData.ifCongPh = 1//固定写法 放在指定要手机号授权框出现 |
|
|
|
//固定写法 放在指定要手机号授权框出现 |
|
|
|
// app.globalData.ifCongPh = 1 |
|
|
|
this.getCouponChannelList() |
|
|
|
}, |
|
|
|
onReachBottom: function () { |
|
|
@@ -219,7 +221,7 @@ Page({ |
|
|
|
that.setData({ |
|
|
|
businePageNum: that.data.businePageNum + 1 |
|
|
|
}); |
|
|
|
console.log("加载更多页数" + that.data.page,); |
|
|
|
console.log("加载更多页数" + that.data.page, ); |
|
|
|
console.log("加载更多key" + that.data.code); |
|
|
|
this.getCouponChannelList(0) |
|
|
|
}, |