shish 6 лет назад
Родитель
Сommit
d05ba2790f
3 измененных файлов с 12 добавлено и 14 удалено
  1. 0 2
      mall/src/components/app-coupon-sel.vue
  2. 0 3
      mall/src/pages/pay/index.vue
  3. 12 9
      mall/src/utils/common.js

+ 0 - 2
mall/src/components/app-coupon-sel.vue

@@ -128,10 +128,8 @@ export default {
 			let arr = []
 			await userDiscount().then(res => {
 				this.data = res.data
-				console.log('1111111')
 				arr = this.discountArr
 			})
-			console.log('222222')
 			return arr
 		},
 		checkChange(e) {

+ 0 - 3
mall/src/pages/pay/index.vue

@@ -162,18 +162,15 @@
 				}
 				getOrderShop().then(res => {
 					this.inpFocus = true
-					console.log(res)
 					uni.setNavigationBarTitle({
 						title: `您正在向【${res.shop.merchantName}】付款`
 					})
-
 					this.$refs.couponSel._getUserDiscount().then(status => {
 						this.discountArr = status
 					})
 				})
 				if (isLogin()) {
 					getShopUser(true).then(res => {
-						console.log('shopUser', res)
 						// 设置分享
 						let shareParams = {
 							title: `点我付款`, // 分享标题

+ 12 - 9
mall/src/utils/common.js

@@ -68,7 +68,7 @@ export function getRandomNum(minNum, maxNum) {
 // 节流
 export function debounce(fn, time) {
 	let handle
-	return function(e) {
+	return function (e) {
 		// 取消之前的延时调用
 		clearTimeout(handle)
 		handle = setTimeout(() => {
@@ -123,7 +123,7 @@ export function getFormatDate(time, fmt, status) {
  * 时间格式化
  */
 // eslint-disable-next-line no-extend-native
-Date.prototype.Format = function(fmt = 'yyyy-MM-dd hh:mm:ss') {
+Date.prototype.Format = function (fmt = 'yyyy-MM-dd hh:mm:ss') {
 	const o = {
 		'M+': this.getMonth() + 1, // 月份
 		'd+': this.getDate(), // 日
@@ -197,11 +197,13 @@ export function isWxBrowser() {
 /** *
  * 是否是微信小程序
  */
-export async function isWxMiniapp() {
+export function isWxMiniapp() {
+
 	let status = false
-		// #ifdef MP-WEIXIN
-		status = true
-		// #endif
+	// #ifdef MP-WEIXIN
+	status = true
+	// #endif
+
 	// const ua = navigator.userAgent.toLowerCase()
 	// // ios的ua中无miniProgram,但都有MicroMessenger(表示是微信浏览器)
 	// // eslint-disable-next-line
@@ -218,6 +220,7 @@ export async function isWxMiniapp() {
 	// 	// 走不在小程序的逻辑
 	// 	status = false
 	// }
+
 	return status
 }
 
@@ -430,10 +433,10 @@ export function weixinBase64src(base64data) {
 			filePath,
 			data: buffer,
 			encoding: 'binary',
-			success: function(res) {
+			success: function (res) {
 				resolve(filePath)
 			},
-			fail: function(err) {
+			fail: function (err) {
 				reject()
 				console.log(err)
 			}
@@ -476,7 +479,7 @@ export function copyText(str) {
 
 	uni.setClipboardData({
 		data: str,
-		success: function() {
+		success: function () {
 			that.$msg('复制成功')
 		}
 	})