提交 847fa27c 编写于 作者: D Devil

头条小程序支付更新+售后去除必填说明

上级 0098ee7b
......@@ -116,8 +116,8 @@
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">退款说明<text class="form-group-tips-must">必填</text></view>
<textarea onInput="form_msg_event" placeholder-class="cr-ccc" class="cr-666" placeholder="退款说明 5~200 个字符之间" maxlength="200" auto-height="{{true}}" value="{{form_msg}}" />
<view class="form-gorup-title">退款说明<text class="form-group-tips">选填</text></view>
<textarea onInput="form_msg_event" placeholder-class="cr-ccc" class="cr-666" placeholder="退款说明最多200个字符" maxlength="200" auto-height="{{true}}" value="{{form_msg}}" />
</view>
<view class="form-gorup bg-white form-container-upload oh">
......
......@@ -353,8 +353,7 @@ Page({
// 数据校验
var validation = [
{ fields: "type", msg: "请选择操作类型", is_can_zero: 1 },
{ fields: "reason", msg: "请选择原因" },
{ fields: "msg", msg: "请填写退款说明" }
{ fields: "reason", msg: "请选择原因" }
];
if (form_data['type'] == 1)
{
......
......@@ -328,7 +328,10 @@ Page({
}
// 数据校验
var validation = [{ fields: "type", msg: "请选择操作类型", is_can_zero: 1 }, { fields: "reason", msg: "请选择原因" }, { fields: "msg", msg: "请填写退款说明" }];
var validation = [
{ fields: "type", msg: "请选择操作类型", is_can_zero: 1 },
{ fields: "reason", msg: "请选择原因" }
];
if (form_data['type'] == 1) {
validation.push({ fields: "number", msg: "请选择退货数量" });
}
......
......@@ -116,8 +116,8 @@
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">退款说明<text class="form-group-tips-must">必填</text></view>
<textarea bindinput="form_msg_event" placeholder-class="cr-ccc" class="cr-666" placeholder="退款说明 5~200 个字符之间" maxlength="200" auto-height="{{true}}" value="{=form_msg=}" />
<view class="form-gorup-title">退款说明<text class="form-group-tips">选填</text></view>
<textarea bindinput="form_msg_event" placeholder-class="cr-ccc" class="cr-666" placeholder="退款说明最多200个字符" maxlength="200" auto-height="{{true}}" value="{=form_msg=}" />
</view>
<view class="form-gorup bg-white form-container-upload oh">
......
......@@ -350,8 +350,7 @@ Page({
// 数据校验
var validation = [
{ fields: "type", msg: "请选择操作类型", is_can_zero: 1 },
{ fields: "reason", msg: "请选择原因" },
{ fields: "msg", msg: "请填写退款说明" }
{ fields: "reason", msg: "请选择原因" }
];
if (form_data['type'] == 1)
{
......
......@@ -116,8 +116,8 @@
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">退款说明<text class="form-group-tips-must"></text></view>
<textarea bindinput="form_msg_event" placeholder-class="cr-ccc" class="cr-666" placeholder="退款说明 5~200 个字符之间" maxlength="200" auto-height="{{true}}" value="{{form_msg}}" />
<view class="form-gorup-title">退款说明<text class="form-group-tips"></text></view>
<textarea bindinput="form_msg_event" placeholder-class="cr-ccc" class="cr-666" placeholder="退款说明最多200个字符" maxlength="200" auto-height="{{true}}" value="{{form_msg}}" />
</view>
<view class="form-gorup bg-white form-container-upload oh">
......
......@@ -227,13 +227,12 @@ Page({
// 支付方法
pay_handle(order_id, index) {
var self = this; // 加载loding
var self = this;
tt.showLoading({
title: "请求中..."
});
tt.request({
url: app.get_request_url("pay", "toutiao", "membershiplevelvip"),
url: app.get_request_url("pay", "buy", "membershiplevelvip"),
method: "POST",
data: {
id: order_id,
......@@ -242,33 +241,26 @@ Page({
dataType: "json",
success: res => {
tt.hideLoading();
if (res.data.code == 0) {
var data = res.data.data;
tt.pay({
orderInfo: data.order_info,
service: data.service,
orderInfo: data.data,
service: 5,
success(res) {
// if (res.code == 0) {
// // 数据设置
// self.order_item_pay_success_handle(index); // 跳转支付页面
// tt.navigateTo({
// url: "/pages/paytips/paytips?code=9000&total_price=" + self.data.data_list[index]['price']
// });
// } else {
// app.showToast('支付失败');
// }
// 由于头条支付无法监听支付状态,这里就不做接口轮询了,直接刷新页面
self.setData({
data_page: 1
});
self.get_data_list(1);
if (res.code == 0) {
// 数据设置
self.order_item_pay_success_handle(index);
// 跳转支付页面
tt.navigateTo({
url: "/pages/paytips/paytips?code=9000"
});
} else {
app.showToast('支付失败');
}
},
fail(res) {
console.log(res, 'pay-fail')
app.showToast('调起收银台失败-'+res.data.code);
app.showToast('调起收银台失败-'+res.errMsg);
}
});
} else {
......
......@@ -227,7 +227,7 @@ Page({
title: "请求中..."
});
tt.request({
url: app.get_request_url("pay", "toutiao", "wallet"),
url: app.get_request_url("pay", "recharge", "wallet"),
method: "POST",
data: {
recharge_id: recharge_id,
......@@ -236,33 +236,26 @@ Page({
dataType: "json",
success: res => {
tt.hideLoading();
if (res.data.code == 0) {
var data = res.data.data;
tt.pay({
orderInfo: data.order_info,
service: data.service,
orderInfo: data.data,
service: 5,
success(res) {
// if (res.code == 0) {
// // 数据设置
// self.order_item_pay_success_handle(index); // 跳转支付页面
// tt.navigateTo({
// url: "/pages/paytips/paytips?code=9000&total_price=" + self.data.data_list[index]['money']
// });
// } else {
// app.showToast('支付失败');
// }
// 由于头条支付无法监听支付状态,这里就不做接口轮询了,直接刷新页面
self.setData({
data_page: 1
});
self.get_data_list(1);
if (res.code == 0) {
// 数据设置
self.order_item_pay_success_handle(index);
// 跳转支付页面
tt.navigateTo({
url: "/pages/paytips/paytips?code=9000"
});
} else {
app.showToast('支付失败');
}
},
fail: function (res) {
console.log(res, 'pay-fail')
app.showToast('调起收银台失败-'+res.data.code);
fail(res) {
app.showToast('调起收银台失败-'+res.errMsg);
}
});
} else {
......
......@@ -246,7 +246,7 @@ Page({
title: "请求中..."
});
tt.request({
url: app.get_request_url("pay", "toutiao"),
url: app.get_request_url("pay", "order"),
method: "POST",
data: {
ids: order_ids,
......@@ -268,31 +268,23 @@ Page({
case 0:
var data = res.data.data;
tt.pay({
orderInfo: data.order_info,
service: data.service,
orderInfo: data.data,
service: 5,
success(res) {
// if (res.code == 0) {
// // 数据设置
// self.order_item_pay_success_handle(index);
// // 跳转支付页面
// tt.navigateTo({
// url: "/pages/paytips/paytips?code=9000&total_price=" +
// self.data.data_list[index]['total_price']
// });
// } else {
// app.showToast('支付失败');
// }
// 由于头条支付无法监听支付状态,这里就不做接口轮询了,直接刷新页面
self.setData({
data_page: 1
});
self.get_data_list(1);
if (res.code == 0) {
// 数据设置
self.order_item_pay_success_handle(order_ids);
// 跳转支付页面
tt.navigateTo({
url: "/pages/paytips/paytips?code=9000"
});
} else {
app.showToast('支付失败');
}
},
fail(res) {
console.log(res, 'pay-fail');
app.showToast('调起收银台失败-'+res.data.code);
app.showToast('调起收银台失败-'+res.errMsg);
}
});
break;
......@@ -342,8 +334,9 @@ Page({
// 支付成功数据设置
order_item_pay_success_handle(order_ids) {
var order_ids_arr = order_ids.split(',');
var temp_data_list = this.data.data_list; // 数据设置
var temp_data_list = this.data.data_list;
// 数据设置
for (var i in temp_data_list) {
if (order_ids_arr.indexOf(temp_data_list[i]['id']) != -1) {
switch (parseInt(temp_data_list[i]['order_model'])) {
......
......@@ -356,8 +356,7 @@ Page({
// 数据校验
var validation = [
{ fields: "type", msg: "请选择操作类型", is_can_zero: 1 },
{ fields: "reason", msg: "请选择原因" },
{ fields: "msg", msg: "请填写退款说明" }
{ fields: "reason", msg: "请选择原因" }
];
if (form_data['type'] == 1)
{
......
......@@ -116,8 +116,8 @@
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">退款说明<text class="form-group-tips-must">必填</text></view>
<textarea bindinput="form_msg_event" placeholder-class="cr-ccc" class="cr-666" placeholder="退款说明 5~200 个字符之间" maxlength="200" auto-height="{{true}}" value="{{form_msg}}" />
<view class="form-gorup-title">退款说明<text class="form-group-tips">选填</text></view>
<textarea bindinput="form_msg_event" placeholder-class="cr-ccc" class="cr-666" placeholder="退款说明最多200个字符" maxlength="200" auto-height="{{true}}" value="{{form_msg}}" />
</view>
<view class="form-gorup bg-white form-container-upload oh">
......
......@@ -352,8 +352,7 @@ Page({
// 数据校验
var validation = [
{ fields: "type", msg: "请选择操作类型", is_can_zero: 1 },
{ fields: "reason", msg: "请选择原因" },
{ fields: "msg", msg: "请填写退款说明" }
{ fields: "reason", msg: "请选择原因" }
];
if (form_data['type'] == 1)
{
......
......@@ -116,8 +116,8 @@
</view>
<view class="form-gorup bg-white">
<view class="form-gorup-title">退款说明<text class="form-group-tips-must">必填</text></view>
<textarea bindinput="form_msg_event" placeholder-class="cr-ccc" class="cr-666" placeholder="退款说明 5~200 个字符之间" maxlength="200" auto-height="{{true}}" value="{{form_msg}}" />
<view class="form-gorup-title">退款说明<text class="form-group-tips">选填</text></view>
<textarea bindinput="form_msg_event" placeholder-class="cr-ccc" class="cr-666" placeholder="退款说明最多200个字符" maxlength="200" auto-height="{{true}}" value="{{form_msg}}" />
</view>
<view class="form-gorup bg-white form-container-upload oh">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册