lhl 2 سال پیش
والد
کامیت
7fc40ca45b

BIN
baseInfo/certificate.cer


+ 3 - 3
manifest.json

@@ -1,9 +1,9 @@
 {
     "name" : "精联惠选",
-    "appid" : "__UNI__53EB06E",
+    "appid" : "__UNI__991D0D9",
     "description" : "精联惠选",
-    "versionName" : "1.0.2",
-    "versionCode" : 102,
+    "versionName" : "1.0.3",
+    "versionCode" : 103,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */

+ 23 - 2
pages.json

@@ -19,6 +19,12 @@
 				"navigationBarTitleText": "开发中"
 			}
 		},
+		{
+			"path": "pages/index/zero",
+			"style": {
+				"navigationBarTitleText": "零撸板块"
+			}
+		},
 		{
 			"path": "pages/index/usert",
 			"style": {
@@ -32,6 +38,21 @@
 				"navigationBarTitleText": "更新"
 			}
 		},
+		{
+			"path": "pages/index/gift",
+			"style": {
+				"enablePullDownRefresh": true,
+				"navigationBarTitleText": "VIP商品"
+			}
+		},
+		{
+			"path": "pages/zero/task",
+			"style": {
+				"navigationBarTitleText": "做任务赚积分",
+				"navigationBarTextStyle": "white",
+				"navigationBarBackgroundColor": "#282623"
+			}
+		},
 		{
 			"path": "pages/public/register",
 			"style": {
@@ -433,10 +454,10 @@
 				"text": "我的薪酬"
 			},
 			// {
-			// 	"pagePath": "pages/cart/cart",
+			// 	"pagePath": "pages/index/zero",
 			// 	"iconPath": "static/tabBar/cart.png",
 			// 	"selectedIconPath": "static/tabBar/cart-action.png",
-			// 	"text": "购物车"
+			// 	"text": "零撸板块"
 			// },
 			{
 				"pagePath": "pages/user/user",

+ 145 - 0
pages/index/gift.vue

@@ -0,0 +1,145 @@
+<template>
+	<view class="hot-list">
+		<view class="good" v-for="item in goodList" @click="navto('/pages/product/product?id=' + item.id)">
+			<image :src="item.image" mode="" class="good-img"></image>
+			<view class="good-tit">
+				{{item.store_name}}
+			</view>
+			<view class="good-cz flex">
+				<view class="price">
+					<text class="xy">¥</text> <text>{{item.price}}</text><text class="old-price">¥{{item.ot_price}}</text>
+				</view>
+				<view class="cz-btn">
+					立即抢购
+				</view>
+			</view>
+		</view>
+		<uni-load-more :status="loadingType"></uni-load-more>
+	</view>
+</template>
+
+<script>
+	import {
+		getBargainList,
+		getProducts,
+		goodsDetail,
+		poster
+	} from '@/api/product.js';
+	export default {
+		data() {
+			return {
+				goodList: [], //商品列表
+				loadingType: 'more',
+				page: 1,
+				limit: 10
+			}
+		},
+		onShow() {
+			this.getGoodList()
+		},
+		onReachBottom() {
+			this.getGoodList()
+		},
+		onPullDownRefresh() {
+			this.getGoodList('down')
+		},
+		methods: {
+			navto(url) {
+				uni.navigateTo({
+					url,
+					fail() {
+						uni.switchTab({
+							url
+						})
+					}
+				})
+			
+			},
+			getGoodList(type) {
+				let obj = this
+				if(type == 'down') {
+					obj.loadingType = 'more'
+					obj.page = 1
+				}
+				if (obj.loadingType == 'loading' || obj.loadingType == 'noMore') {
+					return
+				}
+				obj.loadingType = 'loading'
+				getProducts({
+					is_pack: 1,
+					page: obj.page,
+					limit:obj.limit,
+				}).then(res => {
+					if(type == 'down') {
+						obj.goodList = []
+						uni.stopPullDownRefresh();
+					}
+					obj.goodList = obj.goodList.concat(res.data)
+					if (obj.limit == res.data.length) {
+						obj.loadingType = 'more'
+						obj.page++
+					} else {
+						obj.loadingType = 'noMore'
+					}
+					
+				}).catch(err => {
+					obj.loadingType = 'more'
+					uni.stopPullDownRefresh();
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.hot-list {
+		// margin-top: -70rpx;
+		padding-top: 20rpx;
+		.good {
+			width: 704rpx;
+			background: #FFFFFF;
+			border-radius: 20rpx;
+			margin:0 auto 30rpx;
+			.good-img {
+				width: 704rpx;
+				height: 330rpx;
+				background: #D4D4E1;
+				border-radius: 20rpx 20rpx 0rpx 0rpx;
+			}
+			.good-tit {
+				padding:10rpx 20rpx;
+				font-size: 30rpx;
+				font-weight: bold;
+				color: #000000;
+			}
+			.good-cz {
+				padding: 0 20rpx 23rpx 23rpx;
+				.price {
+					font-size: 42rpx;
+					font-weight: bold;
+					color: $base-color;
+					.xy {
+						font-size: 24rpx;
+					}
+					.old-price {
+						font-size: 26rpx;
+						font-weight: 500;
+						text-decoration: line-through;
+						color: #999999;
+						margin-left: 18rpx;
+					}
+				}
+				.cz-btn {
+					width: 172rpx;
+					line-height: 60rpx;
+					background: $base-color;
+					border-radius: 10rpx;
+					font-size: 26rpx;
+					font-weight: 500;
+					color: #FFFFFF;
+					text-align: center;
+				}
+			}
+		}
+	}
+</style>

+ 23 - 4
pages/index/index.vue

@@ -30,10 +30,10 @@
 		</view>
 		<!-- 分类 ed -->
 		<view class="jg">
-
 		</view>
+		<video src="../../static/video/v1.mp4" controls class="gsjs" autoplay muted="muted"></video>
 		<!-- 商品列表 start -->
-		<view class="hot-wrap">
+		<!-- <view class="hot-wrap">
 			<view class="hot-top flex">
 				<image src="../../static/icon/hhh.png" mode=""></image>
 				<view class="">
@@ -56,7 +56,8 @@
 					</view>
 				</view>
 			</view>
-		</view>
+		</view> -->
+		
 		<!-- 商品列表 ed-->
 		<uni-popup ref="popupkf" type="center">
 			<view class="popup-box">
@@ -111,9 +112,15 @@
 	export default {
 		data() {
 			return {
+				// #ifdef APP-PLUS
+				muted: false,
+				// #endif
+				// #ifdef H5
+				muted: true,
+				// #endif
 				cateList: [
 					{
-						path: '',
+						path: '/pages/index/gift',
 						img: '../../static/icon/inx1.png',
 						tit: 'VIP商品'
 					},
@@ -260,6 +267,15 @@
 					uni.navigateTo({
 						url: '/pages/index/dkf'
 					})
+				}else {
+					uni.navigateTo({
+						url: path,
+						fail() {
+							uni.switchTab({
+								url:path
+							})
+						}
+					})
 				}
 			},
  			getGoodList() {
@@ -716,4 +732,7 @@
 		top: 0;
 		width: 100%;
 	}
+	.gsjs {
+		width: 100%;
+	}
 </style>

+ 287 - 0
pages/index/zero.vue

@@ -0,0 +1,287 @@
+<template>
+	<view class="">
+		<view class="flex center-box ">
+			<view class="flex center-item" @click="navto('/pages/user/xzdl?type=2')">
+				<view class="val">
+					1000
+				</view>
+				<view class="name">我的消费包</view>
+			</view>
+			<view class="line">
+			</view>
+			<view class="flex center-item" @click="navto('/pages/user/xzdl?type=1')">
+				<view class="val">
+					1000
+				</view>
+				<view class="name">我的共富值</view>
+			</view>
+			<view class="line">
+			</view>
+			<view class="flex center-item" @click="toTx">
+				<view class="val">
+					1000
+				</view>
+				<view class="name">我的通证</view>
+			</view>
+		</view>
+		<view class="flex banne">
+			<image src="../../static/img/zjf.png" mode="" @click="navto('/pages/zero/task')"></image>
+			<image src="../../static/img/yj.png" mode="" @click="navto('/pages/zero/task')"></image>
+		</view>
+		<view class="flex nav">
+			<view class="nav-item" v-for="(item,index) in navList" :class="{'action': current == index}"
+				@click="changeTab(index)">
+				{{item.tit}}
+			</view>
+		</view>
+		<swiper disable-touch :current="current"  class="list-wrap" :style="{'height': maxHeight}">
+			<swiper-item :style="{'height': maxHeight}" v-for="item in navList">
+				<scroll-view scroll-y="true"  class="" :style="{'height': maxHeight}">
+					<view class="card-wrap flex" v-for="item in 10">
+						<image src="" mode="" class="card-img"></image>
+						<view class="flex card-info">
+							<view class="name clamp2">
+								普通卡
+							</view>
+							<view class="">
+								价值1持包值
+							</view>
+							<view class="price">
+								<image src="../../static/icon/ydjf.png" mode=""></image>
+								<text>100</text> 阅读积分
+							</view>
+						</view>
+						<view class="card-btn">
+							立即兑换
+						</view>
+					</view>
+					<uni-load-more :status="item.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+		
+	</view>
+</template>
+
+<script>
+	import {
+		saveUrl,
+		interceptor
+	} from '@/utils/loginUtils.js';
+	import {
+		getUserInfo,
+		userPool,
+		goft
+	} from '@/api/user.js';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				maxHeight: '',
+				current: 0,
+				navList: [{
+						tit: '消费包',
+						list: [],
+						loadingType: 'more',
+						loaded: false,
+						page: 1,
+						limit: 10,
+					},
+					{
+						tit: '阅读积分交易',
+						list: [],
+						loadingType: 'more',
+						loaded: false,
+						page: 1,
+						limit: 10,
+					}
+				]
+			}
+		},
+		onLoad() {
+
+		},
+		onShow() {
+
+		},
+		computed: {
+			...mapState('user',['userInfo','hasLogin'])
+		},
+		onReady(res) {
+			var that = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.list-wrap').boundingClientRect();
+					query.exec(function(res) {
+						that.maxHeight = resu.windowHeight - res[0].top + 'px';
+						console.log(that.maxHeight);
+					});
+				},
+				fail: res => {}
+			});
+			
+		},
+		methods: {
+			changeTab(index) {
+				this.current = index
+				this.getList('tab')
+			},
+			getList(type) {
+
+			},
+			navto(url) {
+				
+				if (!this.hasLogin) {
+					// 保存地址
+					saveUrl();
+					// 登录拦截
+					interceptor();
+				} else {
+					uni.navigateTo({
+						url,
+						 fail() {
+						 	uni.switchTab({
+						 		url
+						 	})
+						 }
+					})
+				}
+				
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.center-box {
+		width: 693rpx;
+		height: 152rpx;
+		background: #FFFFFF;
+		box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
+		border-radius: 20rpx;
+		margin: 0 auto;
+		font-size: 30rpx;
+		font-weight: bold;
+		color: #333333;
+
+		.center-item {
+			flex-grow: 1;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+
+			.val {
+				font-size: 38rpx;
+				font-weight: bold;
+				color: #333333;
+			}
+
+			.name {
+				padding-top: 10rpx;
+			}
+		}
+
+		.line {
+			width: 2rpx;
+			height: 74rpx;
+			background: #eff1f5;
+		}
+	}
+
+	.banne {
+		justify-content: center;
+		padding: 20rpx 0;
+
+		image {
+			width: 340rpx;
+			height: 204rpx;
+			margin: 0 8rpx;
+		}
+	}
+
+	.nav {
+		padding: 30rpx 0;
+
+		.nav-item {
+			flex-grow: 1;
+			text-align: center;
+			font-size: 34rpx;
+			font-weight: bold;
+			color: #333333;
+		}
+
+		.action {
+			color: #FF4C4C;
+		}
+	}
+	.list-wrap {
+		// background-color: red;
+		.card-wrap {
+			width: 690rpx;
+			height: 197rpx;
+			background: #FFFFFF;
+			border-radius: 10rpx;
+			margin: 0 auto 20rpx;
+			padding: 20rpx;
+			justify-content: flex-start;
+			.card-img {
+				flex-shrink: 0;
+				width: 158rpx;
+				height: 158rpx;
+				background-color: #eee;
+				margin-right: 20rpx;
+			}
+			.card-info {
+				flex-grow: 1;
+				font-size: 24rpx;
+				font-weight: 500;
+				height: 100%;
+				color: #999999;
+				flex-direction: column;
+				justify-content: space-between;
+				align-items: flex-start;
+				
+				.name {
+					font-size: 32rpx;
+					font-weight: bold;
+					color: #333333;
+				}
+				.price {
+					font-size: 20rpx;
+					font-weight: 500;
+					color: #FC4141;
+					line-height: 35rpx;
+					image {
+						width: 34rpx;
+						height: 33rpx;
+						vertical-align:bottom;
+					}
+					text {
+						font-size: 36rpx;
+						font-weight: bold;
+						color: #FC4141;
+						vertical-align:bottom;
+						padding: 0 5rpx;
+					}
+				}
+			}
+			.card-btn {
+				flex-shrink: 0;
+				width: 137rpx;
+				height: 52rpx;
+				background: #ff4c4c;
+				border-radius: 26rpx;
+				font-size: 26rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+				text-align: center;
+				line-height: 50rpx;
+				align-self: flex-end;
+			}
+		}
+	}
+</style>

+ 1 - 1
pages/user/withdrawal.vue

@@ -243,7 +243,7 @@
 				}
 				if (this.type == 'bank') {
 					console.log('bank');
-					data.name = this.bankInfo.name;
+					data.name = this.bankInfo.fullname;
 					data.bankname = this.bankInfo.bank + this.bankInfo.subbranch;
 					data.cardnum = this.bankInfo.bankno;
 				}

+ 251 - 0
pages/zero/task.vue

@@ -0,0 +1,251 @@
+<template>
+	<view class="">
+		<view class="top-wrap">
+			<view class="user-calling">
+				<view class="calling">
+					<!-- <image src="../../static/img/calling.png" mode="" class="calling-img"></image> -->
+				</view>
+			</view>
+		</view>
+		<view class="flex banne">
+			<image src="../../static/img/jfc.png" mode="" @click="navto('/pages/zero/task')"></image>
+			<image src="../../static/img/scjf.png" mode="" @click="navto('/pages/zero/task')"></image>
+		</view>
+		<view class="gg-wrap flex">
+			<image src="../../static/icon/jiang.png" mode=""></image>
+			<view class="gg-tit">
+				<view class="tit">
+					观看视频赚阅读积分
+				</view>
+				<view class="">
+					观看可获得阅读积分
+				</view>
+			</view>
+			<view class="gg-btn">
+				去观看
+			</view>
+		</view>
+		<view class="bottom-list" v-for="key in navList">
+			<view class="flex list-item">
+				<view class="logo-wrap" :style="{'background-color': key.bgc}">
+					<image :src="key.img" mode="" class="logo"></image>
+				</view>
+				
+				<view class="much">
+					<view class="">
+						{{key.name}}
+					</view>
+					<view class="val">
+						余额:{{userInfo[key.val]*1 || '0'}}
+					</view>
+				</view>
+				<view class="btn" v-if="key.agent" @click="goft">
+					复投
+				</view>
+				<view class="more" @click="navto('/pages/user/sz?type=' + key.type)">
+					查看明细
+				</view>
+				<image src="../../static/icon/back.png" mode="" class="black"></image>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				navList: [{
+						name: '阅读积分',
+						val: 'resumption',
+						type: 1,
+						agent: true,
+						img: '../../static/icon/task1.png',
+						bgc: '#fef2f2'
+					},
+					{
+						name: '通证',
+						val: 'brokerage_price',
+						type: 2,
+						agent: false,
+						img: '../../static/icon/task2.png',
+						bgc: '#fcf7e3'
+					},
+					{
+						name: '商场积分',
+						val: 'max_pool',
+						type: 3,
+						agent: false,
+						img: '../../static/icon/task3.png',
+						bgc: '#f7ecfc'
+					},
+				]
+			}
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'hasLogin'])
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		background-color: #fff;
+		min-height: 100%;
+
+	}
+
+	.top-wrap {
+		// height: 260rpx;
+		padding-top: 220rpx;
+		background-color: #282623;
+
+	}
+
+	.user-calling {
+		height: 115rpx;
+		border-radius: 50rpx 50rpx 0 0;
+		background-color: #fff;
+		position: relative;
+	}
+
+	.calling {
+		width: 720rpx;
+		height: 190rpx;
+		position: absolute;
+		left: 0;
+		right: 0;
+		top: -110rpx;
+		background-image: url('../../static/img/calling.png');
+		background-size: contain;
+		margin: auto;
+		// .calling-img {
+		// 	width: 100%;
+		// 	height: 100%;
+		// }
+	}
+
+	.banne {
+		justify-content: center;
+		padding: 20rpx 0;
+		background-color: #fff;
+
+		image {
+			width: 340rpx;
+			height: 204rpx;
+			margin: 0 8rpx;
+		}
+	}
+
+	.bottom-list {
+		.list-item {
+			width: 670rpx;
+			height: 131rpx;
+			// background-color: red;
+			border-bottom: 1px solid #E8E8E8;
+
+			margin: auto;
+			.logo-wrap {
+				width: 81rpx;
+				height: 81rpx;
+				border-radius: 50%;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				.logo {
+					width: 40rpx;
+					height: 40rpx;
+				}
+			}
+			
+
+			.much {
+				padding-left: 14rpx;
+				flex-grow: 1;
+				font-size: 30rpx;
+				font-weight: bold;
+				color: #333333;
+
+				.val {
+					padding-top: 15rpx;
+					font-size: 22rpx;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+
+			.btn {
+				width: 127rpx;
+				height: 52rpx;
+				border: 2px solid #ff5050;
+				border-radius: 26rpx;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				font-size: 26rpx;
+				font-weight: 500;
+				color: #ff5050;
+				margin-right: 24rpx;
+			}
+
+			.more {
+				font-size: 24rpx;
+				font-weight: 500;
+				color: #999999;
+				padding-right: 14rpx;
+			}
+
+			.black {
+				width: 16rpx;
+				height: 27rpx;
+			}
+		}
+	}
+	.gg-wrap {
+		width: 702rpx;
+		height: 140rpx;
+		background: #FEFEFE;
+		box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(231,71,68,0.09);
+		border-radius: 4rpx;
+		margin: 20rpx auto;
+		padding: 30rpx 40rpx 40rpx 90rpx;
+		position: relative;
+		image {
+			position: absolute;
+			top: 0;
+			left: 26rpx;
+			width: 45rpx;
+			height: 60rpx;
+			
+		}
+		.gg-tit {
+			font-size: 24rpx;
+			font-weight: 500;
+			color: #999999;
+			.tit {
+				padding-bottom: 20rpx;
+				font-size: 32rpx;
+				font-weight: bold;
+				color: #333333;
+			}
+		}
+		.gg-btn {
+			width: 125rpx;
+			height: 46rpx;
+			background: linear-gradient(60deg, #FF8F3B, #FF3106);
+			border-radius: 23rpx;
+			font-size: 24rpx;
+			font-weight: 500;
+			color: #FFFFFF;
+			text-align: center;
+			line-height: 45rpx;
+		}
+	}
+</style>

BIN
static/icon/jiang.png


BIN
static/icon/task1.png


BIN
static/icon/task2.png


BIN
static/icon/task3.png


BIN
static/icon/ydjf.png


BIN
static/img/calling.png


BIN
static/img/jfc.png


BIN
static/img/scjf.png


BIN
static/img/yj.png


BIN
static/img/zjf.png


BIN
static/video/v1.mp4