Преглед изворни кода

feat:新首页,新收益记录页

zhanghui пре 1 година
родитељ
комит
acecd7af84

+ 0 - 1
pages.json

@@ -185,7 +185,6 @@
 				"navigationBarTitleText" : ""
 			}
 		}
-
 	],
 	"tabBar": {
 		"color": "#999999",

+ 171 - 6
pages/earningsList/earningsList.vue

@@ -1,13 +1,180 @@
 <template>
 	<view class="page">
 		<!-- #ifdef H5-->
-		<uni-nav-bar  v-if="!$isWxBrowser()" :fixed="true" background-color="#FFE05C" :border="false" :statusBar="false"  left-icon="left" title="我的收益" @clickLeft="back" />
+		<uni-nav-bar  v-if="!$isWxBrowser()" :fixed="true" background-color="#FFE05C" :border="false" :statusBar="false"  left-icon="left" title="收益记录" @clickLeft="back" />
 		<!-- #endif -->
 
-		<view :style="{height:height}" class="list">
-			<mescroll-item ref="MescrollItem" :i="0"  :index="0"  :height="height">
-			</mescroll-item>
+		<view class="flex-col statistics">
+			<view class="flex-row grid">
+				<view class="flex-col gridItem">
+					<view  class="title flex-row justify-center">
+						<text>累计奖励</text>
+					</view>
+					<view class="number flex-row justify-center">
+						<text>4008</text>
+					</view>
+				</view>
+				<view class="flex-col gridItem leftBorder">
+					<view  class="title flex-row justify-center">
+						<text>累计提现</text>
+					</view>
+					<view class="number flex-row justify-center">
+						<text>2008</text>
+					</view>
+				</view>
+				<view class="flex-col gridItem leftBorder">
+					<view  class="title flex-row justify-center">
+						<text>可提现</text>
+					</view>
+					<view class="number flex-row justify-center">
+						<text>2000</text>
+					</view>
+				</view>
+			</view>
+			<view class="flex-row justify-center">
+				<view class="flex-row justify-center tixian">
+					<text>去提现</text>
+					<u-icon name="arrow-right" color="#000" size="14"></u-icon>
+				</view>
+			</view>
+
+		</view>
+		<view class="flex-row grid1">
+			<view class="flex-col justify-evenly gridItem1">
+				<view  class="title flex-row justify-center">
+					<text>累计拓客</text>
+				</view>
+				<view class="number1 flex-row justify-center">
+					<text>4008</text>
+				</view>
+			</view>
+			<view class="flex-col justify-evenly gridItem1 leftBorder1">
+				<view  class="title flex-row justify-center">
+					<text>用券人数</text>
+				</view>
+				<view class="number1 flex-row justify-center">
+					<text>4008</text>
+				</view>
+			</view>
+			<view class="flex-col justify-evenly gridItem1 leftBorder1">
+				<view  class="title flex-row justify-center">
+					<text>充值人数</text>
+				</view>
+				<view class="number1 flex-row justify-center">
+					<text>4008</text>
+				</view>
+			</view>
+			<view class="flex-col  justify-evenly gridItem1 leftBorder1">
+				<view  class="title flex-row justify-center">
+					<text>消费次数累计</text>
+				</view>
+				<view class="number1 flex-row justify-center">
+					<text>4008</text>
+				</view>
+			</view>
+		</view>
+
+		<view class="title-h1">
+			<text>拓客数据(今日)</text>
+		</view>
+		<view class="flex-row grid1">
+			<view class="flex-col justify-evenly gridItem1">
+				<view  class="title flex-row justify-center">
+					<text>累计拓客</text>
+				</view>
+				<view class="number1 flex-row justify-center">
+					<text>4008</text>
+				</view>
+			</view>
+			<view class="flex-col justify-evenly gridItem1 leftBorder1">
+				<view  class="title flex-row justify-center">
+					<text>用券人数</text>
+				</view>
+				<view class="number1 flex-row justify-center">
+					<text>4008</text>
+				</view>
+			</view>
+			<view class="flex-col justify-evenly gridItem1 leftBorder1">
+				<view  class="title flex-row justify-center">
+					<text>充值人数</text>
+				</view>
+				<view class="number1 flex-row justify-center">
+					<text>4008</text>
+				</view>
+			</view>
+			<view class="flex-col  justify-evenly gridItem1 leftBorder1">
+				<view  class="title flex-row justify-center">
+					<text>消费次数累计</text>
+				</view>
+				<view class="number1 flex-row justify-center">
+					<text>4008</text>
+				</view>
+			</view>
+		</view>
+		<view class="title-h1">
+			<text>间接拓客数据(今日)</text>
 		</view>
+		<view class="flex-row grid1">
+			<view class="flex-col justify-evenly gridItem1">
+				<view  class="title flex-row justify-center">
+					<text>累计拓客</text>
+				</view>
+				<view class="number1 flex-row justify-center">
+					<text>4008</text>
+				</view>
+			</view>
+			<view class="flex-col justify-evenly gridItem1 leftBorder1">
+				<view  class="title flex-row justify-center">
+					<text>用券人数</text>
+				</view>
+				<view class="number1 flex-row justify-center">
+					<text>4008</text>
+				</view>
+			</view>
+			<view class="flex-col justify-evenly gridItem1 leftBorder1">
+				<view  class="title flex-row justify-center">
+					<text>充值人数</text>
+				</view>
+				<view class="number1 flex-row justify-center">
+					<text>4008</text>
+				</view>
+			</view>
+			<view class="flex-col  justify-evenly gridItem1 leftBorder1">
+				<view  class="title flex-row justify-center">
+					<text>消费次数累计</text>
+				</view>
+				<view class="number1 flex-row justify-center">
+					<text>4008</text>
+				</view>
+			</view>
+		</view>
+		<view v-for="i in 10">
+			<view class="title-h1 flex-row">
+				<text>2024-06</text>
+				<u-icon name="arrow-right" color="#000" size="16"></u-icon>
+				<u-icon name="arrow-down" color="#000" size="16"></u-icon>
+			</view>
+			<view class="listItem" v-for="i in 2">
+				<view class="flex-row justify-between listItemMsg">
+					<view class="memberNo">
+						<text>会员编号:Vip.00006379</text>
+					</view>
+					<view class="flex-row justify-between msg">
+						<text>发券</text>
+						<text>0.01</text>
+					</view>
+				</view>
+				<view class="time">
+					<text>2024-02-05:12:01:22</text>
+				</view>
+			</view>
+		</view>
+
+		<view class="flex-row justify-center seeMore">
+			<text>查看更多</text>
+		</view>
+
+
 		<!--#ifdef H5-->
 		<liu-drag-button v-if="$isWxBrowser()" @clickBtn="back">返回</liu-drag-button>
 		<!--#endif-->
@@ -15,10 +182,8 @@
 </template>
 
 <script>
-	import MescrollItem from "./module/mescrollUni-item.vue";
 	export default {
 		components: {
-			MescrollItem
 		},
 		data() {
 			return {

+ 103 - 1
pages/earningsList/index.rpx.css

@@ -1,3 +1,105 @@
 .page{
-	padding: 0 24rpx;
+	background-color: #F9F9F9;
+}
+
+.statistics{
+	width: 750rpx;
+	height: 288rpx;
+	background-image: url("/static/index/earningBg.png");
+	/*background-image: url('https://jje.xinyuekj.com.cn/tk/static/index/earningBg.png');*/
+	background-repeat: no-repeat;
+	background-size: contain;
+}
+.gridItem{
+	width: 248rpx;
+	height: 104rpx;
+	margin-top: 40rpx;
+}
+.title{
+	font-weight: 400;
+	font-size: 24rpx;
+	color: #666666;
+	line-height: 44rpx;
+}
+.number{
+	font-weight: 600;
+	font-size: 40rpx;
+	color: #333333;
+	line-height: 44rpx;
+	margin-top: 12rpx;
+}
+.tixian{
+	width: 200rpx;
+	height: 64rpx;
+	background: rgba(255,224,92,0);
+	border-radius: 32rpx;
+	border: 2rpx solid #333333;
+
+	font-weight: 400;
+	font-size: 28rpx;
+	color: #333333;
+	line-height: 64rpx;
+	margin-top: 44rpx;
+
+}
+.leftBorder{
+	border-left: 2rpx solid #FFFFFF;
+}
+.grid1{
+	width: 750rpx;
+	height: 160rpx;
+	background: white;
+}
+.gridItem1{
+	width: 186rpx;
+	height: 98rpx;
+	margin-top: 32rpx;
+}
+.number1{
+	font-weight: 400;
+	font-size: 32rpx;
+	color: #333333;
+	line-height: 44rpx;
+}
+.leftBorder1{
+	border-left: 2rpx solid #EEEEEE;
+}
+.title-h1{
+	font-weight: 600;
+	font-size: 32rpx;
+	color: #333333;
+	line-height: 44rpx;
+	padding: 32rpx 0 16rpx 32rpx;
+}
+.listItem{
+	width: 686rpx;
+	margin-left: 32rpx;
+	padding: 24rpx 0;
+	border-bottom: 2rpx  solid #EEEEEE;
+}
+
+.time{
+	font-weight: 400;
+	font-size: 24rpx;
+	color: #999999;
+	line-height: 44rpx;
+}
+.listItemMsg{
+	font-weight: 400;
+	font-size: 28rpx;
+	color: #333333;
+	line-height: 44rpx;
+}
+.memberNo{
+	width: 450rpx;
+}
+.msg{
+	flex: 1;
+}
+.seeMore{
+	font-weight: 400;
+	font-size: 24rpx;
+	color: #999999;
+	line-height: 44rpx;
+	padding: 10rpx;
 }

+ 0 - 54
pages/earningsList/module/index.rpx.css

@@ -1,54 +0,0 @@
-.item{
-    height: 156rpx;
-    border-bottom: 1px solid #EEEEEE;
-}
-.leftText{
-    width: 84rpx;
-    height: 84rpx;
-    text-align: center;
-    color: #FFFFFF;
-    line-height: 84rpx;
-    border-radius: 42rpx;
-    font-size: 24rpx;
-    font-family: PingFangSC-Regular, PingFang SC;
-    margin-top: 32rpx ;
-}
-.rightText{
-    margin-top: 32rpx;
-    width: 590rpx;
-    padding: 0 20rpx;
-}
-.text1{
-    height: 44rpx;
-    font-size: 28rpx;
-    font-family: PingFangSC-Regular, PingFang SC;
-    font-weight: 400;
-    color: #333333;
-    line-height: 44rpx;
-}
-
-.text2{
-    height: 44rpx;
-    font-size: 28rpx;
-    font-family: PingFangSC-Medium, PingFang SC;
-    font-weight: bold;
-    color: #333333;
-    line-height: 44rpx;
-}
-.text3{
-    height: 40rpx;
-    font-size: 24rpx;
-    font-family: PingFangSC-Regular, PingFang SC;
-    font-weight: 400;
-    color: #999999;
-    line-height: 40rpx;
-}
-.backColor1{
-    background: #ED569F;
-}
-.backColor2{
-    background: #93D21A;
-}
-.backColor3{
-    background: #FFAF36;
-}

+ 0 - 150
pages/earningsList/module/mescrollUni-item.vue

@@ -1,150 +0,0 @@
-<template>
-	<!--
-    swiper中的transfrom会使fixed失效,此时用height固定高度;
-    swiper中无法触发mescroll-mixins.js的onPageScroll和onReachBottom方法,只能用mescroll-uni,不能用mescroll-body
-    -->
-	<!-- ref动态生成: 字节跳动小程序编辑器不支持一个页面存在相同的ref (如不考虑字节跳动小程序可固定值为 ref="mescrollRef") -->
-	<!-- top的高度等于悬浮菜单tabs的高度 -->
-	<mescroll-uni :ref="'mescrollRef' + i" @init="mescrollInit" :height="height" :down="downOption" @down="downCallback"
-		:up="upOption" @up="upCallback" @emptyclick="emptyClick">
-		<view>
-			<view class="item" v-for="(item,index) in list" :key="index">
-				<view class="flex-row justify-between" @click="goOrderDetail(item)">
-					<view class="leftText" :class="{'backColor2':item.isAdd == '1','backColor1':item.isAdd != '1'}">
-						<text v-if="item.isAdd == '1'">增加</text>
-						<text v-else>减少</text>
-					</view>
-					<view class="rightText flex-col">
-						<view class=" flex-row justify-between">
-							<text class="text1">{{item.description || item.remake}}</text>
-							<text class="text2" v-if="item.isAdd == '1'">{{item.amount}}</text>
-							<text class="text2" v-else>-{{item.amount}}</text>
-						</view>
-						<view v-if="item.no" class=" flex-row justify-between">
-							<text class="text3">昵称:{{item.memberName}}</text>
-							<text class="text3">编号:{{item.no}}</text>
-						</view>
-						<view class=" flex-row justify-between">
-							<text class="text3">{{item.createTime}}</text>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-
-	</mescroll-uni>
-</template>
-
-<script>
-	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
-	import MescrollMoreItemMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-more-item.js"
-	export default {
-		mixins: [MescrollMixin, MescrollMoreItemMixin], // 注意此处还需使用MescrollMoreItemMixin (必须写在MescrollMixin后面)
-		components: {
-		},
-
-		data() {
-			return {
-				downOption: {
-					auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
-				},
-				upOption: {
-					auto: false, // 不自动加载
-					// page: {
-					// 	num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
-					// 	size: 10 // 每页数据的数量
-					// },
-					noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
-					empty: {
-						icon: '/static/dataNull.png',
-						tip: '暂无内容', // 提示
-						// btnText: '去看看'
-					},
-					textNoMore: '没有更多了'
-				},
-				list:[],
-			}
-		},
-		props: {
-			i: Number, // 每个tab页的专属下标 (除了支付宝小程序必须在这里定义, 其他平台都可不用写, 因为已在MescrollMoreItemMixin定义)
-			index: { // 当前tab的下标 (除了支付宝小程序必须在这里定义, 其他平台都可不用写, 因为已在MescrollMoreItemMixin定义)
-				type: Number,
-				default () {
-					return 0
-				}
-			},
-
-			height: [Number, String], // mescroll的高度
-
-		},
-		watch:{
-
-		},
-
-		created(){
-
-
-		},
-
-		methods: {
-
-
-			/*下拉刷新的回调 */
-			downCallback() {
-				// 这里加载你想下拉刷新的数据, 比如刷新轮播数据
-				// loadSwiper();
-				// 下拉刷新的回调,默认重置上拉加载列表为第一页 (自动执行 page.num=1, 再触发upCallback方法 )
-				this.mescroll.resetUpScroll()
-			},
-			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
-			upCallback(page) {
-
-				//联网加载数据
-				let httpData = {
-					pageNum:page.num,
-					pageSize:10
-				}
-
-				this.$api.service.getRecord(httpData).then((res) => {
-					//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
-					this.mescroll.endSuccess(res.data.data.length,res.data.data.length === 10);
-					//设置列表数据
-					if (page.num === 1) this.list = []; //如果是第一页需手动制空列表
-					this.list = this.list.concat(res.data.data); //追加新数据
-					console.log(this.list)
-				}).catch((err) => {
-					//联网失败, 结束加载
-					this.mescroll.endErr();
-				})
-
-
-			},
-
-			//点击空布局按钮的回调
-			emptyClick() {
-				uni.showToast({
-					title: '点击了按钮,具体逻辑自行实现'
-				})
-			},
-			// 搜索
-			doSearch() {
-				this.list = []; // 先清空列表,显示加载进度
-				this.mescroll.resetUpScroll();
-			},
-
-
-
-
-			goOrderDetail(item){
-				uni.navigateTo({
-					url:'/myPages/transactionRecordDetail/index?item='+JSON.stringify(item)
-				})
-			},
-		}
-	}
-</script>
-<style>
-	@import '/common/css/common.css';
-	@import './index.rpx.css';
-
-</style>

+ 51 - 55
pages/index/attach/attach.vue

@@ -1,73 +1,59 @@
 <template>
-	<view class="page">
-
-<!--		<view class="roleNameView">-->
-<!--			<text>当前身份:<text class="roleName">{{userInfo.roleName}}</text></text>-->
-<!--		</view>-->
-
-		<view class="dataNullView flex-col" v-if="roleBindRuleList.length===0">
-			<view class="flex-row justify-center">
-				<image class="dataNullImage" src="/static/zhanwu.png"></image>
-			</view>
-			<text class="roleHint">当前角色没有拓客规则,请联系拓客经理处理</text>
-		</view>
-
-		<view :style="{marginTop:'24rpx'}" class="scroll-Y" v-else>
-				<view class="flex-col outView " :class="{select:item.select}" v-for="(item,index) in roleBindRuleList" @click="selectRule(item,index)">
-					<view class="flex-row justify-between">
-						<text class="title">{{item.title}}</text>
-						<u-icon name="checkbox-mark" color="#666" size="24" v-if="item.select"></u-icon>
+	<view class="attach">
+		<view class="flex-row justify-center">
+			<view class="grid">
+				<view class="flex-col gridItem">
+					<view  class="title flex-row justify-center">
+						<text>累计邀约</text>
 					</view>
-					<view class="flex-row justify-between  awardView">
-						<text>直推:</text>
-						<view>
-							<view class="flex-row  award ">
-								<text class="awardItem">注册现金:{{item.awardAmount}}元</text>
-							</view>
-							<view class="flex-row  award justify-between">
-								<text class="awardItem">消费现金:{{item.consumeAmount}}元</text>
-								<text class="awardItem">消费比例:{{item.consumeRatio * 100}}%</text>
-							</view>
-						</view>
+					<view class="number flex-row justify-center">
+						<text>2008</text>
 					</view>
-					<view class="flex-row justify-between  awardView">
-						<text>间推:</text>
-						<view class="flex-row  award justify-between">
-							<text class="awardItem">间推现金:{{item.indirectAmount}}元</text>
-							<text class="awardItem">间推比例:{{item.indirectRatio * 100}}%</text>
-						</view>
+				</view>
+				<view class="flex-col gridItem leftBorder">
+					<view  class="title flex-row justify-center">
+						<text>用券情况</text>
 					</view>
-					<view class="flex-row justify-between  awardView">
-						<text>优惠券:</text>
-						<view class="flex-col">
-							<view class="flex-col discount award" v-for="(item1,index1) in item.strategyList" :key="index1">
-								<text>{{item1.name}} * {{item1.degree}}张</text>
-								<text>有效期:{{item1.startTime.substring(0,10)}} 至 {{item1.endTime.substring(0,10)}}</text>
-							</view>
-						</view>
+					<view class="number flex-row justify-center">
+						<text>20/80</text>
 					</view>
 				</view>
+				<view class="flex-col gridItem leftBorder">
+					<view  class="title flex-row justify-center">
+						<text>关联邀请</text>
+					</view>
+					<view class="number flex-row justify-center">
+						<text>20/800</text>
+					</view>
+				</view>
+				<view class="flex-col gridItem" @click="goItem('/pages/earningsList/earningsList')">
+					<view  class="title flex-row justify-center">
+						<text>业绩推广</text>
+					</view>
+					<view class="number flex-row justify-center">
+						<text>2008</text>
+					</view>
+				</view>
+			</view>
 		</view>
-		<view class="confirmButton" @click="createQrCode">
-			<text>生成二维码</text>
+
+		<view class="flex-row justify-center">
+			<view class="qrView" @click="qrCodePopup">
+				<uv-qrcode ref="qrcode" size="600rpx" :value="qrcodeUrl" :options="options"></uv-qrcode>
+			</view>
 		</view>
 
-		<uni-popup ref="createQrCodePopup" type="center" @change="createQrCodePopupChange">
-			<view class="createQrCodePopup">
+		<uni-popup ref="createQrCodePopup" type="center">
+			<view class="createQrCodePopup flex-col justify-center">
 				<view class="flex-row justify-center">
-					<text class="popupTitle">好友邀请码</text>
+					<uv-qrcode ref="qrcode" size="600rpx" :value="qrcodeUrl" :options="options"></uv-qrcode>
 				</view>
 				<view class="xoIcon" @click="closePopup">
-					<u-icon name="close-circle" color="#666" size="24"></u-icon>
-				</view>
-				<view class="flex-row justify-center">
-					<uv-qrcode ref="qrcode" size="540rpx" :value="qrcodeUrl" :options="options"></uv-qrcode>
-				</view>
-				<view class="flex-row justify-center qrCreateTime">
-					<text>生成时间:{{qrCreateTime}}</text>
+					<u-icon name="close-circle" color="#666" size="35"></u-icon>
 				</view>
 			</view>
 		</uni-popup>
+
 	</view>
 </template>
 
@@ -106,6 +92,16 @@
 				this.qrCreateTime = commonUtils.formatDate(new Date())
 			},
 
+			qrCodePopup(){
+				this.$refs.createQrCodePopup.open()
+			},
+
+			goItem(url){
+				uni.navigateTo({
+					url:url
+				})
+			},
+
 			selectRule(item,index){
 				this.roleBindRuleList.forEach(i=>{
 					i.select=false

+ 41 - 97
pages/index/attach/index.rpx.css

@@ -1,110 +1,54 @@
-.page{
-    background: #F7F7F7;
-    padding: 0rpx 32rpx;
-    overflow: auto;
+.attach{
+    background-image: url("/static/index/indexbg.png");
+    /*background-image: url('https://jje.xinyuekj.com.cn/tk/static/index/indexbg.png');*/
+    background-repeat: no-repeat;
+    background-size: 750rpx 680rpx;
+    background-color: #F9F9F9;
 }
-.scroll-Y{
-    height: 900rpx;
-    overflow: auto;
+.grid{
+    width: 624rpx;
 }
-.outView{
-    background: #FFFFFF;
-    border-radius: 20rpx;
-    padding: 28rpx 24rpx;
-    margin-bottom: 24rpx;
+.qrView{
+    padding: 20rpx;
+    margin-top: 56rpx;
+    background: white;
 }
-.title{
-    font-size: 32rpx;
-    font-weight: 500;
-    color: #333333;
-    line-height: 44rpx;
-    font-weight: bold;
+
+.gridItem{
+    width: 206rpx;
+    height: 104rpx;
+    margin-top: 30rpx;
+    float: left;
 }
-.awardView{
-    font-size: 28rpx;
+.title{
     font-weight: 400;
+    font-size: 24rpx;
     color: #666666;
-    line-height: 40rpx;
-    /*padding: 20rpx 0;*/
-}
-.award{
-    width: 500rpx;
+    line-height: 44rpx;
+    text-align: center;
 }
-
-.awardItem{
+.number{
+    font-weight: 600;
+    font-size: 40rpx;
+    color: #333333;
+    line-height: 44rpx;
 }
-
-.confirmButton{
-    width: 686rpx;
-    height: 108rpx;
-    background: #FFE05C;
-    border-radius: 60rpx;
-    text-align: center;
-    font-size: 32rpx;
-    font-weight: 500;
-    color: #111111;
-    line-height: 108rpx;
-    margin-top: 24rpx;
+.leftBorder{
+    border-left: 2rpx solid #FFFFFF;
 }
 .createQrCodePopup{
-    width: 638rpx;
-    height: 750rpx;
-    background: #FFFFFF;
-    border-radius: 24rpx;
-    position: relative;
-}
-.popupTitle{
-    line-height: 100rpx;
-    font-size: 32rpx;
-    font-weight: bold;
-    color: #111111;
+    width: 750rpx;
+    height: 100vh;
+    background: white;
 }
 .xoIcon{
-    position: absolute;
-    top: 20rpx;
-    right: 32rpx;
-
-}
-.select{
-    background: rgba(255, 224, 92, 0.1);
-    border: 4rpx solid #FFE05C;
-    box-sizing:border-box
-}
-.discount{
-    margin-top: 20rpx;
-    border: 1px solid rgba(226, 136, 136, 0.83);
-    padding: 0 6rpx;
-    border-radius: 10rpx;
-}
-.discount:first-child{
-    margin-top: 0rpx;
-}
-.dataNullView{
-    background: #FFFFFF;
-    border-radius: 20rpx;
-    padding: 24rpx;
-    text-align: center;
-}
-.dataNullImage{
-    width: 300rpx;
-    height: 300rpx;
-}
-.roleName1{
-    background: #FFFFFF;
-    color: #007aff;
-}
-.roleHint{
-    color: #999999;
-}
-.roleNameView{
-    font-weight: bold;
-    padding: 20rpx 0;
-}
-.roleName{
-    color: #007aff;
-}
-.qrCreateTime{
-    margin-top: 24rpx;
-    font-size: 24rpx;
-    color: #999999;
+    width: 70rpx;
+    margin-top: 50rpx;
+    margin-left: 350rpx;
+}
+.qrcodeView{
+    width: 100%;
+    height: 100%;
+    background: #4cd964;
+    position: relative;
 }

+ 0 - 2
pages/index/index.rpx.css

@@ -1,4 +1,2 @@
 .page{
-    background: #F7F7F7;
-    min-height: 100vh;
 }

+ 3 - 4
pages/index/index.vue

@@ -6,9 +6,8 @@
 			title="首页" />
 		<!-- #endif -->
 
-		<manager v-if="isManager == '1'"></manager>
+		<manager v-if="isManager == '1'" :height="height"></manager>
 		<attach v-else-if="isManager == '0' && (roleTag == '0' || roleTag ==  '2')"></attach>
-
 		<view :style="{height:height}" v-else-if="isManager == '0' && roleTag == '1'" class="flex-col justify-center">
 			<view class="flex-row justify-center">
 				<text>合作伙伴相关功能正在建设中...</text>
@@ -20,7 +19,7 @@
 
 <script>
 	import manager from "./manager/manager";
-	import attach from "./attach/attach"
+	import attach from "./attach/attach";
 	export default {
 		components: {
 			manager,
@@ -91,4 +90,4 @@
 
 <style scoped lang="scss">
 	@import './index.rpx.css';
-</style>
+</style>

+ 40 - 156
pages/index/manager/index.rpx.css

@@ -1,170 +1,54 @@
-.page{
-    padding: 0rpx 32rpx;
+.manager{
+    background-image: url("/static/index/indexbg.png");
+    /*background-image: url('https://jje.xinyuekj.com.cn/tk/static/index/indexbg.png');*/
+    background-repeat: no-repeat;
+    background-size: 750rpx 680rpx;
+    background-color: #F9F9F9;
 }
-.outView{
-    background: #FFFFFF;
-    border-radius: 20rpx;
-    padding: 28rpx 24rpx;
-    margin-bottom: 24rpx;
+.grid{
+    width: 624rpx;
 }
-.roleName{
-    margin-right: 20rpx;
-    font-size: 28rpx;
-    font-weight: 400;
-    color: #333333;
-    line-height: 44rpx;
+.qrView{
+    padding: 20rpx;
+    margin-top: 56rpx;
+    background: white;
 }
-.title{
-    font-size: 32rpx;
-    font-weight: 500;
-    color: #333333;
-    line-height: 44rpx;
-    font-weight: bold;
+
+.gridItem{
+    width: 206rpx;
+    height: 104rpx;
+    margin-top: 30rpx;
+    float: left;
 }
-.awardView{
-    font-size: 28rpx;
+.title{
     font-weight: 400;
+    font-size: 24rpx;
     color: #666666;
-    line-height: 40rpx;
-    padding: 5rpx 0;
-}
-.award{
-    width: 500rpx;
-}
-.discount{
-    margin-top: 20rpx;
-    border: 1px solid rgba(226, 136, 136, 0.83);
-    padding: 0 6rpx;
-    border-radius: 10rpx;
-}
-.discount:first-child{
-    margin-top: 0rpx;
-}
-.awardItem{
-    min-width: 230rpx;
-}
-.addButton{
-    width: 686rpx;
-    height: 84rpx;
-    background: #FFFFFF;
-    border-radius: 54rpx;
-    border: 4rpx dashed #FFE05C;
+    line-height: 44rpx;
     text-align: center;
-    line-height: 84rpx;
-    font-size: 28rpx;
-    font-weight: 400;
-    color: #333333;
-    margin-top: 24rpx;
-}
-.scroll-Y{
-    height: 50vh;
-    overflow: auto;
-}
-.rulePopup{
-    height: 900rpx;
-    border-top-right-radius: 10rpx;
-    border-top-left-radius: 10rpx;
-    background: white;
-    padding: 0 32rpx;
-    background: #f7f7f7;
-}
-.popupTitle{
-    line-height: 100rpx;
-    font-size: 32rpx;
-    font-weight: bold;
-    color: #111111;
-}
-.scroll-Y1{
-    height: 600rpx;
 }
-.label{
-    padding: 24rpx 32rpx;
-    background: #F7F7F7;
-    margin-top: 24rpx;
-    border-radius: 15rpx;
+.number{
+    font-weight: 600;
+    font-size: 40rpx;
+    color: #333333;
+    line-height: 44rpx;
 }
-.confirmButton{
-    width: 686rpx;
-    height: 108rpx;
-    background: #FFE05C;
-    border-radius: 60rpx;
-    text-align: center;
-    font-size: 32rpx;
-    font-weight: 500;
-    color: #111111;
-    line-height: 108rpx;
-    margin-top: 24rpx;
+.leftBorder{
+    border-left: 2rpx solid #FFFFFF;
 }
 .createQrCodePopup{
-    width: 638rpx;
-    height: 750rpx;
-    background: #FFFFFF;
-    border-radius: 24rpx;
-    position: relative;
-}
-.xoIcon{
-    position: absolute;
-    top: 20rpx;
-    right: 32rpx;
-}
-.rolePopup{
-    height: 700rpx;
-    border-top-right-radius: 10rpx;
-    border-top-left-radius: 10rpx;
-    padding: 0 32rpx;
+    width: 750rpx;
+    height: 100vh;
     background: white;
 }
-.scroll-Y2{
-    height: 450rpx;
-}
-.roleName1{
-    padding: 20rpx;
-    font-size: 30rpx;
-    font-weight: bold;
-    border-radius: 10rpx;
-    background: #f7f7f7;
-    margin-top: 24rpx;
-}
-.roleName1:first-child{
-    margin-top: 0;
-}
-
-.selectRoleName1{
-    background: rgba(255, 224, 92, 0.1);
-    /*box-shadow: 0 0 0 2px  #FFE05C;*/
-    border: 4rpx solid #FFE05C;
-    box-sizing:border-box
-}
-.tag{
-    background: #FFF6CE;
-    border-radius: 8rpx;
-    border: 2rpx solid #FFE05C;
-    font-size: 20rpx;
-    font-weight: 400;
-    color: #333333;
-    line-height: 48rpx;
-    padding: 0rpx 15rpx;
-    margin-left: 10rpx;
-}
-.dataNullView{
-    background: #FFFFFF;
-    border-radius: 20rpx;
-    padding: 24rpx;
-    text-align: center;
-}
-.dataNullImage{
-    width: 300rpx;
-    height: 300rpx;
-}
-.roleName1{
-    background: #FFFFFF;
-    color: #007aff;
-}
-.roleHint{
-    color: #999999;
-}
-.qrCreateTime{
-    margin-top: 24rpx;
-    font-size: 24rpx;
-    color: #999999;
+.xoIcon{
+    width: 70rpx;
+    margin-top: 50rpx;
+    margin-left: 350rpx;
+}
+.qrcodeView{
+    width: 100%;
+    height: 100%;
+    background: #4cd964;
+    position: relative;
 }

+ 51 - 307
pages/index/manager/manager.vue

@@ -1,167 +1,64 @@
 <template>
-	<view class="page">
-		<view class="flex-row justify-between outView" :style="{marginTop:'24rpx'}" v-if="roleList.length>0"
-			@click="selectRole">
-			<view class="roleName">
-				<text>角色</text>
-			</view>
-			<view class="flex-row">
-				<text class="roleName">{{roleList[confirmRoleIndex].name}}</text>
-				<u-icon name="arrow-right" color="#666" size="18"></u-icon>
-			</view>
-		</view>
-
-		<view class="dataNullView flex-col" v-if="roleBindRuleList.length===0">
-			<view class="flex-row justify-center">
-				<image class="dataNullImage" src="/static/zhanwu.png"></image>
-			</view>
-			<text v-if="roleList[confirmRoleIndex]" class="roleName1">{{roleList[confirmRoleIndex].name}}<text
-					class="roleHint">角色没有拓客规则,点击下方“添加规则”按钮可添加拓客规则</text></text>
-		</view>
+	<view class="manager">
 
-		<view v-else class="scroll-Y">
-			<view class="flex-col outView" v-for="(item,index) in roleBindRuleList" :key="index">
-				<view class="flex-row justify-between">
-					<text class="title">{{item.title}}</text>
-					<u-icon name="trash" color="#666" size="24" @click="deleteRule(item)"></u-icon>
+		<view class="flex-row justify-center">
+			<view class="grid">
+				<view class="flex-col gridItem">
+					<view  class="title flex-row justify-center">
+						<text>累计专员数量</text>
+					</view>
+					<view class="number flex-row justify-center">
+						<text>2008</text>
+					</view>
 				</view>
-				<view class="flex-row justify-between  awardView">
-					<text>直推:</text>
-					<view>
-						<view class="flex-row  award justify-between">
-							<text class="awardItem">注册现金:{{item.awardAmount}}元</text>
-						</view>
-						<view class="flex-row  award justify-between">
-							<text class="awardItem">消费现金:{{item.consumeAmount}}元</text>
-							<text class="awardItem">消费比例:{{item.consumeRatio * 100}}%</text>
-						</view>
+				<view class="flex-col gridItem leftBorder">
+					<view  class="title flex-row justify-center">
+						<text>今日新增专员</text>
+					</view>
+					<view class="number flex-row justify-center">
+						<text>2008</text>
 					</view>
 				</view>
-				<view class="flex-row justify-between  awardView">
-					<text>间推:</text>
-					<view class="flex-row  award justify-between">
-						<text class="awardItem">间推现金:{{item.indirectAmount}}元</text>
-						<text class="awardItem">间推比例:{{item.indirectRatio * 100}}%</text>
+				<view class="flex-col gridItem leftBorder">
+					<view  class="title flex-row justify-center">
+						<text>本月任务</text>
+					</view>
+					<view class="number flex-row justify-center">
+						<text>20/800</text>
 					</view>
 				</view>
-				<view class="flex-row justify-between  awardView">
-					<text>优惠券:</text>
-					<view class="flex-col">
-						<view class="flex-col discount award" v-for="(item1,index1) in item.strategyList" :key="index1">
-							<text>{{item1.name}} * {{item1.degree}}张</text>
-							<text>有效期:{{item1.startTime.substring(0,10)}} 至 {{item1.endTime.substring(0,10)}}</text>
-						</view>
+				<view class="flex-col gridItem">
+					<view  class="title flex-row justify-center">
+						<text>累计异业伙伴</text>
+					</view>
+					<view class="number flex-row justify-center">
+						<text>2008</text>
+					</view>
+				</view>
+				<view class="flex-col gridItem leftBorder">
+					<view  class="title flex-row justify-center">
+						<text>累计卖券金额</text>
+					</view>
+					<view class="number flex-row justify-center">
+						<text>2008</text>
 					</view>
 				</view>
 			</view>
 		</view>
 
-
-
-		<view class="addButton" @click="addRule">
-			<text>+添加规则</text>
-		</view>
-
-		<view class="confirmButton" @click="createQrCode">
-			<text>生成二维码</text>
+		<view class="flex-row justify-center">
+			<view class="qrView" @click="qrCodePopup">
+				<uv-qrcode ref="qrcode" size="600rpx" :value="qrcodeUrl" :options="options"></uv-qrcode>
+			</view>
 		</view>
 
-		<!--邀请好友福利码-->
-		<uni-popup ref="createQrCodePopup" type="center" @change="createQrCodePopupChange">
-			<view class="createQrCodePopup">
+		<uni-popup ref="createQrCodePopup" type="center">
+			<view class="createQrCodePopup flex-col justify-center">
 				<view class="flex-row justify-center">
-					<text class="popupTitle">邀请好友福利码</text>
+					<uv-qrcode ref="qrcode" size="600rpx" :value="qrcodeUrl" :options="options"></uv-qrcode>
 				</view>
 				<view class="xoIcon" @click="closePopup">
-					<u-icon name="close-circle" color="#666" size="24"></u-icon>
-				</view>
-				<view class="flex-row justify-center">
-					<uv-qrcode ref="qrcode" size="540rpx" :value="qrcodeUrl" :options="options"></uv-qrcode>
-				</view>
-				<view class="flex-row justify-center qrCreateTime">
-					<text>生成时间:{{qrCreateTime}}</text>
-				</view>
-			</view>
-		</uni-popup>
-		<!--选择规则-->
-		<uni-popup ref="rulePopup" type="bottom" @change="popupChange">
-			<view class="rulePopup">
-				<view class="flex-row justify-between">
-					<text class="popupTitle">选择规则</text>
-					<u-icon name="close-circle" color="#666" size="24" @click="closePopup"></u-icon>
-				</view>
-				<scroll-view scroll-y class="scroll-Y1">
-					<view class="dataNullView flex-col" v-if="roleNoBindRuleList.length===0">
-						<view class="flex-row justify-center">
-							<image class="dataNullImage" src="/static/dataNull.png"></image>
-						</view>
-						<text class="roleHint">暂无可添加的拓客规则</text>
-					</view>
-
-					<view v-else>
-						<view class="flex-col outView " :class="{selectRoleName1: item.select }"
-							v-for="(item,index) in roleNoBindRuleList" :style="{marginTop: '24rpx'}"
-							@click="selectRule(item,index)" :key="index">
-							<view class="flex-row justify-between">
-								<text class="title">{{item.title}}</text>
-							</view>
-							<view class="flex-row justify-between  awardView">
-								<text>直推:</text>
-								<view>
-									<view class="flex-row  award justify-between">
-										<text class="awardItem">注册现金:{{item.awardAmount}}元</text>
-									</view>
-									<view class="flex-row  award justify-between">
-										<text class="awardItem">消费现金:{{item.consumeAmount}}元</text>
-										<text class="awardItem">消费比例:{{item.consumeRatio * 100}}%</text>
-									</view>
-								</view>
-							</view>
-							<view class="flex-row justify-between  awardView">
-								<text>间推:</text>
-								<view class="flex-row  award justify-between">
-									<text class="awardItem">间推现金:{{item.indirectAmount}}元</text>
-									<text class="awardItem">间推比例:{{item.indirectRatio * 100}}%</text>
-								</view>
-							</view>
-							<view class="flex-row justify-between  awardView">
-								<text>优惠券:</text>
-								<view class="flex-col">
-									<view class="flex-col discount award" v-for="(item1,index1) in item.strategyList"
-										:key="index1">
-										<text>{{item1.name}} * {{item1.degree}}张</text>
-										<text>有效期:{{item1.startTime.substring(0,10)}} 至
-											{{item1.endTime.substring(0,10)}}</text>
-									</view>
-								</view>
-							</view>
-						</view>
-					</view>
-
-				</scroll-view>
-				<view class="confirmButton" @click="confirmAddRule">
-					<text>确定</text>
-				</view>
-			</view>
-		</uni-popup>
-		<!--选择角色-->
-		<uni-popup ref="rolePopup" type="bottom" @change="popupChange">
-			<view class="rolePopup">
-				<view class="flex-row justify-between">
-					<text class="popupTitle">选择角色</text>
-					<u-icon name="close-circle" color="#666" size="24" @click="closePopup"></u-icon>
-				</view>
-				<scroll-view scroll-y class="scroll-Y2">
-					<view class="roleName1" :class="{selectRoleName1: selectRoleIndex === index }"
-						v-for="(item,index) in roleList" :key="index" @click="selectRoleIndex = index">
-						<text>{{item.name}}</text>
-<!--						<text class="tag" v-if="item.tag == '0'">拓客专员</text>-->
-<!--						<text class="tag" v-if="item.tag == '1'">合作伙伴</text>-->
-<!--						<text class="tag" v-if="item.tag == '2'">推广人员</text>-->
-					</view>
-				</scroll-view>
-				<view class="confirmButton" @click="confirmRole">
-					<text>确定</text>
+					<u-icon name="close-circle" color="#666" size="35"></u-icon>
 				</view>
 			</view>
 		</uni-popup>
@@ -183,19 +80,11 @@
 		},
 		data() {
 			return {
-				qrCreateTime: '',
-				selectRoleIndex: 0, //正在选择的角色下标
-				confirmRoleIndex: 0, //当前选中的角色下标
-				roleList: [],
-				roleBindRuleList: [], //角色已经绑定的规则
-				roleNoBindRuleList: [], //角色没有绑定的规则
-				roleBindRuleParam: {},
-				value: 1,
-				qrcodeUrl: this.$tkUrl + '?roleId={roleId}&parentId={parentId}&timestamp={timestamp}&type=2&expand1=2',
+				qrcodeUrl:this.$xcxUrl+'?expandUserId={expandUserId}&ruleId={ruleId}&timestamp={timestamp}&type=2&expand1=2',
 				options: {
 					// 指定二维码前景,一般可在中间放logo
-					foregroundImagePadding: 2,
-					foregroundImageBorderRadius: 5,
+					foregroundImagePadding:2,
+					foregroundImageBorderRadius:5,
 					foregroundImageSrc: '/static/logo.png'
 				},
 			}
@@ -203,162 +92,17 @@
 		created() {
 			console.log('接收到的高度', this.height)
 			this.userInfo = uni.getStorageSync('spreadUserInfo')
-			this.getRoleList()
 		},
 		methods: {
-
 			formatDate() {
 				this.qrCreateTime = commonUtils.formatDate(new Date())
 			},
-
-			deleteRule(item) {
-
-				let that = this
-				uni.showModal({
-					title: '温馨提示',
-					content: '是否确认删除该规则!',
-					success: function(res) {
-						if (res.confirm) {
-							console.log('用户点击确定');
-							that.$api.service.cancelRoleBindRule({
-								roleId: that.roleList[that.confirmRoleIndex].id,
-								ruleIds: [item.id]
-							}).then(res => {
-								that.getRuleByRoleId(that.roleList[that.confirmRoleIndex].id)
-								that.getNewRules(that.roleList[that.confirmRoleIndex].id)
-							})
-						} else if (res.cancel) {
-							console.log('用户点击取消');
-						}
-					}
-				});
-
-
-			},
-
-			selectRule(item, index) {
-				console.log(item)
-				item.select = !item.select
-				this.$set(this.roleNoBindRuleList, index, item)
-			},
-
-			confirmAddRule() {
-				let ruleIds = []
-				for (const rule of this.roleNoBindRuleList) {
-					if (rule.select) {
-						ruleIds.push(rule.id)
-					}
-				}
-				if (ruleIds.length === 0) {
-					this.closePopup()
-					return
-				}
-				this.$api.service.roleBindRule({
-					roleId: this.roleList[this.confirmRoleIndex].id,
-					ruleIds: ruleIds
-				}).then(res => {
-					this.getRuleByRoleId(this.roleList[this.confirmRoleIndex].id)
-					this.getNewRules(this.roleList[this.confirmRoleIndex].id)
-				})
-				this.closePopup()
-			},
-
-			confirmRole() {
-				this.confirmRoleIndex = this.selectRoleIndex
-				this.getRuleByRoleId(this.roleList[this.confirmRoleIndex].id)
-				this.getNewRules(this.roleList[this.confirmRoleIndex].id)
-				this.closePopup()
-			},
-
-			popupChange(e) {
-				if (e.show) {
-					uni.hideTabBar()
-				}
-				if (!e.show) {
-					uni.showTabBar()
-				}
-			},
-			closePopup() {
-
-				this.$refs.rolePopup.close()
-				this.$refs.createQrCodePopup.close()
-				this.$refs.rulePopup.close()
-			},
-			selectRole() {
-				this.$refs.rolePopup.open()
-
-			},
-			createQrCode() {
-
-				if (!this.roleBindRuleList || this.roleBindRuleList.length === 0) {
-					uni.showToast({
-						icon: 'error',
-						duration: 3000,
-						title: '请先添加规则!'
-					});
-					return
-				}
-
-				let data = {
-					roleId: this.roleList[this.confirmRoleIndex].id,
-					parentId: this.userInfo.id,
-					timestamp: new Date().getTime() + (60 * 1000 * 60 * 24 * 365 * 10)
-				};
-				for (let key in data) {
-					let regexp = new RegExp("{" + key + "}"); // 构造正则表达式
-					this.qrcodeUrl = this.qrcodeUrl.replace(regexp, data[key]); // 执行替换操作
-				}
-				console.log('++++qrcodeUrl+++++', this.qrcodeUrl)
-				this.formatDate()
+			qrCodePopup(){
 				this.$refs.createQrCodePopup.open()
 			},
-			createQrCodePopupChange(e) {
-				console.log(e)
-				if (!e.show) {
-					this.qrcodeUrl = this.$tkUrl + '?roleId={roleId}&parentId={parentId}&timestamp={timestamp}&type=2&expand1=2'
-				}
-			},
-			addRule() {
-				this.$refs.rulePopup.open()
-			},
-			change(e) {
-				console.log("e:", e);
-			},
-			//查询规则
-			getRuleList() {
-				this.$api.service.getRuleList().then(res => {
-					console.log(res)
-					this.ruleList = res.data.data
-				})
-			},
-			//查询角色
-			getRoleList() {
-				this.$api.service.getRoleList().then(res => {
-					console.log(res)
-					this.roleList = res.data.data
-					this.getRuleByRoleId(this.roleList[this.confirmRoleIndex].id)
-					this.getNewRules(this.roleList[this.confirmRoleIndex].id)
-				})
-			},
-
-			//查询角色已经绑定的规则
-			getRuleByRoleId(roleId) {
-				this.$api.service.getRuleByRoleId({
-					roleId: roleId
-				}).then(res => {
-					this.roleBindRuleList = res.data.data
-				})
-			},
-
-			//查询角色没有绑定的规则
-			getNewRules(roleId) {
-				this.$api.service.getNewRules({
-					roleId: roleId
-				}).then(res => {
-					this.roleNoBindRuleList = res.data.data
-				})
-			},
-
+			closePopup(){
+				this.$refs.createQrCodePopup.close()
+			}
 
 		}
 	}

BIN
static/index/earningBg.png


BIN
static/index/indexbg.png


+ 2 - 0
uni_modules/uni-icons/changelog.md

@@ -1,3 +1,5 @@
+## 2.0.10(2024-06-07)
+- 优化 uni-app x 中,size 属性的类型
 ## 2.0.9(2024-01-12)
 fix: 修复图标大小默认值错误的问题
 ## 2.0.8(2023-12-14)

+ 81 - 81
uni_modules/uni-icons/components/uni-icons/uni-icons.uvue

@@ -1,91 +1,91 @@
 <template>
-	<text class="uni-icons" :style="styleObj">
-		<slot>{{unicode}}</slot>
-	</text>
+  <text class="uni-icons" :style="styleObj">
+    <slot>{{unicode}}</slot>
+  </text>
 </template>
 
 <script>
-	import { fontData, IconsDataItem } from './uniicons_file'
+  import { fontData, IconsDataItem } from './uniicons_file'
 
-	/**
-	 * Icons 图标
-	 * @description 用于展示 icon 图标
-	 * @tutorial https://ext.dcloud.net.cn/plugin?id=28
-	 * @property {Number} size 图标大小
-	 * @property {String} type 图标图案,参考示例
-	 * @property {String} color 图标颜色
-	 * @property {String} customPrefix 自定义图标
-	 * @event {Function} click 点击 Icon 触发事件
-	 */
-	export default {
-		name: "uni-icons",
-		props: {
-			type: {
-				type: String,
-				default: ''
-			},
-			color: {
-				type: String,
-				default: '#333333'
-			},
-			size: {
-				type: Object,
-				default: 16
-			},
-			fontFamily: {
-				type: String,
-				default: ''
-			}
-		},
-		data() {
-			return {};
-		},
-		computed: {
-			unicode() : string {
-				let codes = fontData.find((item : IconsDataItem) : boolean => { return item.font_class == this.type })
-				if (codes !== null) {
-					return codes.unicode
-				}
-				return ''
-			},
-			iconSize() : string {
-				const size = this.size
-				if (typeof size == 'string') {
-					const reg = /^[0-9]*$/g
-					return reg.test(size as string) ? '' + size + 'px' : '' + size;
-					// return '' + this.size
-				}
-				return this.getFontSize(size as number)
-			},
-			styleObj() : UTSJSONObject {
-				if (this.fontFamily !== '') {
-					return { color: this.color, fontSize: this.iconSize, fontFamily: this.fontFamily }
-				}
-				return { color: this.color, fontSize: this.iconSize }
-			}
-		},
-		created() { },
-		methods: {
-			/**
-			 * 字体大小
-			 */
-			getFontSize(size : number) : string {
-				return size + 'px';
-			},
-		},
-	}
+  /**
+   * Icons 图标
+   * @description 用于展示 icon 图标
+   * @tutorial https://ext.dcloud.net.cn/plugin?id=28
+   * @property {Number,String} size 图标大小
+   * @property {String} type 图标图案,参考示例
+   * @property {String} color 图标颜色
+   * @property {String} customPrefix 自定义图标
+   * @event {Function} click 点击 Icon 触发事件
+   */
+  export default {
+    name: "uni-icons",
+    props: {
+      type: {
+        type: String,
+        default: ''
+      },
+      color: {
+        type: String,
+        default: '#333333'
+      },
+      size: {
+        type: [Number, String],
+        default: 16
+      },
+      fontFamily: {
+        type: String,
+        default: ''
+      }
+    },
+    data() {
+      return {};
+    },
+    computed: {
+      unicode() : string {
+        let codes = fontData.find((item : IconsDataItem) : boolean => { return item.font_class == this.type })
+        if (codes !== null) {
+          return codes.unicode
+        }
+        return ''
+      },
+      iconSize() : string {
+        const size = this.size
+        if (typeof size == 'string') {
+          const reg = /^[0-9]*$/g
+          return reg.test(size as string) ? '' + size + 'px' : '' + size;
+          // return '' + this.size
+        }
+        return this.getFontSize(size as number)
+      },
+      styleObj() : UTSJSONObject {
+        if (this.fontFamily !== '') {
+          return { color: this.color, fontSize: this.iconSize, fontFamily: this.fontFamily }
+        }
+        return { color: this.color, fontSize: this.iconSize }
+      }
+    },
+    created() { },
+    methods: {
+      /**
+       * 字体大小
+       */
+      getFontSize(size : number) : string {
+        return size + 'px';
+      },
+    },
+  }
 </script>
 
 <style scoped>
-	@font-face {
-		font-family: UniIconsFontFamily;
-		src: url('./uniicons.ttf');
-	}
+  @font-face {
+    font-family: UniIconsFontFamily;
+    src: url('./uniicons.ttf');
+  }
 
-	.uni-icons {
-		font-family: UniIconsFontFamily;
-		font-size: 18px;
-		font-style: normal;
-		color: #333;
-	}
+  .uni-icons {
+    font-family: UniIconsFontFamily;
+    font-size: 18px;
+    font-style: normal;
+    color: #333;
+  }
 </style>

+ 3 - 2
uni_modules/uni-icons/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-icons",
   "displayName": "uni-icons 图标",
-  "version": "2.0.9",
+  "version": "2.0.10",
   "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
   "keywords": [
     "uni-ui",
@@ -42,7 +42,8 @@
     "platforms": {
       "cloud": {
         "tcb": "y",
-        "aliyun": "y"
+        "aliyun": "y",
+        "alipay": "n"
       },
       "client": {
         "App": {