Browse Source

文档修复

master
nige 3 years ago
parent
commit
4ea8c503a4
  1. 3
      pages/info/postProductInfo/index.js
  2. 9
      pages/list/activitynew/index.wxml
  3. 223
      pages/order/components/address/index.js
  4. 8
      pages/order/postOrder/index.js
  5. 4
      pages/pbService/sceneComfort/index.wxml
  6. 2
      pages/pbService/sceneComfort/index.wxss
  7. 1
      pages/user/cartlist/list.js
  8. 1
      pages/user/coupon/index.wxml
  9. 7
      pages/user/coupon/index.wxss
  10. 3
      pages/user/order/movieOrderInfo/index.wxml
  11. 52
      pages/user/order/sceneOrderInfo/index.js

3
pages/info/postProductInfo/index.js

@ -40,7 +40,8 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log(options); //删除临时存储的联系人
wx.removeStorageSync('linkMan')
let rect = wx.getMenuButtonBoundingClientRect(), let rect = wx.getMenuButtonBoundingClientRect(),
that = this; that = this;
let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight; let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight;

9
pages/list/activitynew/index.wxml

@ -27,14 +27,15 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon1{{type==1?'_active':''}}.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon1{{type==1?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==1?'color:#FFB423':''}}">演出</view> <view style="{{type==1?'color:#FFB423':''}}">演出</view>
</view> </view>
<view class="type-item" bindtap="changeType" data-type="4">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon4{{type==4?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==4?'color:#63B71F':''}}">电影</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>
</view> </view>
<view class="type-item" bindtap="changeType" data-type="4">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon4{{type==4?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==4?'color:#63B71F':''}}">电影</view>
</view>
<!-- <view class="type-item" bindtap="changeType" data-type="5"> <!-- <view class="type-item" bindtap="changeType" data-type="5">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon5{{type==5?'_active':''}}.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon5{{type==5?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==5?'color:#0B898E':''}}">讲座</view> <view style="{{type==5?'color:#0B898E':''}}">讲座</view>

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

@ -18,82 +18,94 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
selectLinkman:null, selectLinkman: null,
linkmanList:[], linkmanList: [],
showMask:false, showMask: false,
editId:null editId: null
}, },
lifetimes: { lifetimes: {
attached: function() { attached: function () {
// 在组件实例进入页面节点树时执行 // 在组件实例进入页面节点树时执行
// 获取默认联系人 // 获取默认联系人 如果有临时存储的联系人则不获取默认联系人
commonApi.user_post("token/check").then(res=>{ commonApi.user_post("token/check").then(res => {
if(res.code==1){ if (res.code == 1) {
userApi.user_post("user/getDefaultContact",{ console.log(wx.getStorageSync('linkMan'));
contactType:"CONSIGNEE" if (wx.getStorageSync('linkMan')) {
}).then(res=>{
console.log(res)
this.setData({
selectLinkman:res.data
})
if(res.data){
this.triggerEvent("setAddress",res.data)
}
this.getLinkmanList() this.getLinkmanList()
}) } else {
userApi.user_post("user/getDefaultContact", {
contactType: "CONSIGNEE"
}).then(res => {
this.setData({
selectLinkman: res.data
})
if (res.data) {
this.triggerEvent("setAddress", res.data)
}
this.getLinkmanList()
})
}
} }
}) })
}, },
detached: function() { detached: function () {
// 在组件实例被从页面节点树移除时执行 // 在组件实例被从页面节点树移除时执行
}, },
}, },
pageLifetimes: { pageLifetimes: {
show: function() { show: function () {
// 页面被展示 // 页面被展示
if(this.data.editId){ if (this.data.editId) {
let editId = this.data.editId; let editId = this.data.editId;
userApi.user_post("user/getContactInfoById",{ userApi.user_post("user/getContactInfoById", {
id:editId id: editId
}).then(res=>{ }).then(res => {
let selectLinkman = this.data.selectLinkman,linkmanList = this.data.linkmanList; let selectLinkman = this.data.selectLinkman,
if(selectLinkman.id==editId){ linkmanList = this.data.linkmanList;
if (selectLinkman.id == editId) {
selectLinkman.name = res.data.name; selectLinkman.name = res.data.name;
selectLinkman.tel = res.data.tel; selectLinkman.tel = res.data.tel;
selectLinkman.address = res.data.address; selectLinkman.address = res.data.address;
selectLinkman.is_default = res.data.is_default; selectLinkman.is_default = res.data.is_default;
} }
linkmanList.map(item=>{ linkmanList.map(item => {
if(item.id==editId){ if (item.id == editId) {
item.name = res.data.name; item.name = res.data.name;
item.tel = res.data.tel; item.tel = res.data.tel;
item.address = res.data.address; item.address = res.data.address;
item.is_default = res.data.is_default; item.is_default = res.data.is_default;
} } else if (res.data.is_default == 1 && item.is_default == 1) {
else if(res.data.is_default==1 && item.is_default==1){
item.is_default = 0; item.is_default = 0;
} }
}) })
this.setData({ this.setData({
linkmanList:linkmanList, linkmanList: linkmanList,
selectLinkman:selectLinkman selectLinkman: selectLinkman
}) })
this.triggerEvent("setAddress",res.data) this.triggerEvent("setAddress", res.data)
}) })
} } else {
else { commonApi.user_post("token/check").then(res => {
commonApi.user_post("token/check").then(res=>{ if (res.code == 1) {
if(res.code==1){ if (!wx.getStorageSync('linkMan')) {
this.getDefault() this.getDefault()
}else{
this.setData({
selectLinkman: wx.getStorageSync('linkMan')
})
this.triggerEvent("setAddress",wx.getStorageSync('linkMan'))
this.getLinkmanList()
}
} }
}) })
} }
}, },
hide: function() { hide: function () {
// 页面被隐藏 // 页面被隐藏
}, },
resize: function(size) { resize: function (size) {
// 页面尺寸变化 // 页面尺寸变化
} }
}, },
@ -102,23 +114,23 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
gotoEdit:function(e){ gotoEdit: function (e) {
this.setData({ this.setData({
editId:e.currentTarget.dataset.item.id editId: e.currentTarget.dataset.item.id
}) })
wx.navigateTo({ wx.navigateTo({
url: '/pages/user/address/add/index?id='+this.data.editId+'&from=order', url: '/pages/user/address/add/index?id=' + this.data.editId + '&from=order',
}) })
this.setData({ this.setData({
editId:null editId: null
}) })
}, },
showLinkman:function(){ showLinkman: function () {
this.setData({ this.setData({
showMask:!this.data.showMask showMask: !this.data.showMask
}) })
}, },
cancel:function(){ cancel: function () {
// let selectLinkman = this.data.selectLinkman,linkmanList = this.data.linkmanList; // let selectLinkman = this.data.selectLinkman,linkmanList = this.data.linkmanList;
// linkmanList.map(linkman=>{ // linkmanList.map(linkman=>{
// linkman.selected = 0; // linkman.selected = 0;
@ -131,85 +143,90 @@ Component({
// }) // })
this.showLinkman() this.showLinkman()
}, },
confirm:function(){ confirm: function () {
let linkmanList = this.data.linkmanList,selectLinkman = null; let linkmanList = this.data.linkmanList,
linkmanList.map(linkman=>{ selectLinkman = null;
if(linkman.selected==1){ linkmanList.map(linkman => {
if (linkman.selected == 1) {
selectLinkman = (linkman); selectLinkman = (linkman);
} }
}) })
this.setData({ this.setData({
selectLinkman:selectLinkman selectLinkman: selectLinkman
}) })
this.triggerEvent("setAddress",selectLinkman) this.triggerEvent("setAddress", selectLinkman)
this.showLinkman() this.showLinkman()
}, },
getLinkmanList:function(){ getLinkmanList: function () {
// 直接获取1000条出行人信息 就不要分页了 // 直接获取1000条出行人信息 就不要分页了
userApi.user_post("user/getContactOrConsignee",{ userApi.user_post("user/getContactOrConsignee", {
contactType:"CONSIGNEE", contactType: "CONSIGNEE",
offset:0, offset: 0,
limit:1000 limit: 1000
}).then(res=>{ }).then(res => {
let list = res.data; let list = res.data;
this.setData({ this.setData({
linkmanList:list linkmanList: list
}) })
}) })
}, },
setDefault:function(e){ setDefault: function (e) {
let item = e.currentTarget.dataset.item,linkmanList = this.data.linkmanList; let item = e.currentTarget.dataset.item,
userApi.user_post("user/setDefaultConsignee",{ linkmanList = this.data.linkmanList;
id:item.id userApi.user_post("user/setDefaultConsignee", {
}).then(res=>{ id: item.id
if(res.code==1){ }).then(res => {
if (res.code == 1) {
wx.showToast({ wx.showToast({
title: '设置成功', title: '设置成功',
icon: 'success' icon: 'success'
}) })
linkmanList.map(linkman=>{ linkmanList.map(linkman => {
if(linkman.id==item.id){ if (linkman.id == item.id) {
linkman.is_default=1; linkman.is_default = 1;
} } else {
else {
linkman.is_default = 0; linkman.is_default = 0;
} }
}) })
this.setData({ this.setData({
linkmanList:linkmanList linkmanList: linkmanList
}) })
} }
}) })
}, },
delLinkman:function(e){ delLinkman: function (e) {
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
}) })
let index = e.currentTarget.dataset.index,selectLinkman = this.data.selectLinkman; let index = e.currentTarget.dataset.index,
selectLinkman.splice(index,1); selectLinkman = this.data.selectLinkman;
selectLinkman.splice(index, 1);
this.setData({ this.setData({
selectLinkman:selectLinkman selectLinkman: selectLinkman
}) })
wx.hideLoading() wx.hideLoading()
}, },
del:function(e){ del: function (e) {
let item = e.currentTarget.dataset.item,index = e.currentTarget.dataset.index,that = this,linkmanList=this.data.linkmanList; let item = e.currentTarget.dataset.item,
index = e.currentTarget.dataset.index,
that = this,
linkmanList = this.data.linkmanList;
wx.showModal({ wx.showModal({
title:"提示", title: "提示",
content:"确定删除吗?", content: "确定删除吗?",
success (res) { success(res) {
if (res.confirm) { if (res.confirm) {
userApi.user_post("user/delConsignee",{ userApi.user_post("user/delConsignee", {
id:item.id id: item.id
}).then(res=>{ }).then(res => {
if(res.code==1){ if (res.code == 1) {
wx.showToast({ wx.showToast({
title: '删除成功', title: '删除成功',
icon:"success" icon: "success"
}) })
linkmanList.splice(index,1); linkmanList.splice(index, 1);
that.setData({ that.setData({
linkmanList:linkmanList linkmanList: linkmanList
}) })
} }
}) })
@ -220,26 +237,28 @@ Component({
} }
}) })
}, },
selectIt:function(e){ selectIt: function (e) {
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item;
this.setData({ this.setData({
selectLinkman:item, selectLinkman: item,
showMask:false showMask: false
}) })
this.triggerEvent("setAddress",item) wx.setStorageSync('linkMan', item)
console.log(wx.getStorageSync('linkMan'));
this.triggerEvent("setAddress", item)
}, },
getDefault:function(e){ getDefault: function (e) {
commonApi.user_post("token/check").then(res=>{ commonApi.user_post("token/check").then(res => {
if(res.code==1){ if (res.code == 1) {
userApi.user_post("user/getDefaultContact",{ userApi.user_post("user/getDefaultContact", {
contactType:"CONSIGNEE" contactType: "CONSIGNEE"
}).then(res=>{ }).then(res => {
console.log(res) console.log(res)
this.setData({ this.setData({
selectLinkman:res.data selectLinkman: res.data
}) })
if(res.data){ if (res.data) {
this.triggerEvent("setAddress",res.data) this.triggerEvent("setAddress", res.data)
} }
this.getLinkmanList() this.getLinkmanList()
}) })

8
pages/order/postOrder/index.js

@ -70,9 +70,10 @@ Page({
}) })
}, },
setAddress: function (e) { setAddress: function (e) {
this.setData({ console.log('我触发了');
address: e.detail this.setData({
}) address: e.detail
})
this.getPostFee() this.getPostFee()
}, },
minus: function (e) { minus: function (e) {
@ -308,6 +309,7 @@ Page({
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () { onHide: function () {
console.log(12312312321);
}, },

4
pages/pbService/sceneComfort/index.wxml

@ -53,9 +53,9 @@
</view> </view>
<view wx:if="{{item.comfort_level===itemY.level}}" wx:for-item="itemY" style="color:{{itemY.color}}" wx:for="{{comfortLevel}}" class="two">{{itemY.desc}}</view> <view wx:if="{{item.comfort_level===itemY.level}}" wx:for-item="itemY" style="color:{{itemY.color}}" wx:for="{{comfortLevel}}" class="two">{{itemY.desc}}</view>
</view> </view>
<view class="num"> <!-- <view class="num">
瞬时承载量:{{item.ins_carry_capacity}}人 瞬时承载量:{{item.ins_carry_capacity}}人
</view> </view> -->
</view> </view>
<view class="other-tip"> <view class="other-tip">
<text>更新时间:{{item.status_time}}</text> <text>更新时间:{{item.status_time}}</text>

2
pages/pbService/sceneComfort/index.wxss

@ -133,7 +133,7 @@ font-weight: 500;
color: #83D851; color: #83D851;
} }
.info{ .info{
width: 650rpx; width: 630rpx;
min-height: 134rpx; min-height: 134rpx;
border-radius: 10rpx; border-radius: 10rpx;
padding: 28rpx 20rpx; padding: 28rpx 20rpx;

1
pages/user/cartlist/list.js

@ -28,6 +28,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
wx.removeStorageSync('linkMan')
this.getList(); this.getList();
}, },
manage: function () { manage: function () {

1
pages/user/coupon/index.wxml

@ -18,7 +18,6 @@
<view class="yuan l"> <view class="yuan l">
</view> </view>
<view class="line"> <view class="line">
---------------------------------------------
</view> </view>
<view class="yuan r"> <view class="yuan r">
</view> </view>

7
pages/user/coupon/index.wxss

@ -103,10 +103,11 @@ page {
.coupon-tip text { .coupon-tip text {
color: #999999; color: #999999;
display: inline-block; display: inline-block;
width: 160rpx; width: 130rpx;
} }
.coupon-rule { .coupon-rule {
font-size: 26rpx; font-size: 26rpx;
margin-top: 20rpx;
} }
.rule-text{ .rule-text{
@ -132,3 +133,7 @@ page {
.fixed-btn text { .fixed-btn text {
color: #0B898E; color: #0B898E;
} }
.line{
height: 25rpx;
border-bottom: dashed 1rpx #D8D8D8;
}

3
pages/user/order/movieOrderInfo/index.wxml

@ -71,6 +71,9 @@
<view class="detail-item"> <view class="detail-item">
<text>座位:{{info.order_product_list[0].order_product_extend.seats_list}}</text> <text>座位:{{info.order_product_list[0].order_product_extend.seats_list}}</text>
</view> </view>
<view class="detail-item" wx:if="{{info.order_product_list[0].order_product_extend.ticket_code}}">
<text style="color: #D62828;">{{info.order_product_list[0].order_product_extend.ticket_code}} 请凭取票凭证码至影院大厅内影院自有取票机或前台进行取票</text>
</view>
</view> </view>
<view class="box"> <view class="box">
<view class="box-title">出行人</view> <view class="box-title">出行人</view>

52
pages/user/order/sceneOrderInfo/index.js

@ -49,33 +49,37 @@ Page({
}, },
getCodeImg:function(){ getCodeImg:function(){
let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[]; let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[];
qrcode.map((item,index)=>{
if(item.use_url){ this.data.info.order_product_list.forEach(qrcode=>{
codeImgs.push(item.use_url); qrcode.qrcode.map((item,index)=>{
if(codeImgs.length==qrcode.length){ if(item.use_url){
that.setData({ codeImgs.push(item.use_url);
codeImgs:codeImgs if(codeImgs.length==qrcode.qrcode.length){
}) that.setData({
codeImgs:codeImgs
})
}
} }
} else {
else { new QRCode('damocode'+index,{
new QRCode('damocode'+index,{ text: item.use_code,
text: item.use_code, width: 300 * radio,
width: 300 * radio, height: 300 * radio,
height: 300 * radio, padding: 12, // 生成二维码四周自动留边宽度,不传入默认为0
padding: 12, // 生成二维码四周自动留边宽度,不传入默认为0 correctLevel: QRCode.CorrectLevel.L, // 二维码可辨识度
correctLevel: QRCode.CorrectLevel.L, // 二维码可辨识度 callback: (res) => {
callback: (res) => { codeImgs.push(res.path);
codeImgs.push(res.path); if(codeImgs.length==qrcode.qrcode.length){
if(codeImgs.length==qrcode.length){ that.setData({
that.setData({ codeImgs:codeImgs
codeImgs:codeImgs })
}) }
} }
} })
}) }
} })
}) })
}, },
prevCodeImg:function(){ prevCodeImg:function(){
let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex; let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;

Loading…
Cancel
Save