lhl 1 سال پیش
والد
کامیت
f1f5937354
7فایلهای تغییر یافته به همراه97 افزوده شده و 48 حذف شده
  1. 12 12
      pages.json
  2. 11 2
      pages/index/index.vue
  3. 9 6
      pages/user/model/model.vue
  4. 1 1
      pages/user/model/modelrz.vue
  5. 52 20
      pages/user/model/phb.vue
  6. 12 7
      pages/user/shareQrCode.vue
  7. BIN
      static/img/phb.png

+ 12 - 12
pages.json

@@ -81,12 +81,12 @@
 					"navigationBarTitleText": "佣金明细"
 				}
 			},
-			{
-				"path": "award/withdrawal",
-				"style": {
-					"navigationBarTitleText": "提现"
-				}
-			},
+			// {
+			// 	"path": "award/withdrawal",
+			// 	"style": {
+			// 		"navigationBarTitleText": "提现"
+			// 	}
+			// },
 			{
 				"path": "money/pay",
 				"style": {
@@ -115,12 +115,12 @@
 					"navigationBarTitleText": "余额明细"
 				}
 			},
-			{
-				"path": "award/account",
-				"style": {
-					"navigationBarTitleText": "提现账号"
-				}
-			},
+			// {
+			// 	"path": "award/account",
+			// 	"style": {
+			// 		"navigationBarTitleText": "提现账号"
+			// 	}
+			// },
 			{
 				"path": "money/recharge",
 				"style": {

+ 11 - 2
pages/index/index.vue

@@ -44,7 +44,9 @@
 
 				</view>
 			</view>
-
+			<view class="banner" @click="navTo('/pages/user/model/phb')">
+				<image src="../../static/img/phb.png" mode="widthFix"></image>
+			</view>
 
 			<view class="title-box flex">
 				<!-- <view class="flex">
@@ -88,7 +90,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="title-box flex">
+			<view class="title-box flex"  v-if="jxList.length > 0">
 				<view class="flex">
 					<image class="hot margin-r-10" src="../../static/icon/hot.png" mode="scaleToFill"></image>
 					<view class="title">
@@ -616,4 +618,11 @@
 		flex-wrap: wrap;
 		padding: 30rpx 0;
 	}
+	.banner {
+		image {
+			width: 691rpx;
+			margin: auto;
+		}
+		padding: 20rpx 0;
+	}
 </style>

+ 9 - 6
pages/user/model/model.vue

@@ -115,9 +115,9 @@
 			//个人中心提交数据预览
 			if (this.type === 1) {
 				this.userTemplate = uni.getStorageSync('modeldata');
-				this.isDefault=false;
+				this.isDefault = false;
 				uni.setNavigationBarTitle({
-					title:'名片预览'
+					title: '名片预览'
 				})
 				return
 			}
@@ -174,7 +174,7 @@
 			let url = currentPage.route; //当前页面url
 			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
 			let shareObj = {}
-			console.log(url,'url');
+			console.log(url, 'url');
 			shareObj = {
 				title: this.userTemplate.name + '母婴界数字名片', // 默认是小程序的名称(可以写slogan等)
 				path: url + '?uid=' + this.shareId + '&mtype=' + this.mtype + '&type=2', // 默认是当前页面,必须是以‘/’开头的完整路径
@@ -356,7 +356,7 @@
 					that.modelInfo = res.data;
 					if (that.type == 0) {
 						uni.setNavigationBarTitle({
-							title:that.modelInfo.title
+							title: that.modelInfo.title
 						})
 						that.shareNumber = res.data.look_count
 					}
@@ -371,7 +371,9 @@
 					let arr = []
 					let basearr = res.data.service_area_all
 					basearr.forEach(item => {
-						arr.push(item[0].name + item[1].name + item[2].name)
+						if(item.length == 3) {
+							arr.push(item[0].name + item[1].name + item[2].name)
+						}
 					})
 					res.data.service_area_all = arr
 					// 保存用户模板数据
@@ -699,7 +701,7 @@
 
 	.fxmp {
 		width: 750rpx;
-		
+
 		.share {
 			width: 50%;
 			padding: 0;
@@ -708,6 +710,7 @@
 			background-color: $base-color;
 			color: #fff;
 			font-size: 32rpx;
+
 			&::after {
 				border: none;
 			}

+ 1 - 1
pages/user/model/modelrz.vue

@@ -146,7 +146,7 @@
 						<text class="font-color-red font-size-sm">✲</text><text class="title">服务次数</text>
 					</view>
 					<view class="right flex">
-						<input class="input" v-model="updata.service_count" type="number" placeholder="请输入最低收费价"
+						<input class="input" v-model="updata.service_count" type="number" placeholder="请输入已经服务的数量"
 							placeholder-class="placeholder" />
 					</view>
 				</view>

+ 52 - 20
pages/user/model/phb.vue

@@ -8,63 +8,68 @@
 		</view>
 		<image :src="top_bg" mode="" class="top-bg"></image>
 		<view class="bd-wrap flex">
-			<view class="bd">
+			
+			<view class="bd" v-if="showList.length > 0">
 				<image :src="tit_bg" mode="widthFix" class="bd-tit"></image>
 				<view class="bd-top flex">
-					<view class="top-item">
+					<view class="top-item" @click="navTo('/pages/user/model/model?uid=' + showList[1].auth_info.uid + '&type=2&mtype=1')">
 						<view class="top-logo yp">
-							<image src="" mode=""></image>
+							<image :src="showList[1].auth_info.avatar" mode=""></image>
 						</view>
 						<view class="top-name">
-							李小图
+							{{showList[1].auth_info.name || ''}}
 						</view>
 						<view class="top-visit">
-							86.4W
+							{{showList[1].card_look_count || '0'}}
 						</view>
 					</view>
-					<view class="top-item-center">
+					<view class="top-item-center" @click="navTo('/pages/user/model/model?uid=' + showList[0].auth_info.uid + '&type=2&mtype=1')">
 						<view class="top-logo  jp">
-							<image src="" mode=""></image>
+							<image :src="showList[0].auth_info.avatar" mode=""></image>
 						</view>
 						<view class="top-name">
+							{{showList[0].auth_info.name || ''}}
 						</view>
 						<view class="top-visit">
-							86.4W
+							{{showList[0].card_look_count || '0'}}
 						</view>
 					</view>
-					<view class="top-item">
+					<view class="top-item" @click="navTo('/pages/user/model/model?uid=' + showList[2].auth_info.uid + '&type=2&mtype=1')">
 						<view class="top-logo tp">
-							<image src="" mode=""></image>
+							<image :src="showList[2].auth_info.avatar" mode=""></image>
 						</view>
 						<view class="top-name">
-							李小图
+							{{showList[2].auth_info.name || ''}}
 						</view>
 						<view class="top-visit">
-							86.4W
+							{{showList[2].card_look_count || '0'}}
 						</view>
 					</view>
 				</view>
-				<view class="bd-btm-item flex" v-for="item in 3">
-					<image src="" mode="" class="item-img"></image>
+				<view class="bd-btm-item flex" v-for="(item,index) in showList" v-if="(index != 0 && index != 1 && index!= 2)" :key="index"  @click="navTo('/pages/user/model/model?uid=' + item.auth_info.uid + '&type=2&mtype=1')">
+					<image :src="item.auth_info.avatar" mode="" class="item-img"></image>
 					<view class="flex item-info">
 						<view class="item-name">
-							杨阿姨 <image :src="rz" mode=""></image>
+							{{item.auth_info.name || ''}} <image :src="rz" mode="" v-if="item.is_type_audit == 1"></image>
 						</view>
 						<view class="item-zy">
-							育儿嫂
-						</view>
-						<view class="item-where">
-							48岁 丨 甘肃人
+							{{item.user_work_type_id || ''}}
 						</view>
+						<!-- <view class="item-where">
+							48岁 
+						</view> -->
 						<view class="" style="flex-grow: 1;">
 							
 						</view>
 						<view class="item-vist">
-							浏览量:2362
+							浏览量:{{item.card_look_count || '0'}}
 						</view>
 					</view>
 				</view>
 			</view>
+			<view class="bd bd-no" v-else>
+				暂无榜单数据
+			</view>
 		</view>
 		<view class="" style="height: 60rpx;">
 
@@ -111,6 +116,11 @@
 		},
 		onReady() {
 
+		},
+		computed: {
+			showList() {
+				return this.navList[this.currentIndex].list
+			}
 		},
 		methods: {
 			navClick(index) {
@@ -133,6 +143,23 @@
 				}).catch(err => {
 					navitem.loaded = false
 				})
+			},
+			navTo(url) {
+				console.log(url);
+				if (url) {
+					if (url.indexOf('http') > -1) {
+						// #ifdef H5
+						window.location.href = url
+						// #endif
+						// #ifdef APP
+						plus.runtime.openURL(url)
+						// #endif
+					} else {
+						uni.navigateTo({
+							url: url
+						})
+					}
+				}
 			}
 			
 		}
@@ -350,4 +377,9 @@
 			}
 		}
 	}
+	.bd-no {
+		height: 500rpx;
+		text-align: center;
+		line-height: 500rpx;
+	}
 </style>

+ 12 - 7
pages/user/shareQrCode.vue

@@ -73,7 +73,7 @@
 			this.loadData();
 		},
 		computed: {
-			...mapState(['userInfo']),
+			...mapState('user',['userInfo']),
 		},
 		methods: {
 			bindchange(e) {
@@ -259,15 +259,20 @@
 						ctx.fillRect(0, 0, this.canvasW, this.canvasH) // fillRect(x,y,宽度,高度)
 			
 						// 绘制商品主图,二维码
-						ctx.drawImage(this.goodsImg.path, 0, 0, this.canvasW, this
-							.canvasH) // drawImage(图片路径,x,y,绘制图像的宽度,绘制图像的高度)
-							ctx.drawImage(this.ewmImg.path, (this.canvasW / 2 - this.ewmW / 2),this.canvasH - 85*this.ratio - this.ewmW,
-								this.ewmW, this.ewmW) // drawImage(图片路径,x,y,绘制图像的宽度,绘制图像的高度,二维码的宽,高)
-						
+						ctx.drawImage(this.goodsImg.path, 0, 0, this.canvasW, this.canvasH) // drawImage(图片路径,x,y,绘制图像的宽度,绘制图像的高度)
+						// ctx.drawImage(this.ewmImg.path, (this.canvasW / 2 - this.ewmW / 2),this.canvasH - 85*this.ratio - this.ewmW, this.ewmW, this.ewmW) // drawImage(图片路径,x,y,绘制图像的宽度,绘制图像的高度,二维码的宽,高)
+						ctx.drawImage(this.ewmImg.path,40*this.ratio,this.canvasH - 50*this.ratio - this.ewmW, this.ewmW, this.ewmW)
 			
 						// 3、绘制商品标题,多余文字自动换行
 						ctx.setFontSize(16); // setFontSize() 设置字体字号
-						ctx.setFillStyle('#333'); // setFillStyle() 设置字体颜色
+						ctx.setFillStyle('#555'); // setFillStyle() 设置字体颜色
+						let name = this.userInfo.nickname
+						let len = 8
+						if(name.length > len) {
+							name = name.substr(0,len) + '...'
+						}
+						ctx .fillText(name, 100*this.ratio + this.ewmW,this.canvasH- this.ewmW/2 - 80*this.ratio)
+						ctx .fillText('邀请您加入母婴严选', 100*this.ratio + this.ewmW,this.canvasH- this.ewmW/2  -16*this.ratio)
 						ctx.draw(false, (ret) => { // draw方法 把以上内容画到 canvas 中。
 							console.log(ret)
 							uni.showToast({

BIN
static/img/phb.png