Răsfoiți Sursa

fix: 解决价格组件等文件的代码冲突

13147038669 5 luni în urmă
părinte
comite
62cf39b664

+ 1 - 1
crmeb_src/mer_uniapp/components/BaseMoney.vue

@@ -2,7 +2,7 @@
 	<view :class="{ line: line, weight: weight, 'font-color': !incolor}"
 		:style="{color: '#' + incolor,fontWeight: fontWeight, display:(discount || inline) ? 'inline-block' : 'block' }"
 		class="base-money semiBold line-heightOne">
-		<text v-if="!discount" class="symbol" :style="{'font-size': symbolSize +'rpx'}">sL </text><text class="integer line-heightOne"
+		<text v-if="!discount" class="symbol" :style="{'font-size': symbolSize +'rpx'}">{{$store.getters.priceUnit}}</text><text class="integer line-heightOne"
 			:style="{'font-size': integerSize +'rpx'}">{{ integer }}</text>
 		<text v-if="digits && decimal != '00' && decimal != '0'" class="decimal"
 			:style="{'font-size': decimalSize +'rpx'}">.{{ decimal }}</text>

+ 7 - 2
crmeb_src/mer_uniapp/components/orderGoods/index.vue

@@ -37,7 +37,7 @@
 						<!-- 其他价格 -->
 						<view v-else class='acea-row justify-between' style="align-items: baseline;">
 							<view v-show="item.price || item.productPrice" class="acea-row">
-								<view class='money line-heightOne regular'>sL{{item.priceSl || item.productPriceSl}}</view>
+								<view class='money line-heightOne regular'>{{$store.getters.priceUnit}}{{item.priceSl || item.productPriceSl}}</view>
 							</view>
 							<view
 								v-if="(item.deliveryMethod == 1 || !orderInfo.takeTheirSwitch) && !jump && Number(item.productType)==0"
@@ -82,7 +82,9 @@
 	} from "@/enums/productEnums";
 	import PointsPrice from '@/components/PointsPrice.vue';
   import {handleSetClipboard} from "../../libs/order";
-	/**
+  import { rmbToLgns } from "@/utils";
+
+  /**
 	 * 积分商品推荐样式
 	 */
 	const hotPointsStyle = {
@@ -168,6 +170,9 @@
 			}
 		},
 		methods: {
+      rmbToLgnsHandle(rmb){
+        return rmbToLgns(rmb)
+      },
       handleSetClipboard,
 			// 普通商品、虚拟(开启可申请退款开关)、视频号可申请退款
 			isRefund(item) {

+ 2 - 2
crmeb_src/mer_uniapp/components/svipPrice.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="acea-row items-baseline">
 		<view :class="priceColor.color?'':'x-money'" class="mr-12 acea-row items-baseline relative" :style="svipPriceStyle.topStyle?[svipPriceStyle.topStyle,priceColor]:[priceColor]">
-			<view class="f-s-26">sL</view>
+			<view class="f-s-26">{{$store.getters.priceUnit}}</view>
 			<view v-if="productPrice.groupPrice" class='tui-skeleton-rect semiBold' :style="[svipIconStyle.price]">{{productPrice.groupPrice}}</view>
 			<view v-else class='tui-skeleton-rect semiBold' :style="[svipIconStyle.price]">{{rmbToLgnsHandle(userIsPaidMember && productPrice.isPaidMember?productPrice.vipPrice:productPrice.price)}}</view>
 		</view>
@@ -11,7 +11,7 @@
 		
 		<view v-if="!userIsPaidMember && paidMemberPriceDisplay==='all' && productPrice.isPaidMember&&!productPrice.groupPrice" class="svip-price acea-row row-middle" :style="[svipPriceStyle.svipBox]">
 			<view class="icon pl-10 acea-row row-middle" :style="[svipPriceStyle.icon]">SVIP</view>
-			<view class="price ml-6 semiBold" :style="[svipPriceStyle.svipPrice]">¥{{productPrice.vipPrice}}</view>
+			<view class="price ml-6 semiBold" :style="[svipPriceStyle.svipPrice]">{{$store.getters.priceUnit}}{{rmbToLgnsHandle(productPrice.vipPrice)}}</view>
 		</view>
 	</view>
 </template>

+ 1 - 1
crmeb_src/mer_uniapp/pages/goods/goods_details/index.vue

@@ -317,7 +317,7 @@
 												height="204rpx"></easy-loadimage>
 										</view>
 										<view class="name line2 mt-20 h-74 lh-38rpx">{{ val.name }}</view>
-										<view class="money theme_price regular">sL{{ rmbToLgnsHandle(val.price) }}</view>
+										<view class="money theme_price regular">{{$store.getters.priceUnit}}{{ rmbToLgnsHandle(val.price) }}</view>
 									</view>
 								</view>
 							</view>

+ 9 - 9
crmeb_src/mer_uniapp/pages/goods/order_confirm/index.vue

@@ -130,7 +130,7 @@
 					<view v-show="item.svipDiscountPriceSl != 0&&orderInfoVo.type!=2"
 						class='item acea-row row-between-wrapper'>
 						<view>会员优惠</view>
-						<view class='money'>-sL{{item.svipDiscountPriceSl || 0}}</view>
+						<view class='money'>-{{$store.getters.priceUnit}}{{item.svipDiscountPriceSl || 0}}</view>
 					</view>
 					<view v-if="isProductType" class='item acea-row row-between-wrapper'>
 						<view>店铺优惠</view>
@@ -138,7 +138,7 @@
 							@tap='couponTap(item.merCouponUserList,item.merId, index)'>
 							<view class='discount acea-row row-between-wrapper'>
 								<text
-									class="couponTitle line1">{{item.couponFeeSl==0?`有${item.merCouponUserList.length}张优惠券可选`:`-sL${item.couponFeeSl}`}}</text>
+									class="couponTitle line1">{{item.couponFeeSl==0?`有${item.merCouponUserList.length}张优惠券可选`:`-${$store.getters.priceUnit}${item.couponFeeSl}`}}</text>
 								<text class='iconfont text-bbb icon-ic_rightarrow ml-4'></text>
 							</view>
 						</view>
@@ -159,20 +159,20 @@
         <view v-show="secondType !== ProductTypeEnum.Integral" class='moneyList borRadius14'>
           <view class='item acea-row row-between-wrapper'>
             <view>商品总价</view>
-            <view class='money'>sL{{orderInfoVo.proTotalFeeSl || 0}}</view>
+            <view class='money'>{{$store.getters.priceUnit}}{{orderInfoVo.proTotalFeeSl || 0}}</view>
           </view>
           <view class='item acea-row row-between-wrapper' v-if="parseInt(orderInfoVo.freightFeeSl) > 0">
             <view>运费:</view>
-            <view class='money'>+sL{{orderInfoVo.freightFeeSl || 0}}</view>
+            <view class='money'>+{{$store.getters.priceUnit}}{{orderInfoVo.freightFeeSl || 0}}</view>
           </view>
           <view v-show="orderInfoVo.svipDiscountPriceSl != 0 &&orderInfoVo.type!=2"
                 class='item acea-row row-between-wrapper'>
             <view>会员优惠</view>
-            <view class='money'>-sL{{orderInfoVo.svipDiscountPriceSl || 0}}</view>
+            <view class='money'>-{{$store.getters.priceUnit}}{{orderInfoVo.svipDiscountPriceSl || 0}}</view>
           </view>
           <view class='item acea-row row-between-wrapper' v-if="parseInt(merCouponFeeSl) > 0 && isProductType">
             <view>店铺优惠</view>
-            <view class='money'>-sL{{merCouponFeeSl}}</view>
+            <view class='money'>-{{$store.getters.priceUnit}}{{merCouponFeeSl}}</view>
           </view>
           <view v-if="isProductType" class='item acea-row row-between-wrapper'>
             <view>平台优惠</view>
@@ -180,7 +180,7 @@
                   class='discount acea-row row-between-wrapper'
                   @tap='couponTap(orderInfoVo.platCouponUserList,0)'>
               <text
-                  class="couponTitle line1">{{platCouponFeeSl==0?`有${orderInfoVo.platCouponUserList.length}张优惠券可选`:`-sL${platCouponFeeSl}`}}</text>
+                  class="couponTitle line1">{{platCouponFeeSl==0?`有${orderInfoVo.platCouponUserList.length}张优惠券可选`:`-${$store.getters.priceUnit}${platCouponFeeSl}`}}</text>
               <text class='text-bbb iconfont icon-ic_rightarrow ml-4'></text>
             </view>
             <view v-else class="noCoupon">暂无优惠券</view>
@@ -202,7 +202,7 @@
 
           <view class='item acea-row row-between-wrapper' v-if="Number(orderInfoVo.deductionPriceSl) > 0">
             <view>抵扣金额</view>
-            <view class='money'>-sL {{orderInfoVo.deductionPriceSl || 0}}</view>
+            <view class='money'>-{{$store.getters.priceUnit}} {{orderInfoVo.deductionPriceSl || 0}}</view>
           </view>
 
         </view>
@@ -214,7 +214,7 @@
 					<PointsPrice v-if="orderInfoVo.secondType === ProductTypeEnum.Integral" :pointsPrice="orderInfoVo"
 						:pointsGoodsStyle="hotPointsStyle"></PointsPrice>
 					<!-- 其他价格 -->
-					<text v-else class='price_color f-s-38 regular line-heightOne'>sL{{orderInfoVo.totalPriceReat || 0}}</text>
+					<text v-else class='price_color f-s-38 regular line-heightOne'>{{$store.getters.priceUnit}}{{orderInfoVo.totalPriceReat || 0}}</text>
 				</view>
 				<view class='settlement' style='z-index:100' @tap="SubOrder">
 					{{secondType === ProductTypeEnum.Integral?"确认兑换":"立即下单"}}

+ 12 - 8
crmeb_src/mer_uniapp/pages/goods/order_details/index.vue

@@ -243,30 +243,30 @@
 						<PointsPrice v-if="secondType === ProductTypeEnum.Integral" :pointsPrice="pointsPrice"
 							:pointsGoodsStyle="hotPointsStyle"></PointsPrice>
 						<!-- 其他价格 -->
-						<view v-else class='conter'>sL{{orderInfo.proTotalPriceSl || 0}}</view>
+						<view v-else class='conter'>{{$store.getters.priceUnit}}{{orderInfo.proTotalPriceSl || 0}}</view>
 					</view>
 					<view class='item acea-row row-between' v-if="orderInfo.payPostageSl > 0">
 						<view>运费:</view>
-						<view class='conter'>sL{{orderInfo.payPostageSl || 0}}</view>
+						<view class='conter'>{{$store.getters.priceUnit}}{{orderInfo.payPostageSl || 0}}</view>
 					</view>
 					<view class='item acea-row row-between' v-if='orderInfo.svipDiscountPriceSl > 0'>
 						<view>会员优惠:</view>
-						<view class='conter'>-sL{{orderInfo.svipDiscountPriceSl || 0}}</view>
+						<view class='conter'>-{{$store.getters.priceUnit}}{{orderInfo.svipDiscountPriceSl || 0}}</view>
 					</view>
 					<view class='item acea-row row-between' v-if='orderInfo.merCouponPriceSl > 0'>
 						<view>店铺优惠:</view>
-						<view class='conter'>-sL{{orderInfo.merCouponPriceSl || 0}}</view>
+						<view class='conter'>-{{$store.getters.priceUnit}}{{orderInfo.merCouponPriceSl || 0}}</view>
 					</view>
 					<view class='item acea-row row-between' v-if='orderInfo.platCouponPriceSl > 0'>
 						<view>平台优惠:</view>
-						<view class='conter'>-sL{{orderInfo.platCouponPriceSl || 0}}</view>
+						<view class='conter'>-{{$store.getters.priceUnit}}{{orderInfo.platCouponPriceSl || 0}}</view>
 					</view>
 					<view class='item acea-row row-between' v-if="orderInfo.integralPriceSl > 0">
 						<view>积分抵扣:</view>
-						<view class='conter'>-sL{{orderInfo.integralPriceSl || 0}}</view>
+						<view class='conter'>-{{$store.getters.priceUnit}}{{orderInfo.integralPriceSl || 0}}</view>
 					</view>
 					<view v-show="secondType !== ProductTypeEnum.Integral" class='actualPay acea-row row-right'>
-						实付款<span style="color:#FF448F;">sL <span style="font-weight: bold;">{{orderInfo.totalPriceReat || 0}}</span></span>
+						实付款<span style="color:#FF448F;">{{$store.getters.priceUnit}} <span style="font-weight: bold;">{{orderInfo.totalPriceReat || 0}}</span></span>
 					</view>
 				</view>
 				<view style='height:200rpx;'></view>
@@ -343,7 +343,8 @@
 	import {
 		onDelOrder
 	} from "../../../libs/order";
-	import DeliveryMethod from "../../../components/DeliveryMethod";
+  import { rmbToLgns } from "@/utils";
+  import DeliveryMethod from "../../../components/DeliveryMethod";
 	import {
 		cancelReservationApi
 	} from "../../../api/order";
@@ -470,6 +471,9 @@
 
 		},
 		methods: {
+      rmbToLgnsHandle(rmb) {
+        return rmbToLgns(rmb);
+      },
 			//发货记录
 			godeliverRecord() {
 				uni.showLoading({

+ 3 - 1
crmeb_src/mer_uniapp/pages/goods/order_list/index.vue

@@ -237,7 +237,9 @@
 	import {
 		onDelOrder
 	} from "../../../libs/order";
-	const app = getApp();
+  import { rmbToLgns } from "@/utils";
+
+  const app = getApp();
 	export default {
 		mixins: [orderPay],
 		components: {

+ 7 - 7
crmeb_src/mer_uniapp/pages/order_addcart/order_addcart.vue

@@ -168,7 +168,7 @@
 					<view>
 						<text class="all_text">合计:</text>
 						<text class='price-color'>
-							<text class="symbol">sL</text>
+							<text class="symbol">{{$store.getters.priceUnit}}</text>
 							<text
 								class="all_money semiBold">{{calculatePriceData.totlePriceRate?calculatePriceData.totlePriceRate:0}}</text>
 						</text>
@@ -176,7 +176,7 @@
 					<view class="acea-row row-middle" @click="popupChange()"
 						v-show="calculatePriceData.totalCouponPrice>0">
 						<text
-							class="youhui">优惠:sL{{rmbToLgnsHandle(calculatePriceData.totalCouponPrice?calculatePriceData.totalCouponPrice:0)}}</text>
+							class="youhui">优惠:{{$store.getters.priceUnit}}{{rmbToLgnsHandle(calculatePriceData.totalCouponPrice?calculatePriceData.totalCouponPrice:0)}}</text>
 						<text class="mingxi price-color">优惠明细</text>
 						<text class="iconfont icon-ic_downarrow f-s-24"></text>
 						<!-- <text class="iconfont icon-ic_uparrow"></text> -->
@@ -231,23 +231,23 @@
 					<block v-if="calculatePriceData.proTotalPrice>0 && calculatePriceData.totalCouponPrice!=0">
 						<view class="_cell acea-row row-between-wrapper">
 							<text class="_label">商品总价:</text>
-							<text class="_count">sL{{calculatePriceData.productTotal}}</text>
+							<text class="_count">{{$store.getters.priceUnit}}{{calculatePriceData.productTotal}}</text>
 						</view>
 						<view class="_cell acea-row row-between-wrapper">
 							<text class="_label">会员优惠:</text>
-							<text class="_count">-sL{{rmbToLgnsHandle(calculatePriceData.svipDiscountPrice)}}</text>
+							<text class="_count">-{{$store.getters.priceUnit}}{{rmbToLgnsHandle(calculatePriceData.svipDiscountPrice)}}</text>
 						</view>
 						<view class="_cell acea-row row-between-wrapper">
 							<text class="_label">店铺优惠:</text>
-							<text class="_count">-sL{{rmbToLgnsHandle(calculatePriceData.merCouponPrice)}}</text>
+							<text class="_count">-{{$store.getters.priceUnit}}{{rmbToLgnsHandle(calculatePriceData.merCouponPrice)}}</text>
 						</view>
 						<view class="_cell acea-row row-between-wrapper">
 							<text class="_label">平台优惠:</text>
-							<text class="_count">-sL{{rmbToLgnsHandle(calculatePriceData.platCouponPrice)}}</text>
+							<text class="_count">-{{$store.getters.priceUnit}}{{rmbToLgnsHandle(calculatePriceData.platCouponPrice)}}</text>
 						</view>
 						<view class="_cell_all acea-row row-between-wrapper">
 							<text class="_label">共优惠:</text>
-							<text class="_count">-sL{{rmbToLgnsHandle(calculatePriceData.totalCouponPrice)}}</text>
+							<text class="_count">-{{$store.getters.priceUnit}}{{rmbToLgnsHandle(calculatePriceData.totalCouponPrice)}}</text>
 						</view>
 					</block>
 					<!-- #ifdef MP-->

+ 1 - 1
crmeb_src/mer_uniapp/pages/users/user_payment/index.vue

@@ -4,7 +4,7 @@
 			<view class="payment-top acea-row row-column row-center-wrapper">
 				<span class="name1">我的余额</span>
 				<view class="pic">
-					sL<span class="pic-font semiBold">{{ nowMoney || 0 }}</span>
+          {{$store.getters.priceUnit}}<span class="pic-font semiBold">{{ nowMoney || 0 }}</span>
 				</view>
 			</view>
 			<view v-if="!payShow" class="payment">

+ 2 - 1
crmeb_src/mer_uniapp/store/getters.js

@@ -33,5 +33,6 @@ export default {
 	isEmployee:state => state.app.isEmployee,
 	selectMerId:state => state.app.selectMerId,
 	selectMerchantRole:state => state.app.selectMerchantRole,
-	isAdvertisement: state => state.app.isAdvertisement
+	isAdvertisement: state => state.app.isAdvertisement,
+	priceUnit: state => "sL"
 };

+ 15 - 15
crmeb_src/mer_uniapp/utils/index.js

@@ -18,13 +18,13 @@ import store from "../store";
  * 取值
  */
 export function configMap(args, init) {
-	if(Array.isArray(args)) {
-		return args.reduce((i, v)=>{
+	if (Array.isArray(args)) {
+		return args.reduce((i, v) => {
 			i[v] = () => Store.getters.globalData[v];
 			return i;
 		}, init || {})
-	}else{
-		return Object.keys(args).reduce((i, v)=>{
+	} else {
+		return Object.keys(args).reduce((i, v) => {
 			i[v] = () => {
 				const val = Store.getters.globalData[v];
 				return (val === undefined || val === null || val === '') ? args[v] : val;
@@ -38,8 +38,8 @@ export function configMap(args, init) {
  * 获取浏览器的分销码
  * @param options
  */
-export function getUserSpread(options){
-	if(options.sd) store.commit('Change_Spread', options.sd);
+export function getUserSpread(options) {
+	if (options.sd) store.commit('Change_Spread', options.sd);
 }
 
 /**
@@ -47,15 +47,15 @@ export function getUserSpread(options){
  * @param islogin
  * @param sd
  */
-export function silenceBindingSpread(islogin,sd) {
+export function silenceBindingSpread(islogin, sd) {
 	if (islogin && sd !== undefined && sd !== null && sd > 0) {
 		spreadApi(sd).then(res => {
 			//#ifdef MP
 			getApp().globalData.spread = 0;
 			//#endif
 			//清空分销码
-			store.commit("Change_Spread",0)
-		}).catch(res => {})
+			store.commit("Change_Spread", 0)
+		}).catch(res => { })
 	}
 }
 
@@ -103,16 +103,16 @@ export function getCityList() {
 	return new Promise((resolve, reject) => {
 		getCity().then(res => {
 			resolve(res.data);
-			Cache.set('cityList',res.data)
+			Cache.set('cityList', res.data)
 		})
 	});
 }
 
 // 人民币转Ls币
-export function rmbToLgns(rmb,mathType = "ceil"){
+export function rmbToLgns(rmb, mathType = "ceil") {
 	let rate = Store.getters.globalData.daibiRateLgnsCny
-	if(!rate) rate = 1
-	if(mathType == "ceil") {
+	if (!rate) rate = 1
+	if (mathType == "ceil") {
 		return (Math.ceil((rmb / rate) * 100) / 100).toFixed(2);
 	} else {
 		return (Math.floor((rmb / rate) * 100) / 100).toFixed(2);
@@ -120,9 +120,9 @@ export function rmbToLgns(rmb,mathType = "ceil"){
 }
 
 // 获取人民币转Ls的汇率
-export function getRmbToLgnsRate(){
+export function getRmbToLgnsRate() {
 	let rate = Store.getters.globalData.daibiRateLgnsCny
-	if(!rate) rate = 1
+	if (!rate) rate = 1
 	return rate
 }