Browse Source

优化整理项目

zhengjinyi 2 years ago
parent
commit
b7943776ac

+ 2 - 2
components/cm-module/cart-components/index.vue

@@ -487,11 +487,11 @@ import tuiNomore from '@/components/tui-components/nomore/nomore'
 import activiPopup from '@/components/cm-module/productDetails/cm-activipopu'
 import couponTabs from '@/components/cm-module/coupon/tui-tabs.vue'
 import modalLayer from '@/components/modal-layer'
-import wechatPay from '@/utils/mixins/wechatPay.js'
+import payMixins from '@/mixins/payMixins.js'
 import { mapState, mapMutations } from 'vuex'
 export default {
 	name: 'cartComponents',
-	mixins: [wechatPay],
+	mixins: [payMixins],
 	props: {
 		pathType: {
 			type: Number

+ 0 - 125
components/cm-module/orderDetails/transfeRecord.vue

@@ -1,125 +0,0 @@
-<template name="transfe">
-	<view class="transfe-template">
-		 <!-- 转账信息 -->
-		 <view class="transfe-content" >
-			<view class="transfe-top" @click="showTransfe">
-				<text class="name">转账信息</text>
-				<text class="iconfont icon-web_xiangxiazhankai" :class="{'icon-web_xiangxiazhankai-active':isOpen}"></text>
-			</view>
-			<view :class="{'transfe-warp--hide':!isOpen}" class="transfe-warp">
-				<view  class="transfe-warp__wrapper transfe-animation" 
-					   :style="{'transform':isOpen?'translateY(0)':'translateY(-50%)','-webkit-transform':isOpen?'translateY(0)':'translateY(-50%)'}">
-					<view class="table">
-						<text>开户行:</text>
-						<text>{{transfeData.bankBranch}}</text>
-					</view>
-					<view class="table">
-						<text>银行账号:</text>
-						<text>{{this.$reg.bankRegex(transfeData.bankNumber)}}</text>
-					</view>
-					<view class="table">
-						<text>户名:</text>
-						<text>{{transfeData.accountName}}</text>
-					</view>
-				</view>
-			</view>
-		 </view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:"transfe",
-		data() {
-			return{
-				isOpen:false,
-				transfeData:{
-					bankBranch:'华夏银行深圳分行营业部',
-					bankNumber:'6230 2100 9221 2400',
-					accountName:'周倩如'
-				},
-			}
-		},
-		created(){
-			
-		},
-		computed: {
-
-		},
-		methods:{
-			showTransfe(){
-				this.isOpen = !this.isOpen
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.transfe-template{
-		width: 100%;
-		height: auto;
-		background: #FFFFFF;
-		float: left;
-		margin-top: 24rpx;
-		.transfe-content{
-			width: 702rpx;
-			padding: 20rpx 24rpx;
-			height: auto;
-			.transfe-top{
-				width: 100%;
-				height: 40rpx;
-				line-height: 40rpx;
-				font-size: $font-size-28;
-				color: $text-color;
-				text-align: left;
-				.name{
-					float: left;
-					font-weight: bold;
-				}
-				.icon-web_xiangxiazhankai{
-					transform: rotate(0deg);
-					transform-origin: center center;
-					float: right;
-					font-size: $font-size-32;
-					color: #000000;
-					/* transition: transform 0.3s ease;*/
-					transition-property: transform;
-					transition-duration: 0.3s;
-					transition-timing-function: ease;
-				}
-				.icon-web_xiangxiazhankai-active{
-					transform: rotate(180deg);
-				}
-			}
-			.transfe-warp{
-				width: 100%;
-				padding: 24rpx 0 0 0;
-				overflow: hidden;
-				.table{
-					height: 76rpx;
-					line-height: 76rpx;
-					font-size: $font-size-26;
-					color: $text-color;
-					text-align: left;
-				}
-			}	
-			.transfe-animation {
-				/* transition: transform 0.3s ease;*/
-				transition-property: transform;
-				transition-duration: 0.3s;
-				transition-timing-function: ease;
-			}
-			.transfe-warp__wrapper{
-				/* #ifndef APP-NVUE */
-				display: flex;
-				/* #endif */
-				flex-direction: column;
-			}
-			.transfe-warp--hide {
-				padding: 0 0;
-				height: 0px;
-				line-height: 0px;
-			}		
-		}
-	}
-</style>

+ 27 - 0
mixins/bankMixins.js

@@ -0,0 +1,27 @@
+// 统计数据
+// 统计类型 1:首页banner;2:直播模块;3:最新活动;4:热门文章;5:新品橱窗;6:活动列表
+import Vue from 'vue'
+const bankMixins = {
+    data() {
+        return {
+            bankInfo:{
+                userName: '',
+                bankNumber: '',
+                bankName: ''
+            }
+        }
+    },
+    methods: {
+        cmsSysStatistics() {
+            this.ProductService.sYsStatisticsTypesSatisticsNumber()
+                .then(response => {
+                    
+                })
+                .catch(error => {
+                    console.log('<-------获取收款银行数据异常------>')
+                })
+        },
+    }
+}
+
+export default bankMixins

+ 3 - 3
utils/mixins/wechatPay.js → mixins/payMixins.js

@@ -20,7 +20,7 @@ function wxRequestPayment(payData) {
 }
 
 // 微信支付
-const wechatPay = {
+const payMixins = {
     data() {
         
     },
@@ -80,7 +80,7 @@ const wechatPay = {
 			 } catch (error) {
                 // 微信支付失败
                 this.$util.msg('支付失败~',2000)
-			 } 
+			 }  
         },
         // 微信支付超级会员
         async weChatMiniVipWxPay(params) {
@@ -107,4 +107,4 @@ const wechatPay = {
     }
 }
 
-export default wechatPay
+export default payMixins

+ 1 - 1
pages/goods/cart.vue

@@ -6,7 +6,7 @@
 </template>
 <script>
 	import { mapState,mapMutations } from 'vuex';
-	import custom from "@/components/cm-module/headerNavbar/headerNavbar.vue" //顶部自定义胶囊'
+	import custom from "./components/cm-navbar.vue" //顶部自定义胶囊'
 	import cart from '@/components/cm-module/cart-components/index.vue'
 	export default{
 		components:{

+ 0 - 0
components/cm-module/headerNavbar/header-poduct.vue → pages/goods/components/cm-header.vue


+ 0 - 0
components/cm-module/headerNavbar/headerNavbar.vue → pages/goods/components/cm-navbar.vue


+ 3 - 3
pages/goods/product.vue

@@ -673,7 +673,7 @@
 
 <script>
 import { mapState, mapMutations } from 'vuex'
-import customP from '@/components/cm-module/headerNavbar/header-poduct' //自定义导航
+import customP from './components/cm-header.vue' //自定义导航
 import parser from '@/components/jyf-Parser/index' //富文本处理
 import cmPrice from './components/cm-price.vue' //价格显示
 import cmAttributes from './components/cm-attributes.vue' //规格信息
@@ -685,11 +685,11 @@ import couponTabs from '@/components/cm-module/coupon/tui-tabs.vue'
 import authorize from '@/common/config/authorize.js'
 import wxLogin from '@/common/config/wxLogin.js'
 import { debounce } from '@/common/config/common.js'
-import wechatPay from '@/utils/mixins/wechatPay.js'
+import payMixins from '@/mixins/payMixins.js'
 import thorui from '@/components/clipboard/clipboard.thorui.js'
 var isPreviewImg
 export default {
-	mixins: [wechatPay],
+	mixins: [payMixins],
 	components: {
 		customP,
 		parser,

+ 237 - 0
pages/second/product/components/cm-header.vue

@@ -0,0 +1,237 @@
+<template name="headerNavbar">
+	<!-- 自定义导航栏 -->
+	<view class='navbar-wrap' :class="[headerColor? 'bg-color' : 'bg-color']" :style="{height:navbarHeight+'px',paddingTop:CustomBar/2+'px'}"> 
+	  	<view class="navbar-icon" v-if="navbarData.showCapsule ? navbarData.showCapsule : true" 
+			  :style="{top:navbarBtn.top + statusBarHeight+'px;',lineHeight:navbarBtn.height+'px;',left:12+'px;',width:navbarBtn.height+'px;',height:navbarBtn.height+'px;'}">
+			  <text v-if='haveBack' @click="_goBack" class="iconfont icon-fanhui"></text>
+			  <text v-else  @click="_goHome" class="iconfont icon-shouye"></text>
+	  	</view>
+		<view class="navbar-text" :style="{top:navbarBtn.top + statusBarHeight+'px;',height:navbarBtn.height+'px;',fontSize:fontSizeSetting+'px;'}">
+			<image class="logo" :style="{width:106+'px;',height:navbarBtn.height+'px;'}" src="https://static.caimei365.com/app/img/icon/logo-top@2x.png" mode=""></image>
+		</view>
+ 		<!--<view class="navbar-text" :style="{top:navbarBtn.top + statusBarHeight+'px;',height:navbarBtn.height+'px;',fontSize:fontSizeSetting+'px;'}">
+	    	<view class="gosearch-btn" :style="{paddingLeft:navbarBtn.height+'px;',right:(navbarBtn.width+30)+'px;',borderRadius:(navbarBtn.height/2)+'px;',width:(375-navbarBtn.width*2)+'px;',lineHeight:navbarBtn.height+'px;'}">
+				<text class="iconfont icon-sousuo" :style="{width:navbarBtn.height+'px;',height:navbarBtn.height+'px;',lineHeight:navbarBtn.height+'px;'}"></text>
+				<view class="input" @click="this.$api.navigateTo(clickPath)">搜索商品/供应商/项目仪器</view>
+			</view>
+	  	</view> -->
+	</view>
+</template>
+
+<script>
+	var self;
+	export default{
+		name:'headerNavbar',
+		props:{
+		    navbarData: { // 由父页面传递的数据
+				type: Object
+		    },
+			systeminfo:{
+				type:Object
+			},
+			headerBtnPosi:{
+				type:Object
+			},
+			page:{
+				type:Number
+			},
+			headerColor:{
+				type:Boolean
+			},
+			headerTitle:{
+				type:String
+			},
+			type:{
+				type:String
+			},
+		},
+		data() {
+			return{
+				headerType:'',
+				CustomBar:this.CustomBar,// 顶部导航栏高度
+				clickPath:'/pages/search/search',
+				haveBack: true, // 是否有返回按钮,true 有 false 没有 若从分享页进入则为 false
+			    statusBarHeight: 0, // 状态栏高度
+			    navbarHeight: 0, // 顶部导航栏高度,
+			    navbarBtn: { // 胶囊位置信息
+			      height: 0,
+			      width: 0,
+			      top: 0,
+			      bottom: 0,
+			      right: 0
+				},
+				platform:'',
+				fontSizeSetting:0
+			}
+		},
+		created() {
+			this.headerType = this.type
+			this.fontSizeSetting = this.systeminfo.fontSizeSetting
+			let statusBarHeight = this.systeminfo.statusBarHeight // 状态栏高度
+			let headerPosi = this.headerBtnPosi // 胶囊位置信息
+		    /**
+		     * wx.getMenuButtonBoundingClientRect() 坐标信息以屏幕左上角为原点
+		     * 菜单按键宽度: 87
+		     * 菜单按键高度: 32
+		     * 菜单按键左边界坐标: 278
+		     * 菜单按键上边界坐标: 26
+		     * 菜单按键右边界坐标: 365
+		     * 菜单按键下边界坐标: 58
+		     */
+			let btnPosi = { // 胶囊实际位置,坐标信息不是左上角原点
+			      height: headerPosi.height,
+			      width: headerPosi.width,
+			      // 胶囊top - 状态栏高度
+			      top: headerPosi.top - statusBarHeight,
+			      // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
+			      bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
+			      // 屏幕宽度 - 胶囊right
+			      right: this.systeminfo.screenWidth - headerPosi.right
+			}
+			console.log(btnPosi)
+			let haveBack;
+			if (getCurrentPages().length === 1) { // 当只有一个页面时
+			     haveBack = false;
+			} else {
+			     haveBack = true;
+			}
+		    this.haveBack=haveBack, // 获取是否是通过分享进入的小程序
+		    this.statusBarHeight=statusBarHeight,
+		    this.navbarHeight= headerPosi.bottom + btnPosi.bottom, // 原胶囊bottom + 现胶囊bottom
+			this.$parent.navbarHeight = this.navbarHeight
+			this.$parent.statusBarHeight = this.statusBarHeight
+			// console.log(this.navbarHeight);
+		    this.navbarBtn=btnPosi
+		},
+		onLoad(){
+			
+		},
+		methods:{
+			_goBack: function () {
+		      	uni.navigateBack({
+		        	delta: this.page
+		      	});
+		    },
+		    _goHome: function () {
+		      	uni.switchTab({
+		        	url: '/pages/tabBar/home/index'
+		      	})
+		    }
+		},
+		onShow(){
+	
+		}
+	}
+</script>
+
+<style lang="scss">
+	.navbar-wrap {
+		 position: fixed;
+		 width: 100%;
+		 top: 0;
+		 z-index: 100000;
+		 box-sizing: border-box;
+		 &.bg-color{
+			animation: showColor 0.3s ease-in-out both;
+		 }
+		 &.no-color{
+		    animation: hideColor 0.3s ease-in-out both;
+		 }
+	}
+	.navbar-text {
+		 width: 100%;
+		 color: #000000;
+		 font-weight: 500;
+		 position: fixed;
+		 .logo{
+			 margin: 0 auto;
+			 display: block;
+		 }
+	}
+	.gosearch-btn{
+		height: 100%;
+		background: rgba(255, 255, 255, 0.6);
+		font-size: 28rpx;
+		color: #999999;
+		position: relative;
+		box-sizing: border-box;
+		position:absolute ;
+		top: 0;
+		border: 0.5px solid rgba(0, 0, 0, 0.1);
+		.icon-sousuo{
+			height: 100%;
+			text-align: center;
+			display: block;
+			position: absolute;
+			left: 0;
+			top: 0;
+			font-size: 34rpx;
+			color: #999999;
+			z-index: 10;
+		}
+		.input{
+			height: 100%;
+			float: left;
+			font-size: $font-size-24;
+			text-align: left;
+		}
+	}
+	.navbar-icon {
+		 position: fixed;
+		 display: flex;
+		 border-radius: 50%;
+		 text-align: center;
+		 background: rgba(255,255,255,0.6);
+		 border: 0.5px solid rgba(0,0,0, 0.1);
+		 box-sizing: border-box;
+		 z-index: 9999;
+	}
+	.navbar-icon .iconfont {
+		 height: 100%;
+		 width: 100%;
+		 font-size: 38rpx;
+		 font-weight: bold;
+		 display: inline-block;
+		 overflow: hidden;
+	}
+	.navbar-icon view {
+		 height: 18px;
+		 border-left: 0.5px solid rgba(0,0,0, 0.3);
+		 margin-top: 6px;
+	}
+	.navbar-loading {
+		 background: #fff;
+		 text-align: center;
+	}
+	@keyframes showColor {
+		0% {background: rgba(255,255,255,0);}
+		50% {background: rgba(255,255,255,0.5);}
+		100% {background: rgba(255,255,255,1);}
+	}
+	@keyframes hideColor {
+		0% {background: rgba(255,255,255,1);}
+		50% {background: rgba(255,255,255,0.5);}
+		100% {background: rgba(255,255,255,0);}
+	}
+</style>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 1 - 1
pages/second/product/product-details.vue

@@ -142,7 +142,7 @@
 
 <script>
 	import { mapState,mapMutations } from 'vuex'
-	import customP from '@/components/cm-module/headerNavbar/header-poduct' 		 //自定义导航
+	import customP from './components/cm-header' 		 //自定义导航
 	import secondPrice from './components/secondPrice.vue' //价格显示
 	import authorize from '@/common/config/authorize.js'
 	import uniStars from '@/components/uni-stars/uni-stars.vue'

+ 2 - 2
pages/seller/cart/coupon-share.vue

@@ -66,9 +66,9 @@
 import { mapState, mapMutations } from 'vuex'
 import wxLogin from '@/common/config/wxLogin.js'
 import authorize from '@/common/config/authorize.js'
-import wechatPay from '@/utils/mixins/wechatPay.js'
+import payMixins from '@/mixins/payMixins.js'
 export default {
-	mixins: [wechatPay],
+	mixins: [payMixins],
 	data() {
 		return {
 			StaticUrl: this.$Static,

+ 2 - 2
pages/user/coupon/coupon-activity.vue

@@ -124,9 +124,9 @@ import { mapState, mapMutations } from 'vuex'
 import authorize from '@/common/config/authorize.js'
 import wxLogin from '@/common/config/wxLogin.js'
 import couponTabs from '@/components/cm-module/coupon/tui-tabs.vue'
-import wechatPay from '@/utils/mixins/wechatPay.js'
+import payMixins from '@/mixins/payMixins.js'
 export default {
-	mixins: [wechatPay],
+	mixins: [payMixins],
 	components: {
 		couponTabs
 	},

+ 2 - 2
pages/user/coupon/coupon-collection.vue

@@ -112,9 +112,9 @@
 import { mapState, mapMutations } from 'vuex'
 import authorize from '@/common/config/authorize.js'
 import couponTabs from '@/components/cm-module/coupon/tui-tabs.vue'
-import wechatPay from '@/utils/mixins/wechatPay.js'
+import payMixins from '@/mixins/payMixins.js'
 export default {
-	mixins: [wechatPay],
+	mixins: [payMixins],
 	components: {
 		couponTabs
 	},

+ 2 - 2
pages/user/member/member-pay.vue

@@ -69,9 +69,9 @@
 <script>
 import authorize from '@/common/config/authorize.js'
 const thorui = require('@/components/clipboard/clipboard.thorui.js')
-import wechatPay from '@/utils/mixins/wechatPay.js'
+import payMixins from '@/mixins/payMixins.js'
 export default {
-	mixins: [wechatPay],
+	mixins: [payMixins],
 	data() {
 		return {
 			isIphoneX: this.$store.state.isIphoneX,

+ 2 - 2
pages/user/order/order-payhlb.vue

@@ -94,9 +94,9 @@
 <script>
 	import authorize from '@/common/config/authorize.js'
 	import thorui from '@/components/clipboard/clipboard.thorui.js'
-	import wechatPay from '@/utils/mixins/wechatPay.js'
+	import payMixins from '@/mixins/payMixins.js'
 	export default{
-		mixins: [wechatPay],
+		mixins: [payMixins],
 		data(){
 			return{
 				orderId:0,

+ 2 - 0
pages/user/order/order-payment.vue

@@ -131,7 +131,9 @@
 
 <script>
 	const thorui = require('@/components/clipboard/clipboard.thorui.js')
+	import bankMixins from '@/mixins/bankMixins.js'
 	export default{
+		mixins: [bankMixins],
 		data(){
 			return{
 				orderId:0,

+ 2 - 0
pages/user/order/order-payunder.vue

@@ -28,7 +28,9 @@
 
 <script>
 	const thorui = require('@/components/clipboard/clipboard.thorui.js')
+	import bankMixins from '@/mixins/bankMixins.js'
 	export default{
+		mixins: [bankMixins],
 		data(){
 			return{
 				orderId:'',

BIN
static/icon-shop@3x.png


BIN
static/severs@3x.png