作者 wangxuyu

换电脑前上传

... ... @@ -338,7 +338,7 @@ input, textarea {
-moz-osx-font-smoothing: grayscale;
}
.icon-aaa::before{
content: "\e605"
content: "\e605"
}
.icon-vip:before {
content: "\e62f";
... ...
... ... @@ -2,654 +2,654 @@
const app = getApp();
const WxParse = require('../../../wxParse/wxParse/wxParse.js');
Page({
/**
* 页面的初始数据
*/
data: {
imgUrl: app.globalData.imgUrl,
shoucang: false,
active: true,
show: false,
shows: false,
id: 0,
goods: [],
ids: [],
idss: [],
status: 0,
cart_count: 0,
skuid: '',
num: 1,
id_arr: [],
gPrice: 0,
collocation: [],
goods_star: 1,
star_arr: [],
commentCount: 0,
favorite: 0,
totalPrice: 0,
is_group: 0,
day: 0,
hour: 0,
minute: 0,
second: 0,
skuid_arr: [],
skuid_price: 0,
old_skuid_price: 0,
vip_skuid_price: 0,
yyhTop: 0,
basicInfo: false,
one: 11,
two: 22,
statestatus: 0,
groupList: [],
yesno: false,
stock:0,
is_vip:0,
string:'',
gggPrice: null
},
//进入评论详情
go_comment_detail(e){
var id = e.currentTarget.dataset.id
wx.navigateTo({
url: '../user_comment_detail/user_comment_detail?id='+id,
/**
* 页面的初始数据
*/
data: {
imgUrl: app.globalData.imgUrl,
shoucang: false,
active: true,
show: false,
shows: false,
id: 0,
goods: [],
ids: [],
idss: [],
status: 0,
cart_count: 0,
skuid: '',
num: 1,
id_arr: [],
gPrice: 0,
collocation: [],
goods_star: 1,
star_arr: [],
commentCount: 0,
favorite: 0,
totalPrice: 0,
is_group: 0,
day: 0,
hour: 0,
minute: 0,
second: 0,
skuid_arr: [],
skuid_price: 0,
old_skuid_price: 0,
vip_skuid_price: 0,
yyhTop: 0,
basicInfo: false,
one: 11,
two: 22,
statestatus: 0,
groupList: [],
yesno: false,
stock: 0,
is_vip: 0,
string: '',
gggPrice: null
},
//进入评论详情
go_comment_detail(e) {
var id = e.currentTarget.dataset.id
wx.navigateTo({
url: '../user_comment_detail/user_comment_detail?id=' + id,
})
},
//进入基本参数
jumpBasicInfo() {
this.setData({
basicInfo: true
})
},
//进入评论列表
jump_user_comment(e) {
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '../user_comment/user_comment?id=' + this.data.id
})
},
//跳转至建议搭配商品详情
jump_collocation_detail(e) {
let id = e.currentTarget.dataset.jid;
console.log(id)
this.setData({
id: id
})
wx.pageScrollTo({
scrollTop: 0,
duration: 0
})
this.fetchGoods()
},
//减少数量
dec_num() {
var num = this.data.num;
if (num <= 1) {
return;
} else {
num--
}
this.setData({
num: num
});
this.totalPrice()
},
//增加数量
add_num() {
var num = this.data.num;
num++
this.setData({
num: num
});
this.totalPrice();
},
//总价格
totalPrice() {
var that = this
var total = that.data.goods.info.price * that.data.num
that.setData({
totalPrice: total
})
},
//点击收藏
collection_true(e) {
let id = e.currentTarget.dataset.id
let that = this
let url = '/wxapp/product/setFavorites?id=' + id
let params = {
id: id
}
app.post(url).then(r => {
if (r.code == 1) {
wx.showToast({
title: r.msg,
icon: 'none'
})
},
//进入基本参数
jumpBasicInfo() {
this.setData({
basicInfo: true
})
},
//进入评论列表
jump_user_comment(e) {
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '../user_comment/user_comment?id=' + this.data.id
})
},
//跳转至建议搭配商品详情
jump_collocation_detail(e) {
let id = e.currentTarget.dataset.jid;
console.log(id)
this.setData({
id: id
})
wx.pageScrollTo({
scrollTop: 0,
duration:0
})
this.fetchGoods()
},
//减少数量
dec_num() {
var num = this.data.num;
if (num <= 1) {
return;
} else {
num--
}
this.setData({
num: num
});
this.totalPrice()
},
//增加数量
add_num() {
var num = this.data.num;
num++
this.setData({
num: num
});
this.totalPrice();
},
//总价格
totalPrice() {
var that = this
var total = that.data.goods.info.price * that.data.num
that.setData({
totalPrice: total
})
},
//点击收藏
collection_true(e) {
let id = e.currentTarget.dataset.id
let that = this
let url = '/wxapp/product/setFavorites?id=' + id
let params = {
id: id
}
app.post(url).then(r => {
if (r.code == 1) {
wx.showToast({
title: r.msg,
icon: 'none'
})
that.fetchGoods();
}
})
},
//促销进商品详情
jump_goodsDetial2(e) {
wx.navigateTo({
url: '../goodsDetial2/goodsDetial2?id=' + e.currentTarget.dataset.id
})
},
//加购筛选
changeIds(e) {
let t = this;
let goods = t.data.goods;
let new_arr = t.data.skuid_arr;
let listAll = t.data.goods.attr.attr_sku;
let list = listAll[e.currentTarget.dataset.parent].item;
let x = e.currentTarget.dataset.index;
let stock=t.data.stock
// 当前点击Id
let nowId = e.currentTarget.dataset.gid;
//当前点击value
let nowValue = e.currentTarget.dataset.item;
// 父级索引
let parent = e.currentTarget.dataset.parent;
// 子集索引
let nowIndex = e.currentTarget.dataset.index;
// 当前可否多选
let is_checkMore = false
let foo = new_arr.indexOf(nowId)
if (foo > -1) {
new_arr.splice(foo, 1)
} else {
goods.attr.attr_sku.forEach(function(ele, indexxxx) {
if (indexxxx == parent) {
for (let i = 0; i < ele.item.length; i++) {
let havId = goods.attr.attr_sku[indexxxx].item[i].id
let have = new_arr.indexOf(havId)
if (have > -1) {
new_arr.splice(have, 1)
}
}
}
})
}
// 当前点击父级值
let tempArry = JSON.parse(JSON.stringify(this.data.goods.attr.attr_sku[parent]));
// let tempArry=this.data.goods.attr.attr_sku[parent]
!tempArry.chooseIndex ? tempArry.chooseIndex = [] : '';
!tempArry.chooseValue ? tempArry.chooseValue = [] : '';
// 是否多选
if (is_checkMore) {} else {
tempArry.chooseValue.pop();
tempArry.chooseValue.push(nowValue);
tempArry.chooseIndex.pop();
tempArry.chooseIndex.push(nowId);
for (let obj of tempArry.item) {
obj.t = false
}
tempArry.item[nowIndex].t = true;
}
t.data.goods.attr.attr_sku[parent] = tempArry;
t.setData({
goods: t.data.goods
})
// let goods = t.data.goods;
let sys_attrprice = goods.sys_attrprice;
// let new_arr = [];
let new_arr_item = [];
let str = ''
let skuid = 0
let skuid_price = 0
let old_skuid_price = 0
let vip_skuid_price = 0
goods.attr.attr_sku.forEach(function(ele, indexx) {
if (indexx == parent) {
new_arr = new_arr.concat(ele.chooseIndex);
}
})
new_arr = new_arr.sort()
str = new_arr.join('_');
console.log(111)
console.log(str)
new_arr_item = new_arr_item.join(',');
new_arr_item = new_arr_item.replace(/,/g, " ");
var string = ''
var gggPrice = null
for (let i in sys_attrprice) {
if (i == str) {
skuid = sys_attrprice[i].skuid
skuid_price = sys_attrprice[i].price
old_skuid_price = sys_attrprice[i].old_price
vip_skuid_price = sys_attrprice[i].vip_price
stock = sys_attrprice[i].stock
string = sys_attrprice[i].sku_values
}
}
if(that.data.is_vip==1){
gggPrice = vip_skuid_price
} else {
gggPrice = old_skuid_price
}
this.setData({
id_arr: new_arr,
idss: new_arr,
skuid: skuid,
skuid_price: skuid_price,
old_skuid_price: old_skuid_price,
vip_skuid_price: vip_skuid_price,
skuid_arr: new_arr,
ids: new_arr_item,
stock:stock,
string: string,
gggPrice: gggPrice
});
},
//关闭弹窗
close_mask_cart() {
this.setData({
show: false
});
},
close_mask_info() {
this.setData({
basicInfo: false
});
},
close_mask_carts() {
this.setData({
shows: false
});
},
//点击我知道了
iKnow() {
this.setData({
basicInfo: false
});
},
//去结算
get_settle() {
if (isNaN(this.data.minute)) {
wx.showToast({
title: '活动已经结束',
icon: 'none'
})
return;
} else {
this.setData({
shows: true
});
}
},
//渲染是不是会员
fetchUser(){
let url = '/wxapp/user/index'
let that=this
app.post(url).then(res=>{
if(res.code==1){
that.setData({
is_vip:res.data.user.is_vip
})
that.fetchGoods()
}
})
},
//根据id获取内容
fetchGoods() {
let url = '/wxapp/product/getProductInfo';
// let goods_star=1;
let params = {
id: this.data.id
};
let that = this
let stock=null
let string = null
app.post(url, params).then(r => {
console.log(r);
WxParse.wxParse('content', 'html', r.data.info.content, this, 5);
for (let i = 0; i < r.data.attr.attr_sku.length; i++) {
for (let x = 0; x < r.data.attr.attr_sku[i].item.length; x++) {
r.data.attr.attr_sku[i].item[x].t = false;
}
}
let comment = r.data.comment
comment.forEach(function(ele, index) {
ele.stars_arr = []
for (let i = 1; i < ele.goods_stars + 1; i++) {
ele.stars_arr.push(i);
}
})
let arr = []
let skuid = 0
let skuid_price = 0
let old_skuid_price = 0
let vip_skuid_price = 0
r.data.attr.attr_sku.forEach(function(ele, index) {
ele.item[0].t = true;
arr.push(ele.item[0].id)
})
arr = arr.sort()
let str = arr.join('_');
let sys_attrprice = r.data.sys_attrprice
for (let i in sys_attrprice) {
if (i == str) {
skuid = sys_attrprice[i].skuid
skuid_price = sys_attrprice[i].price
old_skuid_price = sys_attrprice[i].old_price
vip_skuid_price = sys_attrprice[i].vip_price
stock = sys_attrprice[i].stock
string =sys_attrprice[i].sku_values
}
}
var gggPrice = null
if(that.data.is_vip==1){
gggPrice = vip_skuid_price
}else{
gggPrice = old_skuid_price
}
r.data.comment.forEach(function(ele, index) {
that.setData({
goods_star: ele.goods_stars
})
});
r.data.comment.forEach(function(ele, index) {
ele.create_time = app.timeFormate(ele.create_time, 'YYMMDD');
});
console.log(r.data.vips.cashback_price)
r.data.vips.cashback_price +='0'
r.data.vips.cashback_price = r.data.vips.cashback_price.substr(0, 4)
var zuihoujiage = ''
if (that.data.is_vip == 1) {
zuihoujiage = r.data.info.vip_price
} else {
zuihoujiage = r.data.info.price
}
if (r.data.groupType) {
console.log('团购')
var days = ''
var hours = ''
var minutes = ''
var seconds = ''
var percent = 0
that.fetchGoods();
}
})
},
//促销进商品详情
jump_goodsDetial2(e) {
wx.navigateTo({
url: '../goodsDetial2/goodsDetial2?id=' + e.currentTarget.dataset.id
})
},
//加购筛选
changeIds(e) {
let t = this;
let goods = t.data.goods;
let new_arr = t.data.skuid_arr;
let listAll = t.data.goods.attr.attr_sku;
let list = listAll[e.currentTarget.dataset.parent].item;
let x = e.currentTarget.dataset.index;
let stock = t.data.stock
// 当前点击Id
let nowId = e.currentTarget.dataset.gid;
//当前点击value
let nowValue = e.currentTarget.dataset.item;
// 父级索引
let parent = e.currentTarget.dataset.parent;
// 子集索引
let nowIndex = e.currentTarget.dataset.index;
// 当前可否多选
let is_checkMore = false
let foo = new_arr.indexOf(nowId)
if (foo > -1) {
new_arr.splice(foo, 1)
} else {
goods.attr.attr_sku.forEach(function(ele, indexxxx) {
if (indexxxx == parent) {
for (let i = 0; i < ele.item.length; i++) {
let havId = goods.attr.attr_sku[indexxxx].item[i].id
let have = new_arr.indexOf(havId)
if (have > -1) {
new_arr.splice(have, 1)
}
}
}
})
}
// 当前点击父级值
let tempArry = JSON.parse(JSON.stringify(this.data.goods.attr.attr_sku[parent]));
// let tempArry=this.data.goods.attr.attr_sku[parent]
!tempArry.chooseIndex ? tempArry.chooseIndex = [] : '';
!tempArry.chooseValue ? tempArry.chooseValue = [] : '';
// 是否多选
if (is_checkMore) {} else {
tempArry.chooseValue.pop();
tempArry.chooseValue.push(nowValue);
tempArry.chooseIndex.pop();
tempArry.chooseIndex.push(nowId);
for (let obj of tempArry.item) {
obj.t = false
}
tempArry.item[nowIndex].t = true;
}
t.data.goods.attr.attr_sku[parent] = tempArry;
t.setData({
goods: t.data.goods
})
// let goods = t.data.goods;
let sys_attrprice = goods.sys_attrprice;
// let new_arr = [];
let new_arr_item = [];
let str = ''
let skuid = 0
let skuid_price = 0
let old_skuid_price = 0
let vip_skuid_price = 0
goods.attr.attr_sku.forEach(function(ele, indexx) {
if (indexx == parent) {
new_arr = new_arr.concat(ele.chooseIndex);
}
})
new_arr = new_arr.sort()
str = new_arr.join('_');
console.log(111)
console.log(str)
new_arr_item = new_arr_item.join(',');
new_arr_item = new_arr_item.replace(/,/g, " ");
var string = ''
var gggPrice = null
for (let i in sys_attrprice) {
if (i == str) {
skuid = sys_attrprice[i].skuid
skuid_price = sys_attrprice[i].price
old_skuid_price = sys_attrprice[i].old_price
vip_skuid_price = sys_attrprice[i].vip_price
stock = sys_attrprice[i].stock
string = sys_attrprice[i].sku_values
}
}
if (that.data.is_vip == 1) {
gggPrice = vip_skuid_price
} else {
gggPrice = old_skuid_price
}
this.setData({
id_arr: new_arr,
idss: new_arr,
skuid: skuid,
skuid_price: skuid_price,
old_skuid_price: old_skuid_price,
vip_skuid_price: vip_skuid_price,
skuid_arr: new_arr,
ids: new_arr_item,
stock: stock,
string: string,
gggPrice: gggPrice
});
},
//关闭弹窗
close_mask_cart() {
this.setData({
show: false
});
},
close_mask_info() {
this.setData({
basicInfo: false
});
},
close_mask_carts() {
this.setData({
shows: false
});
},
//点击我知道了
iKnow() {
this.setData({
basicInfo: false
});
},
//去结算
get_settle() {
if (isNaN(this.data.minute)) {
wx.showToast({
title: '活动已经结束',
icon: 'none'
})
return;
} else {
this.setData({
shows: true
});
}
},
//渲染是不是会员
fetchUser() {
let url = '/wxapp/user/index'
let that = this
app.post(url).then(res => {
if (res.code == 1) {
that.setData({
is_vip: res.data.user.is_vip
})
that.fetchGoods()
}
})
},
//根据id获取内容
fetchGoods() {
let url = '/wxapp/product/getProductInfo';
// let goods_star=1;
let params = {
id: this.data.id
};
let that = this
let stock = null
let string = null
app.post(url, params).then(r => {
console.log(r);
WxParse.wxParse('content', 'html', r.data.info.content, this, 5);
for (let i = 0; i < r.data.attr.attr_sku.length; i++) {
for (let x = 0; x < r.data.attr.attr_sku[i].item.length; x++) {
r.data.attr.attr_sku[i].item[x].t = false;
}
}
let comment = r.data.comment
comment.forEach(function(ele, index) {
ele.stars_arr = []
for (let i = 1; i < ele.goods_stars + 1; i++) {
ele.stars_arr.push(i);
}
})
let arr = []
let skuid = 0
let skuid_price = 0
let old_skuid_price = 0
let vip_skuid_price = 0
r.data.attr.attr_sku.forEach(function(ele, index) {
ele.item[0].t = true;
arr.push(ele.item[0].id)
})
arr = arr.sort()
let str = arr.join('_');
let sys_attrprice = r.data.sys_attrprice
for (let i in sys_attrprice) {
if (i == str) {
skuid = sys_attrprice[i].skuid
skuid_price = sys_attrprice[i].price
old_skuid_price = sys_attrprice[i].old_price
vip_skuid_price = sys_attrprice[i].vip_price
stock = sys_attrprice[i].stock
string = sys_attrprice[i].sku_values
}
}
var gggPrice = null
if (that.data.is_vip == 1) {
gggPrice = vip_skuid_price
} else {
gggPrice = old_skuid_price
}
r.data.comment.forEach(function(ele, index) {
that.setData({
goods_star: ele.goods_stars
})
});
r.data.comment.forEach(function(ele, index) {
ele.create_time = app.timeFormate(ele.create_time, 'YYMMDD');
});
console.log(r.data.vips.cashback_price)
r.data.vips.cashback_price += '0'
r.data.vips.cashback_price = r.data.vips.cashback_price.substr(0, 4)
var zuihoujiage = ''
if (that.data.is_vip == 1) {
zuihoujiage = r.data.info.vip_price
} else {
zuihoujiage = r.data.info.price
}
if (r.data.groupType) {
console.log('团购')
var days = ''
var hours = ''
var minutes = ''
var seconds = ''
var percent = 0
function time() {
var cut_time = r.data.groupType.count_down_time
days = Math.floor((cut_time) / (60 * 60 * 24));
hours = Math.floor((cut_time) / (60 * 60)) % 24;
minutes = Math.floor((cut_time) / (60)) % 60;
seconds = cut_time % 60;
percent = Math.floor(r.data.info.group_number * 100 / r.data.info.group_min_number)
}
time();
setInterval(time, 1000);
that.setData({
day: days,
hour: hours,
minute: minutes,
second: seconds,
percent: percent,
goods: r.data,
gPrice: zuihoujiage,
gggPrice: gggPrice,
collocation: r.data.collocation,
comment: r.data.comment,
skuid: skuid,
is_group: r.data.info.group_min_number,
id_arr: arr,
skuid_arr: arr,
yesno: true,
stock: stock,
string: string
});
} else {
console.log("不是团购")
that.setData({
yesno: false,
goods: r.data,
gPrice: zuihoujiage,
gggPrice: gggPrice,
collocation: r.data.collocation,
comment: r.data.comment,
favorite: r.data.is_favorite,
skuid_price: skuid_price,
old_skuid_price: old_skuid_price,
vip_skuid_price: vip_skuid_price,
skuid: skuid,
skuid_arr: arr,
id_arr: arr,
stock: stock,
string: string
});
}
});
},
function time() {
var cut_time = r.data.groupType.count_down_time
days = Math.floor((cut_time) / (60 * 60 * 24));
hours = Math.floor((cut_time) / (60 * 60)) % 24;
minutes = Math.floor((cut_time) / (60)) % 60;
seconds = cut_time % 60;
percent = Math.floor(r.data.info.group_number * 100 / r.data.info.group_min_number)
}
time();
setInterval(time, 1000);
that.setData({
day: days,
hour: hours,
minute: minutes,
second: seconds,
percent: percent,
goods: r.data,
gPrice: zuihoujiage,
gggPrice: gggPrice,
collocation: r.data.collocation,
comment: r.data.comment,
skuid: skuid,
is_group: r.data.info.group_min_number,
id_arr: arr,
skuid_arr: arr,
yesno: true,
stock: stock,
string: string
});
} else {
console.log("不是团购")
that.setData({
yesno: false,
goods: r.data,
gPrice: zuihoujiage,
gggPrice: gggPrice,
collocation: r.data.collocation,
comment: r.data.comment,
favorite: r.data.is_favorite,
skuid_price: skuid_price,
old_skuid_price: old_skuid_price,
vip_skuid_price: vip_skuid_price,
skuid: skuid,
skuid_arr: arr,
id_arr: arr,
stock: stock,
string: string
});
}
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
var that = this
// var query = wx.createSelectorQuery();
// var offset = query.select('.itme_list5');
// var yyh = query.select('#yyh');
// var top=0
// yyh.boundingClientRect(function(res){
// top=res.top
// that.setData({
// yyhTop: top
// });
// }).exec()
that.setData({
id: options.id,
})
this.fetchUser()
},
// 返回上一页
get_back() {
wx.navigateBack({})
},
// 跳转图文食谱
get_recipe() {
wx.navigateTo({
url: '../production_steps/production_steps?id=' + this.data.id,
})
},
// 跳转购物车
get_car() {
this.setData({
show: true
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
var that = this
// var query = wx.createSelectorQuery();
// var offset = query.select('.itme_list5');
// var yyh = query.select('#yyh');
// var top=0
// yyh.boundingClientRect(function(res){
// top=res.top
// that.setData({
// yyhTop: top
// });
// }).exec()
that.setData({
id: options.id,
//隐藏mask
hide_mask(e) {
var that = this
if (that.data.skuid != '') {
that.setData({
show: false
});
let url = '/wxapp/cart/addCart'
let params = {
skuid: that.data.skuid,
num: that.data.num
}
if (that.data.stock > 0) {
if (that.data.num <= e.currentTarget.dataset.limit || e.currentTarget.dataset.limit == 0) {
app.post(url, params).then(r => {
if (r.code == 1) {
wx.showToast({
title: '成功加入购物车',
icon: 'none'
})
that.fetchGoods();
} else {
wx.showToast({
title: r.msg,
icon: 'none'
})
}
});
} else {
wx.showToast({
title: '限购' + e.currentTarget.dataset.limit + '件',
icon: 'none'
})
return;
}
} else {
console.log(454545)
wx.showToast({
title: '已经售罄',
icon: 'none'
})
}
} else {
console.log(that.data.skuid + "shangpinzuhe")
wx.showToast({
title: '请先选择商品属性组合',
icon: 'none'
})
}
},
hide_masks() {
var that = this
var minimum = that.data.goods.minimum_price
var pp = that.data.gPrice
console.log(pp)
pp = Math.round(pp)
console.log(pp)
var gPrice = that.data.num * pp
console.log(gPrice)
if (that.data.skuid != '') {
that.setData({
shows: false
});
var str = ''
str = that.data.id_arr.join(',');
if (gPrice >= minimum) {
if (that.data.stock > 0) {
if (that.data.goods.info.limit_numer == that.data.num || that.data.goods.info.limit_numer == 0) {
if (that.data.id_arr.length > 1) {
if (that.data.is_group == 0) {
wx.navigateTo({
url: '../../my/settle_account/settle_account?ids=' + that.data.skuid + '&gid=' + that.data.id + '&num=' + that.data.num + '&gPrice=' + gPrice
})
this.fetchUser()
},
// 返回上一页
get_back() {
wx.navigateBack({})
},
// 跳转图文食谱
get_recipe() {
} else {
wx.navigateTo({
url: '../production_steps/production_steps?id=' + this.data.id,
url: '../../my/settle_account/settle_account?ids=' + that.data.skuid + '&gid=' + that.data.id + '&num=' + that.data.num + '&gPrice=' + gPrice + '&is_group=' + that.data.is_group
})
},
// 跳转购物车
get_car() {
this.setData({
show: true
});
},
//隐藏mask
hide_mask(e) {
var that = this
if (that.data.skuid != '') {
that.setData({
show: false
});
let url = '/wxapp/cart/addCart'
let params = {
skuid: that.data.skuid,
num: that.data.num
}
if(that.data.stock>0){
if (that.data.num <= e.currentTarget.dataset.limit || e.currentTarget.dataset.limit == 0) {
app.post(url, params).then(r => {
if (r.code == 1) {
wx.showToast({
title: '成功加入购物车',
icon: 'none'
})
that.fetchGoods();
} else {
wx.showToast({
title: r.msg,
icon: 'none'
})
}
});
} else {
wx.showToast({
title: '限购' + e.currentTarget.dataset.limit + '件',
icon: 'none'
})
return;
}
}else{
console.log(454545)
wx.showToast({
title: '已经售罄',
icon:'none'
})
}
} else {
console.log(that.data.skuid + "shangpinzuhe")
wx.showToast({
title: '请先选择商品属性组合',
icon: 'none'
})
}
},
hide_masks() {
var that = this
var minimum=that.data.goods.minimum_price
var pp=that.data.gPrice
console.log(pp)
pp = Math.round(pp)
console.log(pp)
var gPrice = that.data.num * pp
console.log(gPrice)
if (that.data.skuid != '') {
that.setData({
shows: false
});
var str = ''
str = that.data.id_arr.join(',');
if(gPrice>=minimum){
if (that.data.stock > 0) {
if (that.data.goods.info.limit_numer == that.data.num || that.data.goods.info.limit_numer == 0) {
if (that.data.id_arr.length > 1) {
if (that.data.is_group == 0) {
wx.navigateTo({
url: '../../my/settle_account/settle_account?ids=' + that.data.skuid + '&gid=' + that.data.id + '&num=' + that.data.num + '&gPrice=' + gPrice
})
} else {
wx.navigateTo({
url: '../../my/settle_account/settle_account?ids=' + that.data.skuid + '&gid=' + that.data.id + '&num=' + that.data.num + '&gPrice=' + gPrice + '&is_group=' + that.data.is_group
})
}
}
} else {
wx.showToast({
title: '限购' + that.data.goods.info.limit_numer + '件',
icon: 'none'
})
return;
}
} else {
console.log(8989)
wx.showToast({
title: '已经售罄',
icon: 'none'
})
return;
}
}else{
wx.showToast({
title: '商品实付'+minimum+'元起送',
icon:'none'
})
}
} else {
wx.showToast({
title: '请先选择商品属性组合',
icon: 'none'
})
}
},
//attr选择规格
chooseStandard() {
this.setData({
show: true
});
},
//跳至图文详情
jump_detail() {
this.setData({
active: false,
statestatus: 22
});
let top = this.data.yyhTop
// wx.pageScrollTo({
// scrollTop: top,
// duration: 300
// })
},
jump_goods() {
this.setData({
active: true,
statestatus: 11
});
// wx.pageScrollTo({
// scrollTop: 0,
// duration: 300
// })
},
//收藏
collection() {
this.setData({
shoucang: !this.data.shoucang
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
}
}
} else {
wx.showToast({
title: '限购' + that.data.goods.info.limit_numer + '件',
icon: 'none'
})
return;
}
} else {
console.log(8989)
wx.showToast({
title: '已经售罄',
icon: 'none'
})
return;
}
} else {
wx.showToast({
title: '商品实付' + minimum + '元起送',
icon: 'none'
})
}
} else {
wx.showToast({
title: '请先选择商品属性组合',
icon: 'none'
})
}
},
//attr选择规格
chooseStandard() {
this.setData({
show: true
});
},
//跳至图文详情
jump_detail() {
this.setData({
active: false,
statestatus: 22
});
let top = this.data.yyhTop
// wx.pageScrollTo({
// scrollTop: top,
// duration: 300
// })
},
jump_goods() {
this.setData({
active: true,
statestatus: 11
});
// wx.pageScrollTo({
// scrollTop: 0,
// duration: 300
// })
},
//收藏
collection() {
this.setData({
shoucang: !this.data.shoucang
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.fetchUser()
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.fetchUser()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
return {
path: '/pages/start/start?share_id=' + app.globalData.user_id,
imgUrl: '',
title: ''
}
}
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
return {
path: '/pages/start/start?share_id=' + app.globalData.user_id,
imgUrl: '',
title: ''
}
}
})
\ No newline at end of file
... ...
const a = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
imgUrl: a.globalData.imgUrl
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
if (options.share_id){
this.setData({
share_id: options.share_id
})
}
this.getKey();
},
// getSessionKey
getKey() {
let url = '/wxapp/public/getSessionKey',t = this;
wx.login({
success: function (res) {
let params = {
code: res.code
};
a.post(url,params,true).then(r=>{
t.setData({
sessionKey: r.data.session_key,
openId: r.data.openid,
unionid: r.data.unionid,
})
wx.setStorageSync('openId', r.data.openid);
wx.setStorageSync('session_key', r.data.session_key);
wx.setStorageSync('unionid', r.data.unionid);
})
},
fail: function (res) { },
complete: function (res) { },
})
},
getUserInfo(e) {
let url = '/wxapp/public/login',params = {
session_key: this.data.sessionKey,
encrypted_data: e.detail.encryptedData,
iv: e.detail.iv,
fromUserId: this.data.share_id ? this.data.share_id:'0'
};
a.post(url,params).then(r=>{
console.log(r)
if(r.code==1){
wx.setStorageSync('token', r.data.token);
a.globalData.user_id = r.data.user_id
console.log(r.data);
wx.switchTab({
url: '/pages/index/index'
})
}else{
wx.showToast({
title: '网络错误',
icon:'none'
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
/**
* 页面的初始数据
*/
data: {
imgUrl: a.globalData.imgUrl
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(options)
if (options.share_id) {
this.setData({
share_id: options.share_id
})
}
this.getKey();
},
// getSessionKey
getKey() {
let url = '/wxapp/public/getSessionKey',
t = this;
wx.login({
success: function(res) {
let params = {
code: res.code
};
a.post(url, params, true).then(r => {
t.setData({
sessionKey: r.data.session_key,
openId: r.data.openid,
unionid: r.data.unionid,
})
wx.setStorageSync('openId', r.data.openid);
wx.setStorageSync('session_key', r.data.session_key);
wx.setStorageSync('unionid', r.data.unionid);
})
},
fail: function(res) {},
complete: function(res) {},
})
},
getUserInfo(e) {
let url = '/wxapp/public/login',
params = {
session_key: this.data.sessionKey,
encrypted_data: e.detail.encryptedData,
iv: e.detail.iv,
fromUserId: this.data.share_id ? this.data.share_id : '0'
};
a.post(url, params).then(r => {
console.log(r)
if (r.code == 1) {
wx.setStorageSync('token', r.data.token);
a.globalData.user_id = r.data.user_id
console.log(r.data);
wx.switchTab({
url: '/pages/index/index'
})
} else {
wx.showToast({
title: '网络错误',
icon: 'none'
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
<!--pages/vip/vip_index/vip_index.wxml-->
<view class='page {{mask||back_shop?"active":""}}'>
<view class='vip_one {{user.user.is_vip==1?"":"active"}}'>
<!-- <image src='../../imgs/vip_index.png' class='vip_one_image'></image> -->
<view class='banner_top'>
<view class='iconfont icon-fanhui' catchtap='get_my'></view>
<view class='hello'>会员中心</view>
<view class='charge_code' catchtap="cancel_mask">省钱计算器</view>
</view>
<view class='vip_one_center'>
<view class='vip_box {{user.user.is_vip==1?"":"active"}}'>
<view class='vip_avatar'>
<image src='{{user.user.avatar}}'></image>
</view>
<view class='vip_name'>
<view class='vip_name_one'>{{user.user.user_nickname}}</view>
<view>
<view class='vip_name_two' wx:if='{{user.user.is_vip==1}}'>HIGO会员</view>
<view class='vip_name_two' wx:else>普通会员</view>
</view>
</view>
<view class='vipvipvip'>
<view>
<text wx:if='{{user.user.is_vip==1}}'>{{user.vip_expire_time}}天</text>
<text wx:else>尚未开通</text>
</view>
<view class='vip_time'>会员有效期</view>
</view>
</view>
<view class='vip_line'></view>
<view class='vip_upgrade'>
<text>升级超级会员\t\t每单返{{user.cashback}}%现金\t\t更享{{user.slide.length}}大特权</text>
</view>
</view>
<view class='vip_one {{user.user.is_vip==1?"":"active"}}'>
<!-- <image src='../../imgs/vip_index.png' class='vip_one_image'></image> -->
<view class='banner_top'>
<view class='iconfont icon-fanhui' catchtap='get_my'></view>
<view class='hello'>会员中心</view>
<view class='charge_code' catchtap="cancel_mask">省钱计算器</view>
</view>
<view class='vip_one_center'>
<view class='vip_box {{user.user.is_vip==1?"":"active"}}'>
<view class='vip_avatar'>
<image src='{{user.user.avatar}}'></image>
</view>
<view class='bigbig {{user.user.is_vip==1?"":"active"}}'>
<view class='vip_one-bottom'>
<view class='vip_one_bottom_auto'>
<image src='{{imgUrl}}vip_left.png'></image>
<text>会员特权</text>
<image src='{{imgUrl}}vip_right.png'></image>
</view>
</view>
<view class='vip_two'>
<view class='vip_two_one' bindtap='show_back_shop' data-index='{{index}}' wx:for-index='index' wx:for='{{user.slide}}' wx:key='{{item.id}}'>
<view class='vip_two_one_icon'>
<image src='{{item.icon}}'></image>
</view>
<view class='vip_two_one_font'>{{item.title}}</view>
</view>
<view class='vip_name'>
<view class='vip_name_one'>{{user.user.user_nickname}}</view>
<view>
<view class='vip_name_two' wx:if='{{user.user.is_vip==1}}'>HIGO会员</view>
<view class='vip_name_two' wx:else>普通会员</view>
</view>
</view>
</view>
<view class='vip_three'>
<view class='vip_three_one'>
<view class='vip_three_one_left'>开通SVIP超级</view>
<view class='vip_three_one_right' bindtap='jump_detail_vip'>
<view class='wenhao'>
<image src='{{imgUrl}}wenhao.png'></image>
</view>
<view class='wenhao_right'>尊享会员说明</view>
</view>
</view>
<view class='vip_three_two'>
<view class='vip_three_two_item {{id==item.id?"active":""}}' wx:for='{{user.vips}}' wx:key='{{item.id}}' wx:for-index='index' bindtap='change_vip_id' data-id='{{item.id}}'>
<view class='trilateral' wx:if='{{id==item.id}}'>
<view class='iconfont icon-duigou'></view>
</view>
<view class='grade_vip_name'>{{item.title}}</view>
<view class='grade_vip_count'>{{item.remark}}</view>
<view class='grade_vip_price'>
<text>¥</text> {{item.sale_price}}
</view>
</view>
</view>
<view class='vipvipvip'>
<view>
<text wx:if='{{user.user.is_vip==1}}'>{{user.vip_expire_time}}天</text>
<text wx:else>尚未开通</text>
</view>
<view class='vip_time'>会员有效期</view>
</view>
<view class='vip_four' bindtap='pay_vip'>升级尊享会员,每单返{{user.cashback}}%现金</view>
</view>
<view class='vip_line'></view>
<view class='vip_upgrade'>
<text>升级超级会员\t\t每单返{{user.cashback}}%现金\t\t更享{{user.slide.length}}大特权</text>
</view>
</view>
</view>
<view class='bigbig {{user.user.is_vip==1?"":"active"}}'>
<view class='vip_one-bottom'>
<view class='vip_one_bottom_auto'>
<image src='{{imgUrl}}vip_left.png'></image>
<text>会员特权</text>
<image src='{{imgUrl}}vip_right.png'></image>
</view>
</view>
<view class='vip_two'>
<view class='vip_two_one' bindtap='show_back_shop' data-index='{{index}}' wx:for-index='index' wx:for='{{user.slide}}' wx:key='{{item.id}}'>
<view class='vip_two_one_icon'>
<image src='{{item.icon}}'></image>
</view>
<view class='vip_two_one_font'>{{item.title}}</view>
</view>
</view>
</view>
<view class='vip_three'>
<view class='vip_three_one'>
<view class='vip_three_one_left'>开通SVIP超级</view>
<view class='vip_three_one_right' bindtap='jump_detail_vip'>
<view class='wenhao'>
<image src='{{imgUrl}}wenhao.png'></image>
</view>
<view class='wenhao_right'>尊享会员说明</view>
</view>
</view>
<view class='vip_three_two'>
<view class='vip_three_two_item {{id==item.id?"active":""}}' wx:for='{{user.vips}}' wx:key='{{item.id}}' wx:for-index='index' bindtap='change_vip_id' data-id='{{item.id}}'>
<view class='trilateral' wx:if='{{id==item.id}}'>
<view class='iconfont icon-duigou'></view>
</view>
<view class='grade_vip_name'>{{item.title}}</view>
<view class='grade_vip_count'>{{item.remark}}</view>
<view class='grade_vip_price'>
<text>¥</text> {{item.sale_price}}
</view>
</view>
</view>
</view>
<view class='vip_four' bindtap='pay_vip'>升级尊享会员,每单返{{user.cashback}}%现金</view>
</view>
<!-- 省钱计算器-->
<view class='vip_mask' wx:if='{{mask}}'>
<view class='vip_mask_diceng'>
<image src='{{imgUrl}}queen_crown.png' class='queen_crown'></image>
<view class='iconfont icon-quxiao cancel_mask' bindtap='opposite_mask'></view>
<view class='vip_mask_one'>
<view class='vip_mask_one_one'>会员有效期:{{user.vip_expire_time}}天</view>
<view class='vip_mask_one_two'>会员期间曾为您节省</view>
<view class='vip_mask_one_three'>
<text>¥</text> {{user.sheng_price}}
</view>
</view>
<view class='vip_mask_two'>
<view class='vip_mask_two_item'>
<view class='vip_mask_two_item_left'>
<view class='back_price'>购物返现</view>
<view class='back_price_content'>单单返现{{user.cashback}}%无上限</view>
</view>
<view class='vip_mask_two_item_right'>¥{{user. cashback_price}}</view>
</view>
<view class='vip_mask_two_item'>
<view class='vip_mask_two_item_left'>
<view class='back_price'>会员专享红包</view>
<view class='back_price_content'>各种优惠享不停</view>
</view>
<view class='vip_mask_two_item_right'>¥0.00</view>
</view>
<view class='vip_mask_two_item'>
<view class='vip_mask_two_item_left'>
<view class='back_price'>商品会员价</view>
<view class='back_price_content'>优质商品专属优惠</view>
</view>
<view class='vip_mask_two_item_right'>¥{{user.diff_price}}</view>
</view>
</view>
<view class='vip_mask_three' bindtap='becomeMonthVip'>成为月度会员,每单返{{user.cashback}}%现金</view>
<view class='vip_mask_diceng'>
<image src='{{imgUrl}}queen_crown.png' class='queen_crown'></image>
<view class='iconfont icon-quxiao cancel_mask' bindtap='opposite_mask'></view>
<view class='vip_mask_one'>
<view class='vip_mask_one_one'>会员有效期:{{user.vip_expire_time}}天</view>
<view class='vip_mask_one_two'>会员期间曾为您节省</view>
<view class='vip_mask_one_three'>
<text>¥</text> {{user.sheng_price}}
</view>
</view>
<view class='vip_mask_two'>
<view class='vip_mask_two_item'>
<view class='vip_mask_two_item_left'>
<view class='back_price'>购物返现</view>
<view class='back_price_content'>单单返现{{user.cashback}}%无上限</view>
</view>
<view class='vip_mask_two_item_right'>¥{{user. cashback_price}}</view>
</view>
<view class='vip_mask_two_item'>
<view class='vip_mask_two_item_left'>
<view class='back_price'>会员专享红包</view>
<view class='back_price_content'>各种优惠享不停</view>
</view>
<view class='vip_mask_two_item_right'>¥0.00</view>
</view>
<view class='vip_mask_two_item'>
<view class='vip_mask_two_item_left'>
<view class='back_price'>商品会员价</view>
<view class='back_price_content'>优质商品专属优惠</view>
</view>
<view class='vip_mask_two_item_right'>¥{{user.diff_price}}</view>
</view>
</view>
<view class='vip_mask_three' bindtap='becomeMonthVip'>成为月度会员,每单返{{user.cashback}}%现金</view>
</view>
</view>
<!-- 购物返现弹框 -->
<view wx:if='{{back_shop}}'>
<view class='back_shop'>
<view class='swiper_box'>
<swiper previous-margin='80rpx' next-margin='40rpx' circular='true' display-multiple-items='1' current='{{current}}' class='swiper_banner_box' bindchange='bindChange'>
<block wx:for='{{slide}}' wx:key='{{item.id}}' wx:for-index='index'>
<swiper-item>
<view class="img_box {{current == index ? 'active': ''}}">
<image src='{{item.image}}' class="slide-image {{current == index ? 'active': ''}}"></image>
</view>
</swiper-item>
</block>
</swiper>
<view class="dots">
<block wx:for="{{slide}}" wx:key="item.id" wx:for-index='index'>
<view class="dot {{current == index ? ' active' : ''}}"></view>
</block>
</view>
</view>
<view class='exit_back_shop' bindtap='hide_back_shop'>退出</view>
</view>
<view class='back_shop'>
<view class='swiper_box'>
<swiper previous-margin='80rpx' next-margin='40rpx' circular='true' display-multiple-items='1' current='{{current}}' class='swiper_banner_box' bindchange='bindChange'>
<block wx:for='{{slide}}' wx:key='{{item.id}}' wx:for-index='index'>
<swiper-item>
<view class="img_box {{current == index ? 'active': ''}}">
<image src='{{item.image}}' class="slide-image {{current == index ? 'active': ''}}"></image>
</view>
</swiper-item>
</block>
</swiper>
<view class="dots">
<block wx:for="{{slide}}" wx:key="item.id" wx:for-index='index'>
<view class="dot {{current == index ? ' active' : ''}}"></view>
</block>
</view>
</view>
<view class='exit_back_shop' bindtap='hide_back_shop'>退出</view>
</view>
</view>
<!-- 专享客服弹框-->
<view wx:if='{{customer_service}}'>
<view class='back_shop'>
<view class='swiper_box'>
<swiper previous-margin='40rpx' next-margin='60rpx' circular='true' display-multiple-items='1' current='{{current}}' class='swiper_banner_box' bindchange='bindChange'>
<swiper-item wx:for='{{slide}}' wx:key='{{item.id}}' wx:for-index='index' class="swiper-item">
<view class="img_box {{current == index ? 'active': ''}}">
<image src='{{item.image}}' class="slide-image {{current == index ? 'active': ''}}"></image>
<view class="slide_font {{current == index ? 'active': ''}}">
<text>尊享会员</text> 每一单都可以享受5%现金返现,订单签收后,返现金额将直接存入你的余额账户,返利金额无上限。这里的字符数将控制在65字以内。
</view>
<view class="slide_fonts {{current == index ? 'active': ''}}">
<text class='slide_fonts_text'><text>温馨提示</text>\n01\t尊享会员返现金额为订单实付金额的5%\n02\t返现金额不可提现,可用于下次消费</text>
</view>
</view>
</swiper-item>
</swiper>
<view class="dots">
<block wx:for="{{slide}}" wx:key="item.id" wx:for-index='index'>
<view class="dot{{current == index ? ' active' : ''}}"></view>
</block>
</view>
</view>
<view class='exit_back_shop' bindtap='hide_customer_service'>退出</view>
</view>
<view class='back_shop'>
<view class='swiper_box'>
<swiper previous-margin='40rpx' next-margin='60rpx' circular='true' display-multiple-items='1' current='{{current}}' class='swiper_banner_box' bindchange='bindChange'>
<swiper-item wx:for='{{slide}}' wx:key='{{item.id}}' wx:for-index='index' class="swiper-item">
<view class="img_box {{current == index ? 'active': ''}}">
<image src='{{item.image}}' class="slide-image {{current == index ? 'active': ''}}"></image>
<view class="slide_font {{current == index ? 'active': ''}}">
<text>尊享会员</text> 每一单都可以享受5%现金返现,订单签收后,返现金额将直接存入你的余额账户,返利金额无上限。这里的字符数将控制在65字以内。
</view>
<view class="slide_fonts {{current == index ? 'active': ''}}">
<text class='slide_fonts_text'><text>温馨提示</text>\n01\t尊享会员返现金额为订单实付金额的5%\n02\t返现金额不可提现,可用于下次消费</text>
</view>
</view>
</swiper-item>
</swiper>
<view class="dots">
<block wx:for="{{slide}}" wx:key="item.id" wx:for-index='index'>
<view class="dot{{current == index ? ' active' : ''}}"></view>
</block>
</view>
</view>
<view class='exit_back_shop' bindtap='hide_customer_service'>退出</view>
</view>
</view>
<!-- 无门槛券弹框-->
<view wx:if='{{coupons}}'>
<view class='back_shop'>
<view class='swiper_box'>
<swiper previous-margin='40rpx' next-margin='60rpx' circular='true' display-multiple-items='1' current='{{current}}' class='swiper_banner_box' bindchange='bindChange'>
<swiper-item wx:for='{{slide}}' wx:key='{{item.id}}' wx:for-index='index' class="swiper-item">
<view class="img_box {{current == index ? 'active': ''}}">
<image src='{{item.image}}' class="slide-image {{current == index ? 'active': ''}}"></image>
<view class="slide_font {{current == index ? 'active': ''}}">
<text>尊享会员</text> 每一单都可以享受5%现金返现,订单签收后,返现金额将直接存入你的余额账户,返利金额无上限。这里的字符数将控制在65字以内。
</view>
<view class="slide_fonts {{current == index ? 'active': ''}}">
<text class='slide_fonts_text'><text>温馨提示</text>\n01\t尊享会员返现金额为订单实付金额的5%\n02\t返现金额不可提现,可用于下次消费</text>
</view>
</view>
</swiper-item>
</swiper>
<view class="dots">
<block wx:for="{{slide}}" wx:key="item.id" wx:for-index='index'>
<view class="dot{{current == index ? ' active' : ''}}"></view>
</block>
</view>
</view>
<view class='exit_back_shop' bindtap='hide_coupons'>退出</view>
</view>
<view class='back_shop'>
<view class='swiper_box'>
<swiper previous-margin='40rpx' next-margin='60rpx' circular='true' display-multiple-items='1' current='{{current}}' class='swiper_banner_box' bindchange='bindChange'>
<swiper-item wx:for='{{slide}}' wx:key='{{item.id}}' wx:for-index='index' class="swiper-item">
<view class="img_box {{current == index ? 'active': ''}}">
<image src='{{item.image}}' class="slide-image {{current == index ? 'active': ''}}"></image>
<view class="slide_font {{current == index ? 'active': ''}}">
<text>尊享会员</text> 每一单都可以享受5%现金返现,订单签收后,返现金额将直接存入你的余额账户,返利金额无上限。这里的字符数将控制在65字以内。
</view>
<view class="slide_fonts {{current == index ? 'active': ''}}">
<text class='slide_fonts_text'><text>温馨提示</text>\n01\t尊享会员返现金额为订单实付金额的5%\n02\t返现金额不可提现,可用于下次消费</text>
</view>
</view>
</swiper-item>
</swiper>
<view class="dots">
<block wx:for="{{slide}}" wx:key="item.id" wx:for-index='index'>
<view class="dot{{current == index ? ' active' : ''}}"></view>
</block>
</view>
</view>
<view class='exit_back_shop' bindtap='hide_coupons'>退出</view>
</view>
</view>
<!-- 无门槛券弹框-->
<view wx:if='{{more}}'>
<view class='back_shop'>
<view class='swiper_box'>
<swiper previous-margin='40rpx' next-margin='60rpx' circular='true' display-multiple-items='1' current='{{current}}' class='swiper_banner_box' bindchange='bindChange'>
<swiper-item wx:for='{{slide}}' wx:key='{{item.id}}' wx:for-index='index' class="swiper-item">
<view class="img_box {{current == index ? 'active': ''}}">
<image src='{{item.image}}' class="slide-image {{current == index ? 'active': ''}}"></image>
<view class="slide_font {{current == index ? 'active': ''}}">
<text>尊享会员</text> 每一单都可以享受5%现金返现,订单签收后,返现金额将直接存入你的余额账户,返利金额无上限。这里的字符数将控制在65字以内。
</view>
<view class="slide_fonts {{current == index ? 'active': ''}}">
<text class='slide_fonts_text'><text>温馨提示</text>\n01\t尊享会员返现金额为订单实付金额的5%\n02\t返现金额不可提现,可用于下次消费</text>
</view>
</view>
</swiper-item>
</swiper>
<view class="dots">
<block wx:for="{{slide}}" wx:key="item.id" wx:for-index='index'>
<view class="dot{{current == index ? ' active' : ''}}"></view>
</block>
</view>
</view>
<view class='exit_back_shop' bindtap='hide_more'>退出</view>
</view>
<view class='back_shop'>
<view class='swiper_box'>
<swiper previous-margin='40rpx' next-margin='60rpx' circular='true' display-multiple-items='1' current='{{current}}' class='swiper_banner_box' bindchange='bindChange'>
<swiper-item wx:for='{{slide}}' wx:key='{{item.id}}' wx:for-index='index' class="swiper-item">
<view class="img_box {{current == index ? 'active': ''}}">
<image src='{{item.image}}' class="slide-image {{current == index ? 'active': ''}}"></image>
<view class="slide_font {{current == index ? 'active': ''}}">
<text>尊享会员</text> 每一单都可以享受5%现金返现,订单签收后,返现金额将直接存入你的余额账户,返利金额无上限。这里的字符数将控制在65字以内。
</view>
<view class="slide_fonts {{current == index ? 'active': ''}}">
<text class='slide_fonts_text'><text>温馨提示</text>\n01\t尊享会员返现金额为订单实付金额的5%\n02\t返现金额不可提现,可用于下次消费</text>
</view>
</view>
</swiper-item>
</swiper>
<view class="dots">
<block wx:for="{{slide}}" wx:key="item.id" wx:for-index='index'>
<view class="dot{{current == index ? ' active' : ''}}"></view>
</block>
</view>
</view>
<view class='exit_back_shop' bindtap='hide_more'>退出</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -496,8 +496,8 @@ margin-bottom:2rpx;
margin-top:0;
}
.slide-image{
width: 100%;
height: 100%
width: 100%;
height: 100%
}
.slide_font{
width: 600rpx;
... ...