Browse Source

文档修改

master
nige 3 years ago
parent
commit
7d4fb24cba
  1. 2
      app.js
  2. 10
      pages/component/TitleHeader.js
  3. 18
      pages/info/postProductInfo/index.js
  4. 16
      pages/list/activitynew/index.js
  5. 17
      pages/list/activitynew/index.wxml
  6. 23
      pages/list/activitynew/index.wxss
  7. 4
      pages/map/index.wxml
  8. 20
      pages/order/components/address/index.js
  9. 65
      pages/order/postOrder/index.js
  10. 2
      pages/user/address/add/index.wxml
  11. 7
      pages/user/order/museumOrderInfo/index.wxml

2
app.js

@ -21,7 +21,7 @@ App({
unique_key: "wechatxcx" unique_key: "wechatxcx"
}).then(res => { }).then(res => {
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
data.isTest = data.isTest53? true : false; data.isTest = data.isTest54? true : false;
this.globalData.configJson = data this.globalData.configJson = data
}).then(() => { }).then(() => {
// 获取ui配置文件 // 获取ui配置文件

10
pages/component/TitleHeader.js

@ -73,7 +73,15 @@ Component({
// wx.switchTab({ // wx.switchTab({
// url: '/pages/user/user' // url: '/pages/user/user'
// }) // })
// } // }
else if (pages[pages.length-1].route.indexOf('pages/order/pay/index') != -1){
console.log(pages[pages.length-1]);
wx.redirectTo({
url:'/pages/user/order/list'
})
}
else if (pages[pages.length-1].route.indexOf('orderList') != -1){ else if (pages[pages.length-1].route.indexOf('orderList') != -1){
console.log(11111); console.log(11111);
wx.navigateTo({ wx.navigateTo({

18
pages/info/postProductInfo/index.js

@ -72,15 +72,15 @@ Page({
}) })
// 获取补贴 // 获取补贴
commonApi.user_post("product/getProductAllowancePrice", { // commonApi.user_post("product/getProductAllowancePrice", {
product_code: res.data.product_code // product_code: res.data.product_code
}).then(resTwo => { // }).then(resTwo => {
if (resTwo && resTwo.code == 1) { // if (resTwo && resTwo.code == 1) {
this.setData({ // this.setData({
allowance_data: resTwo.data // allowance_data: resTwo.data
}) // })
} // }
}) // })
this.BroswerRecord() this.BroswerRecord()
}) })
// 获取评价列表 // 获取评价列表

16
pages/list/activitynew/index.js

@ -10,7 +10,7 @@ Page({
data: { data: {
isYL: false, isYL: false,
selectDay: new Date().getTime(), selectDay: new Date().getTime(),
days: ['日', '一', '二', '三', '四', '五', '六'], days: [ '日','一', '二', '三', '四', '五', '六'],
types: [null, 'show', 'exhibition', 'scene', 'movie', 'lecture', 'other'], types: [null, 'show', 'exhibition', 'scene', 'movie', 'lecture', 'other'],
weeks: [], weeks: [],
pageNo: 1, pageNo: 1,
@ -20,7 +20,7 @@ Page({
total: 1, total: 1,
areas: ['姑苏', '吴江', '苏州'], areas: ['姑苏', '吴江', '苏州'],
area: 0, area: 0,
type: 2, type: 9,
movieType: 1, movieType: 1,
moreFlag: true, moreFlag: true,
lat: "", lat: "",
@ -80,9 +80,10 @@ Page({
total: 1, total: 1,
pageNo: 1, pageNo: 1,
moreFlag: true, moreFlag: true,
keywords: "", // keywords: "",
realKeywords: "" // realKeywords: ""
}) })
console.log(this.data.type);
this.getList(); this.getList();
}, },
changeArea: function (e) { changeArea: function (e) {
@ -110,6 +111,7 @@ Page({
date: putDate, date: putDate,
isSelect: i == myDate isSelect: i == myDate
}; };
reslist.push(item); reslist.push(item);
} }
this.setData({ this.setData({
@ -353,7 +355,11 @@ Page({
list: [], list: [],
pageNo: 1, pageNo: 1,
total: 1, total: 1,
moreFlag: true moreFlag: true,
date:null,
isYL: true,
selectDay: null
}) })
this.getList(); this.getList();
}, },

17
pages/list/activitynew/index.wxml

@ -15,6 +15,10 @@
</view> </view>
</view> </view>
<view scroll-x enable-flex class="types"> <view scroll-x enable-flex class="types">
<view class="type-item" bindtap="changeType" data-type="9">
<image src="https://static.ticket.sz-trip.com/uploads/20230208/{{type==9?'b44d3101973581c7efe097df2119504d':'4bf0b55112e6607e62a6b3498757b86f'}}.png" mode="widthFix"></image>
<view style="{{type==9?'color: #0B898E':''}}">全部</view>
</view>
<view class="type-item" bindtap="changeType" data-type="2"> <view class="type-item" bindtap="changeType" data-type="2">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon2{{type==2?'_active':''}}.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon2{{type==2?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==2?'color:#C155E9':''}}">展览</view> <view style="{{type==2?'color:#C155E9':''}}">展览</view>
@ -42,14 +46,21 @@
<view style="width:1rpx;flex-shrink:0;height:1rpx"></view> <view style="width:1rpx;flex-shrink:0;height:1rpx"></view>
</view> </view>
<view class="date-box" hidden="{{type==4}}"> <view class="date-box" hidden="{{type==4}}">
<view class="yulan{{isYL?' active':''}}" data-flag="0" bindtap="yulan">全部</view> <view class="yulan{{isYL?' active':''}}" data-flag="0" bindtap="yulan">
<view>
全部
</view>
<view>
日期
</view>
</view>
<view class="date-item {{item.times==selectDay?'active':''}}" wx:for="{{weeks}}" bindtap="changeDate" data-times="{{item.times}}"> <view class="date-item {{item.times==selectDay?'active':''}}" wx:for="{{weeks}}" bindtap="changeDate" data-times="{{item.times}}">
<view>{{item.date}}</view>
<view>周{{item.day}}</view> <view>周{{item.day}}</view>
<view>{{item.date}}</view>
</view> </view>
<picker mode="date" value="{{date}}" start="1970-01-01" end="2027-09-01" bindchange="bindDateChange"> <picker mode="date" value="{{date}}" start="1970-01-01" end="2027-09-01" bindchange="bindDateChange">
<view class="picker calendar-img{{isYL?'':' active'}}"> <view class="picker calendar-img{{isYL?'':' active'}}">
<image width="56rpx" height="60rpx" mode="aspectFill" src="https://static.ticket.sz-trip.com/xcxImages/activity/calendar{{isYL?'':'1'}}.png"></image> <image width="56rpx" height="60rpx" mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20230208/967796a90039681fee47e9271c2207d7.png"></image>
</view> </view>
</picker> </picker>
</view> </view>

23
pages/list/activitynew/index.wxss

@ -65,18 +65,18 @@ border-radius: 3rpx;
.yulan { .yulan {
flex-shrink: 0; flex-shrink: 0;
width: 60rpx; width: 60rpx;
padding-right: 20rpx;
line-height: 80rpx;
text-align: right; text-align: right;
background: #fff; background: #fff;
border-radius: 0px 30rpx 30rpx 0px; border-radius: 0px 30rpx 30rpx 0px;
color: #0B898E; color: #333333;
white-space: nowrap; white-space: nowrap;
font-size: 26rpx; font-size: 26rpx;
display: flex;
flex-direction: column;
} }
.yulan.active { .yulan.active {
background:#0B898E; color: #0B898E;
color:#fff;
} }
.date-item { .date-item {
font-size: 26rpx; font-size: 26rpx;
@ -85,10 +85,17 @@ border-radius: 3rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
width: 79rpx;
height:100%;
} }
.date-item.active { .date-item.active {
font-weight:500; font-weight:500;
color: #0B898E; color: #0B898E;
background: rgba(11, 137, 142, .1);
} }
.calendar-img { .calendar-img {
width: 70rpx; width: 70rpx;
@ -101,12 +108,12 @@ border-radius: 3rpx;
border-radius: 30rpx 0px 0px 30rpx; border-radius: 30rpx 0px 0px 30rpx;
} }
.calendar-img image { .calendar-img image {
width: 56rpx; width: 50rpx;
height: 60rpx; height: 50rpx;
display: block; display: block;
} }
.calendar-img.active { .calendar-img.active {
background-color: #0B898E;
} }
.top-fixed-activity { .top-fixed-activity {
background: #f7f7f7; background: #f7f7f7;

4
pages/map/index.wxml

@ -31,10 +31,10 @@
<text style="color:#00B3C8" class="iconfont icon-location"></text> <text style="color:#00B3C8" class="iconfont icon-location"></text>
<text>文保单位</text> <text>文保单位</text>
</view> </view>
<view class="right-menu-item{{type==7?' active':''}}" bindtap="changeType" data-title="影院" data-type="7"> <!-- <view class="right-menu-item{{type==7?' active':''}}" bindtap="changeType" data-title="影院" data-type="7">
<text style="color:#9342CB" class="iconfont icon-location"></text> <text style="color:#9342CB" class="iconfont icon-location"></text>
<text>影院</text> <text>影院</text>
</view> </view> -->
<view class="right-menu-item{{type==6?' active':''}}" bindtap="changeType" data-title="运河十景" data-type="6"> <view class="right-menu-item{{type==6?' active':''}}" bindtap="changeType" data-title="运河十景" data-type="6">
<text style="color:#EB3C70" class="iconfont icon-location"></text> <text style="color:#EB3C70" class="iconfont icon-location"></text>
<text>运河十景</text> <text>运河十景</text>

20
pages/order/components/address/index.js

@ -85,7 +85,7 @@ Component({
else { else {
commonApi.user_post("token/check").then(res=>{ commonApi.user_post("token/check").then(res=>{
if(res.code==1){ if(res.code==1){
this.getLinkmanList() this.getDefault()
} }
}) })
} }
@ -227,6 +227,24 @@ Component({
showMask:false showMask:false
}) })
this.triggerEvent("setAddress",item) this.triggerEvent("setAddress",item)
},
getDefault:function(e){
commonApi.user_post("token/check").then(res=>{
if(res.code==1){
userApi.user_post("user/getDefaultContact",{
contactType:"CONSIGNEE"
}).then(res=>{
console.log(res)
this.setData({
selectLinkman:res.data
})
if(res.data){
this.triggerEvent("setAddress",res.data)
}
this.getLinkmanList()
})
}
})
} }
} }
}) })

65
pages/order/postOrder/index.js

@ -28,7 +28,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
from: options.from, from: options.from,
kjId: app.globalData.kjId, kjId: app.globalData.kjId,
@ -269,38 +268,38 @@ Page({
coupon: app.globalData.couponInfo coupon: app.globalData.couponInfo
}) })
// 获取补贴 // 获取补贴
if (this.data.product.length == 1) { // if (this.data.product.length == 1) {
commonApi.user_post("product/getProductAllowancePrice", { // commonApi.user_post("product/getProductAllowancePrice", {
product_code: this.data.product[0].product.product_code // product_code: this.data.product[0].product.product_code
}).then(resTwo => { // }).then(resTwo => {
console.log(resTwo) // console.log(resTwo)
if (resTwo && resTwo.code == 1) { // if (resTwo && resTwo.code == 1) {
this.setData({ // this.setData({
allowance_data: resTwo.data // allowance_data: resTwo.data
}) // })
let spread_price = Number(this.data.allowance_data.discount_limit_price - this.data.allowance_data.user_used_price) // let spread_price = Number(this.data.allowance_data.discount_limit_price - this.data.allowance_data.user_used_price)
let sInfo = this.data.product[0].sku // let sInfo = this.data.product[0].sku
console.log(9999, this.data.allowance_data.discount_rate / 100 * sInfo.price) // console.log(9999, this.data.allowance_data.discount_rate / 100 * sInfo.price)
console.log(9999, spread_price) // console.log(9999, spread_price)
if (spread_price > 0) { // if (spread_price > 0) {
if (spread_price < this.data.allowance_data.discount_rate / 100 * sInfo.price) { // if (spread_price < this.data.allowance_data.discount_rate / 100 * sInfo.price) {
this.setData({ // this.setData({
allowance_price: spread_price // allowance_price: spread_price
}) // })
} else { // } else {
this.setData({ // this.setData({
allowance_price: this.data.allowance_data.discount_rate / 100 * sInfo.price // allowance_price: this.data.allowance_data.discount_rate / 100 * sInfo.price
}) // })
} // }
this.changePrice() // this.changePrice()
} else { // } else {
this.setData({ // this.setData({
allowance_price: 0 // allowance_price: 0
}) // })
} // }
} // }
}) // })
} // }
}, },
/** /**

2
pages/user/address/add/index.wxml

@ -24,7 +24,7 @@
</view> </view>
<view class="input-item"> <view class="input-item">
<text class="input-label">设为默认</text> <text class="input-label">设为默认</text>
<switch checked="{{formData.isDefault}}" bindchange="setDefault" /> <switch checked="{{formData.is_default}}" bindchange="setDefault" />
</view> </view>
</view> </view>
<view class="btn" bindtap="save">保存</view> <view class="btn" bindtap="save">保存</view>

7
pages/user/order/museumOrderInfo/index.wxml

@ -32,11 +32,11 @@
<text>商品总价</text> <text>商品总价</text>
<text>¥{{info.total_money/100}}</text> <text>¥{{info.total_money/100}}</text>
</view> </view>
<view class="detail-item" wx:if="{{info.total_post_fee}}"> <view class="detail-item">
<text>运费</text> <text>运费</text>
<text>¥{{info.total_post_fee/100}}</text> <text>¥{{info.total_post_fee/100}}</text>
</view> </view>
<view class="detail-item" wx:if="{{info.preference_money}}"> <view class="detail-item">
<text>优惠券抵扣</text> <text>优惠券抵扣</text>
<text>-¥{{info.preference_money/100}}</text> <text>-¥{{info.preference_money/100}}</text>
</view> </view>
@ -78,6 +78,9 @@
<view class="detail-item"> <view class="detail-item">
<text>{{item.title}}:{{item.id_number}}</text> <text>{{item.title}}:{{item.id_number}}</text>
</view> </view>
<view class="detail-item" wx:if="{{item.tel}}">
<text>手机号:{{item.tel}}</text>
</view>
</view> </view>
</view> </view>
<view class="box" wx:if="{{info}}"> <view class="box" wx:if="{{info}}">

Loading…
Cancel
Save