var app = getApp();
function setOnShowScene(e) {
app.onShowData || (app.onShowData = {}), app.onShowData.scene = e
}
var pay = {
init: function (l, e) {
var _ = this,
A = getApp().api;
_.page = l,
app = e;
var y = getApp().core.getStorageSync(getApp().const.PARENT_ID);
y || (y = 0),
_.page.orderPay = function (e) {
var t = e.currentTarget.dataset.index,
o = _.page.data.order_list[t],
a = new Array;
if (void 0 !== _.page.data.pay_type_list) a = _.page.data.pay_type_list;
else if (void 0 !== o.pay_type_list) a = o.pay_type_list;
else if (void 0 !== o.goods_list[0].pay_type_list) a = o.goods_list[0].pay_type_list;
else {
var r = {
payment: 0
};
a.push(r)
}
var p = getCurrentPages(),
s = p[p.length - 1].__route__,
c = {};
console.log(p, s)
if (-1 != s.indexOf("pt")) n = A.group.pay_data, c.order_id = o.order_id;
else if (-1 != s.indexOf("miaosha")) n = A.miaosha.pay_data, c.order_id = o.order_id;
else if (-1 != s.indexOf("book")) n = A.book.order_pay, c.id = o.id;
else {
var n = A.order.pay_data;
c.order_id = o.order_id
}
function ttt() {
t.pay_type = "BALANCE_PAY";
var e = getApp().getUser();
getApp().core.showModal({
title: "当前账户余额:" + e.money,
content: "是否使用余额",
success: function (e) {
e.confirm && (getApp().core.showLoading({
title: "正在提交",
mask: !0
}),
app.request({
url: o,
data: t,
complete: function () {
getApp().core.hideLoading()
},
success: function (e) {
0 == e.code && getApp().core.redirectTo({
url: "/" + a + "?status=1"
}), 1 == e.code && getApp().core.showModal({
title: "提示",
content: e.msg,
showCancel: !1
})
}
}))
}
})
}
// function pay_way(e, t, o) {
// getApp().core.showModal({
// title: "提示",
// content: "选择线上支付方式",
// cancelText: "微信",
// confirmText: "支付宝",
// success: function (e) {
// e.confirm ? (getApp().core.showLoading({
// title: "正在提交",
// mask: !0
// }), i(c, n, s)) : e.cancel && (getApp().core.showLoading({
// title: "正在提交",
// mask: !0
// }), z(c, n, s))
// }
// })
// }
//支付宝支付
// function i(e, t, o) {
// e.pay_type = "WECHAT_PAY",
// e.pay_way = 'alipay',
// app.request({
// url: t,
// data: e,
// complete: function () {
// getApp().core.hideLoading()
// },
// success: function (e) {
// console.log(e, "ddddd")
// if (0 == e.code) {
// setOnShowScene("pay")
// console.log(e, "ddddd")
// tt.requestPayment({
// data: {
// app_id: e.data.app_id,
// method: e.data.method,
// sign: e.data.sign,
// sign_type: e.data.sign_type,
// timestamp: e.data.timestamp + "",
// trade_no: e.data.trade_no,
// risk_info: e.data.risk_info,
// merchant_id: e.data.merchant_id + "",
// uid: e.data.uid,
// total_amount: e.data.total_amount,
// pay_channel: 'ALIPAY_NO_SIGN',
// pay_type: 'ALIPAY_APP',
// params: e.data.params,
// },
// success: function (e) { },
// fail: function (e) { },
// complete: function (e) {
// "requestPayment:fail" != e.errMsg && "requestPayment:fail cancel" != e.errMsg ? getApp().core.redirectTo({
// url: "/" + o + "?status=1"
// }) : getApp().core.showModal({
// title: "提示",
// content: "订单尚未支付",
// showCancel: !1,
// confirmText: "确认",
// success: function (e) {
// e.confirm && getApp().core.redirectTo({
// url: "/" + o + "?status=0"
// })
// }
// })
// }
// })
// }
// 1 == e.code && getApp().core.showModal({
// title: "提示",
// content: e.msg,
// showCancel: !1
// })
// }
// })
// // 1== e.code && getApp().core.showModal({
// // title: "提示",
// // content: e.msg,
// // showCancel: !1
// // })
// }
// 线上支付方式(微信支付/支付宝)
function i(e, t, o) {
e.pay_type = "WECHAT_PAY",
// e.pay_way = 'wechat',
app.request({
url: t,
data: e,
complete: function () {
getApp().core.hideLoading()
},
success: function (e) {
console.log(e, "ddddd")
if (0 == e.code) {
setOnShowScene("pay")
console.log(e, "ddddd")
// tt.requestPayment({
// data: {
// app_id: e.data.app_id,
// method: e.data.method,
// sign: e.data.sign,
// sign_type: e.data.sign_type,
// timestamp: e.data.timestamp + "",
// trade_no: e.data.trade_no,
// risk_info: e.data.risk_info,
// merchant_id: e.data.merchant_id + "",
// uid: e.data.uid,
// total_amount: e.data.total_amount,
// pay_channel: 'ALIPAY_NO_SIGN',
// pay_type: 'ALIPAY_APP',
// params: e.data.params,
// },
// success: function (e) { },
// fail: function (e) { },
// complete: function (e) {
// "requestPayment:fail" != e.errMsg && "requestPayment:fail cancel" != e.errMsg ? getApp().core.redirectTo({
// url: "/" + o + "?status=1"
// }) : getApp().core.showModal({
// title: "提示",
// content: "订单尚未支付",
// showCancel: !1,
// confirmText: "确认",
// success: function (e) {
// e.confirm && getApp().core.redirectTo({
// url: "/" + o + "?status=0"
// })
// }
// })
// }
// })
没有合适的资源?快使用搜索试试~ 我知道了~
抖音商城版 微信小程序.zip
共797个文件
ttss:196个
js:174个
ttml:169个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 168 浏览量
2024-02-25
17:28:00
上传
评论
收藏 1.17MB ZIP 举报
温馨提示
如题,抖音小程序源码,易于运行部署,用于学习交流
资源推荐
资源详情
资源评论
收起资源包目录
抖音商城版 微信小程序.zip (797个子文件)
qrcode_close.gif 2KB
icon-loading.gif 522B
settle.jpg 2KB
liji.jpg 1KB
order-pay.js 32KB
showdown.js 28KB
order-pay - 副本.js 27KB
page.js 23KB
new-order-submit.js 16KB
details.js 15KB
details.js 14KB
api.js 14KB
order-submit.js 12KB
order-submit.js 11KB
topic.js 10KB
goods.js 10KB
order.js 9KB
order-submit.js 8KB
index.js 8KB
details.js 8KB
recharge.js 7KB
details.js 7KB
cart.js 7KB
order.js 7KB
order.js 7KB
order.js 7KB
submit.js 7KB
shop.js 7KB
index.js 7KB
order-detail.js 6KB
order-detail.js 6KB
miaosha.js 6KB
specifications_model.js 6KB
shop.js 6KB
specifications_model.js 6KB
topic-list.js 6KB
diy.js 6KB
clerk.js 6KB
shopping_cart.js 5KB
core.js 5KB
goods.js 5KB
index.js 5KB
goods.js 5KB
goods_refund.js 5KB
index.js 5KB
order.js 5KB
cat.js 5KB
apply.js 5KB
apply.js 5KB
order-comment.js 5KB
wxDiscode.js 5KB
setting.js 5KB
setting.js 5KB
goods_buy.js 4KB
cash.js 4KB
cash.js 4KB
order.js 4KB
index.js 4KB
order-refund.js 4KB
list.js 4KB
order-refund.js 4KB
search.js 4KB
tongji.js 4KB
goods_info.js 4KB
html2json.js 4KB
order-details.js 4KB
app.js 4KB
tongji.js 4KB
index.js 4KB
shop.js 3KB
detail.js 3KB
shop.js 3KB
details.js 3KB
index.js 3KB
order-comment.js 3KB
request.js 3KB
index.js 3KB
index.js 3KB
cash.js 3KB
quick-navigation.js 3KB
account.js 3KB
order-send.js 3KB
order-send.js 3KB
account.js 3KB
address-edit.js 3KB
order-comment.js 3KB
order-comment.js 3KB
user.js 3KB
htmlparser.js 3KB
order.js 3KB
card.js 3KB
wxParse.js 3KB
index.js 3KB
index.js 3KB
order-detail.js 2KB
index.js 2KB
clerk.js 2KB
shop-summary.js 2KB
shop-summary.js 2KB
member.js 2KB
共 797 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
资源评论
极致人生-010
- 粉丝: 3259
- 资源: 3077
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功