Browse Source

commit -m 上线优化调整

zhengjinyi 3 years ago
parent
commit
b5569a4e64

+ 6 - 5
components/cm-module/headerNavbar/header-back.vue

@@ -7,6 +7,7 @@
 	  	<view class="navbar-icon" v-if="navbarData.showCapsule == 1 ? true : false" 
 			  :style="{top:navbarBtn.top + statusBarHeight+'px;',left:(navbarBtn.right)+'px;',height:navbarBtn.height+'px;',lineHeight:navbarBtn.height+'px;'}">
 			  <text v-if='haveBack' @click="_goBack" class="iconfont icon-fanhui"></text>
+			  <text v-if='isShare' @click="_goBack" class="iconfont icon-shouye"></text>
 	  	</view>
 		<view class="navbar-icon" v-if="navbarData.showSearch == 1 ? true : false"
 			  :style="{top:navbarBtn.top + statusBarHeight+'px;',right:(navbarBtn.width)+'px;',height:navbarBtn.height+'px;',lineHeight:navbarBtn.height+'px;'}">
@@ -16,7 +17,7 @@
 </template>
 
 <script>
-	var self;
+	var self
 	export default{
 		name:'headerNavbar',
 		props:{ 
@@ -84,11 +85,11 @@
 			      // 屏幕宽度 - 胶囊right
 			      right: this.systeminfo.screenWidth - headerPosi.right
 			}
-			let haveBack;
+			let haveBack
 			if (getCurrentPages().length === 1) { // 当只有一个页面时
-			     haveBack = false;
+			     haveBack = false
 			} else {
-			     haveBack = true;
+			     haveBack = true
 			}
 		    this.haveBack=haveBack, // 获取是否是通过分享进入的小程序
 		    this.statusBarHeight=statusBarHeight,
@@ -107,7 +108,7 @@
 				}else{
 					uni.navigateBack({
 			        	delta: 1
-			      	});
+			      	})
 				}
 		    },
 		    _goHome: function () {

+ 2 - 2
main.js

@@ -5,7 +5,7 @@ import './services/index.js'
 import * as Api from '@/common/config/caimeiApi.js'
 import * as Regs from '@/common/config/common.js'
 // 友盟
-// import Uma from './plugins/uma'
+import Uma from './plugins/uma'
 
 // 公共组件 全局组件
 import { msg, modal, prePage, boundingClientRect } from './utils/util'
@@ -42,7 +42,7 @@ Vue.prototype.$Static = 'https://static.caimei365.com/app/img/'
 App.mpType = 'app'
 
 // 使用插件
-// Vue.use(Uma)
+Vue.use(Uma)
 
 const app = new Vue({
     ...App

+ 13 - 1
pages/user/order/order-pay-list.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container cashier">
-		<view class="pay-title" @click="handlePayunder">
+		<view class="pay-title" v-if="!showPayUnder" @click="handlePayunder">
 			<view class="content">
 				因线上支付政策调整,请对每家店铺分别进行线上付款;若需要直接转账支付订单,请点击右侧箭头查看线下转账信息。
 				<view class="content-icon"> <text class="iconfont icon-xiayibu"></text> </view>
@@ -47,6 +47,7 @@ export default {
 	data() {
 		return {
 			orderId: 0,
+			showPayUnder:false,
 			list: []
 		}
 	},
@@ -74,11 +75,22 @@ export default {
 			this.PayService.PayOrderShoporders({ orderId: orderId })
 				.then(response => {
 					this.list = response.data
+					this.PayOrderCheckoutCounter(orderId)
 				})
 				.catch(error => {
 					this.$util.msg(error.msg, 2000)
 				})
 		},
+		PayOrderCheckoutCounter(orderId){
+			this.PayService.PayOrderCheckoutCounter({orderId:orderId}).then(response =>{
+				let data = response.data
+				if(data.discernReceipt.length>0){
+					this.showPayUnder = true
+				}
+			}).catch(error =>{
+				this.$util.msg(error.msg,2000)
+			})
+		},
 		handlePayOrder(shopOrderId){
 			this.$api.navigateTo(`/pages/user/order/order-payment?shopOrderId=${shopOrderId}`)
 		},

+ 1 - 1
plugins/uma/index.js

@@ -1,5 +1,5 @@
 // 友盟依赖包
-// import uma from 'umtrack-wx'
+import uma from 'umtrack-wx'
 import { umtrackWxKey as appKey } from './config.js'
 
 // 默认事件广播(防止报错)

+ 2 - 2
services/config.env.js

@@ -4,8 +4,8 @@ if(process.env.NODE_ENV === 'development'){
     // URL_CONFIG = 'http://192.168.2.67:18002'	 //智捷联调地址
     // URL_CONFIG = 'http://192.168.2.68:18002'	 //涛涛联调地址
     // URL_CONFIG = 'http://192.168.2.75:18002'	 //超超联调地址
-    URL_CONFIG = 'https://core-b.caimei365.com'
-    // URL_CONFIG = 'https://core.caimei365.com'
+    // URL_CONFIG = 'https://core-b.caimei365.com'
+    URL_CONFIG = 'https://core.caimei365.com'
 }else{
     // 生产环境
     // URL_CONFIG = 'https://core-b.caimei365.com'

+ 0 - 3
services/index.js

@@ -2,7 +2,6 @@ import Vue from 'vue'
 
 import ajaxService from './ajax.service.js'
 import CommonService from './common.service'
-import LocateService from './locate.service'
 import UserService from './user.service'
 import ProductService from './product.service'
 import ShopService from './shop.service'
@@ -18,7 +17,6 @@ import UploadService from './upload.service.js'
 import BeautyArchive from './beautyArchive.service.js'
 
 let commonService = new CommonService(ajaxService)
-let locateService = new LocateService(ajaxService)
 let userService = new UserService(ajaxService)
 let productService = new ProductService(ajaxService)
 let shopService = new ShopService(ajaxService)
@@ -35,7 +33,6 @@ let beautyArchive = new BeautyArchive(ajaxService)
 
 Vue.prototype.AjaxService = ajaxService
 Vue.prototype.CommonService = commonService
-Vue.prototype.LocateService = locateService
 Vue.prototype.UserService = userService
 Vue.prototype.ProductService = productService
 Vue.prototype.ShopService = shopService

+ 0 - 75
services/locate.service.js

@@ -1,75 +0,0 @@
-/**
- * 定位相关的业务服务
- */
-// import { qqMapKey } from '@/utils/config.js'
-// const QQMapWX = require('@/static/base/js/qqmap-wx-jssdk.min.js')
-// const qqmapsdk = new QQMapWX({
-//   coord_type: 5,
-//   key: qqMapKey
-// })
-
-export default class LocateService {
-	constructor(AjaxService) {
-		Object.assign(this, { AjaxService })
-		this.name = 'LocateService'
-	}
-	/* 获取当前的地理位置 */
-	getGeoLocation() {
-		return new Promise(function(reslove, reject) {
-			wx.getLocation({
-				type: 'gcj02',
-				success: function(res) {
-					reslove(res)
-				},
-				fail: function(err) {
-					reject(err)
-				},
-				complete: function(res) {}
-			})
-		})
-	}
-
-	/* 获取城市名 */
-	getCityName(lat, lon) {
-		return new Promise(function(reslove, reject) {
-			qqmapsdk.reverseGeocoder({
-				location: {
-					latitude: lat,
-					longitude: lon
-				},
-				success: function(res) {
-					const {
-						ad_info: addressInfo,
-						location,
-						formatted_addresses: formattedAddress = {},
-						address
-					} = res.result || {}
-
-					let locationInfo = {
-						cityName: addressInfo.city,
-						location: location,
-						address: formattedAddress.recommend || address
-					}
-					console.log("locationInfo: " + locationInfo);
-					reslove(locationInfo)
-				},
-				fail: function(err) {
-					reject(err)
-				}
-			})
-		})
-	}
-
-	/* 获取当前定位 */
-	async getLocationByLocate () {
-		// 获取地理位置
-		let locationInfo = await this.getGeoLocation()
-		const { latitude, longitude } = locationInfo || {}
-		// 获取城市名
-		let cityInfo = await this.getCityName(latitude, longitude)
-		const { location = {}, cityName, address } = cityInfo
-		console.log(location);
-		console.log(cityName);
-		console.log(address);
-	}
-}