[版本更新]
This commit is contained in:
@@ -25,8 +25,11 @@ const cancel = (orderid) => req({url: "orders/cancel?orderid=" + orderid , metho
|
||||
//福利取消订单
|
||||
const welfaresCancel = (orderid) => req({url: "welfares/orders/cancel?orderid=" + orderid , method: "POST"})
|
||||
|
||||
//福利订单支付
|
||||
const welfarePay = (orderid) => req({url: "payments/welfare?orderid=" + orderid})
|
||||
|
||||
//兑换订单支付
|
||||
const payments = (orderid) => req({url: "payments/order?orderid=" + orderid})
|
||||
const rightsPay = (orderid) => req({url: "payments/order?orderid=" + orderid})
|
||||
|
||||
export default({
|
||||
orders,
|
||||
@@ -37,5 +40,6 @@ export default({
|
||||
welfaresShow,
|
||||
cancel,
|
||||
welfaresCancel,
|
||||
payments
|
||||
welfarePay,
|
||||
rightsPay
|
||||
})
|
||||
|
||||
@@ -11,7 +11,7 @@ const choice = (type, area_name, user_lng, user_lat) => req({url: "home/group",
|
||||
const classify = (category_id, area_name, user_lng, user_lat) => req({url: "categories/" + category_id, data: {area_name: area_name, user_lng: user_lng, user_lat:user_lat}})
|
||||
|
||||
//周五福利详情
|
||||
const welfares = (welfare_id) => req({url: "welfare/" + welfare_id})
|
||||
const welfares = (welfare_id, address_id, is_deliver) => req({url: "welfare/" + welfare_id, data: {address_id: address_id || '', is_deliver:is_deliver}})
|
||||
|
||||
//市区选择
|
||||
const idxCity = (province_id) => req({url: "areas/citys?province_id=" + province_id || ''})
|
||||
|
||||
@@ -2,8 +2,9 @@ import {errInfo} from './err'
|
||||
import {updToken} from './updateToken'
|
||||
|
||||
// 请求方式配置
|
||||
// https://card.ysd-bs.com 正式地址
|
||||
const api = "https://lifetest.ysd-bs.com/api/" //测试地址
|
||||
// https://lifetest.ysd-bs.com //测试地址
|
||||
// https://card.ysd-bs.com
|
||||
const api = "https://lifetest.ysd-bs.com/api/" //正式地址
|
||||
const header = {
|
||||
"Accept" : "application/json"
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<text>请出示以上券码给网点工作人员</text>
|
||||
</view>
|
||||
|
||||
<block wx:if="{{details.card_type == 'merchant_card'}}">
|
||||
<!-- <block wx:if="{{details.card_type == 'merchant_card'}}">
|
||||
<view class="detailsCode-join {{details.is_get == true ? 'active':''}}">
|
||||
<send-coupon send_coupon_params="{{merchantcardinfo.send_coupon_params}}" sign="{{ merchantcardinfo.sign }}" send_coupon_merchant="{{merchantcardinfo.send_coupon_merchant}}" wx:if="{{details.is_get == true}}">
|
||||
已加入微信卡包
|
||||
@@ -31,16 +31,16 @@
|
||||
加入微信卡包
|
||||
</send-coupon>
|
||||
</view>
|
||||
</block>
|
||||
</block> -->
|
||||
|
||||
<block wx:if="{{details.card_type == 'card'}}">
|
||||
<!-- <block wx:if="{{details.card_type == 'card'}}">
|
||||
<view class="detailsCode-join {{details.is_get == true ? 'active':''}}" wx:if="{{details.is_get == true}}">
|
||||
已加入微信卡包
|
||||
</view>
|
||||
<view class="detailsCode-join {{details.is_get == true ? 'active':''}}" bindtap="join" wx:else>
|
||||
加入微信卡包
|
||||
</view>
|
||||
</block>
|
||||
</block> -->
|
||||
</view>
|
||||
|
||||
<!-- 门店定位 -->
|
||||
|
||||
@@ -114,10 +114,16 @@ Page({
|
||||
* 支付提交
|
||||
*/
|
||||
orderPay() {
|
||||
wx.$api.exchange.payments(this.data.pay.orderId).then(res=>{
|
||||
let url = ''
|
||||
if(this.data.orderType == 'welfare' || this.data.orderType == 'welfareGoods') url = wx.$api.exchange.welfarePay
|
||||
if(this.data.orderType == 'rights' || this.data.orderType == 'rightsCoupons') url = wx.$api.exchange.rightsPay
|
||||
url(this.data.pay.orderId).then(res=>{
|
||||
// payTips为1的时候为微信支付
|
||||
if(this.data.pay.payTips == 1) {
|
||||
wx.$api.index.wechat(res.data.trade_no).then(res=>{
|
||||
let wechaUrl = ''
|
||||
if(this.data.orderType == 'welfare' || this.data.orderType == 'welfareGoods') wechaUrl = wx.$api.index.fridayPay
|
||||
if(this.data.orderType == 'rights' || this.data.orderType == 'rightsCoupons') wechaUrl = wx.$api.index.wechat
|
||||
wechaUrl(res.data.trade_no).then(res=>{
|
||||
let payInfo = JSON.parse(res.data)
|
||||
wx.requestPayment({
|
||||
timeStamp: payInfo.timeStamp,
|
||||
@@ -132,16 +138,14 @@ Page({
|
||||
icon : 'success'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
wx.reLaunch({
|
||||
url: '/pages/coupon/coupon?type=couponPublic'
|
||||
})
|
||||
// 获取商品活动订单
|
||||
this.orderInfo();
|
||||
},2000)
|
||||
}
|
||||
},
|
||||
fail : res=>{
|
||||
wx.redirectTo({
|
||||
url: '/pages/order/order?stateType=unpay'
|
||||
})
|
||||
// 获取商品活动订单
|
||||
this.orderInfo();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -95,13 +95,13 @@
|
||||
</view>
|
||||
<radio class="radio" value="1" checked></radio>
|
||||
</view>
|
||||
<view class="payContList-label">
|
||||
<!-- <view class="payContList-label">
|
||||
<view class="payContList-label-name">
|
||||
<image class="payContList-label-img" src="/static/img/wqb.jpg"></image>
|
||||
沃钱包支付
|
||||
</view>
|
||||
<radio class="radio" value="2"></radio>
|
||||
</view>
|
||||
</view> -->
|
||||
</radio-group>
|
||||
<button class="payWayBtn" bindtap="orderPay">确认</button>
|
||||
</view>
|
||||
@@ -52,7 +52,7 @@
|
||||
<view class="order-total">
|
||||
<view class="order-total-li">
|
||||
实际支付
|
||||
<text class="redCor">¥{{order.amount || order.source.welfare.price}}</text>
|
||||
<text class="redCor">¥{{order.total || order.source.welfare.price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@ Page({
|
||||
disabled : false,
|
||||
payWayIndex : 0,
|
||||
payWay :[
|
||||
{value: 0, name: "微信支付"},
|
||||
{value: 1, name: "沃钱包支付"}
|
||||
{value: 0, name: "微信支付"}
|
||||
// {value: 1, name: "沃钱包支付"}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
<view class="userOrder-icon">
|
||||
<image src="/static/img/userOrder_02.png"></image>
|
||||
</view>
|
||||
<text>权益订单</text>
|
||||
<text>权益券订单</text>
|
||||
</view>
|
||||
<view class="userOrder-label" bindtap="userNav" data-url="/pages/order/order?orderType=rights">
|
||||
<view class="userOrder-icon">
|
||||
|
||||
@@ -5,10 +5,12 @@ Page({
|
||||
*/
|
||||
data: {
|
||||
address : '', //默认收货地址
|
||||
amount : '', //总金额
|
||||
allAddress : '', //收货地址列表
|
||||
addressShow : false, //收货地址显示
|
||||
noticeShow : false, //须知显示状态
|
||||
pointMoreShow : false, //重要提示显示状态
|
||||
freight : '', //运费
|
||||
isdeliver : -1,
|
||||
groupId : '', //权益id
|
||||
contData : '', //全局内容
|
||||
@@ -20,8 +22,8 @@ Page({
|
||||
platIndex : 0, //选择提交方式下标
|
||||
payWayIndex : 0, //选择支付方式下标
|
||||
payWay :[
|
||||
{value: 0, name: "微信支付"},
|
||||
{value: 1, name: "沃钱包支付"}
|
||||
{value: 0, name: "微信支付"}
|
||||
// {value: 1, name: "沃钱包支付"}
|
||||
]
|
||||
|
||||
},
|
||||
@@ -47,7 +49,7 @@ Page({
|
||||
* 详情
|
||||
*/
|
||||
rightsInfo() {
|
||||
wx.$api.index.welfares(this.data.groupId).then(res=>{
|
||||
wx.$api.index.welfares(this.data.groupId, this.data.address.id, this.data.isdeliver).then(res=>{
|
||||
let obj = res.data.detail.right.express
|
||||
let defGet = res.data.detail.right.def_get
|
||||
let arr = new Array
|
||||
@@ -69,6 +71,8 @@ Page({
|
||||
address : res.data.address,
|
||||
allAddress : res.data.all_address,
|
||||
contData : res.data.detail,
|
||||
freight : res.data.freight,
|
||||
amount : res.data.total,
|
||||
platformCp : arr,
|
||||
rightData : res.data.detail.right,
|
||||
remark : res.data.detail.remark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"'),
|
||||
|
||||
@@ -78,6 +78,10 @@
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
<view class="rightsLabel" wx:if="{{platformCp[platIndex].name == '快递'}}">
|
||||
<view class="rightsLabel-left">快递运费</view>
|
||||
<view class="rightsLabel-right">¥{{freight}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
@@ -85,7 +89,7 @@
|
||||
<view class="rightsList">
|
||||
<view class="rightsLabel-pay" style="font-weight: 600;">
|
||||
<view class="rightsLabel-left">{{contData.attribute.form_pay}}</view>
|
||||
<view class="rightsLabel-right">¥<text style="font-size: 36rpx;">{{contData.price}}</text></view>
|
||||
<view class="rightsLabel-right">¥<text style="font-size: 36rpx;">{{amount}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"compileHotReLoad": false,
|
||||
"useMultiFrameRuntime": true,
|
||||
"useApiHook": true,
|
||||
"useApiHostProcess": true,
|
||||
"useApiHostProcess": false,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
|
||||
Reference in New Issue
Block a user