This commit is contained in:
zhangmanman
2021-07-07 10:47:38 +08:00
parent fc77594016
commit c29fc7b5cb
12 changed files with 56 additions and 48 deletions

View File

@@ -45,8 +45,6 @@ Page({
// 获取卡券列表
this.couponInfo()
console.log(this.data.platformCp[this.data.platIndex])
},
/**
@@ -270,8 +268,6 @@ Page({
}
},
fail : res=>{
console.log(this.data.isdeliver)
console.log(Newtype)
if(Newtype == 'welfare'){
if(this.data.isdeliver == 1) {
wx.reLaunch({

View File

@@ -25,7 +25,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad (options) {
console.log(options)
// 登录方式-活动
this.setData({
way : options.way
@@ -121,10 +120,10 @@ Page({
* 点击账号登录
*/
loginGo(e) {
let username = e.currentTarget.dataset.name,
wechatUser_id = app.globalData.wechatUser
let username = e.currentTarget.dataset.name
const wechatUserId = wx.getStorageSync("wechatUser")
wx.$api.enroll.tel(wechatUser_id, username).then(res=>{
wx.$api.enroll.tel(wechatUserId, username).then(res=>{
app.globalData.token = res.data.token
app.globalData.isUser = true

View File

@@ -33,7 +33,6 @@ Page({
*/
frozenInfo() {
wx.$api.user.ungrants(this.data.type).then(res=>{
console.log(res.data)
this.setData({
frozenData: res.data
})

View File

@@ -354,7 +354,6 @@ Page({
}
},
fail: err => {
console.log(err)
}
})
}

View File

@@ -107,7 +107,12 @@ Page({
// 存入缓存
app.globalData.userInfo = res.data.users
app.globalData.wechatUser = res.data.wechatUser_id
// 写入缓存
wx.setStorage({
key : 'wechatUser',
data : res.data.wechatUser_id
})
this.setData({
isLogin: false

View File

@@ -26,8 +26,6 @@ Page({
orderType: options.orderType,
stateType: options.stateType
})
console.log(options.orderType)
},
onShow() {

View File

@@ -97,9 +97,17 @@ Page({
* 支付提交
*/
orderPay(e) {
let url = ''
let orderid = e.currentTarget.dataset.id
wx.$api.exchange.payments(orderid).then(res=>{
wx.$api.index.wechat(res.data.trade_no).then(res=>{
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(orderid).then(res=>{
// payTips为1的时候为微信支付
if(this.data.pay.payTips == 1) {
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,
@@ -114,19 +122,31 @@ Page({
icon : 'success'
})
setTimeout(()=>{
wx.reLaunch({
url: '/pages/coupon/coupon?type=couponPublic'
})
// 获取商品活动订单
this.orderInfo();
},2000)
}
},
fail : res=>{
wx.reLaunch({
url: '/pages/order/order?stateType=unpay'
})
// 获取商品活动订单
this.orderInfo();
}
})
})
}
// payTips为2的时候为沃钱包支付
if(this.data.pay.payTips == 2) {
const newUrl = "https://lifetest.ysd-bs.com/unicom/payment?trade_no=" + res.data.trade_no
let url= encodeURIComponent(newUrl)
wx.navigateTo({
// 跳转到webview页面
url: `/pages/webView/webView?url=${url}`
});
}
this.setData({
['pay.payState']: false
})
})
},

View File

@@ -59,5 +59,5 @@
<view class="order-data-footer {{statusHeight > 30 ? 'iphoneX':''}}">
<view class="order-btn" bindtap="orderRun">返回订单</view>
<view class="order-btn" bindtap="orderDelete" data-id="{{order.orderid}}" wx:if="{{order.canCancel || order.can.cancel}}">取消订单</view>
<view class="order-btn order-btn-back" bindtap="orderPay" wx:if="{{order.canPay || order.can.pay}}" data-id="{{order.orderid}}">立即支付</view>
<!-- <view class="order-btn order-btn-back" bindtap="orderPay" wx:if="{{order.canPay || order.can.pay}}" data-id="{{order.orderid}}">立即支付</view> -->
</view>

View File

@@ -78,7 +78,6 @@ Page({
}
if(res.data.detail.type == 'virtual') this.setData({isdeliver : 1})
}
this.setData({
address : res.data.address,
allAddress : res.data.all_address,
@@ -219,7 +218,6 @@ Page({
* 选择收货地址
*/
selectAddress(e){
console.log(e)
let new_addressId = e.currentTarget.dataset.id,
addressId = this.data.address.id
if (new_addressId != addressId) {

View File

@@ -122,7 +122,7 @@
<view class="rightsList" style="padding: 0 0 2rpx">
<view class="rightsLabel">
<view class="rightsLabel-left">{{detail.attribute.form_type}}</view>
<view class="rightsLabel-right rightsLabel-red">¥{{detail.score}}</view>
<view class="rightsLabel-right rightsLabel-red">¥{{score}}</view>
</view>
<view class="rightsLabel uni-border-top">
<view class="rightsLabel-left">{{detail.attribute.form_pay}}</view>

View File

@@ -27,7 +27,6 @@ Page({
},
onLoad(e) {
console.log(e)
wx.getLocation({
success: res => {
// 解析坐标
@@ -133,8 +132,6 @@ Page({
this.setData({
regiList : res.data
})
console.log(this.data.regiList)
})
},
@@ -142,7 +139,6 @@ Page({
* 选择市区返回
*/
regionOpt (e) {
console.log(e)
let area_name = e.currentTarget.dataset.city
var pages = getCurrentPages();
var prevPage = pages[pages.length - 2];

View File

@@ -15,8 +15,6 @@ Page({
this.setData({
url : decodeURIComponent(options.url)
})
console.log(this.data.url)
},
/**