Browse Source

修改补贴

修改补贴
master
xuetaotao 4 years ago
parent
commit
9d9599f1f9
  1. 8
      pages/info/postProductInfo/index.js
  2. 12
      pages/info/postProductInfo/index.wxml
  3. 14
      pages/info/postProductInfo/index.wxss
  4. 94
      pages/info/sceneProductInfo/index.js
  5. 70
      pages/info/sceneProductInfo/index.wxml
  6. 127
      pages/info/sceneProductInfo/index.wxss
  7. 6
      pages/order/postOrder/index.js
  8. 9
      pages/order/postOrder/index.wxml
  9. 12
      pages/order/postOrder/index.wxss
  10. 303
      pages/order/scene/index.js
  11. 22
      pages/order/scene/index.wxml
  12. 71
      pages/order/scene/index.wxss
  13. 8
      project.private.config.json
  14. 8
      utils/https.js

8
pages/info/postProductInfo/index.js

@ -29,7 +29,8 @@ Page({
cartCount: 0,
shareImg: null,
showShareFlag: false,
allowance_data: null
allowance_data: null,
showAllowance: false
},
/**
@ -93,6 +94,11 @@ Page({
})
},
changeAllowance: function () {
this.setData({
showAllowance: !this.data.showAllowance
})
},
BroswerRecord: function () {
setTimeout(() => {
if (app.globalData.uuid) {

12
pages/info/postProductInfo/index.wxml

@ -18,7 +18,7 @@
</swiper-item>
</block>
</swiper>
<view class="allowance-box" wx:if="{{allowance_data}}">
<view class="allowance-box" wx:if="{{allowance_data}}" bindtap="changeAllowance">
补贴价
<view class="com-price two">¥{{ allowance_data.mini_price / 100 }}起</view>
<view class="yellow">单品最高补贴{{ allowance_data.max_price / 100 }}元</view>
@ -108,7 +108,8 @@
<image id="skuImg" src="{{info.sku[skuIndex].headimg}}" mode="aspectFill"></image>
<view class="sku-info">
<view class="sku-price">{{info.sku[skuIndex].price/100}}
<view class="allowance" wx:if="{{allowance_data}}">补贴价:¥{{ (1 - allowance_data.discount_rate / 100) * info.sku[skuIndex].price / 100 }}</view>
<view class="allowance" wx:if="{{allowance_data}}">
补贴价:¥{{ (1 - allowance_data.discount_rate / 100) * info.sku[skuIndex].price / 100 }}</view>
</view>
<view class="sku-name">已选择:{{info.sku[skuIndex].sku_name}}</view>
</view>
@ -162,4 +163,11 @@
</view>
<view class="save-btn" bindtap="save">保存到相册</view>
</view>
</view>
<view class="mask mask-allowance" wx:if="{{showAllowance}}">
<view bindtap="changeAllowance" class="mask-bg"></view>
<view class="mask-content rule-box">
<view class="rule-title">{{allowance_data.title}}</view>
<rich-text nodes="{{allowance_data.content}}"></rich-text>
</view>
</view>

14
pages/info/postProductInfo/index.wxss

@ -792,4 +792,18 @@ page {
background-color: #FDEDD4;
margin-left: 20rpx;
border-radius: 30rpx;
}
.mask-allowance .mask-content {
margin: auto;
width: auto;
top: initial;
bottom: initial;
padding: 20rpx;
width: 80%;
}
.mask-allowance .mask-content .rule-title {
text-align: center;
margin-bottom: 20rpx;
}

94
pages/info/sceneProductInfo/index.js

@ -21,7 +21,9 @@ Page({
isTest: true,
retailId: "",
shareImg: null,
showShareFlag: false
showShareFlag: false,
showAllowance: false,
allowance_data:null,
},
/**
@ -86,7 +88,7 @@ Page({
this.setData({
info: res.data
})
util.pagePoint({event:'scene_view',param:{type:res.data.type,id:res.data.id}},1)
util.pagePoint({ event: 'scene_view', param: { type: res.data.type, id: res.data.id } }, 1)
this.BroswerRecord()
})
// 获取收藏的状态
@ -123,6 +125,11 @@ Page({
console.log(res)
})
},
changeAllowance: function () {
this.setData({
showAllowance: !this.data.showAllowance
})
},
BroswerRecord: function () {
setTimeout(() => {
if (app.globalData.uuid) {
@ -177,12 +184,12 @@ Page({
bookingInfoTitle: e.currentTarget.dataset.item.sku_name
})
util.pagePoint({
event:"scene_notice",
param:{
type:this.data.info.type,
id:this.data.info.id
event: "scene_notice",
param: {
type: this.data.info.type,
id: this.data.info.id
}
},1)
}, 1)
},
closeMask: function () {
this.setData({
@ -190,14 +197,14 @@ Page({
})
},
order: function (e) {
if(e.currentTarget.dataset.disable==1) return;
if (e.currentTarget.dataset.disable == 1) return;
util.pagePoint({
event:'scene_order',
param:{
type:this.data.info.type,
id:this.data.info.id
event: 'scene_order',
param: {
type: this.data.info.type,
id: this.data.info.id
}
},1)
}, 1)
wx.setStorageSync('login_from', 'scene_order_login')
wx.setStorageSync('order_from', 'scene_order_submit')
app.globalData.couponInfo = null;
@ -208,21 +215,21 @@ Page({
url: '/pages/order/scene/index',
})
},
pagePoint: function(e){
pagePoint: function (e) {
util.pagePoint({
event:e.currentTarget.dataset.event,
param:{
type:this.data.info.type,
id:this.data.info.id
event: e.currentTarget.dataset.event,
param: {
type: this.data.info.type,
id: this.data.info.id
}
},1)
}, 1)
},
// 分享
share: function () {
if (!wx.getStorageSync("jstrip_token")) {
wx.setStorageSync('login_from', 'scene_share_login')
commonApi.user_post("user/getMyInfo", {}).then(res => {
}).catch(err=>{
}).catch(err => {
})
return;
}
@ -254,7 +261,7 @@ Page({
that.setData({
showShareFlag: !that.data.showShareFlag
})
util.pagePoint({event:'scene_share_save',param:{type:that.data.info.type,id:that.data.info.id}},1)
util.pagePoint({ event: 'scene_share_save', param: { type: that.data.info.type, id: that.data.info.id } }, 1)
},
fail(res) {
wx.showToast({
@ -351,10 +358,10 @@ Page({
if (subtitle && subtitle.length > 10) {
subtitle = subtitle.substr(0, 10) + '...'
}
if(subtitle){
if (subtitle) {
ctx.fillText(subtitle, 25 * ratio, 540 * ratio);
}
// ctx.draw();
// 划线价
// ctx.setFillStyle("#999999");
@ -478,15 +485,15 @@ Page({
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
if(app.globalData.configJson){
if (app.globalData.configJson) {
this.setData({
isTest: app.globalData.configJson.isTest
})
}
else {
setTimeout(()=>{
setTimeout(() => {
this.onReady()
},300)
}, 300)
}
},
@ -499,13 +506,46 @@ Page({
}
if (this.data.info && this.data.info.id) {
this.drawImg()
// 获取补贴
if (this.data.product.length == 1) {
commonApi.user_post("product/getProductAllowancePrice", {
product_code: this.data.product[0].product.product_code
}).then(resTwo => {
console.log(resTwo)
if (resTwo && resTwo.code == 1) {
this.setData({
allowance_data: resTwo.data
})
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
console.log(9999, this.data.allowance_data.discount_rate / 100 * sInfo.price)
console.log(9999, spread_price)
if (spread_price > 0) {
if (spread_price < this.data.allowance_data.discount_rate / 100 * sInfo.price) {
this.setData({
allowance_price: spread_price
})
} else {
this.setData({
allowance_price: this.data.allowance_data.discount_rate / 100 * sInfo.price
})
}
this.changePrice()
} else {
this.setData({
allowance_price: 0
})
}
}
})
}
}
else {
setTimeout(() => {
this.onShow()
}, 200)
}
},
/**

70
pages/info/sceneProductInfo/index.wxml

@ -6,8 +6,8 @@
<view>语音导览</view>
<image src="https://static.ticket.sz-trip.com/xcxImages/info/play-btn.png" mode="widthFix"></image>
</view> -->
<swiper class="swiper" indicator-dots="{{true}}" wx:if="{{info}}"
autoplay="{{true}}" interval="{{2000}}" duration="{{300}}">
<swiper class="swiper" indicator-dots="{{true}}" wx:if="{{info}}" autoplay="{{true}}" interval="{{2000}}"
duration="{{300}}">
<block wx:for="{{info.listimg}}" wx:key="*this">
<swiper-item>
<image src="{{item}}" mode="aspectFill"></image>
@ -17,20 +17,29 @@
<view class="top-info" wx:if="{{info}}" style="position:relative">
<view class="title">{{info.title}}</view>
<view class="tags-box textOver">
<view class="tag textOver" wx:for="{{info.display_tags}}">{{item}}<view class="line"></view></view>
<view class="tag textOver" wx:for="{{info.display_tags}}">{{item}}<view class="line"></view>
</view>
<!-- <view class="tags-text">详情 <text class="iconfont icon-you"></text></view> -->
</view>
<view class="tags-box address-box" style="height:auto">
<view class="info-address">开园时间:{{info.open_time}}</view>
<navigator url="/pages/info/sceneInfo/index?id={{info.id}}" catchtap="pagePoint" data-event="scene_detail" class="iconfont" style="font-size:27rpx;flex-shrink:0">优待政策 | 景点介绍 <text class="iconfont icon-you" style="font-size:24rpx"></text></navigator>
<navigator url="/pages/info/sceneInfo/index?id={{info.id}}" catchtap="pagePoint" data-event="scene_detail"
class="iconfont" style="font-size:27rpx;flex-shrink:0">优待政策 | 景点介绍 <text class="iconfont icon-you"
style="font-size:24rpx"></text></navigator>
</view>
<view class="tags-box textOver address-box">
<view class="info-address">地址:{{info.address}}</view>
<view class="iconfont icon-daohang" bindtap="gotolocation"></view>
</view>
<view class="status-text{{info.garden_flag==0?' disable':''}}" wx:if="{{info.garden_flag_text && info.garden_flag!=1}}">{{info.garden_flag_text}}</view>
<view class="status-text{{info.garden_flag==0?' disable':''}}"
wx:if="{{info.garden_flag_text && info.garden_flag!=1}}">{{info.garden_flag_text}}</view>
</view>
<view class="box" wx:if="{{info}}" wx:for="{{info.product}}">
<view class="allowance-box" wx:if="{{info.allowance}}" bindtap="changeAllowance">
补贴价
<view class="com-price two">¥{{ info.allowance.mini_price / 100 }}起</view>
<view class="yellow">单品最高补贴{{ info.allowance.max_price / 100 }}元</view>
</view>
<view class="box-top">
<text>{{item.title}}</text>
</view>
@ -45,7 +54,9 @@
</view>
<view class="product-right">
<view class="price"><text>¥</text><text>{{sku.price?sku.price/100:0}}</text><text>起</text></view>
<view bindtap="order" data-sku="{{sku}}" data-product="{{item}}" data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}" class="btn{{item.flag==0 || sku.flag=='off'?' disable':''}}">立即预订</view>
<view bindtap="order" data-sku="{{sku}}" data-product="{{item}}"
data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}"
class="btn{{item.flag==0 || sku.flag=='off'?' disable':''}}">立即预订</view>
</view>
</view>
</view>
@ -60,10 +71,12 @@
</view>
<view class="empty-box" wx:if="{{!ask || ask.length==0}}">
<view>这里空空如也,快去向大家提问吧!</view>
<navigator url="/pages/ask/index?id={{id}}" catchtap="pagePoint" data-event="scene_question" class="empty-btn">去提问</navigator>
<navigator url="/pages/ask/index?id={{id}}" catchtap="pagePoint" data-event="scene_question" class="empty-btn">去提问
</navigator>
</view>
<view class="ask-list" wx:else>
<navigator url="/pages/ask/info/index?id={{item.id}}" catchtap="pagePoint" data-event="scene_comment" class="ask-item" wx:for="{{ask}}">
<navigator url="/pages/ask/info/index?id={{item.id}}" catchtap="pagePoint" data-event="scene_comment"
class="ask-item" wx:for="{{ask}}">
<view class="item-ques">
<image class="item-icon" src="https://static.ticket.sz-trip.com/xcxImages/ask/ask.png" mode="widthFix"></image>
<view class="ques">{{item.question_name}}</view>
@ -76,15 +89,17 @@
</view>
<view class="ques-tip">
<view class="ques-time">{{item.created_time}}提问</view> -->
<!-- <view class="ans-number">全部{{item.answer && item.answer.total ? item.answer.total : 0}}个回答 <text class="iconfont icon-you"></text> </view> -->
<!-- <view class="ans-number">全部{{item.answer && item.answer.total ? item.answer.total : 0}}个回答 <text class="iconfont icon-you"></text> </view> -->
<!-- </view> -->
</navigator>
<navigator style="border-top:1rpx solid #ccc" url="/pages/ask/index?id={{info.id}}" class="more-comment-btn">查看全部问答<text class="iconfont icon-you"></text></navigator>
<navigator style="border-top:1rpx solid #ccc" url="/pages/ask/index?id={{info.id}}" class="more-comment-btn">
查看全部问答<text class="iconfont icon-you"></text></navigator>
</view>
</view>
<view class="box">
<view class="box-top">
<text class="iconfont icon-tiwen"></text><text>游客点评</text><text class="score" wx:if="{{info && commentTotal>0}}">{{info.rate}}分</text>
<text class="iconfont icon-tiwen"></text><text>游客点评</text><text class="score"
wx:if="{{info && commentTotal>0}}">{{info.rate}}分</text>
<text class="all-comment-num">共{{commentTotal}}条</text>
</view>
<view class="empty-box" wx:if="{{!comment || comment.length==0}}">
@ -96,16 +111,19 @@
<image src="{{item.user.avatar}}" mode="aspectFill"></image>
<view class="comment-info">
<view class="nickname">{{item.user.nickname}}</view>
<view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view>
<view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text
wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view>
</view>
<view class="comment-date">{{item.create_time}}</view>
</view>
<view class="comment-content">{{item.content}}</view>
</navigator>
<navigator url="/pages/list/comments/index?sceneid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn">查看全部点评<text class="iconfont icon-you"></text></navigator>
<navigator url="/pages/list/comments/index?sceneid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn">
查看全部点评<text class="iconfont icon-you"></text></navigator>
</view>
<view style="height:{{safeBottom}}px"></view>
<notice bookingInfo="{{bookingInfo}}" skuName="{{bookingInfoTitle}}" wx:if="{{bookingInfo}}" bind:close="closeMask"></notice>
<notice bookingInfo="{{bookingInfo}}" skuName="{{bookingInfoTitle}}" wx:if="{{bookingInfo}}" bind:close="closeMask">
</notice>
<view style="position:absolute;right:0;left:-10000rpx;top:-20000rpx;z-index:-1">
<canvas canvas-id='imageCanvas' class='imageCanvas' style="width:551rpx;height:643rpx;" disable-scroll='true'>
</canvas>
@ -117,17 +135,31 @@
<image class="share-img" src="{{shareImg}}" mode="widthFix"></image>
<view class="share-tips">
<view style="position:relative">
<image class="img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/img.png" mode="widthFix"></image>
<image class="img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/img.png" mode="widthFix">
</image>
<view>保存图片到相册</view>
<view class="tipimg"><image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/ok.png" mode="widthFix"></image></view>
<view class="tipimg">
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/ok.png" mode="widthFix"></image>
</view>
</view>
<image style="width:36rpx" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/arrow2.png" mode="widthFix"></image>
<image style="width:36rpx" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/arrow2.png"
mode="widthFix"></image>
<view style="position:relative">
<image class="img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/code.png" mode="widthFix"></image>
<image class="img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/code.png" mode="widthFix">
</image>
<view>微信识别二维码</view>
<view class="tipimg"><image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/ok1.png" mode="widthFix"></image></view>
<view class="tipimg">
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/ok1.png" mode="widthFix"></image>
</view>
</view>
</view>
<view class="save-btn" bindtap="save">保存到相册</view>
</view>
</view>
<view class="mask mask-allowance" wx:if="{{showAllowance}}">
<view bindtap="changeAllowance" class="mask-bg"></view>
<view class="mask-content rule-box">
<view class="rule-title">{{info.allowance.title}}</view>
<rich-text nodes="{{info.allowance.content}}"></rich-text>
</view>
</view>

127
pages/info/sceneProductInfo/index.wxss

@ -2,15 +2,18 @@
page {
background: #f2f2f2;
}
.swiper {
width: 100%;
height: 400rpx;
}
.swiper image {
height: 400rpx;
display: block;
width: 100%;
}
.top-info {
border-radius: 20rpx 20rpx 0 0;
background: white;
@ -19,11 +22,13 @@ page {
margin-top: -20rpx;
padding: 20rpx 40rpx;
}
.top-info .title {
font-size: 32rpx;
font-weight: 500;
color: #000;
}
.tags-box {
margin-top: 10rpx;
margin-bottom: 20rpx;
@ -33,6 +38,7 @@ page {
font-size: 27rpx;
height: 50rpx;
}
.tags-box .tag {
position: relative;
line-height: 20rpx;
@ -41,6 +47,7 @@ page {
line-height: 50rpx;
margin-right: 10rpx;
}
.tags-box .tag .line {
content: "1";
display: block;
@ -53,32 +60,39 @@ page {
top: 30rpx;
z-index: -1;
}
.tags-text {
flex: 1;
text-align: right;
}
.tags-box .iconfont {
margin-left: 4rpx;
font-size: 24rpx;
}
.address-box {
justify-content: space-between;
margin-top: 0;
}
.info-address {
color: #666;
font-size: 27rpx;
margin-bottom: 0rpx;
line-height: 40rpx;
}
.address-box .iconfont {
font-size: 34rpx;
}
.box {
margin: 20rpx;
background: white;
border-radius: 13rpx;
}
.box-top {
line-height: 95rpx;
border-bottom: 1rpx solid #d9d9d9;
@ -87,29 +101,35 @@ page {
font-size: 35rpx;
padding: 0 20rpx;
}
.product-item {
margin: 0 20rpx;
padding: 27rpx 0;
border-bottom: 1rpx solid #ccc;
}
.skutitle {
font-size: 29rpx;
color: #333;
font-weight: 500;
}
.product-box {
display: flex;
align-items: flex-end;
justify-content: space-between;
margin-top: 20rpx;
}
.product-left {
flex: 1;
}
.product-tags {
display: flex;
align-items: center;
}
.product-tag {
font-size: 20rpx;
color: #0B898E;
@ -119,31 +139,38 @@ page {
padding: 0 15rpx;
margin-right: 13rpx;
}
.product-tags .product-tags:last-child {
margin-right: 0;
}
.order-tip-text {
margin-top: 33rpx;
font-size: 24rpx;
color: #666;
}
.product-right {
text-align: center;
flex-shrink: 0;
}
.product-right .price {
color: #D62828;
font-size: 24rpx;
margin-bottom: 20rpx;
}
.product-right .price text:nth-child(2){
.product-right .price text:nth-child(2) {
font-weight: 500;
font-size: 33rpx;
}
.product-right .price text:nth-child(3){
.product-right .price text:nth-child(3) {
color: #8D8D8D;
font-size: 20rpx;
}
.product-right .btn {
background: #D62828;
color: #fff;
@ -153,23 +180,28 @@ page {
font-weight: 500;
width: 176rpx;
}
.product-right .btn.disable {
background: #ccc;
}
.box .product-item:last-child {
border-bottom: none;
}
.box-top .iconfont {
color: #0B898E;
font-size: 33rpx;
margin-right: 16rpx;
}
.empty-box {
text-align: center;
padding: 40rpx 0;
font-size: 23rpx;
color: #333;
}
.empty-btn {
margin: 0 auto;
margin-top: 30rpx;
@ -181,17 +213,20 @@ page {
font-size: 32rpx;
margin-bottom: 10rpx;
}
.box-top .score {
color: #D62828;
font-size: 30rpx;
font-weight: 400;
margin-left: 11rpx;
}
.product-comment {
margin: 0 20rpx;
border-bottom: 1rpx solid #ccc;
padding: 33rpx 0;
}
.product-comment-top {
display: flex;
justify-content: space-between;
@ -199,31 +234,37 @@ page {
align-items: center;
font-size: 24rpx;
}
.product-comment-top image {
flex-shrink: 0;
width: 57rpx;
height: 57rpx;
border-radius: 50%;
}
.product-comment-top .comment-info {
flex: 1;
margin: 0 15rpx;
color: #666;
font-size: 21rpx;
}
.product-comment-top .comment-info .iconfont {
color: #D62828;
font-size: 22rpx;
}
.product-comment-top .comment-info .iconfont text {
.product-comment-top .comment-info .iconfont text {
margin-right: 6rpx;
}
.comment-content {
margin-left: 72rpx;
margin-top: 36rpx;
font-size: 28rpx;
color: #000;
}
.more-comment-btn {
line-height: 93rpx;
margin-right: 20rpx;
@ -232,23 +273,28 @@ page {
font-size: 27rpx;
font-weight: 500;
}
.more-comment-btn .iconfont {
margin-left: 6rpx;
font-size: 24rpx;
}
.all-comment-num {
float: right;
color: #999999;
font-size: 27rpx;
font-weight: 400;
}
.ask-list .ask-item:nth-child(1) {
margin-top: 40rpx;
}
.ask-item {
padding: 0 25rpx;
margin-bottom: 40rpx;
}
.item-ques {
display: flex;
color: #000;
@ -256,16 +302,19 @@ page {
font-size: 29rpx;
line-height: 38rpx;
}
.item-ques image {
width: 36rpx;
margin-right: 18rpx;
flex-shrink: 0;
}
.item-ques .ques {
font-size: 32rpx;
font-weight: 500;
flex: 1;
}
.ques-tip {
margin-left: 54rpx;
color: #999999;
@ -274,14 +323,18 @@ page {
align-items: center;
justify-content: space-between;
}
.ans-number {
color: #0B898E;
font-size: 28rpx;
}
.ans-number .iconfont {
font-size: 28rpx;
}
.icon-xin,.icon-shoucang {
.icon-xin,
.icon-shoucang {
position: absolute;
right: 100rpx;
margin-top: 20rpx;
@ -294,9 +347,11 @@ page {
font-size: 36rpx;
z-index: 1;
}
.icon-shoucang {
color: #D62828;
}
.ques-num {
flex-shrink: 0;
margin-left: 10rpx;
@ -304,6 +359,7 @@ page {
color: #999;
font-weight: 400;
}
.audio-box {
display: flex;
align-items: center;
@ -319,6 +375,7 @@ page {
font-size: 31rpx;
z-index: 1;
}
.audio-box image {
width: 45rpx;
display: block;
@ -333,6 +390,7 @@ page {
bottom: 0;
width: 100%;
}
.mask-content .icon-close {
position: absolute;
right: 40rpx;
@ -348,10 +406,12 @@ page {
align-items: center;
justify-content: center;
}
.share-img {
display: block;
width: 551rpx;
}
.share-tips {
width: 426rpx;
height: 150rpx;
@ -367,12 +427,14 @@ page {
text-align: center;
line-height: 40rpx;
}
.share-tips .img {
display: block;
width: 55rpx;
margin: 0 auto;
margin-bottom: 4rpx;
}
.tipimg {
position: absolute;
left: 50%;
@ -386,11 +448,13 @@ page {
justify-content: center;
top: 34rpx;
}
.tipimg image {
width: 21rpx;
display: block;
}
.save-btn {
width: 403rpx;
line-height: 77rpx;
@ -402,6 +466,7 @@ page {
font-weight: 500;
margin-top: 50rpx;
}
.status-text {
position: absolute;
right: 0;
@ -415,8 +480,60 @@ page {
font-weight: bold;
border-radius: 23rpx 0px 0px 23rpx;
}
.status-text.disable {
width: 120rpx;
background: rgba(51, 51, 51, .1);
color: #666666;
}
.allowance-box {
height: 113rpx;
background: url("https://sz-qd.oss-cn-hangzhou.aliyuncs.com/uploads/20220606/0b2895725088c04fb182e09ec186f895.png");
background-size: 100% auto;
background-repeat: no-repeat;
padding: 30rpx 30rpx 10rpx;
font-size: 24rpx;
color: #FFFFFF;
position: relative;
display: flex;
justify-content: start;
align-items: baseline;
}
.allowance-box .com-price {
font-size: 30rpx;
color: #FFFFFF;
}
.allowance-box .com-price:before {
font-size: 18rpx;
color: #FFFFFF;
}
.allowance-box .com-price:after {
font-size: 18rpx;
color: #FFFFFF;
}
.allowance-box .yellow {
color: #DF2115;
padding: 8rpx 14rpx;
background-color: #FDEDD4;
margin-left: 20rpx;
border-radius: 30rpx;
}
.mask-allowance .mask-content {
margin: auto;
width: auto;
top: initial;
bottom: initial;
padding: 20rpx;
width: 80%;
}
.mask-allowance .mask-content .rule-title {
text-align: center;
margin-bottom: 20rpx;
}

6
pages/order/postOrder/index.js

@ -20,6 +20,7 @@ Page({
select_allowance: false,
allowance_data: null,
allowance_price: 0,
showAllowance: false,
},
/**
@ -51,6 +52,11 @@ Page({
this.couponCom = this.selectAllComponents("#coupon")[0];
}
},
changeAllowance: function () {
this.setData({
showAllowance: !this.data.showAllowance
})
},
inputRemark: function (e) {
let index = e.currentTarget.dataset.index, product = this.data.product;
product[index].remark = e.detail.value;

9
pages/order/postOrder/index.wxml

@ -38,7 +38,7 @@
</view>
<!-- 补贴 -->
<view class="box-title allowance" wx:if="{{allowance_price}}">
<view>惠民补贴</view>
<view bindtap="changeAllowance">惠民补贴</view>
<view class="com-flex-tao" bindtap="selectAllowance">
-¥{{allowance_price / 100}}
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/uploads/20220602/6ecdbc41527c0c603608686967d4493b.png"
@ -55,4 +55,11 @@
</view>
<view class="fixed-price-box" wx:else><text>合计:</text><text class="price">¥{{postFee?(0+postFee)/100:0}}</text></view>
<view class="fixed-btn" bindtap="order">提交订单</view>
</view>
<view class="mask mask-allowance" wx:if="{{showAllowance}}">
<view bindtap="changeAllowance" class="mask-bg"></view>
<view class="mask-content rule-box">
<view class="rule-title">{{allowance_data.title}}</view>
<rich-text nodes="{{allowance_data.content}}"></rich-text>
</view>
</view>

12
pages/order/postOrder/index.wxss

@ -210,4 +210,16 @@ page {
line-height: 113rpx;
padding: 0 20rpx;
border-bottom: 1rpx solid #d8d8d8;
}
.mask-allowance .mask-content {
margin: auto;
top: initial;
bottom: initial;
padding: 20rpx;
}
.mask-allowance .mask-content .rule-title {
text-align: center;
margin-bottom: 20rpx;
}

303
pages/order/scene/index.js

@ -8,20 +8,24 @@ Page({
* 页面的初始数据
*/
data: {
product:app.globalData.product,
productNum:1,
linkmanList:[],
date:"",
time:"",
remark:"",
singlePrice:0,
type:null,
coupon:app.globalData.couponInfo,
isLogin:false,
kjId:null,
gp_id:null,
groupName:"",
prizeId:null
product: app.globalData.product,
productNum: 1,
linkmanList: [],
date: "",
time: "",
remark: "",
singlePrice: 0,
type: null,
coupon: app.globalData.couponInfo,
isLogin: false,
kjId: null,
gp_id: null,
groupName: "",
prizeId: null,
select_allowance: false,
showAllowance: false,
allowance_data: null,
allowance_price: 0,
},
/**
@ -29,229 +33,250 @@ Page({
*/
onLoad: function (options) {
this.setData({
type:options.type,
kjId:app.globalData.kjId,
gp_id:app.globalData.gp_id || app.globalData.team_id,
prizeId:wx.getStorageSync('prizeId')
type: options.type,
kjId: app.globalData.kjId,
gp_id: app.globalData.gp_id || app.globalData.team_id,
prizeId: wx.getStorageSync('prizeId')
})
if(!app.globalData.product){
if (!app.globalData.product) {
util.back();
return;
}
if(app.globalData.product.productNum){
if (app.globalData.product.productNum) {
this.setData({
productNum:app.globalData.product.productNum<1?1:app.globalData.product.productNum
productNum: app.globalData.product.productNum < 1 ? 1 : app.globalData.product.productNum
})
}
this.setData({
product:app.globalData.product,
singlePrice:this.data.gp_id?app.globalData.product.sku.event_price:app.globalData.product.sku.price
product: app.globalData.product,
singlePrice: this.data.gp_id ? app.globalData.product.sku.event_price : app.globalData.product.sku.price
})
if(!this.data.kjId && !this.data.gp_id && this.data.product.isGroup!=1){
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1) {
this.couponCom = this.selectAllComponents("#coupon")[0];
}
},
changeGroupName:function(e){
changeGroupName: function (e) {
this.setData({
groupName:e.detail.value
groupName: e.detail.value
})
},
setLinkman:function(e){
setLinkman: function (e) {
let linkmanList = e.detail;
if(this.data.productNum!=linkmanList.length && this.data.coupon){
if (this.data.productNum != linkmanList.length && this.data.coupon) {
wx.showToast({
title: '订单价格发生变化,请重新选择优惠券',
icon: 'none'
})
if(!this.data.kjId && !this.data.gp_id && this.data.product.isGroup!=1){
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1) {
this.couponCom.setNullCoupon()
}
app.globalData.couponInfo = null;
this.setData({
coupon:null
coupon: null
})
}
let productNum = linkmanList.length==0?1:linkmanList.length;
if(this.data.gp_id){
let productNum = linkmanList.length == 0 ? 1 : linkmanList.length;
if (this.data.gp_id) {
productNum = app.globalData.product.maxNum;
}
this.setData({
productNum:productNum,
linkmanList:linkmanList
productNum: productNum,
linkmanList: linkmanList
})
this.changePrice()
},
add:function(){
if(this.data.product.sku.sku_model.traveller_limit_num!=0 && this.data.productNum==this.data.product.sku.sku_model.traveller_limit_num){
add: function () {
if (this.data.product.sku.sku_model.traveller_limit_num != 0 && this.data.productNum == this.data.product.sku.sku_model.traveller_limit_num) {
wx.showToast({
title: '出行人限购'+this.data.product.sku.sku_model.traveller_limit_num+"份",
icon:'none'
title: '出行人限购' + this.data.product.sku.sku_model.traveller_limit_num + "份",
icon: 'none'
})
return;
}
this.setData({
productNum:this.data.productNum+1
productNum: this.data.productNum + 1
})
this.changePrice()
},
minus:function(){
if(this.data.productNum==1) return;
if(this.data.coupon){
minus: function () {
if (this.data.productNum == 1) return;
if (this.data.coupon) {
wx.showToast({
title: '订单价格发生变化,请重新选择优惠券',
icon: 'none'
})
}
if(!this.data.kjId && !this.data.gp_id && this.data.product.isGroup!=1){
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1) {
this.couponCom.setNullCoupon()
}
app.globalData.couponInfo = null;
this.setData({
productNum:(this.data.productNum-1),
coupon:null
productNum: (this.data.productNum - 1),
coupon: null
})
this.changePrice()
},
changeDate:function(e){
if(e.detail.price!=this.data.singlePrice && this.data.coupon) {
changeDate: function (e) {
if (e.detail.price != this.data.singlePrice && this.data.coupon) {
wx.showToast({
title: '订单价格发生变化,请重新选择优惠券',
icon: 'none'
})
this.setData({
coupon:null
coupon: null
})
if(!this.data.kjId && !this.data.gp_id && this.data.product.isGroup!=1){
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1) {
this.couponCom.setNullCoupon()
}
app.globalData.couponInfo = null;
}
this.setData({
date:e.detail,
singlePrice:this.data.gp_id?this.data.product.sku.event_price:e.detail.price
date: e.detail,
singlePrice: this.data.gp_id ? this.data.product.sku.event_price : e.detail.price
})
this.changePrice()
},
changeTime: function (e) {
this.setData({
time: e.detail
})
console.log(e.detail)
},
changeTime:function(e){
changeAllowance: function () {
this.setData({
time:e.detail
showAllowance: !this.data.showAllowance
})
},
changeRemark:function(e){
changeRemark: function (e) {
this.setData({
remark:e.detail.value
remark: e.detail.value
})
},
order:function(){
let linkmanList = this.data.linkmanList,productNum = this.data.productNum,date = this.data.date,time = this.data.time,remark=this.data.remark,product= this.data.product;
let linkmanIds=[];
if(linkmanList.length<productNum && app.globalData.product.isGroup!=1){
/**
* 补贴价
*/
changePrice: function () {
let product = this.data.product, price = product.sku.price;
if (this.data.allowance_data && this.data.select_allowance && this.data.allowance_price) {
let spread_price = Number(this.data.allowance_data.discount_limit_price - this.data.allowance_data.user_used_price);
price -= this.data.allowance_price < spread_price ? this.data.allowance_price : spread_price
}
this.setData({
singlePrice: app.globalData.kjId ? 0 : price
})
},
order: function () {
let linkmanList = this.data.linkmanList, productNum = this.data.productNum, date = this.data.date, time = this.data.time, remark = this.data.remark, product = this.data.product;
let linkmanIds = [];
if (linkmanList.length < productNum && app.globalData.product.isGroup != 1) {
wx.showToast({
title: '请选择'+productNum+"个出行人",
icon:"none"
title: '请选择' + productNum + "个出行人",
icon: "none"
})
return;
}
if(!date){
if (!date) {
wx.showToast({
title: '请选择使用日期',
icon:'none'
icon: 'none'
})
return
}
if(!time && date.is_time_stock==true){
if (!time && date.is_time_stock == true) {
wx.showToast({
title: '请选择使用时间',
icon:'none'
icon: 'none'
})
return
}
if(app.globalData.product.isGroup==1 && !this.data.groupName){
if (app.globalData.product.isGroup == 1 && !this.data.groupName) {
wx.showToast({
title: '请输入团队主体名称',
icon:'none'
icon: 'none'
})
return;
}
linkmanList.map(item=>{
linkmanList.map(item => {
linkmanIds.push(item.id)
})
let data = {
coupon_id:this.data.coupon?this.data.coupon.id:null,
source:"WECHATXCX",
coupon_id: this.data.coupon ? this.data.coupon.id : null,
source: "WECHATXCX",
product_list: [{
type:product.product.type,
product_id:product.product.id,
sku_id:date.sku_id?date.sku_id:product.sku.id,
start_time:time.start_time,
end_time:time.end_time,
use_date:date.date,
visitors:linkmanIds.join(","),
remark:remark,
product_num:app.globalData.product.isGroup==1?1:productNum
type: product.product.type,
product_id: product.product.id,
sku_id: date.sku_id ? date.sku_id : product.sku.id,
start_time: time.start_time,
end_time: time.end_time,
use_date: date.date,
visitors: linkmanIds.join(","),
remark: remark,
product_num: app.globalData.product.isGroup == 1 ? 1 : productNum
}],
originate_order_id:this.data.kjId,
gp_id:app.globalData.gp_id,
team_id:app.globalData.team_id
originate_order_id: this.data.kjId,
gp_id: app.globalData.gp_id,
team_id: app.globalData.team_id
}
if(app.globalData.from){
if (app.globalData.from) {
data.system_name = app.globalData.from;
}
if(app.globalData.retailId){
if (app.globalData.retailId) {
data.commission_code = app.globalData.retailId;
app.globalData.retailId = null;
}
if(app.globalData.category_id){
if (app.globalData.category_id) {
data.category_id = app.globalData.category_id;
}
if(this.data.prizeId){
if (this.data.prizeId) {
data.lottery_id = this.data.prizeId
}
let service = 'order/create',postData={
data:JSON.stringify(data)
let service = 'order/create', postData = {
data: JSON.stringify(data)
}
if(app.globalData.product.isGroup==1){
if (app.globalData.product.isGroup == 1) {
service = "team_order/appoint"
postData.member_num = this.data.productNum
postData.team_name = this.data.groupName
postData.type = 1;
}
commonApi.user_post(service,postData).then(res=>{
if(app.globalData.kjId){
commonApi.user_post(service, postData).then(res => {
if (app.globalData.kjId) {
this.setData({
kjId:null
kjId: null
});
app.globalData.kjId = null;
}
if(app.globalData.gp_id){
if (app.globalData.gp_id) {
this.setData({
gp_id:null
gp_id: null
});
app.globalData.gp_id = null;
}
if(res.code==1 && app.globalData.product.isGroup==1){
if (res.code == 1 && app.globalData.product.isGroup == 1) {
// 团购跳转到团购详情
wx.navigateTo({
url: '/pages/info/groupOrderInfo/index?id='+res.data.order_id+'&from=order'
url: '/pages/info/groupOrderInfo/index?id=' + res.data.order_id + '&from=order'
})
}
})
},
// 活动预约
activityOrder:function(){
if(this.data.linkmanList && this.data.linkmanList.length>0){
commonApi.user_post("pbservice/Culture/booking",{
id:this.data.product.product.id,
name:this.data.linkmanList[0].name,
card_number:this.data.linkmanList[0].id_number,
tel:this.data.linkmanList[0].tel
}).then(res=>{
if(res.code==1){
activityOrder: function () {
if (this.data.linkmanList && this.data.linkmanList.length > 0) {
commonApi.user_post("pbservice/Culture/booking", {
id: this.data.product.product.id,
name: this.data.linkmanList[0].name,
card_number: this.data.linkmanList[0].id_number,
tel: this.data.linkmanList[0].tel
}).then(res => {
if (res.code == 1) {
wx.showToast({
title: '预约成功',
icon:'success'
icon: 'success'
})
setTimeout(()=>{
setTimeout(() => {
wx.navigateBack()
},1000)
}, 1000)
return;
}
})
@ -259,11 +284,20 @@ Page({
else {
wx.showToast({
title: '请选择出行人',
icon:'none'
icon: 'none'
})
return;
}
},
/**
* 选择补贴
*/
selectAllowance: function () {
this.setData({
select_allowance: !this.data.select_allowance
})
this.changePrice()
},
/**
@ -277,18 +311,49 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
if(!this.data.isLogin){
commonApi.user_post("token/check").then(res=>{
if(res.code==1){
if (!this.data.isLogin) {
commonApi.user_post("token/check").then(res => {
if (res.code == 1) {
this.setData({
isLogin:true
isLogin: true
})
}
})
}
this.setData({
coupon:app.globalData.couponInfo
coupon: app.globalData.couponInfo
})
// 获取补贴
if (this.data.product) {
commonApi.user_post("product/getProductAllowancePrice", {
product_code: this.data.product.product.product_code
}).then(resTwo => {
console.log(resTwo)
if (resTwo && resTwo.code == 1) {
this.setData({
allowance_data: resTwo.data
})
let spread_price = Number(this.data.allowance_data.discount_limit_price - this.data.allowance_data.user_used_price)
let sInfo = this.data.product.sku
if (spread_price > 0) {
if (spread_price < this.data.allowance_data.discount_rate / 100 * sInfo.price) {
this.setData({
allowance_price: spread_price
})
} else {
this.setData({
allowance_price: this.data.allowance_data.discount_rate / 100 * sInfo.price
})
}
this.changePrice()
} else {
this.setData({
allowance_price: 0
})
}
}
})
}
},
/**
@ -303,8 +368,8 @@ Page({
*/
onUnload: function () {
this.setData({
kjId:null,
gp_id:null
kjId: null,
gp_id: null
});
app.globalData.kjId = null;
app.globalData.gp_id = null;

22
pages/order/scene/index.wxml

@ -5,7 +5,8 @@
<view class="product-title">{{product.product.title + product.isGroup==1?'(团体预约)':product.sku.sku_name}}</view>
<view class="product-price" wx:if="{{type=='museum' || type=='activity'}}">免费</view>
</view>
<date wx:if="{{isLogin && type!='activity'}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime" product="{{product}}"></date>
<date wx:if="{{isLogin && type!='activity'}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime"
product="{{product}}"></date>
<view class="box" wx:if="{{product && product.isGroup==1}}">
<view class="box-title">
<view style="flex-shrink:0">团体主体名称:</view>
@ -21,7 +22,20 @@
</view>
</view>
<contact wx:if="{{isLogin}}" type="{{type}}" bind:setLinkman="setLinkman"></contact>
<coupon wx:if="{{!kjId && !gp_id && type!='activity' && product && product.isGroup!=1}}" id="coupon" money="{{singlePrice * productNum}}" sku="{{product.sku.id}}"></coupon>
<!-- 补贴 -->
<view class="box">
<view class="box-title allowance" wx:if="{{allowance_price}}">
<view bindtap="changeAllowance">惠民补贴</view>
<view class="com-flex-tao" bindtap="selectAllowance">
-¥{{allowance_price / 100}}
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/uploads/20220602/6ecdbc41527c0c603608686967d4493b.png"
alt="" wx:if="{{select_allowance}}"></image>
<view class="border" wx:else></view>
</view>
</view>
</view>
<coupon wx:if="{{!kjId && !gp_id && type!='activity' && product && product.isGroup!=1}}" id="coupon"
money="{{singlePrice * productNum}}" sku="{{product.sku.id}}"></coupon>
<view class="box" wx:if="{{type!='activity' && product && product.isGroup!=1}}">
<view class="box-title">
<view style="flex-shrink:0">订单备注</view>
@ -33,7 +47,9 @@
<view class="fixed-bottom" wx:if="{{type!='museum' && type!='activity'}}">
<view class="fixed-price-box" wx:if="{{kjId || prizeId}}"><text>合计:</text><text class="price">¥0</text></view>
<!-- <view class="fixed-price-box" wx:elif="{{prizeId}}"><text>合计:</text><text class="price">¥0</text></view> -->
<view class="fixed-price-box" wx:else><text>合计:</text><text class="price">¥{{((singlePrice * productNum - (coupon?coupon.activity.money:0))>0?(singlePrice * productNum - (coupon?coupon.activity.money:0)):0)/ 100}}</text></view>
<view class="fixed-price-box" wx:else><text>合计:</text><text
class="price">¥{{((singlePrice * productNum - (coupon?coupon.activity.money:0))>0?(singlePrice * productNum - (coupon?coupon.activity.money:0)):0)/ 100}}</text>
</view>
<view class="fixed-btn" bindtap="order">提交订单</view>
</view>
<view class="fixed-bottom yuyue-box" wx:else>

71
pages/order/scene/index.wxss

@ -2,43 +2,54 @@
page {
background: #f6f6f6;
}
.group-order {
background: #fff;
}
.product-info {
padding: 20rpx 47rpx;
border-bottom: 1rpx solid #ccc;
}
.product-title {
font-size: 33rpx;
color: #000;
font-weight: 500;
}
.product-price {
color: #D62828;
font-size: 27rpx;
}
.group-order .box-title {
margin: 0;
}
.group-order .box,.group-order .date-box {
.group-order .box,
.group-order .date-box {
border-bottom: 1rpx solid #D8D8D8;
border-radius: 0;
margin: 0 25rpx;
}
.group-order .dates-boxes {
border-top: none;
padding-top: 0;
}
.group-order .date-time.disable {
background: #CCCCCC;
color: #fff;
}
.box {
margin: 30rpx 25rpx;
background: white;
border-radius: 9rpx;
}
.box-title {
height: 113rpx;
margin: 0 20rpx;
@ -48,12 +59,14 @@ page {
display: flex;
align-items: center;
}
.dates-boxes {
display: flex;
align-items: center;
padding: 31rpx 21rpx;
border-top: 1rpx solid #ccc;
}
.date-item {
width: 162rpx;
height: 97rpx;
@ -68,29 +81,36 @@ page {
align-items: center;
flex-direction: column;
}
.date-item.active {
border-color: #0B898E;
color: #fff;
background: #0B898E;
}
.date-item.disable {
border-color: #CCCCCC;
color: #666;
}
.date-item .price {
font-size: 25rpx;
color: #D62828;
}
.date-item.active .price {
color: #fff;
}
.date-item.disable .price {
color: #666;
}
.more-item {
width: 99rpx;
margin-right: 0;
}
.date-times {
display: flex;
justify-content: space-between;
@ -101,6 +121,7 @@ page {
border-top: 1rpx dashed #ccc;
flex-wrap: wrap;
}
.date-time {
width: 315rpx;
line-height: 58rpx;
@ -112,19 +133,23 @@ page {
margin-bottom: 24rpx;
color: #000;
}
.date-time.disable {
border-color: #ccc;
color: #666666;
}
.date-time.active {
border-color: #0B898E;
background: #0B898E;
color: #fff;
}
.box-title .iconfont {
font-size: 28rpx;
flex-shrink: 0;
}
.number-box {
font-size: 29rpx;
font-weight: 500;
@ -151,10 +176,12 @@ page {
z-index: 1;
box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
}
.yuyue-box {
height: 138rpx;
justify-content: center;
}
.fixed-btn {
width: 320rpx;
line-height: 113rpx;
@ -164,6 +191,7 @@ page {
font-size: 36rpx;
font-weight: 500;
}
.fixed-price-box {
margin-left: 25rpx;
flex-shrink: 0;
@ -171,11 +199,36 @@ page {
color: #333;
font-weight: 500;
}
.fixed-price-box .price {
color: #D62828;
font-size: 36rpx;
margin-left: 10rpx;
}
.allowance {
justify-content: space-between;
}
.allowance>view:nth-child(2) {
display: flex;
align-items: center;
}
.allowance image {
width: 40rpx;
height: 40rpx;
margin-left: 10rpx;
}
.allowance .border {
width: 30rpx;
height: 30rpx;
border-radius: 50%;
border: 4rpx solid #0B98BE;
margin-left: 10rpx;
}
.coupon-btn {
width: 138rpx;
line-height: 56rpx;
@ -185,6 +238,7 @@ page {
font-size: 28rpx;
color: #000;
}
.box-title input {
flex: 1;
display: block;
@ -194,17 +248,32 @@ page {
font-weight: 400;
text-align: right;
}
.yuyue-btn {
width: 657rpx;
line-height: 78rpx;
border-radius: 39rpx;
}
.group-order .yuyue-box {
height: 100rpx;
}
.group-order .yuyue-btn {
width: 100%;
/* height: 100%; */
line-height: 100rpx;
border-radius: 0;
}
.mask-allowance .mask-content {
margin: auto;
top: initial;
bottom: initial;
padding: 20rpx;
}
.mask-allowance .mask-content .rule-title {
text-align: center;
margin-bottom: 20rpx;
}

8
project.private.config.json

@ -13,15 +13,15 @@
"miniprogram": {
"list": [
{
"name": "产品详情4407",
"name": "产4407",
"pathName": "pages/info/postProductInfo/index",
"query": "id=4407",
"scene": null
},
{
"name": "pages/index/index",
"pathName": "pages/index/index",
"query": "id=59532108251510343335",
"name": "景点5447",
"pathName": "pages/info/sceneProductInfo/index",
"query": "id=5447",
"scene": null
},
{

8
utils/https.js

@ -2,7 +2,13 @@ var app = getApp();
import util from "../utils/util"
// import userApi from "../utils/https/user.js";
// const baseUrl = "https://test.api.cloud.sz-trip.com/api/";
const baseUrl = "https://api.cloud.sz-trip.com/api/";
let baseUrl = "https://api.cloud.sz-trip.com/api/";
const env = wx.getAccountInfoSync().miniProgram.envVersion
if (env == 'develop') {
baseUrl = "https://test.api.cloud.sz-trip.com/api/"
} else {
baseUrl = "https://api.cloud.sz-trip.com/api/";
}
const orders = ['', 'weight', 'distance', 'sale_number', 'sale_price', 'price'];
//封装GET请求
function _get(url, data) {

Loading…
Cancel
Save