Commit c4b5e895 by 程默

同步

parent 55758803
......@@ -4,6 +4,8 @@ var prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
OLSHOP_URL:'"https://test-m-shop.mayi888.cn/innerApi/shopApiService"',
IMG_DOMAIN: '"http://test-bucket-ant.oss-cn-shanghai.aliyuncs.com"'
// OLSHOP_URL:'"https://test-m-shop.mayi888.cn/innerApi/shopApiService"',
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 = {
NODE_ENV: '"production"',
OLSHOP_URL:'"http://shop.mayi888.com"',
OLSHOP_URL:'"https://shop.mayi888.com/innerApi/shopApiService"',
IMG_DOMAIN: '"http://cdn.mayi888.com"'
}
......@@ -3,5 +3,8 @@ import {requestPOST,requestPOST1} from "@/utils/request.js";
export default {
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";
export default {
data() {
return {
shopId: "antgood",
shopId: "ant",
options: {},
session_key: "",
baseUrl:"https://test-m-shop.mayi888.cn",
// baseUrl: "https://shop.mayi888.com",
// baseUrl:"https://test-m-shop.mayi888.cn",
baseUrl: "https://shop.mayi888.com",
link: this.baseUrl,
page: "/",
params: "?mixid=" + this.shopId,
......@@ -111,7 +111,6 @@ export default {
wx.authorize({
scope: "scope.userLocation",
success() {
// 用户已经同意小程序使用录音功能,后续调用 wx.startRecord 接口不会弹窗询问
that.getLocationHandle();
}
});
......
......@@ -111,7 +111,7 @@ export default {
this.openid = res.data.data.openid;
this.isShow = true;
}else{
wx.showToast({title: res.data.msg})
wx.showToast({title: res.data.msg,icon: 'none'})
}
})
.catch(err => {});
......@@ -120,7 +120,11 @@ export default {
});
},
getUserInfo: function(e) {
wx.showLoading({
title: "加载中"
});
if (e.target.errMsg == "getUserInfo:ok" && this.isShow) {
wx.hideLoading();
if (this.isHaveUnion) {
//是会员 直接登录
wx.reLaunch({
......
......@@ -60,22 +60,26 @@ export default {
payData.fail = res => {
console.log("支付失败", res, this.options.orderSn);
this.message = "支付失败";
wxPay.cancelPayment(this.options.orderSn).then(() => {
console.log("取消成功");
});
this.toPage();
};
payData.complete = res => {
if (res.errMsg == "chooseWXPay:cancel") {
console.log("支付取消", this.options);
this.message = "支付取消";
this.toPage();
}
console.log("支付completa", res, this.options.orderSn);
// if (res.errMsg == "requestPayment:fail cancel") {
// console.log("支付取消", this.options);
// this.message = "支付取消";
// this.toPage();
// }
};
wx.requestPayment(payData);
} else {
// wx.showToast({ title: res.data.msg });
wx.showToast({ title: res.data.msg, icon: "none" });
}
})
.catch(err => {
// wx.showToast({ title: err });
wx.showToast({ title: res.data.msg, icon: "none" });
});
},
toPage() {
......
let shopMixid = "antgood";
let shopMixid = "ant";
// wx.getStore
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