diff --git a/common/common.js b/common/common.js index e59e346..ccf0d51 100644 --- a/common/common.js +++ b/common/common.js @@ -125,7 +125,7 @@ export default { return new Promise((resolve, reject) => { WeixinJSBridge.invoke( 'getBrandWCPayRequest', data, - function(res) { + function (res) { console.log('支付回调', res); if (res.errMsg == 'requestPayment:fail cancel') { uni.showToast({ @@ -265,7 +265,7 @@ export default { * loading 接口加载中状态 * 传入方法不要写括号 */ - + /* 如果接口加载中,终止任何操作 */ if (this.data.loading) { uni.showToast({ @@ -282,8 +282,8 @@ export default { } catch (e) { //TODO handle the exception } - var that=this; - setTimeout(()=>{that.data.loading = false; console.log("方法执行结束", this.data.loading, this.data.loading);},1000) + var that = this; + setTimeout(() => { that.data.loading = false; console.log("方法执行结束", this.data.loading, this.data.loading); }, 1000) }, @@ -315,7 +315,20 @@ export default { }) }, 100) }, - + msg(msg) { + let title = msg || '' + let icon = 'none' + let mask = false + let duration = 1500 + let position = 'center' + uni.showToast({ + title, + icon, + mask, + duration, + position, + }); + }, /** * @description: 获取规则 * @param {*} type @@ -508,13 +521,13 @@ export default { 'onMenuShareTimeline', ] }); - wx.ready(function() { + wx.ready(function () { wx.checkJsApi({ jsApiList: [ 'openAddress', 'onMenuShareTimeline', ], - success: function(res) { + success: function (res) { if (link.indexOf('http:') < 0 && link.indexOf('https:') < 0) { link = location.href.split('#')[0] + "#" + link; @@ -525,7 +538,7 @@ export default { desc: desc, // 分享描述 link: link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 imgUrl: image, // 分享图标 - success: function() { + success: function () { // 设置成功 } }) @@ -555,7 +568,7 @@ export default { }); - wx.error(function(res) { + wx.error(function (res) { // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。 console.log("出现错误", res); }); diff --git a/components/order-confirm-popup/order-confirm-popup.vue b/components/order-confirm-popup/order-confirm-popup.vue index 93a83fa..11b9789 100644 --- a/components/order-confirm-popup/order-confirm-popup.vue +++ b/components/order-confirm-popup/order-confirm-popup.vue @@ -75,18 +75,6 @@