|
|
var t = require("../../../utils/network.js");
|
|
|
|
|
|
const app=getApp();
|
|
|
Page({
|
|
|
data: {
|
|
|
type: "",
|
...
|
...
|
@@ -72,10 +72,13 @@ Page({ |
|
|
total: this.data.totalmoney,
|
|
|
name: this.data.address.userName,
|
|
|
tel: this.data.address.telNumber,
|
|
|
addr: this.data.address.provinceName + this.data.address.cityName + this.data.address.countyName + this.data.address.detailInfo,
|
|
|
leave: this.data.user_msg ? this.data.user_msg : ""
|
|
|
addr: this.data.address.provinceName + this.data.address.cityName + this.data.address.countyName +
|
|
|
this.data.address.detailInfo,
|
|
|
leave: this.data.user_msg ? this.data.user_msg : "",
|
|
|
share_id: app.globalData.share_id ? app.globalData.share_id :0
|
|
|
},
|
|
|
success: function(t) {
|
|
|
|
|
|
wx.showLoading({
|
|
|
title: "处理中..."
|
|
|
}), "success" == t.data.state && a.setData({
|
...
|
...
|
@@ -85,6 +88,7 @@ Page({ |
|
|
});
|
|
|
},
|
|
|
pay_order: function() {
|
|
|
let that=this;
|
|
|
t.POST({
|
|
|
url: "Pay/pay_order",
|
|
|
header: "application/x-www-form-urlencoded",
|
...
|
...
|
@@ -94,7 +98,7 @@ Page({ |
|
|
money: this.data.totalmoney
|
|
|
},
|
|
|
success: function(t) {
|
|
|
console.log(t), t.data && wx.requestPayment({
|
|
|
t.data && wx.requestPayment({
|
|
|
timeStamp: t.data.timeStamp,
|
|
|
nonceStr: t.data.nonceStr,
|
|
|
package: t.data.package,
|
...
|
...
|
@@ -105,8 +109,16 @@ Page({ |
|
|
url: "../delivery/delivery"
|
|
|
});
|
|
|
},
|
|
|
fail: function(t) {}
|
|
|
fail: function(t) {
|
|
|
wx.redirectTo({
|
|
|
url: '/pages/index/paydetail/paydetail?id=' + that.data.oid + '&type=0'
|
|
|
})
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
fail:function(){
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
},
|
...
|
...
|
@@ -117,7 +129,32 @@ Page({ |
|
|
onUnload: function() {},
|
|
|
onPullDownRefresh: function() {},
|
|
|
onReachBottom: function() {},
|
|
|
onShareAppMessage: function() {},
|
|
|
onShareAppMessage: function (options) {
|
|
|
let that = this;
|
|
|
let ouid;
|
|
|
// 设置菜单中的转发按钮触发转发事件时的转发内容
|
|
|
var shareObj = {
|
|
|
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
|
|
|
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
|
|
|
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
|
|
success: function (res) {
|
|
|
// 转发成功之后的回调
|
|
|
if (res.errMsg == 'shareAppMessage:ok') { }
|
|
|
},
|
|
|
fail: function () {
|
|
|
// 转发失败之后的回调
|
|
|
if (res.errMsg == 'shareAppMessage:fail cancel') {
|
|
|
// 用户取消转发
|
|
|
} else if (res.errMsg == 'shareAppMessage:fail') {
|
|
|
// 转发失败,其中 detail message 为详细失败信息
|
|
|
}
|
|
|
},
|
|
|
complete: function () {
|
|
|
// 转发结束之后的回调(转发成不成功都会执行)
|
|
|
}
|
|
|
}
|
|
|
return shareObj;
|
|
|
},
|
|
|
getaddress: function() {
|
|
|
var t = this;
|
|
|
wx.chooseAddress ? wx.chooseAddress({
|
...
|
...
|
|