Browse Source

强制关注,电影下单页调整

master
nige 3 years ago
parent
commit
b4edfb6d4e
  1. 32
      pages/info/hotelProductInfo/index.js
  2. 4
      pages/info/hotelProductInfo/index.json
  3. 5
      pages/info/hotelProductInfo/index.wxml
  4. 17
      pages/info/museumInfo/index.js
  5. 4
      pages/info/museumInfo/index.json
  6. 2
      pages/info/museumInfo/index.wxml
  7. 37
      pages/info/postProductInfo/index.js
  8. 4
      pages/info/postProductInfo/index.json
  9. 2
      pages/info/postProductInfo/index.wxml
  10. 101
      pages/info/roadInfo/index.js
  11. 4
      pages/info/roadInfo/index.json
  12. 2
      pages/info/roadInfo/index.wxml
  13. 36
      pages/info/sceneProductInfo/index.js
  14. 5
      pages/info/sceneProductInfo/index.json
  15. 2
      pages/info/sceneProductInfo/index.wxml
  16. 223
      pages/list/movieticket/list/ticket/index.js
  17. 3
      pages/list/movieticket/list/ticket/index.json
  18. 2
      pages/list/movieticket/list/ticket/index.wxml
  19. 42
      pages/order/components/wxqrCode/index.js
  20. 4
      pages/order/components/wxqrCode/index.json
  21. 13
      pages/order/components/wxqrCode/index.wxml
  22. 70
      pages/order/components/wxqrCode/index.wxss
  23. 9
      pages/order/movie/index.wxml
  24. 6
      pages/order/movie/index.wxss
  25. 34
      pages/user/cartlist/list.js
  26. 3
      pages/user/cartlist/list.json
  27. 2
      pages/user/cartlist/list.wxml

32
pages/info/hotelProductInfo/index.js

@ -37,7 +37,9 @@ Page({
roomInfo: null,
retailId: "",
shareImg: null,
showShareFlag: false
showShareFlag: false,
showQrCode: false,
wxqrcode: null
},
/**
@ -127,6 +129,18 @@ Page({
})
},
order: function (e) {
console.log(this.data.sceneInfo);
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/info/hotelProductInfo/index?id=' + this.data.id,
title: this.data.sceneInfo.title,
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
let item = e.currentTarget.dataset.item;
item.startDate = this.data.startDate;
item.endDate = this.data.endDate;
@ -140,8 +154,21 @@ Page({
wx.navigateTo({
url: '/pages/order/hotel/index',
})
}
})
},
orderMt: function (e) {
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/info/hotelProductInfo/index?id=' + this.data.id,
title: this.data.sceneInfo.title,
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
let item = e.currentTarget.dataset.item, product = e.currentTarget.dataset.product;
item.startDate = this.data.startDate;
item.endDate = this.data.endDate;
@ -165,6 +192,9 @@ Page({
wx.navigateTo({
url: '/pages/order/hotel/index',
})
}})
},
getDay: function (date) {
let d = new Date(date.replace(/-/g, '/')).getDay();

4
pages/info/hotelProductInfo/index.json

@ -1,6 +1,8 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader",
"common-image":"/pages/component/commonImage/index"
"common-image":"/pages/component/commonImage/index",
"code":"../../order/components/wxqrCode/index"
}
}

5
pages/info/hotelProductInfo/index.wxml

@ -53,7 +53,8 @@
<common-image src="{{item.img_list[0]}}" mode="aspectFill"></common-image>
<view class="product-info textOver">
<view class="title textOver"><view class="textOver">{{item.room_name}}</view></view>
<view class="subtitle textOver2">{{item.useable_area?(item.useable_area+'m²'):''}} <text wx:for="{{item.bed_info}}">{{item.bedDesc}}{{item.bedType}}x{{item.bedCount}}</text> {{item.window?item.window:''}}</view>
<!-- <view class="subtitle textOver2">{{item.useable_area?(item.useable_area+'m²'):''}} <text wx:for="{{item.bed_info}}">{{item.bedDesc}}{{item.bedType}}x{{item.bedCount}}</text> {{item.window?item.window:''}}</view> -->
<view class="subtitle textOver2">{{item.useable_area?(item.useable_area+'m²'):''}} {{item.window?item.window:''}} <text>{{item.capacity?item.capacity+'人入住':''}}</text></view>
<view class="mt-price">{{item.low_price>0?item.low_price/100:'0'}}</view>
</view>
<view class="product-right">
@ -217,3 +218,5 @@
<view class="save-btn" bindtap="save">保存到相册</view>
</view>
</view>
<code showModel="{{showQrCode}}" qrcode = "{{wxqrcode}}">
</code>

17
pages/info/museumInfo/index.js

@ -26,7 +26,9 @@ Page({
retailId: "",
isGroup: null,
shareImg: null,
showShareFlag: false
showShareFlag: false,
showQrCode:false,
wxqrcode:null
},
/**
@ -399,6 +401,17 @@ Page({
})
},
order: function () {
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/info/museumInfo/index?id='+this.data.id,
title:this.data.info.title,
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
this.data.isGroup = null
if(this.data.product.product.flag!=1 || this.data.product.sku.flag=='off') return;
if(this.data.isGroup){
@ -419,7 +432,7 @@ Page({
else {
this.realOrder()
}
}})
},
order1: function () {
this.data.isGroup = 1

4
pages/info/museumInfo/index.json

@ -1,6 +1,8 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader",
"date":"/pages/order/components/date/index"
"date":"/pages/order/components/date/index",
"code":"../../order/components/wxqrCode/index"
}
}

2
pages/info/museumInfo/index.wxml

@ -100,3 +100,5 @@
<view class="save-btn" bindtap="save">保存到相册</view>
</view>
</view>
<code showModel="{{showQrCode}}" qrcode = "{{wxqrcode}}">
</code>

37
pages/info/postProductInfo/index.js

@ -32,8 +32,10 @@ Page({
allowance_data: null,
showAllowance: false,
tjList: [], //推荐商品列表
iShop:false,
supplierId:null
iShop: false,
supplierId: null,
showQrCode: false,
wxqrcode: null
},
/**
@ -73,8 +75,8 @@ Page({
res.data.flag = res.data.sku.find(item => item.flag == 'on') ? res.data.flag : 0
this.setData({
info: res.data,
supplierId:res.data.supplier_id,
iShop:res.data.supplier_id?true:false
supplierId: res.data.supplier_id,
iShop: res.data.supplier_id ? true : false
})
// 获取补贴
@ -221,6 +223,17 @@ Page({
},
showCart: function () {
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/info/postProductInfo/index?id=' + this.data.id,
title: this.data.info.title,
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
if (this.data.info.sku.length == 0) {
wx.showToast({
title: '该产品未设置规格,不能加购',
@ -238,7 +251,8 @@ Page({
cartImgInfo: 'top:' + res.top + 'px;left:' + res.left + 'px;'
})
}).exec()
}
})
},
hideSku: function () {
this.setData({
@ -264,6 +278,17 @@ Page({
})
},
showOrder: function () {
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/info/postProductInfo/index?id=' + this.data.id,
title: this.data.info.title,
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
if (this.data.info.sku.length == 0) {
wx.showToast({
title: '该产品未设置规格,不能购买',
@ -274,6 +299,8 @@ Page({
this.setData({
skuFlag: 'order'
})
}
})
},
order: function () {
app.globalData.postProduct = null

4
pages/info/postProductInfo/index.json

@ -1,5 +1,7 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
"title":"/pages/component/TitleHeader",
"code":"../../order/components/wxqrCode/index"
}
}

2
pages/info/postProductInfo/index.wxml

@ -204,3 +204,5 @@
<rich-text nodes="{{allowance_data.content}}"></rich-text>
</view>
</view>
<code showModel="{{showQrCode}}" qrcode = "{{wxqrcode}}">
</code>

101
pages/info/roadInfo/index.js

@ -20,7 +20,9 @@ Page({
retailId: "",
retailSkuId: "",
shareImg: null,
showShareFlag: false
showShareFlag: false,
showQrCode: false,
wxqrcode: null
},
/**
@ -54,7 +56,7 @@ Page({
retailSkuId: options.skuid
})
}
res.data.flag = res.data.sku.find(item=>item.flag=='on')?res.data.flag:0
res.data.flag = res.data.sku.find(item => item.flag == 'on') ? res.data.flag : 0
this.setData({
info: res.data
@ -85,16 +87,15 @@ Page({
source_id: this.data.info.id,
url: "/pages/info/cardInfo/index?id=" + this.data.info.id,
uuid: app.globalData.uuid
}).then(res => {
})
}
else {
}).then(res => {})
} else {
this.BroswerRecord();
}
}, 500)
},
changeMenu: function (e) {
let index = e.currentTarget.dataset.index, that = this;
let index = e.currentTarget.dataset.index,
that = this;
const query = wx.createSelectorQuery(); //创建节点查询器
query.select("#box" + index).boundingClientRect() //选择toViewid获取位置信息
query.selectViewport().scrollOffset() //获取页面查询位置的
@ -110,7 +111,8 @@ Page({
})
},
onPageScroll: function (e) {
let that = this, height = this.data.top;
let that = this,
height = this.data.top;
let topHeight = height;
wx.createSelectorQuery().select('#menus').boundingClientRect(function (rect) {
console.log(rect.top, topHeight)
@ -119,8 +121,7 @@ Page({
that.setData({
fixed: true
})
}
else {
} else {
that.setData({
fixed: false
})
@ -137,18 +138,15 @@ Page({
that.setData({
type: 4
})
}
else if (res[2].top < minHeight) {
} else if (res[2].top < minHeight) {
that.setData({
type: 3
})
}
else if (res[1].top < minHeight) {
} else if (res[1].top < minHeight) {
that.setData({
type: 2
})
}
else {
} else {
that.setData({
type: 1
})
@ -158,37 +156,53 @@ Page({
},
order: function () {
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/info/roadInfo/index?id=' + this.data.id,
title: this.data.info.title,
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
app.globalData.couponInfo = null;
app.globalData.product = {
product: this.data.info
}
app.globalData.retailId = this.data.retailId;
util.pagePoint({
event:'product_order',
param:{
id:this.data.info.id,
type:this.data.info.type
event: 'product_order',
param: {
id: this.data.info.id,
type: this.data.info.type
}
},1)
}, 1)
wx.setStorageSync('login_from', 'product_order_login')
wx.setStorageSync('order_from', 'product_order_submit')
wx.navigateTo({
url: '/pages/order/road/index?id=' + this.data.info.id + (this.data.retailSkuId ? ('&skuid=' + this.data.retailSkuId) : '')
})
}
})
},
pagePoint:function(e){
pagePoint: function (e) {
util.pagePoint(e)
},
// 分享
share: function () {
if (!wx.getStorageSync("jstrip_token")) {
util.pagePoint({
event:'product_share_login',
param:{
id:that.data.info.id,
type:that.data.info.type
event: 'product_share_login',
param: {
id: that.data.info.id,
type: that.data.info.type
}
},1)
}, 1)
commonApi.user_post("user/getMyInfo", {}).then(res => {
})
@ -207,7 +221,8 @@ Page({
},
// 保存
save() {
let url = this.data.shareImg, that = this;
let url = this.data.shareImg,
that = this;
wx.authorize({
/* 这个就是保存相册的 */
scope: 'scope.writePhotosAlbum',
@ -223,12 +238,12 @@ Page({
showShareFlag: !that.data.showShareFlag
})
util.pagePoint({
event:'product_share_save',
param:{
id:that.data.info.id,
type:that.data.info.type
event: 'product_share_save',
param: {
id: that.data.info.id,
type: that.data.info.type
}
},1)
}, 1)
},
fail(res) {
wx.showToast({
@ -259,7 +274,8 @@ Page({
},
// 绘制海报
drawImg: function () {
var that = this, userinfo = wx.getStorageSync('jstrip_userInfo');
var that = this,
userinfo = wx.getStorageSync('jstrip_userInfo');
if (!userinfo) {
// 去登录
return false;
@ -297,7 +313,7 @@ Page({
ctx.save();
ctx.beginPath(); //开始绘制
that.handleBorderRect(ctx, 0, 0, 551 * ratio, 407 * ratio, 25 * ratio, '#ccc')
ctx.clip();//画好了圆 剪切 原始画布中剪切任意形状和尺寸。一旦剪切了某个区域,则所有之后的绘图都会被限制在被剪切的区域内 这也是我们要save上下文的原因
ctx.clip(); //画好了圆 剪切 原始画布中剪切任意形状和尺寸。一旦剪切了某个区域,则所有之后的绘图都会被限制在被剪切的区域内 这也是我们要save上下文的原因
ctx.drawImage(imgs[0].path, 0, 0, 551 * ratio, 407 * ratio);
ctx.restore();
ctx.save();
@ -408,12 +424,13 @@ Page({
},
// 绘制两行文字
drawText: function (ctx, str, x, y, canvasWidth, ratio) {
let row = [], temp = "", chr = str.split("");
let row = [],
temp = "",
chr = str.split("");
for (var a = 0; a < chr.length; a++) {
if (ctx.measureText(temp).width < canvasWidth) {
temp += chr[a];
}
else {
} else {
a--; //这里添加了a-- 是为了防止字符丢失,效果图中有对比
row.push(temp);
temp = "";
@ -430,13 +447,12 @@ Page({
for (var a = 0; a < rowPart.length; a++) {
if (ctx.measureText(test).width < canvasWidth - 30 * ratio) {
test += rowPart[a];
}
else {
} else {
break;
}
}
empty.push(test);
var group = empty[0] + "..."//这里只显示两行,超出的用...表示
var group = empty[0] + "..." //这里只显示两行,超出的用...表示
rowCut.splice(1, 1, group);
row = rowCut;
}
@ -461,8 +477,7 @@ Page({
}
if (this.data.info && this.data.info.id) {
this.drawImg()
}
else {
} else {
setTimeout(() => {
this.onShow()
}, 200)

4
pages/info/roadInfo/index.json

@ -1,5 +1,7 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
"title":"/pages/component/TitleHeader",
"code":"../../order/components/wxqrCode/index"
}
}

2
pages/info/roadInfo/index.wxml

@ -119,3 +119,5 @@
<view class="save-btn" bindtap="save">保存到相册</view>
</view>
</view>
<code showModel="{{showQrCode}}" qrcode = "{{wxqrcode}}">
</code>

36
pages/info/sceneProductInfo/index.js

@ -32,7 +32,10 @@ Page({
cartTop: 0,
top: 0,
skuList: [], //立即预定的列表
sku_ids: []
sku_ids: [],
showQrCode: false,
wxqrcode: null
},
/**
@ -670,6 +673,17 @@ Page({
},
//加入购物车
showCart: function () {
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/info/sceneProductInfo/index?id=' + this.data.id,
title: this.data.info.title,
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
if (this.data.info.product[0].sku.length == 0) {
wx.showToast({
title: '该产品未设置规格,不能加购',
@ -686,6 +700,11 @@ Page({
cartImgInfo: 'top:' + res.top + 'px;left:' + res.left + 'px;'
})
}).exec()
}
})
},
hideSku: function () {
@ -708,6 +727,18 @@ Page({
},
//立即预定
showOrder: function () {
console.log(this.data.id);
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/info/sceneProductInfo/index?id=' + this.data.id,
title: this.data.info.title,
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
if (this.data.info.product[0].sku.length == 0) {
wx.showToast({
title: '该产品未设置规格,不能购买',
@ -724,6 +755,9 @@ Page({
this.setData({
skuFlag: 'order'
})
}
})
},
/**

5
pages/info/sceneProductInfo/index.json

@ -1,6 +1,9 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader",
"notice":"/pages/component/notice/notice"
"notice":"/pages/component/notice/notice",
"code":"../../order/components/wxqrCode/index"
}
}

2
pages/info/sceneProductInfo/index.wxml

@ -252,3 +252,5 @@
<rich-text nodes="{{info.allowance.content}}"></rich-text>
</view>
</view>
<code showModel="{{showQrCode}}" qrcode = "{{wxqrcode}}">
</code>

223
pages/list/movieticket/list/ticket/index.js

@ -8,19 +8,21 @@ Page({
* 页面的初始数据
*/
data: {
id:null,
dates:[],
days:['周日','周一','周二','周三','周四','周五','周六'],
dateIndex:0,
areas:[],
areaIndex:0,
lat:"",
lon:"",
sort:'distance',
list:[],
title:"",
page:1,
isMore:true
id: null,
dates: [],
days: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
dateIndex: 0,
areas: [],
areaIndex: 0,
lat: "",
lon: "",
sort: 'distance',
list: [],
title: "",
page: 1,
isMore: true,
showQrCode: false,
wxqrcode: null
},
/**
@ -31,178 +33,193 @@ Page({
},
onLoad: function (options) {
this.setData({
id:options.id,
title:options.title
id: options.id,
title: options.title
})
commonApi._post("act/get_suzhou_areas").then(res=>{
commonApi._post("act/get_suzhou_areas").then(res => {
res.data.unshift({
area_id:"",
area_title:"苏州"
area_id: "",
area_title: "苏州"
})
this.setData({
areas:res.data
areas: res.data
})
})
this.initDate();
wx.getLocation({
type: 'gcj02',
success:(res)=>{
success: (res) => {
this.setData({
lat:res.latitude,
lon:res.longitude
lat: res.latitude,
lon: res.longitude
})
this.getList()
},
fail:()=>{
fail: () => {
this.getList()
}
})
},
changeSort:function(e){
changeSort: function (e) {
let sort = e.currentTarget.dataset.sort;
this.setData({
sort:this.data.sort==sort?null:sort,
list:[],
page:1,
isMore:true
sort: this.data.sort == sort ? null : sort,
list: [],
page: 1,
isMore: true
})
if(this.data.sort=='distance' && !this.data.lon){
if (this.data.sort == 'distance' && !this.data.lon) {
wx.getLocation({
type: 'gcj02',
success:(res)=>{
success: (res) => {
this.setData({
lat:res.latitude,
lon:res.longitude
lat: res.latitude,
lon: res.longitude
})
this.getList()
},
fail:()=>{
fail: () => {
this.getList()
}
})
}
else {
} else {
this.getList()
}
},
changeDateIndex:function(e){
changeDateIndex: function (e) {
this.setData({
dateIndex:e.currentTarget.dataset.index,
list:[],
page:1,
isMore:true
dateIndex: e.currentTarget.dataset.index,
list: [],
page: 1,
isMore: true
})
this.getList()
},
changeArea:function(e){
changeArea: function (e) {
this.setData({
areaIndex:e.detail.value,
list:[],
page:1,
isMore:true
areaIndex: e.detail.value,
list: [],
page: 1,
isMore: true
})
this.getList()
},
initDate:function(){
let today = new Date(util.formatDate(new Date()).replace(/-/g,'/')).getTime(),single = 24 * 60 * 60 *1000,dates=[];
for(let i=0;i<7;i++){
let item = new Date(today+i * single);
initDate: function () {
let today = new Date(util.formatDate(new Date()).replace(/-/g, '/')).getTime(),
single = 24 * 60 * 60 * 1000,
dates = [];
for (let i = 0; i < 7; i++) {
let item = new Date(today + i * single);
let name = this.data.days[item.getDay()]
if(i==0){
name="今天"
}
else if(i==1){
name="明天"
if (i == 0) {
name = "今天"
} else if (i == 1) {
name = "明天"
}
dates.push({
date:util.formatDate(item),
dateShort:util.formatDate(item).substr(5,5),
name:name
date: util.formatDate(item),
dateShort: util.formatDate(item).substr(5, 5),
name: name
})
}
this.setData({
dates:dates
dates: dates
})
console.log(dates)
},
getList:function(){
if(!this.data.isMore) return
commonApi._post("Cinema/getCinemaListByShowId",{
third_id:this.data.id,
show_date:this.data.dates[this.data.dateIndex].date,
city_code:this.data.areas[this.data.areaIndex]?this.data.areas[this.data.areaIndex].area_id:"",
lon:this.data.lon,
lat:this.data.lat,
is_price_sort:this.data.sort=='price'?true:false,
is_distance_sort:this.data.sort=='distance',
page:this.data.page,
pageSize:10
}).then(res=>{
res.data.map(item=>{
if(item.distance>1000){
item.distanceText = (item.distance/1000).toFixed(2) + 'km';
}
else if(item.distance>0){
getList: function () {
if (!this.data.isMore) return
commonApi._post("Cinema/getCinemaListByShowId", {
third_id: this.data.id,
show_date: this.data.dates[this.data.dateIndex].date,
city_code: this.data.areas[this.data.areaIndex] ? this.data.areas[this.data.areaIndex].area_id : "",
lon: this.data.lon,
lat: this.data.lat,
is_price_sort: this.data.sort == 'price' ? true : false,
is_distance_sort: this.data.sort == 'distance',
page: this.data.page,
pageSize: 10
}).then(res => {
res.data.map(item => {
if (item.distance > 1000) {
item.distanceText = (item.distance / 1000).toFixed(2) + 'km';
} else if (item.distance > 0) {
item.distanceText = (item.distance).toFixed(2) + 'm';
}
})
let list = this.data.list;
this.setData({
list:list.concat(res.data),
page:this.data.page+1
list: list.concat(res.data),
page: this.data.page + 1
})
if(res.data.length<10){
if (res.data.length < 10) {
this.setData({
isMore:false
isMore: false
})
}
console.log(res)
})
},
selectMovieSeat(e){
selectMovieSeat(e) {
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/list/movieticket/list/ticket/index?id=' + this.data.id,
title: this.data.title,
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
let info = e.currentTarget.dataset.info
let index = e.currentTarget.dataset.index
console.log(index);
console.log(info.schedules);
const areaInfo = JSON.parse(info.schedules[index].schedule_area).map(item => ({...item, price:item.areaPrice,areaId:item.seatAreaId}));
const areaInfo = JSON.parse(info.schedules[index].schedule_area).map(item => ({
...item,
price: item.areaPrice,
areaId: item.seatAreaId
}));
let planData = {
areaInfo,
fee:info.schedules[index].service_fee,
fee: info.schedules[index].service_fee,
movieName: this.data.title,
planId : info.schedules[index].schedule_id,
planTime : info.schedules[index].show_time,
type:'WECHATXCX',
remake : ''
planId: info.schedules[index].schedule_id,
planTime: info.schedules[index].show_time,
type: 'WECHATXCX',
remake: ''
}
let show_id = info.schedules[index].show_id
let cinema_id = info.schedules[index].cinema_id
// let schedule_id = info.schedule_id
console.log(info);
commonApi._post('Cinema/getProductAndSku',{
commonApi._post('Cinema/getProductAndSku', {
show_id,
cinema_id,
}).then(res=>{
app.globalData.product ={
product:res.data,
info:{
hallName:info.schedules[index].hall_name,
cinemaName:info.title,
show_date:info.schedules[index].show_date,
show_time:info.schedules[index].show_time,
close_time:info.schedules[index].close_time,
movieName:this.data.title,
start_end_time:info.schedules[index].show_time,
show_version:info.schedules[index].show_version,
selectSeatInfo:null,
schedule_id:info.schedules[index].schedule_id
}).then(res => {
app.globalData.product = {
product: res.data,
info: {
hallName: info.schedules[index].hall_name,
cinemaName: info.title,
show_date: info.schedules[index].show_date,
show_time: info.schedules[index].show_time,
close_time: info.schedules[index].close_time,
movieName: this.data.title,
start_end_time: info.schedules[index].show_time,
show_version: info.schedules[index].show_version,
selectSeatInfo: null,
schedule_id: info.schedules[index].schedule_id
}
}
console.log(planData);
wx.navigateTo({
url:"/pages/list/movieticket/list/web/index?planData="+ JSON.stringify(planData),
url: "/pages/list/movieticket/list/web/index?planData=" + JSON.stringify(planData),
})
})
}})
},
/**
* 生命周期函数--监听页面初次渲染完成

3
pages/list/movieticket/list/ticket/index.json

@ -1,5 +1,6 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader"
"title":"/pages/component/TitleHeader",
"code":"../../../../order/components/wxqrCode/index"
}
}

2
pages/list/movieticket/list/ticket/index.wxml

@ -44,3 +44,5 @@
<view>暂无内容</view>
</view>
</view>
<code showModel="{{showQrCode}}" qrcode = "{{wxqrcode}}">
</code>

42
pages/order/components/wxqrCode/index.js

@ -0,0 +1,42 @@
// pages/order/components/coupon/index.js
let app = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
showModel:{
type:Boolean,
value:false
},
qrcode:{
type:String,
value:null
}
},
/**
* 组件的初始数据
*/
data: {
},
pageLifetimes: {
show: function() {
console.log(123123);
}
},
/**
* 组件的方法列表
*/
methods: {
submit: function() {
this.setData({
showModel:false
})
}
}
})

4
pages/order/components/wxqrCode/index.json

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

13
pages/order/components/wxqrCode/index.wxml

@ -0,0 +1,13 @@
<view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModel}}"></view>
<view class="modalDlg" wx:if="{{showModel}}">
<view class="img-box">
<image class="codeImg" src="{{qrcode}}" show-menu-by-longpress="{{true}}"></image>
</view>
<view class="text-box">
扫码关注<text>【君到苏州】</text> 微信公众号
</view>
<view class="more">
查看更多旅游资讯
</view>
<image bindtap="submit" class="close" src="https://static.ticket.sz-trip.com/uploads/20230619/c62511826c880bddc20f98011a87a5a9.png" mode=""/>
</view>

70
pages/order/components/wxqrCode/index.wxss

@ -0,0 +1,70 @@
.mask{
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
z-index: 9000;
opacity: 0.7;
}
.modalDlg{
width: 500rpx;
height: 660rpx;
background-image:url('https://static.ticket.sz-trip.com/uploads/20230619/12a423ee9510a8e5c9c92696e52fcc3c.png') ;
background-size: 100% 100%;
position: fixed;
top: 50%;
left: 0;
z-index: 9999;
margin: -370rpx 125rpx;
background-color: #fff;
border-radius: 36rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.img-box{
width: 300rpx;
height: 300rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
margin-top: 79rpx;
}
.img-box image{
width: 310rpx;
height: 310rpx;
border-radius: 10rpx;
}
.text-box{
width: 300rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #FFFFFF;
text-align: center;
margin-top: 40rpx;
}
.text-box text{
color: rgba(255, 255, 85, 1);
}
.more{
margin-top: 80rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #0B898E;
}
.close{
position: absolute;
bottom: -120rpx;
left: 50%;
height: 80rpx;
width: 80rpx;
transform: translate(-40rpx,0);
}

9
pages/order/movie/index.wxml

@ -11,11 +11,6 @@
<view>{{product.info.hallName}} <text wx:if="{{product.info.selectSeatInfo}}">{{product.info.selectSeatInfo.seatInfo}}</text></view>
</view>
</view>
<view class="tel-box">
<text>手机号码:</text>
<input value="{{tel}}" type="number" bindinput="changeTel" placeholder="输入您的手机号"></input>
</view>
</view>
<view class="tips">
@ -32,6 +27,10 @@
</view>
</view>
</view>
<view class="tel-box">
<text>手机号码:</text>
<input value="{{tel}}" type="number" bindinput="changeTel" placeholder="输入您的手机号"></input>
</view>
<coupon money="{{price}}" sku="{{product.product.sku_info.id}}"></coupon>

6
pages/order/movie/index.wxss

@ -14,7 +14,7 @@ page {
display: flex;
padding-top: 30rpx;
padding-bottom: 41rpx;
border-bottom: 1rpx solid #ccc;
/* border-bottom: 1rpx solid #ccc; */
font-size: 27rpx;
color: #999;
justify-content: space-between;
@ -43,6 +43,10 @@ page {
height: 126rpx;
font-size: 31rpx;
justify-content: space-between;
margin: 30rpx 25rpx;
background: white;
border-radius: 9rpx;
padding: 0 20rpx;
}
.tel-box>text {
color: #000;

34
pages/user/cartlist/list.js

@ -21,7 +21,9 @@ Page({
productType: '',
manageFlag: false,
flag: false, //判断订单是否同时有商品和票
isCar:'single',//判断是否购物车
isCar: 'single', //判断是否购物车
showQrCode: false,
wxqrcode: null
},
/**
@ -105,7 +107,7 @@ Page({
}
});
this.setData({
allChecked:flag
allChecked: flag
})
this.updatePrice()
},
@ -127,7 +129,7 @@ Page({
commonApi.user_post("cart/update_sku", {
sku_id: item.sku.id,
num: item.num
}).then(res => {})
}).then(res => { })
},
updatePrice: function () {
let list = this.data.list,
@ -142,6 +144,17 @@ Page({
})
},
order: function () {
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/user/cartlist/list',
title: '购物车',
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
app.globalData.couponInfo = null;
util.pagePoint({
event: 'cart_order'
@ -178,16 +191,16 @@ Page({
if (product.length > 0 && product1.length > 0) {
this.setData({
flag: 'mix',
isCar:'multiple'
isCar: 'multiple'
})
}
if ( product1.length > 1) {
if (product1.length > 1) {
this.setData({
isCar:'multiple'
isCar: 'multiple'
})
}else{
} else {
this.setData({
isCar:'single'
isCar: 'single'
})
}
console.log(product1);
@ -205,6 +218,9 @@ Page({
url: '/pages/order/scene/index?isCar=' + this.data.isCar,
})
}
}
})
},
touchStart(e) { //移动前点击的位置
console.log(e)
@ -297,7 +313,7 @@ Page({
success: function (res) {
if (res.confirm) {
commonApi.user_post("cart/del_sku", {
sku_id:skuids
sku_id: skuids
}).then(res => {
if (res.code == 1) {
wx.showToast({

3
pages/user/cartlist/list.json

@ -1,5 +1,6 @@
{
"usingComponents": {
"title": "/pages/component/TitleHeader"
"title": "/pages/component/TitleHeader",
"code":"../../order/components/wxqrCode/index"
}
}

2
pages/user/cartlist/list.wxml

@ -42,3 +42,5 @@
<text style="color:#666;font-size:26rpx;flex-shrink:0;margin-left:10rpx;flex:1">全选</text>
<view class="fixed-btn del-btn" bindtap="delM">删除</view>
</view>
<code showModel="{{showQrCode}}" qrcode = "{{wxqrcode}}">
</code>
Loading…
Cancel
Save