Browse Source

秒杀详情即将开始显示灰色;

下单第一次添加新地址返回地址没有带回来;
下单付款点击微信支付不支持然后产生了订单,然后订单详情再次余额支付,其实支付成功了,但是没任何提示;
master
Gao xiaosong 5 years ago
parent
commit
a0473dc2f2
  1. 2
      assets/css/style.css
  2. 2
      assets/css/style.css.map
  3. 1
      assets/css/style.less
  4. 4
      config/index.js
  5. 142
      libs/order.js
  6. 8
      pages/activity/SeckillDetails/index.vue
  7. 2
      pages/order/OrderSubmission/index.vue
  8. 32
      剩余问题.js

2
assets/css/style.css

File diff suppressed because one or more lines are too long

2
assets/css/style.css.map

File diff suppressed because one or more lines are too long

1
assets/css/style.less

@ -4454,7 +4454,6 @@ page {
} }
.bargain .header .time { .bargain .header .time {
background-image: url('https://wx.yixiang.co/static/images/time.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
width: 4.4*100rpx; width: 4.4*100rpx;

4
config/index.js

@ -1,5 +1,7 @@
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api'; // export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api';
export const VUE_APP_API_URL = 'http://192.168.31.223:8008/api'; export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'http://192.168.31.223:8008/api';
export const VUE_APP_RESOURCES_URL = 'https://wx.yixiang.co/static'; export const VUE_APP_RESOURCES_URL = 'https://wx.yixiang.co/static';

142
libs/order.js

@ -73,16 +73,25 @@ export function delOrderHandle(orderId) {
} }
// 使用订单号进行支付 // 使用订单号进行支付
export function payOrderHandle(orderId, type, from) { export async function payOrderHandle(orderId, type, from) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// dialog.loading.open(""); uni.showLoading({
title: "支付中",
mask: true
});
payOrder(orderId, type, from) payOrder(orderId, type, from)
.then(res => { .then(async res => {
handleOrderPayResults(res.data) await handleOrderPayResults(res.data)
resolve()
}) })
.catch(err => { .catch(err => {
dialog.loading.close(); reject()
dialog.toast({ mes: err.msg || "订单支付失败" }); uni.hideLoading()
uni.showToast({
title: err.msg || err.response.data.msg || err.response.data.message || '订单支付失败',
icon: "none",
duration: 2000,
});
}); });
}); });
} }
@ -90,63 +99,74 @@ export function payOrderHandle(orderId, type, from) {
// 处理调用支付接口的逻辑 // 处理调用支付接口的逻辑
// @type create(创建订单)||pay(支付订单) // @type create(创建订单)||pay(支付订单)
export function handleOrderPayResults(data, type) { export function handleOrderPayResults(data, type) {
switch (data.status) { console.log(data, type)
// 订单号已存在 return new Promise((resolve, reject) => {
case "ORDER_EXIST": uni.hideLoading()
// 取消支付 switch (data.status) {
case "EXTEND_ORDER": // 订单号已存在
uni.showToast({ case "ORDER_EXIST":
title: data.msg, resolve()
icon: "none", break;
duration: 2000, // 取消支付
}); case "EXTEND_ORDER":
goOrderDetails(data.result.orderId, type) uni.showToast({
break; title: data.msg,
case "PAY_DEFICIENCY": icon: "none",
break; duration: 2000,
// 支付出错 });
case "PAY_ERROR": resolve()
uni.showToast({
title: data.msg,
icon: "none",
duration: 2000,
});
goOrderDetails(data.result.orderId, type)
break;
// 未传递支付环境
case "SUCCESS":
uni.showToast({
title: data.msg,
icon: "none",
duration: 2000,
});
goOrderDetails(data.result.orderId, type)
break;
// H5支付
case "WECHAT_H5_PAY":
goOrderDetails(data.result.orderId, type)
console.log(data)
setTimeout(() => {
// #ifdef H5
// "https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx15171343713577e9f3a418b0865ef90000&package=2547890641"
// location.href = data.result.jsConfig.mweb_url;
// #endif
}, 100);
break;
// 小程序支付
case "WECHAT_PAY":
weappPay(data.result.jsConfig).finally(() => {
goOrderDetails(data.result.orderId, type) goOrderDetails(data.result.orderId, type)
}); break;
break; case "PAY_DEFICIENCY":
// APP支付 break;
case "WECHAT_APP_PAY": // 支付出错
case "PAY_ERROR":
weappPay(data.result.jsConfig).finally(() => { uni.showToast({
title: data.msg,
icon: "none",
duration: 2000,
});
reject()
goOrderDetails(data.result.orderId, type) goOrderDetails(data.result.orderId, type)
}); break;
break; // 未传递支付环境
} case "SUCCESS":
uni.showToast({
title: data.msg || data.payMsg,
icon: "none",
duration: 2000,
});
resolve()
goOrderDetails(data.result.orderId, type)
break;
// H5支付
case "WECHAT_H5_PAY":
goOrderDetails(data.result.orderId, type)
console.log(data)
setTimeout(() => {
resolve()
// #ifdef H5
// "https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx15171343713577e9f3a418b0865ef90000&package=2547890641"
// location.href = data.result.jsConfig.mweb_url;
// #endif
}, 100);
break;
// 小程序支付
case "WECHAT_PAY":
weappPay(data.result.jsConfig).finally(() => {
resolve()
goOrderDetails(data.result.orderId, type)
});
break;
// APP支付
case "WECHAT_APP_PAY":
weappPay(data.result.jsConfig).finally(() => {
resolve()
goOrderDetails(data.result.orderId, type)
});
break;
}
})
} }

8
pages/activity/SeckillDetails/index.vue

@ -171,7 +171,8 @@
return { return {
title: this.storeInfo.title, title: this.storeInfo.title,
imageUrl: this.storeInfo.image, imageUrl: this.storeInfo.image,
path: "pages/activity/GoodsSeckill/index?id=" + this.storeInfo.id + "&spread=" + uni.getStorageSync("uid")+"&pageType=good&codeType=routine", path: "pages/activity/GoodsSeckill/index?id=" + this.storeInfo.id + "&spread=" + uni.getStorageSync("uid") +
"&pageType=good&codeType=routine",
success(res) { success(res) {
uni.showToast({ uni.showToast({
title: '分享成功' title: '分享成功'
@ -398,4 +399,9 @@
.product-con .nav { .product-con .nav {
padding: 0 0.2*100rpx; padding: 0 0.2*100rpx;
} }
.product-con .footer .bnt .buy.bg-color-hui {
background: #ccc;
}
</style> </style>

2
pages/order/OrderSubmission/index.vue

@ -368,7 +368,7 @@ export default {
this.computedPrice(); this.computedPrice();
}, },
}, },
mounted: function () { onShow: function () {
let that = this; let that = this;
this.$store.dispatch("getUser", true); this.$store.dispatch("getUser", true);
that.getCartInfo(); that.getCartInfo();

32
剩余问题.js

@ -0,0 +1,32 @@
// 1、轮播背景问题
// ~~ 延后处理
// 3、充值签名错误
// ? 未测试出该问题
// 页面都多了一个头部
// ~~延后处理
// 6、评价图片上传不了
// ?接口报错,反馈给老徐了
// 8、小程序绑定手机号报错
// ?接口报错,反馈给老徐了
// 12、h5分享关系没形成,看下你那登陆怎么处理的参考下以前的h5
// ~~ 延后处理
// 13、海报分享,分享分享调整没问题,因为是首页,但是,商品详情海报,拼团海报,砍价海报路由跳转会有问题
// ?商品拼团海报生成的不是小程序码
// 海报相关页面
// components/StorePoster.vue 商品详情
// > 根据用户来源生成二维码
// pages/activity/Poster/index 拼团
// > 根据from
// pages/activity/Poster/index 砍价
// > 根据from
// pages/user/promotion/Poster/index 分销
// 14、小程序已经开启了分享形成关系的问题看下
// ! 需沟通
Loading…
Cancel
Save