Commit c4b5e895 by 程默

同步

parent 55758803
...@@ -4,6 +4,8 @@ var prodEnv = require('./prod.env') ...@@ -4,6 +4,8 @@ var prodEnv = require('./prod.env')
module.exports = merge(prodEnv, { module.exports = merge(prodEnv, {
NODE_ENV: '"development"', NODE_ENV: '"development"',
OLSHOP_URL:'"https://test-m-shop.mayi888.cn/innerApi/shopApiService"', // OLSHOP_URL:'"https://test-m-shop.mayi888.cn/innerApi/shopApiService"',
IMG_DOMAIN: '"http://test-bucket-ant.oss-cn-shanghai.aliyuncs.com"' OLSHOP_URL:'"https://shop.mayi888.com/innerApi/shopApiService"',
// IMG_DOMAIN: '"http://test-bucket-ant.oss-cn-shanghai.aliyuncs.com"'
IMG_DOMAIN: '"http://cdn.mayi888.com"'
}) })
module.exports = { module.exports = {
NODE_ENV: '"production"', NODE_ENV: '"production"',
OLSHOP_URL:'"http://shop.mayi888.com"', OLSHOP_URL:'"https://shop.mayi888.com/innerApi/shopApiService"',
IMG_DOMAIN: '"http://cdn.mayi888.com"' IMG_DOMAIN: '"http://cdn.mayi888.com"'
} }
...@@ -3,5 +3,8 @@ import {requestPOST,requestPOST1} from "@/utils/request.js"; ...@@ -3,5 +3,8 @@ import {requestPOST,requestPOST1} from "@/utils/request.js";
export default { export default {
to_wx_pay(options) { to_wx_pay(options) {
return requestPOST1(`${process.env.OLSHOP_URL}/pay/to_wx_pay`, options) return requestPOST1(`${process.env.OLSHOP_URL}/pay/to_wx_pay`, options)
},
cancelPayment(options) {
return requestPOST1(`${process.env.OLSHOP_URL}/pay/payment_cancel?orderSn=${options}`)
} }
} }
\ No newline at end of file
...@@ -10,11 +10,11 @@ import { serialize, getQueryVariable, DFSImg } from "@/utils/index"; ...@@ -10,11 +10,11 @@ import { serialize, getQueryVariable, DFSImg } from "@/utils/index";
export default { export default {
data() { data() {
return { return {
shopId: "antgood", shopId: "ant",
options: {}, options: {},
session_key: "", session_key: "",
baseUrl:"https://test-m-shop.mayi888.cn", // baseUrl:"https://test-m-shop.mayi888.cn",
// baseUrl: "https://shop.mayi888.com", baseUrl: "https://shop.mayi888.com",
link: this.baseUrl, link: this.baseUrl,
page: "/", page: "/",
params: "?mixid=" + this.shopId, params: "?mixid=" + this.shopId,
...@@ -111,7 +111,6 @@ export default { ...@@ -111,7 +111,6 @@ export default {
wx.authorize({ wx.authorize({
scope: "scope.userLocation", scope: "scope.userLocation",
success() { success() {
// 用户已经同意小程序使用录音功能,后续调用 wx.startRecord 接口不会弹窗询问
that.getLocationHandle(); that.getLocationHandle();
} }
}); });
......
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
this.openid = res.data.data.openid; this.openid = res.data.data.openid;
this.isShow = true; this.isShow = true;
}else{ }else{
wx.showToast({title: res.data.msg}) wx.showToast({title: res.data.msg,icon: 'none'})
} }
}) })
.catch(err => {}); .catch(err => {});
...@@ -120,7 +120,11 @@ export default { ...@@ -120,7 +120,11 @@ export default {
}); });
}, },
getUserInfo: function(e) { getUserInfo: function(e) {
wx.showLoading({
title: "加载中"
});
if (e.target.errMsg == "getUserInfo:ok" && this.isShow) { if (e.target.errMsg == "getUserInfo:ok" && this.isShow) {
wx.hideLoading();
if (this.isHaveUnion) { if (this.isHaveUnion) {
//是会员 直接登录 //是会员 直接登录
wx.reLaunch({ wx.reLaunch({
......
...@@ -60,22 +60,26 @@ export default { ...@@ -60,22 +60,26 @@ export default {
payData.fail = res => { payData.fail = res => {
console.log("支付失败", res, this.options.orderSn); console.log("支付失败", res, this.options.orderSn);
this.message = "支付失败"; this.message = "支付失败";
wxPay.cancelPayment(this.options.orderSn).then(() => {
console.log("取消成功");
});
this.toPage(); this.toPage();
}; };
payData.complete = res => { payData.complete = res => {
if (res.errMsg == "chooseWXPay:cancel") { console.log("支付completa", res, this.options.orderSn);
console.log("支付取消", this.options); // if (res.errMsg == "requestPayment:fail cancel") {
this.message = "支付取消"; // console.log("支付取消", this.options);
this.toPage(); // this.message = "支付取消";
} // this.toPage();
// }
}; };
wx.requestPayment(payData); wx.requestPayment(payData);
} else { } else {
// wx.showToast({ title: res.data.msg }); wx.showToast({ title: res.data.msg, icon: "none" });
} }
}) })
.catch(err => { .catch(err => {
// wx.showToast({ title: err }); wx.showToast({ title: res.data.msg, icon: "none" });
}); });
}, },
toPage() { toPage() {
......
let shopMixid = "antgood"; let shopMixid = "ant";
// wx.getStore // wx.getStore
export async function requestGET(url, options) { export async function requestGET(url, options) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment