Commit 4bb5939d by 严立

LL - 订单修改

parent 67aac7a4
......@@ -103,7 +103,12 @@ Page({
'priceDiscountText': App.modular.utils.formatAmount(funcResponse[i].price), // 活动价文本格式
'priceType': 1,
'describe': funcResponse[i].synopsis,
'describeDetail': '', // 商品描述详情,在点击详情时获得数据
'tags': funcResponse[i].tags,
'quantityMin': 1,
'quantityMax': funcResponse[i].number,
'isActive': true,
}
let funcUserType = wx.getStorageSync('userInfo').userType
......@@ -168,6 +173,8 @@ Page({
let funcResponse = response.data
funcItem.banner = funcResponse.imgs.split('|')
funcItem.banner.pop()
funcItem.describeDetail = funcResponse.particulars
this.setData({
commodityDetail: funcItem,
winCommodityDetail: true
......
......@@ -117,7 +117,7 @@
<view class="popup-info-wrapper">
<view class="popuo-info-title">{{commodityDetail.name}}</view>
<view class="popup-info-text">{{commodityDetail.describe}}</view>
<view class="popup-info-text">{{commodityDetail.describeDetail}}</view>
</view>
<view class="popup-footer-wrapper">
......
......@@ -103,6 +103,7 @@ Page({
'priceDiscountText': App.modular.utils.formatAmount(funcResponse[i].price), // 活动价文本格式
'priceType': 1,
'describe': funcResponse[i].synopsis,
'describeDetail': '',
'tags': funcResponse[i].tags,
}
......@@ -168,6 +169,8 @@ Page({
let funcResponse = response.data
funcItem.banner = funcResponse.imgs.split('|')
funcItem.banner.pop()
funcItem.describeDetail = funcResponse.particulars
this.setData({
commodityDetail: funcItem,
winCommodityDetail: true
......
......@@ -117,7 +117,7 @@
<view class="popup-info-wrapper">
<view class="popuo-info-title">{{commodityDetail.name}}</view>
<view class="popup-info-text">{{commodityDetail.describe}}</view>
<view class="popup-info-text">{{commodityDetail.describeDetail}}</view>
</view>
<view class="popup-footer-wrapper">
......
......@@ -206,7 +206,7 @@ Page({
titleColor: '#15191F',
success: (response) => {
if (response.confirm) {
// wx.setStorageSync('shoppingCartBuffer', [])
wx.setStorageSync('shoppingCartBuffer', [])
this.setData({
shoppingCart: []
})
......
......@@ -220,6 +220,9 @@ Page({
console.log(response)
}
})
this.setData({
'orderList': [],
})
this.queryOrder()
},
......@@ -241,7 +244,9 @@ Page({
console.log(response)
}
})
this.setData({
'orderList': [],
})
this.queryOrder()
},
......
......@@ -23,6 +23,8 @@ Page({
fromPage: options.fromPage === 'order' ? 'order' : ''
})
console.log(funcOrderInfo, '--------------------------')
this.queryOrderDetail()
},
......
......@@ -167,8 +167,8 @@
<view class="tip-describe col">
<text>{{'订单编号:' + orderInfo.tipOrderNo}}</text>
<text>{{'下单时间:' + orderInfo.tipTimeSubmit}}</text>
<text>{{'付款时间:' + orderInfo.tipTimePay}}</text>
<text>{{'获得积分:' + orderInfo.tipIntegral}}</text>
<text wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'付款时间:' + orderInfo.tipTimePay}}</text>
<text wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'获得积分:' + orderInfo.tipIntegral}}</text>
</view>
</view>
</view>
\ No newline at end of file
......@@ -122,7 +122,6 @@
max-width: 62rpx;
max-height: 62rpx;
margin-right: 16rpx;
background: #999999;
}
.commodity-item {
......@@ -135,7 +134,6 @@
width: 140rpx;
height: 136rpx;
margin-right: 24rpx;
background: #999999;
}
.commodity-item-info {
......
......@@ -89,7 +89,6 @@ Page({
this.setShoppingCartData()
this.setView()
this.animation = wx.createAnimation({
duration: 700,
timingFunction: 'ease'
......@@ -507,7 +506,9 @@ Page({
// 整合商品数据
let funcCommodity = []
let funcShoppingCartList = this.data.shoppingCartList
console.log(funcShoppingCartList)
for (let i = 0, l = funcShoppingCartList.length; i < l; i++) {
if (funcShoppingCartList.isActive) {
let funcItem = {
'smCommodity': {
'id': funcShoppingCartList[i].id,
......@@ -523,6 +524,7 @@ Page({
}
funcCommodity.push(funcItem)
}
}
// 整合用户数据
let funcUserInfo = []
......@@ -548,6 +550,10 @@ Page({
},
success: (response) => {
let funcResponse = response.data.wxRequest
// 库存不足
// if (funcResponse.)
// 库存充足正常下单支付
pagePayId = response.data.orderId
this.setData({
orderId: pagePayId
......@@ -559,10 +565,10 @@ Page({
'package': funcResponse.package,
'signType': funcResponse.signType,
'paySign': funcResponse.paySign,
'success': (response) => {
success: (response) => {
if (response.errMsg === 'requestPayment:ok') {
// 用户点击支付完成按钮回调
this.payStatus(true)
// this.payStatus(true)
}
if (response.errMsg === 'requestPayment:fail cancel') {
......@@ -570,7 +576,7 @@ Page({
this.payStatus(false)
}
},
'fail': function (response) {
fail: (response) => {
clearInterval(App.globalData.payStateTimer)
this.payStatus(false)
}
......@@ -618,8 +624,16 @@ Page({
*/
payStatus: function (funcPayResult) {
clearInterval(App.globalData.payStateTimer)
if (funcPayResult) {
// 支付成功进入成功页面
wx.navigateTo({
url: '/pages/pay/order-state/order-state?state=' + funcPayResult + '&amount=' + this.data.buyContentAmount + '&orderId=' + this.data.orderId
})
} else {
// 取消支付直接进入订单
wx.reLaunch({
url: '/pages/pay/order-detail/order-detail?id=' + this.data.orderId + '&fromPage=order'
})
}
},
})
\ No newline at end of file
......@@ -208,4 +208,74 @@ Page({
url: '/pages/play/movie/movie'
})
},
// 游客攻略列表
loadVisiterPlanList() {
this.data.loading = true
var that = this
app.wxRequest({
url: '/api/v1/strategy/getList',
data: { pageSize: that.data.pageSize + '', pageNo: that.data.pageNo + '' },
success: function (res) {
that.setData({
loading: false
})
if (res.data.list.length > 0) {
let count = that.data.strategyOriginList.length
if (that.data.pageNo == 1) {
count = 0
}
let tempArray = []
for (let i = 0; i < res.data.list.length; i++) {
let item = res.data.list[i]
let strategy = {
id: item.id,
image: (count == 0 && i == 0) ? item.topImg : item.cover,
title: item.title,
date: item.updateDate,
index: count + i - 1,
}
tempArray.push(strategy)
}
console.log('tempArray', tempArray)
if (that.data.pageNo == 1) {
var newArr = tempArray.slice(1)
var firstItem = tempArray[0]
console.log('firstItem', firstItem)
that.setData({
moreData: (tempArray.length >= Number(res.data.count)) ? false : true,
['strategyFirstItem.id']: firstItem.id,
['strategyFirstItem.image']: firstItem.image,
['strategyFirstItem.title']: firstItem.title,
['strategyFirstItem.date']: firstItem.date,
strategyList: newArr,
strategyOriginList: tempArray,
})
} else {
that.setData({
moreData: (count + tempArray.length >= Number(res.data.count)) ? false : true,
strategyOriginList: that.data.strategyOriginList.concat(tempArray),
strategyList: tempArray,
})
}
// 游客攻略瀑布列表
wx.lin.renderWaterFlow(that.data.strategyList, that.data.pageNo == 1 ? true : false, () => { })
} else {
}
},
fail: function (err) {
that.setData({
loading: false
})
}
})
},
})
\ No newline at end of file
......@@ -70,10 +70,13 @@
</block>
</swiper>
<view class="title-wrapper row align-c">
<image class="title" src="./image/title-route.png">游客攻略</image>
<!-- 游客攻略 -->
<view class="route">
<view class="title row align-c">
<image src="./image/title-route.png">游客攻略</image>
</view>
<view>
<view class="route-list">
</view>
</view>
</view>
\ No newline at end of file
......@@ -29,12 +29,14 @@
width: 130rpx;
height: 20rpx;
}
.banner {
position: relative;
margin-top: 200rpx;
width: 750rpx;
height: 1200rpx;
}
.art-button {
position: absolute;
top: 40rpx;
......@@ -43,6 +45,7 @@
height: 260rpx;
background: transparent;
}
.health-button {
position: absolute;
top: 320rpx;
......@@ -51,6 +54,7 @@
height: 376rpx;
background: transparent;
}
.food-button {
position: absolute;
top: 350rpx;
......@@ -59,6 +63,7 @@
height: 376rpx;
background: transparent;
}
.leisure-button {
position: absolute;
top: 788rpx;
......@@ -66,8 +71,8 @@
width: 304rpx;
height: 308rpx;
background: transparent;
}
.hotel-button {
position: absolute;
top: 820rpx;
......@@ -75,37 +80,36 @@
width: 296rpx;
height: 328rpx;
background: transparent;
}
.title-wrapper {
width: 670rpx;
margin-top: 30rpx;
}
.title {
width: 184rpx;
height: 44rpx;
}
.all {
width: 104rpx;
height: 36rpx;
background-color: #ccc;
}
.recent-swiper {
width: 750rpx;
height: 721rpx;
margin-top: 80rpx;
padding-bottom: 50rpx;
}
.recent-item {
width: 712rpx;
}
.recent-item image {
width: 648rpx;
background-color: #ccc;
}
.recent-item-left {
margin-left: 40rpx;
}
.recent-item-center {
margin-left: 51rpx;
}
......@@ -116,17 +120,20 @@
margin-top: 48rpx;
padding-bottom: 50rpx;
}
.movie-item {
width: 712rpx;
}
.movie-wrapper {
position: relative;
width: 648rpx;
height: 326rpx;
padding: 40rpx 40rpx 40rpx 260rpx;
background-color: #F5F6F8;
background-color: #f5f6f8;
border-radius: 4rpx;
}
.movie-cover {
position: absolute;
left: 40rpx;
......@@ -136,24 +143,29 @@
background-color: #ccc;
border-radius: 4rpx;
}
.movie-item-left {
margin-left: 40rpx;
}
.movie-item-center {
margin-left: 51rpx;
}
.movie-info-wrapper {
margin-left: 40rpx;
}
.movie-name text {
display: -webkit-box;
color: #15191F;
color: #15191f;
font-size: 30rpx;
max-width: 240rpx;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.movie-dimensional {
width: 52rpx;
height: 32rpx;
......@@ -163,25 +175,29 @@
font-size: 20rpx;
text-align: center;
line-height: 32rpx;
background: #15191F;
background: #15191f;
opacity: 0.5;
border-radius: 4rpx;
}
.movie-info {
margin-top: 16rpx;
font-size: 26rpx;
}
.movie-info-left {
color: #959DA9;
color: #959da9;
}
.movie-info-right {
display: -webkit-box;
margin-left: 8rpx;
color: #656E7B;
color: #656e7b;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.movie-btn {
width: 152rpx;
height: 56rpx;
......@@ -190,12 +206,10 @@
font-size: 26rpx;
text-align: center;
line-height: 56rpx;
background: #86C5E1;
background: #86c5e1;
border-radius: 4rpx;
}
/* .banner,
swiper {
position: relative;
......@@ -230,6 +244,7 @@ swiper-item {
}
/* 更多活动 */
.activity {
width: 100%;
height: 34rpx;
......@@ -237,7 +252,7 @@ swiper-item {
padding: 0 56rpx;
font-size: 26rpx;
font-weight: bolder;
color: #1E2025;
color: #1e2025;
}
.activity image {
......@@ -246,6 +261,7 @@ swiper-item {
}
/* 装饰波浪 */
.ornament-wave {
width: 750rpx;
height: 60rpx;
......@@ -258,10 +274,11 @@ swiper-item {
}
/* 标签选择 */
.tab {
width: 100%;
padding: 40rpx 40rpx 0 40rpx;
background: #ffffff;
background: #fff;
}
.tab-fixed {
......@@ -275,7 +292,7 @@ swiper-item {
.tab-blank {
width: 750rpx;
height: 190rpx;
background: #ffffff;
background: #fff;
}
.tab .tab-item-active {
......@@ -283,7 +300,7 @@ swiper-item {
height: 100rpx;
margin-bottom: 16rpx;
border-radius: 50%;
background: #E3EEFF;
background: #e3eeff;
}
.tab .tab-item-inactive {
......@@ -295,11 +312,11 @@ swiper-item {
}
.tab .tab-item-text-active {
color: #15191F;
color: #15191f;
}
.tab .tab-item-text-inactive {
color: #959DA9;
color: #959da9;
}
.tab-item text {
......@@ -313,6 +330,7 @@ swiper-item {
}
/* 标签详情 */
.detail {
width: 750rpx;
min-height: 500rpx;
......@@ -326,6 +344,7 @@ swiper-item {
}
/* 商店详情 */
.shop-item {
position: relative;
width: 750rpx;
......@@ -344,13 +363,12 @@ swiper-item {
position: absolute;
width: 534rpx;
height: 96rpx;
background: #86C5E1;
background: #86c5e1;
border-radius: 2px;
overflow: hidden;
font-size: 30rpx;
font-weight: 500;
color: #ffffff;
color: #fff;
line-height: 42rpx;
}
......@@ -358,3 +376,14 @@ image {
width: 100%;
height: 100%;
}
/* 游客攻略 */
.title {
width: 670rpx;
margin-top: 30rpx;
}
.title > image {
width: 184rpx;
height: 44rpx;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment