[版本更新]

This commit is contained in:
zhangjing
2021-06-10 15:12:48 +08:00
parent b420399fd8
commit e3b1e0fe99
12 changed files with 45 additions and 28 deletions

View File

@@ -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 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({ export default({
orders, orders,
@@ -37,5 +40,6 @@ export default({
welfaresShow, welfaresShow,
cancel, cancel,
welfaresCancel, welfaresCancel,
payments welfarePay,
rightsPay
}) })

View File

@@ -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 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 || ''}) const idxCity = (province_id) => req({url: "areas/citys?province_id=" + province_id || ''})

View File

@@ -2,8 +2,9 @@ import {errInfo} from './err'
import {updToken} from './updateToken' import {updToken} from './updateToken'
// 请求方式配置 // 请求方式配置
// https://card.ysd-bs.com 正式地址 // https://lifetest.ysd-bs.com //测试地址
const api = "https://lifetest.ysd-bs.com/api/" //测试地址 // https://card.ysd-bs.com
const api = "https://lifetest.ysd-bs.com/api/" //正式地址
const header = { const header = {
"Accept" : "application/json" "Accept" : "application/json"
} }

View File

@@ -22,7 +22,7 @@
<text>请出示以上券码给网点工作人员</text> <text>请出示以上券码给网点工作人员</text>
</view> </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':''}}"> <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}}"> <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> </send-coupon>
</view> </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 class="detailsCode-join {{details.is_get == true ? 'active':''}}" wx:if="{{details.is_get == true}}">
已加入微信卡包 已加入微信卡包
</view> </view>
<view class="detailsCode-join {{details.is_get == true ? 'active':''}}" bindtap="join" wx:else> <view class="detailsCode-join {{details.is_get == true ? 'active':''}}" bindtap="join" wx:else>
加入微信卡包 加入微信卡包
</view> </view>
</block> </block> -->
</view> </view>
<!-- 门店定位 --> <!-- 门店定位 -->

View File

@@ -114,10 +114,16 @@ Page({
* 支付提交 * 支付提交
*/ */
orderPay() { 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的时候为微信支付 // payTips为1的时候为微信支付
if(this.data.pay.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) let payInfo = JSON.parse(res.data)
wx.requestPayment({ wx.requestPayment({
timeStamp: payInfo.timeStamp, timeStamp: payInfo.timeStamp,
@@ -132,16 +138,14 @@ Page({
icon : 'success' icon : 'success'
}) })
setTimeout(()=>{ setTimeout(()=>{
wx.reLaunch({ // 获取商品活动订单
url: '/pages/coupon/coupon?type=couponPublic' this.orderInfo();
})
},2000) },2000)
} }
}, },
fail : res=>{ fail : res=>{
wx.redirectTo({ // 获取商品活动订单
url: '/pages/order/order?stateType=unpay' this.orderInfo();
})
} }
}) })
}) })

View File

@@ -95,13 +95,13 @@
</view> </view>
<radio class="radio" value="1" checked></radio> <radio class="radio" value="1" checked></radio>
</view> </view>
<view class="payContList-label"> <!-- <view class="payContList-label">
<view class="payContList-label-name"> <view class="payContList-label-name">
<image class="payContList-label-img" src="/static/img/wqb.jpg"></image> <image class="payContList-label-img" src="/static/img/wqb.jpg"></image>
沃钱包支付 沃钱包支付
</view> </view>
<radio class="radio" value="2"></radio> <radio class="radio" value="2"></radio>
</view> </view> -->
</radio-group> </radio-group>
<button class="payWayBtn" bindtap="orderPay">确认</button> <button class="payWayBtn" bindtap="orderPay">确认</button>
</view> </view>

View File

@@ -52,7 +52,7 @@
<view class="order-total"> <view class="order-total">
<view class="order-total-li"> <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>
</view> </view>

View File

@@ -32,8 +32,8 @@ Page({
disabled : false, disabled : false,
payWayIndex : 0, payWayIndex : 0,
payWay :[ payWay :[
{value: 0, name: "微信支付"}, {value: 0, name: "微信支付"}
{value: 1, name: "沃钱包支付"} // {value: 1, name: "沃钱包支付"}
] ]
}, },

View File

@@ -153,7 +153,7 @@
<view class="userOrder-icon"> <view class="userOrder-icon">
<image src="/static/img/userOrder_02.png"></image> <image src="/static/img/userOrder_02.png"></image>
</view> </view>
<text>权益订单</text> <text>权益订单</text>
</view> </view>
<view class="userOrder-label" bindtap="userNav" data-url="/pages/order/order?orderType=rights"> <view class="userOrder-label" bindtap="userNav" data-url="/pages/order/order?orderType=rights">
<view class="userOrder-icon"> <view class="userOrder-icon">

View File

@@ -5,10 +5,12 @@ Page({
*/ */
data: { data: {
address : '', //默认收货地址 address : '', //默认收货地址
amount : '', //总金额
allAddress : '', //收货地址列表 allAddress : '', //收货地址列表
addressShow : false, //收货地址显示 addressShow : false, //收货地址显示
noticeShow : false, //须知显示状态 noticeShow : false, //须知显示状态
pointMoreShow : false, //重要提示显示状态 pointMoreShow : false, //重要提示显示状态
freight : '', //运费
isdeliver : -1, isdeliver : -1,
groupId : '', //权益id groupId : '', //权益id
contData : '', //全局内容 contData : '', //全局内容
@@ -20,8 +22,8 @@ Page({
platIndex : 0, //选择提交方式下标 platIndex : 0, //选择提交方式下标
payWayIndex : 0, //选择支付方式下标 payWayIndex : 0, //选择支付方式下标
payWay :[ payWay :[
{value: 0, name: "微信支付"}, {value: 0, name: "微信支付"}
{value: 1, name: "沃钱包支付"} // {value: 1, name: "沃钱包支付"}
] ]
}, },
@@ -47,7 +49,7 @@ Page({
* 详情 * 详情
*/ */
rightsInfo() { 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 obj = res.data.detail.right.express
let defGet = res.data.detail.right.def_get let defGet = res.data.detail.right.def_get
let arr = new Array let arr = new Array
@@ -69,6 +71,8 @@ Page({
address : res.data.address, address : res.data.address,
allAddress : res.data.all_address, allAddress : res.data.all_address,
contData : res.data.detail, contData : res.data.detail,
freight : res.data.freight,
amount : res.data.total,
platformCp : arr, platformCp : arr,
rightData : res.data.detail.right, rightData : res.data.detail.right,
remark : res.data.detail.remark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"'), remark : res.data.detail.remark.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"'),

View File

@@ -78,6 +78,10 @@
</navigator> </navigator>
</block> </block>
</view> </view>
<view class="rightsLabel" wx:if="{{platformCp[platIndex].name == '快递'}}">
<view class="rightsLabel-left">快递运费</view>
<view class="rightsLabel-right">¥{{freight}}</view>
</view>
</block> </block>
</view> </view>
@@ -85,7 +89,7 @@
<view class="rightsList"> <view class="rightsList">
<view class="rightsLabel-pay" style="font-weight: 600;"> <view class="rightsLabel-pay" style="font-weight: 600;">
<view class="rightsLabel-left">{{contData.attribute.form_pay}}</view> <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>
</view> </view>

View File

@@ -23,7 +23,7 @@
"compileHotReLoad": false, "compileHotReLoad": false,
"useMultiFrameRuntime": true, "useMultiFrameRuntime": true,
"useApiHook": true, "useApiHook": true,
"useApiHostProcess": true, "useApiHostProcess": false,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],