Commit 49dfd2b7 by 张立顺

取消键盘收起

1 parent 53c31841
...@@ -188,9 +188,9 @@ Page({ ...@@ -188,9 +188,9 @@ Page({
}, },
// 隐藏键盘 // 隐藏键盘
handleHiddenKey() { handleHiddenKey() {
this.setData({ // this.setData({
keyHidden: true // keyHidden: true
}) // })
}, },
// 显示键盘 // 显示键盘
handleShowKey() { handleShowKey() {
...@@ -266,7 +266,7 @@ Page({ ...@@ -266,7 +266,7 @@ Page({
res => { res => {
util.hideLoading() util.hideLoading()
// console.log(res) // console.log(res)
let { returnCode, data,message } = res let { returnCode, data, message } = res
if (returnCode == 0) { if (returnCode == 0) {
let jsapiPayInfo = data.jsapiPayInfo ? JSON.parse(data.jsapiPayInfo) : {} let jsapiPayInfo = data.jsapiPayInfo ? JSON.parse(data.jsapiPayInfo) : {}
...@@ -275,10 +275,10 @@ Page({ ...@@ -275,10 +275,10 @@ Page({
outTradeNo: data.outTradeNo outTradeNo: data.outTradeNo
}) })
_this.wxPayment(jsapiPayInfo) _this.wxPayment(jsapiPayInfo)
} else if(returnCode == -1){ } else {
wx.showToast({ wx.showToast({
title: message || '发起支付失败', title: message || returnCode == -1 ? '发起支付失败' : '支付请求失败',
icon:'error' icon: 'error'
}) })
} }
// console.log(JSON.parse(res.data)) // console.log(JSON.parse(res.data))
...@@ -365,9 +365,9 @@ Page({ ...@@ -365,9 +365,9 @@ Page({
// ) // )
// }, // },
getOrderScreenShot() { getOrderScreenShot() {
let { merchantName,shopMerchantName, dataTime, outTradeNo,payMoney,isYqType } = this.data let { merchantName, shopMerchantName, dataTime, outTradeNo, payMoney, isYqType } = this.data
let params = JSON.stringify({ merchantName:isYqType?merchantName:shopMerchantName, formatAccountDate: dataTime, selectPayType: 1, outTradeNo, payMoney }) let params = JSON.stringify({ merchantName: isYqType ? merchantName : shopMerchantName, formatAccountDate: dataTime, selectPayType: 1, outTradeNo, payMoney })
console.log(params,'params'); console.log(params, 'params')
api api
.orderScreenShot({ url: orderPosterImgUrl + 'orderInfo=' + params }) .orderScreenShot({ url: orderPosterImgUrl + 'orderInfo=' + params })
.then(result => { .then(result => {
......
...@@ -36,11 +36,11 @@ Page({ ...@@ -36,11 +36,11 @@ Page({
// console.log('隐藏成功!') // console.log('隐藏成功!')
} }
}) })
// options.orderCode = 'S2307141727472187'
// 是别的小程序 跳转过来的 // 是别的小程序 跳转过来的
if (options.orderCode) { if (options.orderCode) {
this.setData({ this.setData({
orderCode: options.orderCode otherOrderCode: options.orderCode
}) })
} }
// 开发用 // 开发用
...@@ -87,7 +87,7 @@ Page({ ...@@ -87,7 +87,7 @@ Page({
}, },
gteOpenId() { gteOpenId() {
let that = this let that = this
let { orderCode } = this.data let { otherOrderCode } = this.data
// debugger // debugger
// 登录 // 登录
wx.login({ wx.login({
...@@ -110,9 +110,9 @@ Page({ ...@@ -110,9 +110,9 @@ Page({
self.setData({ self.setData({
openId: data.openId openId: data.openId
}) })
orderCode otherOrderCode
? that.getOrderDetail({ ? that.getOrderDetail({
orderCode orderCode: otherOrderCode
}) })
: that.getScenInfo() : that.getScenInfo()
} }
...@@ -156,9 +156,9 @@ Page({ ...@@ -156,9 +156,9 @@ Page({
o o
}) })
_this.wxPayment(o) _this.wxPayment(o)
} else if (returnCode == -1) { } else {
wx.showToast({ wx.showToast({
title: message || '发起支付失败', title: message || returnCode == -1 ? '发起支付失败' : '订单支付失败',
icon: 'error' icon: 'error'
}) })
} }
...@@ -168,7 +168,7 @@ Page({ ...@@ -168,7 +168,7 @@ Page({
// 调用微信支付 // 调用微信支付
wxPayment: function (row) { wxPayment: function (row) {
let _this = this let _this = this
let { orderCode } = this.data let { otherOrderCode } = this.data
if (this.data.ajaxing) { if (this.data.ajaxing) {
return false return false
} }
...@@ -190,7 +190,7 @@ Page({ ...@@ -190,7 +190,7 @@ Page({
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '支付成功' title: '支付成功'
}) })
if (orderCode) { if (otherOrderCode) {
// 跳转回对应的小程序 // 跳转回对应的小程序
return wx.navigateToMiniProgram({ return wx.navigateToMiniProgram({
appId: 'wxe10067a63c1856ac', appId: 'wxe10067a63c1856ac',
...@@ -200,7 +200,8 @@ Page({ ...@@ -200,7 +200,8 @@ Page({
extraData: { extraData: {
// foo: 'bar' // foo: 'bar'
}, },
envVersion: envName, // envVersion: envName,
envVersion: 'trial',
success(res) { success(res) {
// 打开成功 // 打开成功
} }
...@@ -273,7 +274,7 @@ Page({ ...@@ -273,7 +274,7 @@ Page({
}) })
.then(res => { .then(res => {
console.log(res, 'res') console.log(res, 'res')
let { code, data, errId } = res let { code, data, errId, message } = res
// console.log(data, 'data') // console.log(data, 'data')
// console.log(data.sceneType == 1); // console.log(data.sceneType == 1);
// debugger // debugger
...@@ -292,7 +293,7 @@ Page({ ...@@ -292,7 +293,7 @@ Page({
} }
} else if (errId == '-5003') { } else if (errId == '-5003') {
wx.showToast({ wx.showToast({
title: '订单已失效', title: message || '订单已失效',
icon: 'error' icon: 'error'
}) })
} else { } else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!