作者 王旭宇

购物车结算原来是amount: this.data.amount

... ... @@ -68,7 +68,8 @@
"pages/vip/detail_vip/detail_vip",
"pages/index/goodsDetials/goodsDetials",
"pages/navigate/navigate",
"pages/index/user_comment_detail/user_comment_detail"
"pages/index/user_comment_detail/user_comment_detail",
"pages/my/paySuccess/paySuccess"
],
"window": {
"backgroundTextStyle": "dark",
... ...
... ... @@ -9,12 +9,12 @@
@font-face {
font-family: 'iconfont'; /* project id 636259 */
src: url('//at.alicdn.com/t/font_636259_21eqdmerlfuj.eot');
src: url('//at.alicdn.com/t/font_636259_21eqdmerlfuj.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_636259_21eqdmerlfuj.woff2') format('woff2'),
url('//at.alicdn.com/t/font_636259_21eqdmerlfuj.woff') format('woff'),
url('//at.alicdn.com/t/font_636259_21eqdmerlfuj.ttf') format('truetype'),
url('//at.alicdn.com/t/font_636259_21eqdmerlfuj.svg#iconfont') format('svg');
src: url('//at.alicdn.com/t/font_636259_h4mpxnqg2wu.eot');
src: url('//at.alicdn.com/t/font_636259_h4mpxnqg2wu.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_636259_h4mpxnqg2wu.woff2') format('woff2'),
url('//at.alicdn.com/t/font_636259_h4mpxnqg2wu.woff') format('woff'),
url('//at.alicdn.com/t/font_636259_h4mpxnqg2wu.ttf') format('truetype'),
url('//at.alicdn.com/t/font_636259_h4mpxnqg2wu.svg#iconfont') format('svg');
}
/**
* Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
... ... @@ -255,20 +255,25 @@ input, textarea {
}
.good_btn {
height: 60rpx;
width: 60rpx;
height: 100rpx;
width: 100rpx;
padding: 20rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background-color: #ffda44;
box-shadow: 5rpx 0px 5rpx rgba(248, 207, 38, 0.3);
text-align: center;
}
.icon-gouwuche {
font-size: 29rpx;
line-height: 60rpx;
color: #444;
width:60rpx;
height: 60rpx;
border-radius: 50%;
background-color: #ffda44;
box-shadow: 5rpx 0px 5rpx rgba(248, 207, 38, 0.3);
}
/* 头部信息 */
... ... @@ -307,13 +312,15 @@ input, textarea {
@font-face {
font-family: 'iconfont'; /* project id 636259 */
src: url('//at.alicdn.com/t/font_636259_xrf3sdkafk.eot');
src: url('//at.alicdn.com/t/font_636259_xrf3sdkafk.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_636259_xrf3sdkafk.woff') format('woff'),
url('//at.alicdn.com/t/font_636259_xrf3sdkafk.ttf') format('truetype'),
url('//at.alicdn.com/t/font_636259_xrf3sdkafk.svg#iconfont') format('svg');
src: url('//at.alicdn.com/t/font_636259_h4mpxnqg2wu.eot');
src: url('//at.alicdn.com/t/font_636259_h4mpxnqg2wu.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_636259_h4mpxnqg2wu.woff2') format('woff2'),
url('//at.alicdn.com/t/font_636259_h4mpxnqg2wu.woff') format('woff'),
url('//at.alicdn.com/t/font_636259_h4mpxnqg2wu.ttf') format('truetype'),
url('//at.alicdn.com/t/font_636259_h4mpxnqg2wu.svg#iconfont') format('svg');
}
... ... @@ -604,6 +611,10 @@ input, textarea {
content: "\e63b"
}
.icon-duigoua:before{
content: "\e63c"
}
... ...
... ... @@ -150,6 +150,9 @@ Page({
showList.push(ele)
}
ele.t = false
if(indexxx<r.data.info.num){
ele.t=true
}
ele.attr.attr_sku.forEach(function (eles, indexxxx) {
for (let i = 0; i < eles.item.length; i++) {
eles.item[i].t = false
... ... @@ -273,7 +276,7 @@ Page({
})
if ((n < goods.info.num && n > 0) || n > goods.info.num) {
wx.showToast({
title: '选择' + num + '种商品',
title: '您最多只能选择' + num + '种商品',
icon: 'none'
})
return;
... ... @@ -487,11 +490,19 @@ Page({
let indexs = e.currentTarget.dataset.index
let that = this
let list = that.data.packageList
let n=0
list.forEach(function (ele, index) {
if (indexs == index) {
console.log(ele.t + "之前")
ele.t = !ele.t
console.log(ele.t + "之后")
}
if(ele.t){
n++
}
if(n>that.data.goods.info.num){
wx.showToast({
title: '您最多可选择'+that.data.goods.info.num+'种商品',
icon:'none'
})
}
})
that.setData({
... ...
... ... @@ -201,6 +201,7 @@
<view class='banner'>
<view class='iconfont icon-fanhui' catchtap='closeShowMore'></view>
<view class='coupons'>商品详情</view>
<view class='share' catchtap='closeShowMore'>确定</view>
</view>
<view class='explaina'>
<view class='explain_one'>
... ... @@ -213,7 +214,7 @@
</view>
<view class='three'>
<view class='collocation_boxa' wx:for='{{packageList}}' wx:for-index='index' wx:key='{{index}}' bindtap='goDetail' data-id='{{item.id}}'>
<view class='iconfont icon-weixuanzhong {{item.t?"active":""}}' catchtap='changeFlag' data-index='{{index}}'></view>
<view class='iconfont icon-weixuanzhong xuanzhongda {{item.t?"active":""}}' catchtap='changeFlag' data-index='{{index}}'></view>
<view class='collocation_img'>
<image src='{{item.more.thumbnail}}'></image>
</view>
... ...
... ... @@ -5,13 +5,16 @@ page {
width: 100%;
height: 100%;
}
.page{
.page {
width: 100%;
height: 100%
height: 100%;
}
.page.active{
overflow: hidden
.page.active {
overflow: hidden;
}
.big_box {
width: 100%;
height: 100%;
... ... @@ -68,10 +71,11 @@ page {
position: fixed;
z-index: 999999;
}
.banner_box{
position: relative;
.banner_box {
position: relative;
}
.banner_img {
height: 630rpx;
padding-top: 80rpx;
... ... @@ -100,7 +104,7 @@ page {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
position: relative
position: relative;
}
.banner_character {
... ... @@ -138,7 +142,7 @@ page {
width: auto;
margin-left: 40rpx;
display: flex;
align-items: center
align-items: center;
}
.money_icon2 {
... ... @@ -158,9 +162,9 @@ page {
margin-left: 5rpx;
}
.vip image{
.vip image {
width: 100%;
height: 100%
height: 100%;
}
.list_content {
... ... @@ -267,7 +271,8 @@ page {
margin-left: 113rpx;
}
.item_list2, .item_list3, .item_list4, .itme_list5, .item_list6, .item_list7 , .item_list10 {
.item_list2, .item_list3, .item_list4, .itme_list5, .item_list6, .item_list7,
.item_list10 {
background-color: #fff;
margin-bottom: 20rpx;
}
... ... @@ -629,9 +634,10 @@ page {
padding: 30rpx 25rpx;
margin-bottom: 120rpx;
}
.item_list10{
.item_list10 {
padding: 30rpx 25rpx;
box-sizing: border-box
box-sizing: border-box;
}
.collocation_title {
... ... @@ -651,7 +657,7 @@ page {
width: 340rpx;
border-radius: 16rpx;
overflow: hidden;
margin-bottom:20rpx;
margin-bottom: 20rpx;
}
.collocation_img {
... ... @@ -670,7 +676,7 @@ page {
color: #222;
padding: 22rpx;
height: 152rpx;
position: relative
position: relative;
}
.bottom_btn {
... ... @@ -730,7 +736,8 @@ page {
font-size: 26rpx;
color: #fff;
}
.join_btns{
.join_btns {
width: 266rpx;
height: 100rpx;
display: flex;
... ... @@ -738,7 +745,7 @@ page {
justify-content: center;
font-size: 26rpx;
color: #fff;
background: transparent
background: transparent;
}
.immediately_btn {
... ... @@ -927,124 +934,138 @@ page {
color: #ededed;
font-size: 36rpx;
}
/*团购样式*/
.banner_box_group{
width:700rpx;
height:45rpx;
.banner_box_group {
width: 700rpx;
height: 45rpx;
position: absolute;
left: 0;
bottom: 0;
background: linear-gradient(to right,#ffda44,transparent);
padding-left:26rpx;
background: linear-gradient(to right, #ffda44, transparent);
padding-left: 26rpx;
z-index: 999;
font-size:26rpx;
font-family:PingFang-SC-Medium;
font-weight:500;
color:rgba(255,255,255,1);
line-height:45rpx;
font-size: 26rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(255, 255, 255, 1);
line-height: 45rpx;
}
/*团购*/
.good_price_progress{
margin-top:10rpx;
}
.group_font{
font-size:24rpx;
font-family:PingFang-SC-Medium;
font-weight:500;
color:rgba(136,136,136,1);
line-height:24rpx;
height: 24rpx;
}
.goods_margin_top{
margin-top:20rpx;
}
.group_image{
.good_price_progress {
margin-top: 10rpx;
}
.group_font {
font-size: 24rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(136, 136, 136, 1);
line-height: 24rpx;
height: 24rpx;
}
.goods_margin_top {
margin-top: 20rpx;
}
.group_image {
border-radius: 16rpx;
overflow: hidden
overflow: hidden;
}
.group_time{
.group_time {
position: absolute;
bottom:0;
height:30px;
width:200rpx;
background:rgba(187,187,187,1);
bottom: 0;
height: 30px;
width: 200rpx;
background: rgba(187, 187, 187, 1);
border-radius: 0 0 16rpx 16rpx;
padding:0 10rpx;
font-size:20rpx;
font-family:PingFang-SC-Medium;
font-weight:500;
color:rgba(255,255,255,1);
line-height:54rpx;
text-align: center;
}
.group_time.active{
background:rgba(255,68,68,1);
}
padding: 0 10rpx;
font-size: 20rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(255, 255, 255, 1);
line-height: 54rpx;
text-align: center;
}
.group_time.active {
background: rgba(255, 68, 68, 1);
}
/*小贴士*/
.explain{
.explain {
width: 93.6%;
height:auto;
box-shadow:0px 15px 30px 0px rgba(214,214,214,0.6);
border-radius:16px;
height: auto;
box-shadow: 0px 15px 30px 0px rgba(214, 214, 214, 0.6);
border-radius: 16px;
background: #fff;
margin:20rpx auto 130rpx;
padding:18rpx 49rpx;
box-sizing: border-box
margin: 20rpx auto 130rpx;
padding: 18rpx 49rpx;
box-sizing: border-box;
}
.explain_one{
.explain_one {
text-align: center;
font-size:30rpx;
font-family:PingFang-SC-Heavy;
font-weight:800;
color:rgba(38,54,58,1);
line-height:62rpx;
font-size: 30rpx;
font-family: PingFang-SC-Heavy;
font-weight: 800;
color: rgba(38, 54, 58, 1);
line-height: 62rpx;
position: relative;
margin-bottom:16rpx;
margin-bottom: 16rpx;
}
.explain_one::before{
.explain_one::before {
width: 115rpx;
height: 1rpx;
position: absolute;
left:70rpx;
top:0;
bottom:0;
margin:auto 0;
left: 70rpx;
top: 0;
bottom: 0;
margin: auto 0;
content: '';
background: linear-gradient(to left,rgba(187,187,187,1),transparent);
background: linear-gradient(to left, rgba(187, 187, 187, 1), transparent);
}
.explain_one::after{
.explain_one::after {
width: 115rpx;
height: 1rpx;
position: absolute;
right:70rpx;
top:0;
bottom:0;
margin:auto 0;
right: 70rpx;
top: 0;
bottom: 0;
margin: auto 0;
content: '';
background: linear-gradient(to right,rgba(187,187,187,1),transparent);
background: linear-gradient(to right, rgba(187, 187, 187, 1), transparent);
}
.explain_two{
font-size:26rpx;
font-family:PingFang-SC-Medium;
font-weight:500;
color:rgba(38,54,58,1);
.explain_two {
font-size: 26rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(38, 54, 58, 1);
line-height: 40rpx;
}
.food_title_all{
margin-bottom:30rpx;
.food_title_all {
margin-bottom: 30rpx;
}
.two_title_xixi{
.two_title_xixi {
width: 100%;
height: 23rpx;
text-align: center;
font-size:22rpx;
font-family:PingFang-SC-Medium;
font-weight:500;
color:rgba(148,153,154,1);
line-height:23rpx;
font-size: 22rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(148, 153, 154, 1);
line-height: 23rpx;
}
.collocation_contents {
... ... @@ -1053,74 +1074,100 @@ line-height:23rpx;
color: #222;
padding: 22rpx;
}
.overflowe{
.overflowe {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
position: relative
position: relative;
}
.icon-icondayu{
.icon-icondayu {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
}
.introduces {
font-size: 28rpx;
color: #888;
}
.collocation_boxs {
width: 360rpx;
border-radius: 16rpx;
overflow: hidden;
float: left;
padding:0 10rpx;
position: relative
padding: 0 10rpx;
position: relative;
}
.icon-weixuanzhong{
.icon-weixuanzhong {
position: absolute;
right:20rpx;
top:15rpx;
color:#888;
right: 20rpx;
top: 15rpx;
color: #888;
}
.icon-weixuanzhong.active {
color: rgba(255, 218, 68, 1);
}
.icon-weixuanzhong.active{
color:rgba(255,218,68,1);
.xuanzhongda {
width:80rpx;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
right: 0rpx !important;
top: 0rpx !important;
color: #888;
font-size: 40rpx !important;
}
.replace_dishes{
.replace_dishes {
width: 100%;
/* width:699px; */
height:80rpx;
border:1rpx solid rgba(255,68,68,1);
border-radius:40rpx;
margin:10rpx 0 20rpx;
display: flex;
justify-content: center;
align-items: center
}
.replace_dishes_center{
height: 80rpx;
border: 1rpx solid rgba(255, 68, 68, 1);
border-radius: 40rpx;
margin: 10rpx 0 20rpx;
display: flex;
justify-content: center;
align-items: center;
}
.replace_dishes_center {
display: flex;
/* align-items: center */
}
.replace_image{
.replace_image {
width: 31rpx;
height: 29rpx;
margin-right:18rpx;
margin-top:-14rpx;
margin-right: 18rpx;
margin-top: -14rpx;
}
.replace_image image{
.replace_image image {
width: 100%;
height: 100%
height: 100%;
}
.replace_font{
.replace_font {
height: 29rpx;
font-size:26rpx;
font-family:PingFang-SC-Medium;
font-weight:500;
color:rgba(255,68,68,1);
line-height: 29rpx;
font-size: 26rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(255, 68, 68, 1);
line-height: 29rpx;
}
/*更换菜品弹框*/
.maskMore{
.maskMore {
width: 100%;
min-height: 100%;
background: #f3f5f5;
... ... @@ -1134,66 +1181,73 @@ line-height: 29rpx;
color: #222;
display: flex;
}
.explaina{
.explaina {
width: 93.6%;
height:auto;
box-shadow:0px 15px 30px 0px rgba(214,214,214,0.6);
border-radius:16px;
height: auto;
box-shadow: 0px 15px 30px 0px rgba(214, 214, 214, 0.6);
border-radius: 16px;
background: #fff;
margin:120rpx auto 40rpx;
padding:18rpx 49rpx 18rpx;
box-sizing: border-box
margin: 120rpx auto 40rpx;
padding: 18rpx 49rpx 18rpx;
box-sizing: border-box;
}
.explain_one{
.explain_one {
text-align: center;
font-size:30rpx;
font-family:PingFang-SC-Heavy;
font-weight:800;
color:rgba(38,54,58,1);
line-height:62rpx;
font-size: 30rpx;
font-family: PingFang-SC-Heavy;
font-weight: 800;
color: rgba(38, 54, 58, 1);
line-height: 62rpx;
position: relative;
margin-bottom:16rpx;
margin-bottom: 16rpx;
}
.explain_one::before{
.explain_one::before {
width: 115rpx;
height: 1rpx;
position: absolute;
left:70rpx;
top:0;
bottom:0;
margin:auto 0;
left: 70rpx;
top: 0;
bottom: 0;
margin: auto 0;
content: '';
background: linear-gradient(to left,rgba(187,187,187,1),transparent);
background: linear-gradient(to left, rgba(187, 187, 187, 1), transparent);
}
.explain_one::after{
.explain_one::after {
width: 115rpx;
height: 1rpx;
position: absolute;
right:70rpx;
top:0;
bottom:0;
margin:auto 0;
right: 70rpx;
top: 0;
bottom: 0;
margin: auto 0;
content: '';
background: linear-gradient(to right,rgba(187,187,187,1),transparent);
background: linear-gradient(to right, rgba(187, 187, 187, 1), transparent);
}
.explain_two{
font-size:26rpx;
font-family:PingFang-SC-Medium;
font-weight:500;
color:rgba(38,54,58,1);
.explain_two {
font-size: 26rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
color: rgba(38, 54, 58, 1);
line-height: 40rpx;
}
.three{
.three {
width: 100%;
padding:0 15rpx;
}
padding: 0 15rpx;
}
.collocation_boxa {
width: 360rpx;
border-radius: 16rpx;
overflow: hidden;
float: left;
padding:0 10rpx;
position: relative
padding: 0 10rpx;
position: relative;
}
.collocation_img {
... ... @@ -1211,15 +1265,17 @@ line-height: 29rpx;
color: #888;
}
.icon-weixuanzhong{
.icon-weixuanzhong {
position: absolute;
right:20rpx;
top:15rpx;
color:#888;
right: 20rpx;
top: 15rpx;
color: #888;
}
.icon-weixuanzhong.active{
color:rgba(255,218,68,1);
.icon-weixuanzhong.active {
color: rgba(255, 218, 68, 1);
}
/*购物车添加状态*/
.cart_mask {
... ... @@ -1388,11 +1444,13 @@ line-height: 29rpx;
color: #ededed;
font-size: 36rpx;
}
.pickage_display {
font-size: 24rpx;
color: #f44;
margin-top: 47rpx;
}
.money_icon2 {
font-size: 22rpx;
color: #f44;
... ...
... ... @@ -46,7 +46,9 @@ Page({
groupList: [],
yesno: false,
stock:0,
is_vip:0
is_vip:0,
string:'',
gggPrice: null
},
//进入基本参数
jumpBasicInfo() {
... ... @@ -203,6 +205,8 @@ Page({
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
... ... @@ -210,8 +214,14 @@ Page({
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,
... ... @@ -221,7 +231,9 @@ Page({
vip_skuid_price: vip_skuid_price,
skuid_arr: new_arr,
ids: new_arr_item,
stock:stock
stock:stock,
string: string,
gggPrice: gggPrice
});
},
//关闭弹窗
... ... @@ -282,6 +294,7 @@ Page({
};
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);
... ... @@ -316,8 +329,15 @@ Page({
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
... ... @@ -361,6 +381,7 @@ Page({
percent: percent,
goods: r.data,
gPrice: zuihoujiage,
gggPrice: gggPrice,
collocation: r.data.collocation,
comment: r.data.comment,
skuid: skuid,
... ... @@ -368,7 +389,8 @@ Page({
id_arr: arr,
skuid_arr: arr,
yesno: true,
stock: stock
stock: stock,
string: string
});
} else {
console.log("不是团购")
... ... @@ -376,6 +398,7 @@ Page({
yesno: false,
goods: r.data,
gPrice: zuihoujiage,
gggPrice: gggPrice,
collocation: r.data.collocation,
comment: r.data.comment,
favorite: r.data.is_favorite,
... ... @@ -385,7 +408,8 @@ Page({
skuid: skuid,
skuid_arr: arr,
id_arr: arr,
stock: stock
stock: stock,
string: string
});
}
});
... ...
... ... @@ -53,8 +53,8 @@
<text class='original_price '>¥{{goods.info.old_price}}</text>
</view>
<view class='display_box '>
<text class='money_icon2 '>¥</text>
<text class='money2 '>{{goods.info.vip_price}}</text>
<view class='money_icon2 '>¥</view>
<view class='money2 '>{{goods.info.vip_price}}</view>
<view class='vip '>
<image class='vipvip ' src='{{imgUrl}}vipvip.png '></image>
</view>
... ... @@ -275,7 +275,7 @@
</view>
<view class='templates' id='NAV{{two}}'>
<template is="wxParse" data="{{wxParseData:content.nodes}}" />
<template class='' is="wxParse" data="{{wxParseData:content.nodes}}" />
</view>
</view>
</scroll-view>
... ... @@ -311,18 +311,27 @@
<view class='quality_left {{value.t?"active":""}}' wx:for='{{cell.item}}' wx:key='{{key}}' data-gid='{{value.id}}' data-parent="{{cellindex}}" data-item="{{value.attribute_value}}" data-index="{{index}}" bindtap='changeIds' wx:for-item='value'>{{value.attribute_value}}</view>
</view>
</view>
<view class='goumaishuliang'>
<view>购买数量</view>
<text decode="{{true}}" class='kucun'>&nbsp;(库存{{stock}})</text>
<view class='jiajianjian' wx:if='{{!goods.groupType}}'>
<view bindtap='dec_num' class='dec_num'>-</view>
<view class='numnum'> {{num}}</view>
<view bindtap='add_num' class='dec_num'>+</view>
</view>
</view>
<view class='last_box'>
<view class='last_box_top'>
<view class='last_box_top_price'>
<view>¥{{skuid_price}}</view>
<view class=' last_box_top_price last_box_top_pricess'>
<view>¥{{gggPrice}}</view>
<text decode="{{true}}">({{string}})</text>
</view>
</view>
<view class='last_box_top'>
<view class='last_box_top_price'>
<!-- <view class='last_box_top_price'>
<view class='member_price'>¥{{vip_skuid_price}}</view>
<text class='member'>会员专享</text>
</view>
</view> -->
<!-- <view class='jiajian'>
<view bindtap='dec_num' class='dec_num'>-</view>
<view class='numnum'> {{num}}</view>
... ... @@ -344,9 +353,37 @@
<view class='quality_left {{value.t?"active":""}}' wx:for='{{cell.item}}' wx:key='{{key}}' data-gid='{{value.id}}' data-parent="{{cellindex}}" data-item="{{value.attribute_value}}" data-index="{{index}}" bindtap='changeIds' wx:for-item='value'>{{value.attribute_value}}</view>
</view>
</view>
<view class='goumaishuliang'>
<view>购买数量</view>
<text decode="{{true}}" class='kucun'>&nbsp;(库存{{stock}})</text>
<view class='jiajianjian' wx:if='{{!goods.groupType}}'>
<view bindtap='dec_num' class='dec_num'>-</view>
<view class='numnum'> {{num}}</view>
<view bindtap='add_num' class='dec_num'>+</view>
</view>
</view>
<view class='last_box'>
<view class='last_box_top'>
<view class=' last_box_top_price last_box_top_pricess'>
<view>¥{{gggPrice}}</view>
<text decode="{{true}}">({{string}})</text>
</view>
</view>
<view class='last_box_top'>
<!-- <view class='last_box_top_price'>
<view class='member_price'>¥{{vip_skuid_price}}</view>
<text class='member'>会员专享</text>
</view> -->
<!-- <view class='jiajian'>
<view bindtap='dec_num' class='dec_num'>-</view>
<view class='numnum'> {{num}}</view>
<view bindtap='add_num' class='dec_num'>+</view>
</view> -->
<view class='purchase' data-limit='{{goods.info.limit_numer}}' bindtap='hide_masks'>确定</view>
</view>
</view>
<!-- <view class='last_box'>
<view class='last_box_top'>
<view class='last_box_top_price'>
<view>¥{{goods.info.price}}</view>
</view>
... ... @@ -363,7 +400,7 @@
</view>
<view class='purchase' bindtap='hide_masks'>确定</view>
</view>
</view>
</view> -->
</view>
</view>
<!-- 基本信息弹框 -->
... ...
... ... @@ -5,7 +5,9 @@ page {
width: 100%;
height: 100%;
}
text{
height: 0!important
}
.big_box {
width: 100%;
height: 100%;
... ... @@ -130,10 +132,13 @@ page {
}
.display_box {
width: auto;
height: 30rpx;
margin-left: 40rpx;
display: flex;
align-items: center
align-items: center;
flex-wrap: nowrap;
white-space: nowrap;
line-height: 30rpx;
}
.money_icon2 {
... ... @@ -142,6 +147,8 @@ page {
}
.money2 {
height: 30rpx;
line-height: 30rpx;
font-size: 38rpx;
font-weight: bold;
color: #f44;
... ... @@ -298,6 +305,9 @@ white-space: nowrap;
background-color: #fff;
margin-bottom: 20rpx;
}
.item_list2{
margin-bottom: 0
}
.user_evaluation {
display: flex;
... ... @@ -584,7 +594,7 @@ white-space: nowrap;
}
.ingredients {
margin-top: 40rpx;
/* margin-top: 40rpx; */
}
.ingredients_title {
... ... @@ -676,7 +686,7 @@ white-space: nowrap;
}
.templates{
width: 100%!important;
margin: 20rpx auto 0!important;
margin: 30rpx auto 0!important;
}
.wxParse-p{
width: 100%;
... ... @@ -684,7 +694,7 @@ white-space: nowrap;
}
.wxParse-img{
width: 100%!important;
margin: 0 auto!important
margin: -30rpx auto 0!important
}
.content_item{
margin-bottom:120rpx;
... ... @@ -839,12 +849,23 @@ white-space: nowrap;
background: rgba(255, 255, 255, 1);
border-radius: 10px;
padding-top: 20rpx;
padding-bottom: 130rpx;
padding-bottom: 110rpx;
}
.info_mask_diceng{
padding-bottom: 0;
}
.goumaishuliang{
height: 120rpx;
width: 100%;
margin-top: 50rpx;
padding: 30rpx;
box-sizing: border-box;
display: flex;
position: relative
}
.kucun{
color: #a0a0a0
}
.goods_name {
font-size: 30rpx;
font-family: PingFang-SC-Bold;
... ... @@ -906,7 +927,8 @@ white-space: nowrap;
background: rgba(247, 247, 247, 1);
border-radius: 0px 0px 10px 10px;
margin-top: 100rpx;
padding: 18rpx 0 0 51rpx;
padding-left: 30rpx;
/* padding: 18rpx 0 0 51rpx; */
box-sizing: border-box;
position: absolute;
bottom: 0;
... ... @@ -937,6 +959,14 @@ white-space: nowrap;
font-family: PingFang-SC-Bold;
font-weight: bold;
}
.last_box_top_pricess{
font-size: 28rpx;
line-height: 110rpx;
}
.last_box_top_pricess text{
font-size: 28rpx!important;
color: #26363a
}
.last_box_top_price text {
color: #333;
... ... @@ -977,7 +1007,16 @@ white-space: nowrap;
right: 36rpx;
top: 30rpx;
}
.jiajianjian{
width: 120rpx;
height: 50rpx;
position: absolute;
right:20rpx;
top: 50%;
transform: translateY(-50%);
display: flex;
justify-content: space-between;
}
.jiajian {
width: 120rpx;
height: 50rpx;
... ...
... ... @@ -90,7 +90,8 @@ Page({
scrolltop:0,
stock:-1,
xiaban:{},
resolve:false
resolve:false,
aaa:true
},
//获取购物车数量
fetchCartNum() {
... ... @@ -859,7 +860,22 @@ Page({
if (e.scrollTop > 180) {
that.setData({
maodianFlag: true,
resolve:true
aaa: false
})
if(that.data.nav!=0){
wx.pageScrollTo({
scrollTop: 0,
duration: 0
})
that.setData({
resolve: true,
})
}
console.log('改了吗'+that.data.resolve)
} else {
that.setData({
resolve: false,
aaa:true
})
}
// if(that.data.nav!==0){
... ...
<!-- <view class='big_page {{resolve?"active":""}}'> -->
<view class='big_page {{resolve?"active":""}}'>
<view class='page'>
<view class='back_top' wx:if='{{floorstatus}}' bindtap='goTop'>
... ... @@ -84,7 +85,7 @@
<text>每日签到</text>
</view>
</view>
<view class='new_person_box'>
<view class='new_person_box' wx:if='{{new_person.length>0}}'>
<view class="index_title">
<text class="title_left"></text>
<text class="title_mid">超值新人礼包</text>
... ... @@ -423,7 +424,7 @@
</view>
</view>
<view class='fixed_box {{maodianFlag?"active":""}}'>
<scroll-view scroll-y='true' scroll-into-view="NAV{{status}}" scroll-with-animation='true' class='scroll_view_class' bindscroll='checkTop' bindscrolltoupper='upper' >
<scroll-view scroll-y='true' scroll-into-view="NAV{{status}}" scroll-with-animation='true' class='scroll_view_class' bindscroll='checkTop' bindscrolltoupper='upper'>
<view class='nav_type_box active'>
<view class='nav_type_left'>
<view class='nav_type {{wangge==0?"type_active":""}}' bindtap='changeWangGe0'>
... ... @@ -443,7 +444,7 @@
<block wx:if='{{wangge==0}}'>
<view wx:for='{{packageList}}' wx:key='{{cellindex}}' wx:for-item='cell' wx:for-index='cellindex'>
<!-- <view id='NAV{{cellindex}}'></view> -->
<view class='classfy classfydd' bindtap='jump_web' data-jump='{{cell.more.banner_url}}' id='NAV{{cellindex}}' wx:if='{{cell.more.banner}}' >
<view class='classfy classfydd' bindtap='jump_web' data-jump='{{cell.more.banner_url}}' id='NAV{{cellindex}}' wx:if='{{cell.more.banner}}'>
<image src='{{cell.more.banner}}'></image>
<!-- <image src='{{cell.more.banner}}' bindtap='get_contant'></image> -->
</view>
... ... @@ -562,7 +563,7 @@
</block>
<block wx:if='{{nav==item.id}}' wx:for='{{category}}' wx:key='{{item.id}}'>
<view class='padding-top_nav'>
<swiper next-margin='40rpx' previous-margin='10rpx' circular='true' autoplay='true' display-multiple-items='1' class='swiper_banner_box' interval='5000' wx:if='{{two_banner.length>0}}'>
<swiper next-margin='40rpx' previous-margin='10rpx' circular='true' autoplay='{{aaa}}' display-multiple-items='1' class='swiper_banner_box' interval='5000' wx:if='{{two_banner.length>0}}'>
<block wx:for='{{two_banner}}' wx:key='{{item}}'>
<swiper-item class='nopadding' bindtap='jump_web' data-jump='{{item.jump}}'>
<image src='{{item.url}}' mode='aspectFill' class="slide-image uiuiui {{currentIndex == 0 ? 'active': ''}}"></image>
... ... @@ -824,10 +825,10 @@
<view class='btn2' catchtap='close_all'>完成</view>
</view>
</view>
</view>
</view>
<!-- go_hi轮播弹框 -->
<view wx:if='{{go_hi_flag}}' bindtap='hide_back_shop'>
<!-- go_hi轮播弹框 -->
<view wx:if='{{go_hi_flag}}' bindtap='hide_back_shop'>
<view class='back_shop_index'>
<view class='swiper_box_index'>
<swiper previous-margin='60rpx' next-margin='60rpx' circular='true' display-multiple-items='1' current='{{current}}' class='swiper_banner_box_index' bindchange='bindChange' autoplay>
... ... @@ -847,9 +848,9 @@
</view>
<view class='exit_back_shop_index' bindtap='hide_back_shop'>退出</view>
</view>
</view>
<!-- 客服 -->
<view class='piaofu_kefu' wx:if='{{nav==0}}'>
</view>
<!-- 客服 -->
<view class='piaofu_kefu' wx:if='{{nav==0}}'>
<view class='message_kefu'>
<view class='iconfont icon-weixin'>
... ... @@ -857,5 +858,5 @@
</view>
<button open-type='contact' plain='true' class='index_kefu contact_kefu'>联系客服</button>
<!-- <view class='contact_kefu'>联系客服</view> -->
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -5,6 +5,12 @@
}
.zuida{
background-color: #fafafa;
height: 100%;
overflow: hidden
}
.zuida.active{
height: 100%;
overflow: hidden
}
page {
/* background-color: #fafafa; */
... ... @@ -12,9 +18,9 @@ page {
height: 100%;
}
.big_page{
min-height: 100%
width: 100%;
}
.big_box.active{
.big_page.active{
height: 100%;
overflow: hidden
}
... ... @@ -385,7 +391,10 @@ page {
border-radius: 16rpx;
overflow: hidden;
}
.good_img image{
width: 100%;
height: 100%
}
.label_image {
width: 70rpx;
height: 70rpx;
... ... @@ -395,12 +404,14 @@ page {
}
.goods_img_image {
width: 200rpx;
height: 200rpx;
width: 200rpx!important;
height: 200rpx!important;
border-radius: 16rpx;
overflow: hidden
}
.good_right{
width: calc(100% - 220rpx)
}
.good_name {
height: 32rpx;
line-height: 32rpx;
... ... @@ -950,6 +961,10 @@ page {
}
.goods_one_right_one {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
... ... @@ -1994,3 +2009,6 @@ color:rgba(18,25,27,1);
/* background: red; */
/* padding-top: 200rpx; */
}
.goods_one_right{
width: calc(100% - 180rpx)
}
\ No newline at end of file
... ...
/* pages/index/select_source/select_source.wxss */
@import "../../../wxParse/wxParse/wxParse.wxss";
.wxParse-img{
width: 100%!important;
margin: -10rpx auto 0!important
}
\ No newline at end of file
... ...
... ... @@ -12,3 +12,6 @@
font-family: PingFang-SC-Medium;
line-height: 40rpx
}
.wxParse-img{
margin: -10rpx auto 0!important
}
\ No newline at end of file
... ...
... ... @@ -6,6 +6,9 @@
view{
width: 100%
}
.wxParse-img{
margin: -10rpx auto 0!important
}
.wxparse{
width: 100%
}
... ...
... ... @@ -390,6 +390,7 @@ after_order(e) {
go_pay(e) {
let index = e.currentTarget.dataset.index;
let orderList = this.data.orderList;
let amount = e.currentTarget.dataset.amount
let pay_type = orderList[index].pay_type;
let pay_order_sn = orderList[index].order_sn;
console.log(pay_order_sn)
... ... @@ -410,6 +411,9 @@ go_pay(e) {
success(res) {
console.log(456);
console.log(res);
wx.navigateTo({
url: '../paySuccess/paySuccess?order=' + pay_order_sn+'&amount='+amount,
})
},
fail(res) {
console.log(789);
... ...
... ... @@ -40,7 +40,7 @@
<view>
<view class='money_btn' wx:if='{{cell.status==1}}'>
<view class='cancel' catchtap='cancel_order' data-index='{{index}}' data-orderid='{{cell.id}}'>取消订单</view>
<view class='pay' data-order='{{cell.order_sn}}' catchtap='go_pay' data-index='{{index}}'>付款</view>
<view class='pay' data-order='{{cell.order_sn}}' catchtap='go_pay' data-amount='{{cell.amount}}' data-index='{{index}}'>付款</view>
</view>
<view class='money_btn' wx:elif='{{cell.status==2}}'>
<view class='cancel' data-index='{{index}}' catchtap='alert_send_goods' data-ordersn='{{cell.order_sn}}'>提醒发货</view>
... ... @@ -96,7 +96,7 @@
</view>
<view class='money_btn'>
<view class='cancel' catchtap='cancel_order' data-index='{{index}}' data-orderid='{{cell.id}}'>取消订单</view>
<view class='pay' catchtap='go_pay' data-index='{{index}}'>付款</view>
<view class='pay' data-order='{{cell.order_sn}}' catchtap='go_pay' data-amount='{{cell.amount}}' data-index='{{index}}'>付款</view>
</view>
</view>
</view>
... ...
// pages/my/paySuccess/paySuccess.js
Page({
/**
* 页面的初始数据
*/
data: {
order: null,
amount: null
},
//get_back
get_back(){
wx.switchTab({
url: '../my',
})
},
//返回首页
go_index(){
wx.switchTab({
url: '../../index/index',
})
},
//订单详情
go_order(){
wx.navigateTo({
url: '/pages/my/unship/unship?id='+this.data.order,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
order:options.order,
amount:options.amount
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return {
path: '/pages/start/start?share_id=' + app.globalData.user_id,
imgUrl: '',
title: ''
}
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<view class='page'>
<view class='banner'>
<view class='iconfont icon-fanhui' catchtap='get_back'></view>
<view class='coupons'>支付成功</view>
<view class='share'>
<button open-type='share' type='false' class='share_btn' plain='true'>
<image src='../../imgs/fenxinag.png'></image>
</button>
</view>
</view>
<view class='two'>
<view class='two_item'>
<view class='duigoua'>
<image src='../../imgs/duigoua.png'></image>
</view>
<view class='pay_success'>付款成功</view>
<view class='price'>¥{{amount}}</view>
</view>
<view class='two_two' bindtap='go_order'>订单详情</view>
<view class='two_three' bindtap='go_index'>返回首页</view>
</view>
</view>
\ No newline at end of file
... ...
page {
width: 100%;
height: 100%;
background: #fafafa;
}
.page {
width: 100%;
}
.share{
height: 86rpx;
width: 36rpx;
padding: 26rpx 0;
box-sizing: border-box
}
.share_btn {
width: 36rpx!important;
height: 34rpx!important;
/* background: transparent; */
padding: 0;
margin: 0;
border: 0 !important;
color: #222;
z-index: 999;
display: flex;
justify-content: center;
align-items: center
}
.share_btn image{
width: 100%;
height: 100%
}
.two {
width: 100%;
height: 380rpx;
padding: 0 25rpx;
box-sizing: border-box;
margin-top: 16rpx;
}
.two_item {
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 1);
border: 1rpx solid rgba(237, 237, 237, 1);
border-radius: 16rpx;
padding: 57rpx 0 70rpx 0;
box-sizing: border-box;
}
.duigoua {
width: 126rpx;
height: 110rpx;
margin: 0 auto;
}
.duigoua image{
width: 100%;
height: 100%
}
.pay_success {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffda44;
text-align: center;
margin-top: 19rpx;
}
.price {
height: 52rpx;
line-height: 52rpx;
margin-top: 41rpx;
font-size: 70rpx;
font-family: PingFang SC;
font-weight: bold;
color: rgba(51, 51, 51, 1);
text-align: center;
}
.two_two, .two_three {
width: 100%;
height: 80rpx;
background: #ffda44;
box-shadow: 0rpx 15rpx 30rpx 0rpx rgba(255,218,68,0.6);
border-radius: 40rpx;
text-align: center;
line-height: 80rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(255, 255, 255, 1);
margin-top: 80rpx;
}
.two_three {
color: rgba(51, 51, 51, 1);
background: rgba(255, 255, 255, 1);
border: 1px solid rgba(224, 224, 224, 1);
margin-top: 36rpx;
box-shadow: 0 0 0 0 transparent;
}
... ...
... ... @@ -10,7 +10,7 @@ Page({
addressIndex: 0,
address: {},
address_List: [],
address__id: 4,
address__id: null,
chooseFlagAddress: false,
timedat: '',
showad: false,
... ... @@ -66,7 +66,10 @@ Page({
optionsproId: '',
optionspackId: '',
optionscart: '',
timeflags:false
timeflags:false,
addd:null,
aamount: null,
dingdanid:null
},
//changeTime
changeTime() {
... ... @@ -76,16 +79,25 @@ Page({
},
//检测选择时间的picker
bindMultiPickerChange(e) {
if(this.data.panduan){
var addressId = this.data.deliverTimeId
} else {
var addressId = this.data.addd
}
this.setData({
multiIndex: e.detail.value,
timeflag:false
timeflag:false,
deliverTimeId: addressId,
})
},
//检测picker改变
bindMultiPickerColumnChange(e) {
if (this.data.timeflags){
// if (this.data.timeflags){
this.setData({
panduan: true
})
let that = this
var deliveryTimeId = that.data.deliverTimeId
var deliveryTimeId = null
let column = e.detail.column
let data = {
multiIndex: that.data.multiIndex,
... ... @@ -93,6 +105,7 @@ Page({
timeDataArray: that.data.timeDataArray
}
data.multiIndex[column] = e.detail.value;
console.log(e.detail.value+'shijiyaya')
switch (column) {
case 0:
data.multiArray[1] = that.data.week_two[e.detail.value]
... ... @@ -107,14 +120,6 @@ Page({
if (e == c) {
ele.children.forEach(function (eles, indexs) {
if (eles.disabled) {
if (b == eles.label) {
deliveryTimeId = eles.value
}
that.setData({
timeflag: false
})
} else {
console.log(909090)
wx.showToast({
title: '亲,该时间段已排满咯~',
icon: 'none'
... ... @@ -122,8 +127,16 @@ Page({
that.setData({
timeflag: true
})
deliveryTimeId = deliveryTimeId
return
} else {
if (b == eles.label) {
console.log('b')
deliveryTimeId = eles.value
console.log('时间id'+eles.value)
}
that.setData({
timeflag: false
})
}
})
}
... ... @@ -132,7 +145,7 @@ Page({
that.setData({
deliverTimeId: deliveryTimeId
})
}
// }
},
//判断星期几
getWeek() {
... ... @@ -158,35 +171,42 @@ Page({
week_arr.push(ele.label)
week_right.push(ele.arr)
});
week_right.splice(count, 1)
let foo = week_arr.indexOf(week)
if (foo > -1) {
week_arr.splice(foo, 1);
}
// weeks[0] = week_arr
// weeks[1] = week_right
// weeks[1] = ["13.00-15.00","15.00-17.00"]
var weeks_two = week_right
console.log('000')
var i = null
week_right.forEach(function (elee,indexe) {
if (elee.length == 0) {
i=indexe
week_arr.splice(indexe, 1)
}
})
week_right.splice(i,1)
console.log(week_right)
console.log(week_arr)
console.log(1414)
// week_right.splice(count, 1)
// let foo = week_arr.indexOf(week)
// console.log(foo)
// if (foo >= -1) {
// week_arr.splice(count, 1);
// }else{
// }
var weeks_two = week_right
this.setData({
timeDataArray: canlda,
week_arr: week_arr,
multiArray: weeks,
week_two: weeks_two
});
console.log('3232')
console.log(this.data.week_two)
this.start()
},
start() {
let arr1 = this.data.week_two
let week_arr = this.data.week_arr
console.log(arr1)
console.log(week_arr)
this.setData({
multiArray: [week_arr, arr1[0]]
})
console.log(111)
console.log([week_arr, arr1[0]])
},
//返回
get_my() {
... ... @@ -244,32 +264,43 @@ Page({
app.post(url, params).then(r => {
console.log(r)
var list = r.data.list;
var addid = null
r.data.vips.forEach(function(ele, index) {
ele.t = false
});
var n = 0
r.data.timeDataArray.forEach(function(ele, index) {
if(index==0){
ele.children.forEach(function(e,i){
if(!e.disabled){
n++
if (n == 1) {
addid = ele.children[0].value
}
}
})
var new_arr = []
for (let i = 0; i < ele.children.length; i++) {
if (ele.children[i].disabled){
} else {
new_arr.push(ele.children[i].label)
}
}
ele.arr = new_arr
})
var amount = that.data.amount + r.data.priceData.shipment_price
that.setData({
vip: r.data,
goodsList: r.data.list,
addressList: r.data.address,
address: r.data.address[0],
address__id:r.data.address[0].id,
vipList: r.data.vips,
timeDataArray: [],
timeDataArray: r.data.timeDataArray,
deliverList: r.data.timeDataArray,
addressList: r.data.address,
amount: that.data.amount,
addressId:addid
amount:amount,
addd:addid
});
console.log(addid+'刚进来')
if (that.data.num == 0) {
... ... @@ -291,30 +322,43 @@ Page({
app.post(url, params).then(r => {
if (r.code == 1) {
var list = r.data.list;
var n = 0
r.data.timeDataArray.forEach(function (ele, index) {
if (index == 0) {
ele.children.forEach(function (e, i) {
if (!e.disabled) {
n++
if (n == 1) {
addid = ele.children[0].value
}
}
})
var new_arr = []
for (let i = 0; i < ele.children.length; i++) {
if (ele.children[i].disabled) {
} else {
new_arr.push(ele.children[i].label)
}
}
ele.arr = new_arr
})
that.setData({
vip: r.data,
goodsList: r.data.list,
addressList: r.data.address,
address: r.data.address[0],
address__id: r.data.address[0].id,
vipList: r.data.vips,
timeDataArray: r.data.timeDataArray,
deliverList: r.data.timeDataArray,
ship_ment_price: r.data.priceData.shipment_price,
addressId:addid
addd:addid
});
// that.fetchAmount();
that.amount()
that.getWeek();
} else {
console.log(3333333333)
wx.showToast({
title: r.msg,
icon: 'none'
... ... @@ -338,11 +382,14 @@ Page({
vip: r.data,
goodsList: r.data.list,
addressList: r.data.address,
address: r.data.address[0],
address__id: r.data.address[0].id,
vipList: r.data.vips,
ship_ment_price: r.data.priceData.shipment_price
});
that.amount();
} else {
console.log(11111111)
wx.showToast({
title: r.msg,
icon: 'none',
... ... @@ -366,25 +413,37 @@ Page({
var totalPrice = that.data.totalPrice
app.post(url, params).then(r => {
if (r.code == 1) {
var n = 0
r.data.timeDataArray.forEach(function (ele, index) {
if (index == 0) {
ele.children.forEach(function (e, i) {
if (!e.disabled) {
n++
if (n == 1) {
addid = ele.children[0].value
}
}
})
var new_arr = []
for (let i = 0; i < ele.children.length; i++) {
if (ele.children[i].disabled) {
} else {
new_arr.push(ele.children[i].label)
}
}
ele.arr = new_arr
})
this.setData({
vip: r.data,
goodsList: r.data.list,
addressList: r.data.address,
address: r.data.address[0],
address__id: r.data.address[0].id,
vipList: r.data.vips,
timeDataArray: r.data.timeDataArray,
deliverList: r.data.timeDataArray,
ship_ment_price: r.data.priceData.shipment_price,
addressId:addid
addd:addid
})
this.getWeek();
}
... ... @@ -434,14 +493,24 @@ Page({
app.post(url, params).then(r => {
if (r.code == 1) {
console.log(r)
var n = 0
r.data.timeDataArray.forEach(function (ele, index) {
if (index == 0) {
ele.children.forEach(function (e, i) {
if (!e.disabled) {
n++
if (n == 1) {
addid = ele.children[0].value
}
}
})
var new_arr = []
for (let i = 0; i < ele.children.length; i++) {
if (ele.children[i].disabled) {
} else {
new_arr.push(ele.children[i].label)
}
}
ele.arr = new_arr
})
r.data.list.forEach(function(ele, index) {
... ... @@ -454,6 +523,8 @@ Page({
vip: r.data,
goodsList: r.data.list,
addressList: r.data.address,
address: r.data.address[0],
address__id: r.data.address[0].id,
vipList: r.data.vips,
timeDataArray: r.data.timeDataArray,
deliverList: r.data.timeDataArray,
... ... @@ -461,7 +532,7 @@ Page({
amount: price,
goodsTotalPrice: price,
last_total_price: price,
addressId: addid
addd: addid
});
this.getWeek();
}
... ... @@ -515,6 +586,14 @@ Page({
} else {
url = '/wxapp/cart/confirm2'
}
console.log(that.data.deliverTimeId + "配送时间ids")
if (that.data.deliverTimeId==undefined){
wx.showToast({
title: '请选择配送时间',
icon:'none'
})
return;
}
if (that.data.num != 0 && that.data.is_group == 0) {
console.log("商品直接购买")
if (index != -1) {
... ... @@ -786,26 +865,29 @@ Page({
}
}
}
console.log(params.delivery_time + "配送时间id")
if (that.data.last_total_price > 0) {
// if (that.data.amount > 0) {
if (that.data.is_group == 0) {
if (that.data.addressFlag) {
wx.showToast({
title: '请选择收货地址',
icon: 'none'
})
} else if (params.delivery_time == 0) {
wx.showToast({
title: '请选择配送时间',
icon: 'none'
})
} else {
// if (that.data.addressFlag) {
// wx.showToast({
// title: '请选择收货地址',
// icon: 'none'
// })
// } else if (params.delivery_time == 0) {
// wx.showToast({
// title: '请选择配送时间',
// icon: 'none'
// })
// } else {
app.post(url, params).then(res => {
if (res.code == 1) {
var order_sn = res.data.order_sn
var amount = res.data.amount
var dingdanid = res.data.order_id
that.setData({
order_sn: order_sn
order_sn: order_sn,
aamount: amount,
dingdanid:dingdanid
});
let url = '/wxapp/pay/index?order_sn=' + order_sn
app.post(url).then(r => {
... ... @@ -825,6 +907,9 @@ Page({
that.setData({
showad: true
})
wx.navigateTo({
url: '../paySuccess/paySuccess?order='+dingdanid+'&amount='+that.data.aamount,
})
console.log(showad+"真假值")
},
fail(res) {
... ... @@ -841,6 +926,9 @@ Page({
title: '支付成功',
icon: 'none'
})
wx.navigateTo({
url: '../paySuccess/paySuccess?order=' + dingdanid + '&amount=' + that.data.aamount,
})
wx.switchTab({
url: '../../index/index',
})
... ... @@ -854,6 +942,9 @@ Page({
paySign: r.data.jsApiParameters.paySign,
success(res) {
console.log(res);
wx.navigateTo({
url: '../paySuccess/paySuccess?order=' + dingdanid + '&amount=' + that.data.aamount,
})
},
fail(res) {
wx.navigateTo({
... ... @@ -885,14 +976,14 @@ Page({
return
}
})
}
} else {
if (that.data.addressFlag) {
wx.showToast({
title: '请选择收货地址',
icon: 'none'
})
// }
} else {
// if (that.data.addressFlag) {
// wx.showToast({
// title: '请选择收货地址',
// icon: 'none'
// })
// } else {
app.post(url, params).then(res => {
if (res.code == 1) {
var order_sn = res.data.order_sn
... ... @@ -961,6 +1052,7 @@ Page({
}
}
} else {
console.log(2222222222)
wx.showToast({
title: r.msg,
icon: 'none'
... ... @@ -969,7 +1061,7 @@ Page({
});
}
})
}
// }
}
} else {
wx.showToast({
... ...
... ... @@ -11,13 +11,11 @@
<!-- <view class='expected_time' bindtap='chooseTime' wx:if='{{is_group==0}}'> -->
<picker mode="multiSelector" wx:if='{{is_group==0}}' class='flex_box' bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range="{{multiArray}}">
<view class="picker_class">
<view class='zhanman'>
<view class='iconfont icon-time'></view>
<text class='hint' wx:if='{{timeflag}}'>选择时间</text>
<text class='hint' wx:else>{{multiArray[0][multiIndex[0]]}}{{multiArray[1][multiIndex[1]]}}</text>
<view class='hint' wx:if='{{timeflag}}'>选择时间</view>
<view class='hint' wx:else>{{multiArray[0][multiIndex[0]]}}{{multiArray[1][multiIndex[1]]}}</view>
<view class='centers'>送达</view>
</view>
<view class='iconfont icon-jinru add_left'></view>
</view>
</picker>
... ... @@ -28,9 +26,10 @@
</view>
<view class='expected_time' bindtap='openAddress'>
<view class='iconfont icon-position'></view>
<text wx:if='{{addressFlag}}'>请选择收货地址</text>
<text wx:else class='centers'>{{address.name}}\t\t\t\t{{address.mobile}}\n{{address.poiname}}\t\t{{address.doorplate}}\t\t</text>
<view class='iconfont icon-jinru dec_left {{address_jinru?"active":""}}'></view>
<!-- <text wx:if='{{addressFlag}}'>请选择收货地址</text> -->
<!-- <text wx:else class='centers'>{{address.name}}\t\t\t\t{{address.mobile}}\n{{address.poiname}}\t\t{{address.doorplate}}\t\t</text> -->
<text class='centers'>{{address.name}}\t\t\t\t{{address.mobile}}\n{{address.poiname}}\t\t{{address.doorplate}}\t\t</text>
<view class='iconfont icon-jinru dec_left active'></view>
</view>
</view>
... ...
... ... @@ -16,18 +16,6 @@ box-sizing: border-box;
.pages.activity{
overflow: hidden
}
.flex_box {
width: 100%;
}
.picker_class {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
position: relative;
}
.scroll{
width: 100%;
/* height: calc(100% - 600rpx); */
... ... @@ -120,7 +108,8 @@ position: relative;
margin-right: 18rpx;
color:rgba(255,68,68,1);
/* float: left; */
display: inline-block
display: inline-block;
}
.zhanman{
/* width: 100%; */
... ... @@ -131,7 +120,7 @@ position: relative;
/* float: left; */
display: inline-block;
color:rgba(34,34,34,1);
padding-right:16rpx;
padding-right:26rpx;
box-sizing: border-box;
flex-grow: 1;
overflow: hidden;
... ... @@ -166,10 +155,8 @@ position: relative;
.dec_left{
position: absolute;
right: 0rpx;
top: 24rpx;
}
.dec_left.active{
top: 4rpx
top: 50%;
transform: translateY(-50%)
}
.hint2 {
font-size: 22rpx;
... ... @@ -636,3 +623,17 @@ line-height: 45rpx;
align-items: center;
justify-content: center;
}
.flex_box {
width: 100%;
/* background: red */
}
.picker_class {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
position: relative;
}
\ No newline at end of file
... ...
... ... @@ -14,6 +14,7 @@ Page({
totalPrice: 0,
cancel_order:false,
cancel_value: '',
amount: null,
sale_arr: [],
cancel_reason: [{ id: 1, name: '我不想买了' }, { id: 2, name: '卖家缺货' }, { id: 3, name: '多拍了' }, { id: 4, name: '服务太差' }, { id: 5, name: '信息填写错误' }, { id: 6, name: '再等等' }, { id: 7, name: '其他原因' }],
},
... ... @@ -83,7 +84,7 @@ Page({
success(res) {
console.log(res);
wx.navigateTo({
url: '../myOrder/myOrder?status='+2,
url: '../paySuccess/paySuccess?order=' + pay_order_sn+'&amount='+this.data.amount,
})
},
fail(res) {
... ... @@ -184,7 +185,8 @@ Page({
delivery_time: delivery_time,
totalPrice: totalPrice,
sale_arr: arr,
More:More
More:More,
amount: r.data.info.amount
});
})
},
... ...
... ... @@ -35,7 +35,7 @@
"list": []
},
"miniprogram": {
"current": 93,
"current": 94,
"list": [
{
"id": -1,
... ... @@ -694,6 +694,12 @@
"pathName": "pages/my/wait_receite/wait_receite",
"query": "",
"scene": null
},
{
"id": -1,
"name": "支付成功页",
"pathName": "pages/my/paySuccess/paySuccess",
"scene": null
}
]
}
... ...