作者 lihongjuan

1

... ... @@ -2,20 +2,20 @@
width: 96rpx;
height: 210rpx;
position: fixed;
right: 32rpx;
right: -24rpx;
bottom: 100rpx;
}
.item {
width: 96rpx;
height: 96rpx;
width: 60rpx;
height: 60rpx;
padding: 0;
border: none !important;
margin: 0 !important;
}
.item:first-child {
margin-bottom: 16rpx !important;
margin-bottom: 30rpx !important;
}
.item image {
... ...
{
"pages": [
"pages/startindex/startindex",
"pages/index/index",
"pages/register/register",
"pages/login/login",
"pages/zuji/zuji",
"pages/messagedetail/messagedetail",
"pages/message/message",
"pages/shop_cart/shop_cart",
"pages/classify/classify",
"pages/my/my",
... ... @@ -34,7 +31,7 @@
"pages/taocanpay/taocanpay",
"pages/orderdetail/orderdetail",
"pages/xianshi/xianshi"
],
"window": {
"backgroundTextStyle": "light",
... ... @@ -62,7 +59,6 @@
"iconPath": "images/tabbar/icon_70.png",
"selectedIconPath": "images/tabbar/icon_73.png"
},
{
"pagePath": "pages/my/my",
"text": "我的",
... ...
... ... @@ -101,6 +101,7 @@ Page({
icon: 'none',
duration: 1300
})
} else {
a.post(u, d).then((r) => {
if (r.code == 200) {
... ...
... ... @@ -49,57 +49,43 @@
</view>
</view> -->
<!-- 活动区域 -->
<view class="actity" wx:if="{{status1==1}}">
<!-- <view class="miaoshaoname">活动专区</view> -->
<view class="active flexone">
<view wx:for="{{activity}}" class="actbox" wx:key="" bindtap="seeactive" data-id="{{item.id}}">
<view class="activeitem">
<image src="{{item.image}}"></image>
<view wx:if="{{nav_index==0}}">
<view class="actity" wx:if="{{status1==1}}">
<!-- <view class="miaoshaoname">活动专区</view> -->
<view class="active flexone">
<view wx:for="{{activity}}" class="actbox" wx:key="" bindtap="seeactive" data-id="{{item.id}}">
<view class="activeitem">
<image src="{{item.image}}"></image>
</view>
<view class="activename">{{item.name}}</view>
</view>
<view class="activename">{{item.name}}</view>
</view>
</view>
</view>
<!-- 秒杀商城 -->
<!-- wx:if="{{activitystatus==3}}" -->
<view class="miaosha xianshi" wx:if="{{status2==1&&activitystatus==3&&xianshilist.length!=0}}">
<view class="miaoshatop flextwo">
<view class="miaoshatopleft flexone">
<view class="miaoshaoname">{{title2}}</view>
<!-- <view class="hourgou" wx:if="{{showtime}}">{{day}}:{{hou}}:{{min}}:{{sec}}</view> -->
</view>
<view class="miaosharight" bindtap="moremiao">
查看更多>
</view>
</view>
<view class="miaoshalist">
<view class="miaoshalistitem" wx:for="{{xianshilist}}" wx:key="" bindtap="look_more" data-id="{{item.id}}">
<view class="goodimg">
<image src="{{item.images[0]}}"></image>
<!-- 秒杀商城 -->
<view class="miaosha xianshi" wx:if="{{status2==1&&activitystatus==3&&xianshilist.length!=0}}">
<view class="miaoshatop flextwo">
<view class="miaoshatopleft flexone">
<view class="miaoshaoname">{{title2}}</view>
<!-- <view class="hourgou" wx:if="{{showtime}}">{{day}}:{{hou}}:{{min}}:{{sec}}</view> -->
</view>
<view class="miaosharight" bindtap="moremiao">
查看更多>
</view>
</view>
<view class="miaoshalist">
<view class="miaoshalistitem" wx:for="{{xianshilist}}" wx:key="" bindtap="look_more" data-id="{{item.id}}">
<view class="goodimg">
<image src="{{item.images[0]}}"></image>
</view>
<view class="price">¥{{item.price2!=null?item.price2:item.price}}</view>
</view>
</view>
</view>
</view>
<!-- 公告栏 -->
<navigator class="notice" url="../notice/notice">
<image src="/images/notice.png" class="notice_tips" />
... ...
... ... @@ -297,7 +297,7 @@ image {
.notice_tips {
width: 72rpx;
height: 72rpx;
margin-right: 56rpx;
margin-right:30rpx;
}
.notice_word {
... ... @@ -323,10 +323,11 @@ image {
}
.notice_item .word {
max-width: 380rpx;
max-width: 370rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex:1;
}
.notice_item .time {
... ...
... ... @@ -12,7 +12,7 @@ page {
.mssageitem {
padding: 32rpx 32rpx;
box-sizing: border-box;
height: 145rpx;
border-radius: 10rpx;
border-bottom: 1rpx solid #f5f5f5;
}
... ...
... ... @@ -14,6 +14,7 @@ Page({
area: '',
address: '',
cover_type: false,
total:''
},
//加减商品数量
num_change(e) {
... ... @@ -32,11 +33,11 @@ Page({
if (num < 1) {
return
}
}
}
that.setData({
[`info.coudanProduct[${index}].num`]: num
})
if (check){
if (check) {
coudan.forEach((item, index) => {
if (item.id == id) {
item.num = num
... ... @@ -49,12 +50,28 @@ Page({
// 计算凑单费用
get_choudan() {
let coudan_arr = this.data.coudan_arr
let choudan_money = 0
for (let obj of coudan_arr){
choudan_money = (obj.price * 100 * obj.num) / 100 + choudan_money
let choudan_money = 0;
for (let obj of coudan_arr) {
console.log(obj)
console.log(obj.price2)
if (obj.price2!= null) {
console.log(111)
choudan_money = (obj.price2 * 100 * obj.num) / 100 + choudan_money
} else {
console.log(222)
choudan_money = (obj.price * 100 * obj.num) / 100 + choudan_money
}
}
console.log(typeof (choudan_money))
console.log(choudan_money)
this.setData({
choudan_money: choudan_money
choudan_money: choudan_money*100
// choudan_money: Math.floor(choudan_money* 100) / 100
})
},
show_cover() {
... ... @@ -98,13 +115,14 @@ Page({
let num = e.currentTarget.dataset.num
let index = e.currentTarget.dataset.index
let id = e.currentTarget.dataset.id
let price = e.currentTarget.dataset.price
let price = e.currentTarget.dataset.price;
let price2 = e.currentTarget.dataset.price2;
if (check) {
check = 0
coudan.forEach((item, index) => {
if (item.id == id) {
coudan.splice(index, 1)
coudan_arr.splice(index,1)
coudan_arr.splice(index, 1)
}
})
} else {
... ... @@ -117,7 +135,8 @@ Page({
coudan_arr.push({
id: id,
num: num,
price: Number(price)
price: Number(price),
price2:Number(price2)
})
}
that.setData({
... ... @@ -136,9 +155,21 @@ Page({
info: info
}
app.post(url, params).then((res) => {
console.log('99999', res, Number(res.msg.total))
res.msg.total = Number(res.msg.total * 100)
res.msg.yunfei = Number(res.msg.yunfei * 100)
let total = (res.msg.total + res.msg.yunfei).toFixed("1");
console.log(total)
that.setData({
info: res.msg
info: res.msg,
total:total
})
console.log('9988756', that.data.info)
})
},
... ... @@ -153,7 +184,7 @@ Page({
}
app.post(url, params).then((res) => {
that.setData({
"info.yunfei": res.msg.yunfei
"info.yunfei": Number(res.msg.yunfei)
})
})
},
... ...
... ... @@ -26,7 +26,7 @@
<view class='recommend' wx:if="{{info.coudanProduct.length>0}}">
<view class='re_one'>*您支付后还剩{{info.choudan}}积分为您推荐了以下凑单产品!</view>
<scroll-view class='re_goods' scroll-x scroll-left="0">
<view class='re_item' wx:for='{{info.coudanProduct}}' wx:key='index' bindtap='chooseGoods' data-index="{{index}}" data-id="{{item.id}}" data-num="{{item.num?item.num:1}}" data-check='{{item.check}}' data-price='{{item.price}}'>
<view class='re_item' wx:for='{{info.coudanProduct}}' wx:key='index' bindtap='chooseGoods' data-index="{{index}}" data-id="{{item.id}}" data-num="{{item.num?item.num:1}}" data-check='{{item.check}}' data-price='{{item.price}}' data-price2="{{item.price2}}">
<view class='re_re_item {{item.check?"active":""}}'>
<view class='triangle' wx:if='{{item.check}}'>
<image src='/images/bingo.png' class='bingo'></image>
... ... @@ -36,7 +36,8 @@
</view>
<view class='re_bottom'>
<view class='re_re_name'>{{item.name}}</view>
<view class='re_re_score'>{{item.price}}积分</view>
<view class='re_re_score'wx:if="{{item.price!=null}}">{{item.price2}}积分</view>
<view class='re_re_score' wx:else>{{item.price}}积分</view>
</view>
<!-- 数量操作 -->
... ... @@ -63,7 +64,7 @@
<view class='mask_two'>
<view>邮费</view>
<view class='score' style="color:rgba(242, 0, 0, 1)">{{info.yunfei}}积分</view>
<view class='score' style="color:rgba(242, 0, 0, 1)">{{info.yunfei/100}}积分</view>
</view>
</view>
</view>
... ... @@ -72,7 +73,8 @@
<view class="footer">
<view class="submit" catchtap="show_cover">提交</view>
<view class="jifen"> 合计:
<text>{{choudan_money?choudan_money + info.total + info.yunfei*100/100: info.total + info.yunfei*100/100}}积分</text>
<!-- <text>{{choudan_money?choudan_money + info.total + info.yunfei*100/100: info.total + info.yunfei*100/100}}积分</text> -->
<text>{{choudan_money?(choudan_money + info.total + info.yunfei)/100: (info.total + info.yunfei)/100}}积分</text>
</view>
<view class="num">共{{info.totalnum}}件</view>
</view>
... ... @@ -106,14 +108,14 @@
<view class="cover_box" wx:if="{{cover_type}}">
<view class="cover_order">
<view class="all_money">{{choudan_money?choudan_money + info.total + info.yunfei*100/100: info.total + info.yunfei*100/100}}积分</view>
<view class="all_money">{{choudan_money?(choudan_money + total)/100: (total)/100}}积分</view>
<view class="money_item">
<text>商品积分</text>
<text>{{choudan_money?choudan_money + info.total:info.total}}积分</text>
<text>{{choudan_money?(choudan_money + info.total)/100:info.total/100}}积分</text>
</view>
<view class="money_item">
<text>邮费</text>
<text>{{info.yunfei}}积分</text>
<text>{{info.yunfei/100}}积分</text>
</view>
<view class="cover_submit" catchtap="submit">确认支付</view>
<image src="/images/close.png" class="cover_close" catchtap="show_cover" />
... ...
... ... @@ -40,11 +40,54 @@ Page({
})
},
//查看订单详情
look_detail(e) {
console.log(6666)
wx.navigateTo({
url: '/pages/order/order_detail/order_detail?id=' + e.currentTarget.dataset.id+'&type='+e.currentTarget.dataset.type,
orderagain(e) {
let item=e.currentTarget.dataset.item;
let num=e.currentTarget.dataset.num;
let goodid=[]
item.forEach(function(value,index,array){
goodid.push(value.id)
})
let that = this
let url = a.interface.addshop
let params = {
num: num,
product_id: goodid.join(",")
}
a.post(url, params).then((res) => {
// that.setData({
// "info.shop": Number(that.data.info.shop) + that.data.num,
// num: 1
// })
wx.showModal({
title: '提示',
content: '加入成功,是否跳到购物车',
success(res) {
if (res.confirm) {
console.log('用户点击确定')
wx.switchTab({
url: '/pages/shop_cart/shop_cart',
})
} else if (res.cancel) {
}
}
})
// wx.switchTab({
// url: '/pages/shop_cart/shop_cart',
// })
})
// console.log(6666)
// wx.navigateTo({
// url: '/pages/order/order_detail/order_detail?id=' + e.currentTarget.dataset.id+'&type='+e.currentTarget.dataset.type,
// })
},
/**
* 生命周期函数--监听页面加载
... ...
... ... @@ -38,7 +38,7 @@
<view class='score'>{{item.address_name}}</view>
</view>
<view class='mask_two'>
<view>收电话:</view>
<view>收货电话</view>
<view class='score'>{{item.address_mobile}}</view>
</view>
... ... @@ -105,7 +105,7 @@
<view class='score'>{{item.address_name}}</view>
</view>
<view class='mask_two'>
<view>收电话:</view>
<view>收货电话</view>
<view class='score'>{{item.address_mobile}}</view>
</view>
... ... @@ -118,7 +118,7 @@
<view class='score'>{{item.youfei}}积分</view>
</view>
<view class='btn_box'>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="look_detail" data-id="{{item.id}}" data-type="2">再来一单</view>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="orderagain" data-id="{{item.id}}" data-type="2" data-item="{{item.orderitem}}" data-num="{{item.total_num}}">再来一单</view>
<view class='cancel_order' data-d="{{item.order_odd}}" data-t="1" bindtap="jumpReturnFun">退货</view>
<view style='clear:both;'></view>
</view>
... ... @@ -167,7 +167,7 @@
<view class='score'>{{item.address_name}}</view>
</view>
<view class='mask_two'>
<view>收电话:</view>
<view>收货电话</view>
<view class='score'>{{item.address_mobile}}</view>
</view>
... ... @@ -188,7 +188,7 @@
</view>
</view>
<view class='btn_box'>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="look_detail" data-id="{{item.id}}" data-type="2">再来一单</view>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="orderagain" data-id="{{item.id}}" data-type="2" data-item="{{item.orderitem}}" data-num="{{item.total_num}}">再来一单</view>
<view class='go_pay' catchtap="queren" data-d="{{item.order_odd}}">确认收货</view>
<view class='cancel_order' data-d="{{item.order_odd}}" catchtap="look_logistics">物流查询</view>
<view class='cancel_order' data-d="{{item.order_odd}}" data-t="1" bindtap="jumpReturnFun">退货</view>
... ... @@ -236,7 +236,7 @@
<view class='score'>{{item.address_name}}</view>
</view>
<view class='mask_two'>
<view>收电话:</view>
<view>收货电话</view>
<view class='score'>{{item.address_mobile}}</view>
</view>
... ... @@ -259,7 +259,7 @@
<view class='btn_box'>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="look_detail" data-id="{{item.id}}" data-type="2">再来一单</view>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="orderagain" data-id="{{item.id}}" data-type="2" data-item="{{item.orderitem}}" data-num="{{item.total_num}}">再来一单</view>
<view class='cancel_order' catchtap="delete_item" data-d="{{item.order_odd}}">删除</view>
<view style='clear:both;'></view>
... ... @@ -304,7 +304,7 @@
<view class='score'>{{item.address_name}}</view>
</view>
<view class='mask_two'>
<view>收电话:</view>
<view>收货电话</view>
<view class='score'>{{item.address_mobile}}</view>
</view>
... ... @@ -326,7 +326,7 @@
</view>
<view class='btn_box'>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="look_detail" data-id="{{item.id}}" data-type="2">再来一单</view>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="orderagain" data-id="{{item.id}}" data-type="2" data-item="{{item.orderitem}}" data-num="{{item.total_num}}">再来一单</view>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="jumpReturnFun">查看详情</view>
<view style='clear:both;'></view>
... ...
... ... @@ -189,7 +189,7 @@ page {
}
.score {
width: 500rpx;
width: 419rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
... ...
... ... @@ -129,7 +129,12 @@ Page({
for (let obj of list) {
if (obj.check_type) {
all_num = obj.num + all_num
var item_integral = Number(obj.product.price) * 100 * Number(obj.num) / 100
if (obj.product.price2!=null){
var item_integral = Number(obj.product.price2) * 100 * Number(obj.num) / 100
}else{
var item_integral = Number(obj.product.price) * 100 * Number(obj.num) / 100
}
integral = integral + item_integral
}
... ...
... ... @@ -68,15 +68,15 @@
<view wx:if="{{info.price2!=null}}">
<view class='two_ones'>
<view class='scores'>积分</view>
<view class='prices'>{{info.price}}</view>
<view class='prices'>{{info.price2}}</view>
</view>
<view class="oldprice">{{info.price2}}</view>
<view class="oldprice">{{info.price}}</view>
</view>
<view class='two_ones' wx:else>
<view class='scores'>积分</view>
<view class='prices'>{{info.price2}}</view>
<view class='prices'>{{info.price}}</view>
</view>
</view>
</view>
... ...
// pages/startindex/startindex.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
thumbnail: '',
sec:'',
endTime:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
getpic() {
let that = this;
var url = '/wb/advertising';
var params = {
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
thumbnail: res.msg.image,
endTime: res.msg.sec
})
that.countDown()
}).catch((err) => {
})
},
jump(){
wx.switchTab({
url: '/pages/index/index',
})
},
// 倒计时
countDown() {
console.log(788)
var that = this;
var time = that.data.endTime;
var interval = setInterval(function () {
// 秒数
let day = parseInt(time / (60 * 60 * 24));
let hou = parseInt(time % (60 * 60 * 24) / 3600);
let min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
that.setData({
// day: that.timeFormat(day),
// hou: that.timeFormat(hou),
// min: that.timeFormat(min),
sec: sec
})
time--;
if (time <= 0) {
clearInterval(interval);
wx.switchTab({
url: '/pages/index/index',
})
}
}.bind(this), 1000);
},
// timeFormat(param) {
// return param < 10 ? '0' + param : param;
// },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
that.getpic()
setTimeout(function () {
wx.navigateTo({
url: '/pages/homepage/homepage',
})
}, 2500)
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationStyle": "custom"
}
\ No newline at end of file
... ...
<view class="pagebox">
<image src="{{thumbnail}}"></image>
<view class="jump" bindtap="jump">{{sec}}跳过</view>
</view>
... ...
page {
width: 750rpx;
height: 100%;
overflow-y: hidden;
}
.pagebox {
width: 750rpx;
height: 100%;
}
image {
width: 100%;
height: 100%;
}
.jump {
width: 150rpx;
height: 50rpx;
border-radius: 40rpx;
color: #fff;
font-size: 24rpx;
text-align: center;
line-height: 50rpx;
background: #333;
opacity: 0.5;
position: absolute;
top: 135rpx;
right: 35rpx;
letter-spacing: 6rpx;
}
... ...
... ... @@ -29,10 +29,10 @@
<image src="{{item.images[0]}}" mode="widthFix"></image>
</view>
<view class="listleft ">
<view class="commontwo ">{{item.name}} <text class="sold">x{{item.sold}}</text></view>
<!-- x{{item.sold}} -->
<view class="commontwo ">{{item.name}} <text class="sold"></text></view>
<view class="leftbottom flexone ">
<view class="botleft ">¥{{item.price2==null?item.price:item.price2}}</view>
<view class="botleft ">¥{{item.price2==null?item.price:item.price2}}</view>
</view>
</view>
... ...
... ... @@ -142,7 +142,7 @@ Page({
console.log(res)
that.setData({
info: res.msg,
totalmoney: Number(res.msg.total) + Number(res.msg.yunfei * 100 / 100)
totalmoney: (Number(res.msg.total) + Number(res.msg.yunfei * 100 / 100)).toFixed("1")
})
console.log('999',that.data.totalmoney)
... ...
... ... @@ -28,7 +28,8 @@
<image src="{{item.images[0]}}" mode="widthFix "></image>
</view>
<view class="listleft ">
<view class="commontwo ">{{item.name}} <text class="sold">x{{item.sold}}</text></view>
<!-- x{{item.sold}} -->
<view class="commontwo ">{{item.name}} <text class="sold"></text></view>
<view class="leftbottom flexone ">
<view class="botleft ">¥{{item.price2==null?item.price:item.price2}}</view>
... ... @@ -121,7 +122,7 @@
<view class="cover_box" wx:if="{{cover_type}}">
<view class="cover_order">
<view class="all_money">{{choudan_money?choudan_money + info.total + info.yunfei*100/100: info.total + info.yunfei*100/100}}积分</view>
<view class="all_money">{{choudan_money?choudan_money + totalmoney: totalmoney}}积分</view>
<view class="money_item">
<text>商品积分</text>
<text>{{choudan_money?choudan_money + info.total:info.total}}积分</text>
... ...
... ... @@ -495,7 +495,8 @@ page {
background: #fff;
}
.listleft{
margin-left:10rpx;
width:500rpx;
/* margin-left:10rpx; */
}
.commontwo {
color: #232323;
... ... @@ -518,7 +519,7 @@ image{
width: 218rpx;
height: 156rpx;
font-size: 0;
margin-left: 32rpx;
margin-right: 32rpx;
}
.leftbottom {
... ...
... ... @@ -22,8 +22,14 @@
<view class="goodsouname morehidden">{{item.name}}</view>
<view class="miaogood flextwo">
<view class="miaogoodleft">
<view class="saleprice">¥288</view>
<view class="miaogoodleft flexone" wx:if="{{item.price2!=null}}">
<view class="saleprice" >¥{{item.price2}}</view>
<view class=" oldprice">¥{{item.price}}</view>
<!-- <view class="yuansaleprice">¥{{}}</view> -->
</view>
<view class="miaogoodleft flexone" wx:else>
<view class="saleprice" >¥{{item.price}}</view>
<!-- <view class="yuansaleprice">¥{{}}</view> -->
</view>
<view class="buynow buyactive" wx:if="{{status==1}}">未开始</view>
... ...
... ... @@ -74,6 +74,11 @@
margin-top:8rpx;
text-decoration: line-through;
}
.saleprice{
font-size: 28rpx;
}
.oldprice{
margin-left:20rpx;}
.buynow{
width:150rpx;
height:60rpx;
... ... @@ -110,7 +115,7 @@
width:200rpx;
height:200rpx;
font-size: 0;
margin-right:20rpx;
margin-right:40rpx;
flex:0 0 auto;
overflow: hidden
... ...