lhl 1 year ago
parent
commit
c5d50c3266

+ 88 - 0
api/zero.js

@@ -0,0 +1,88 @@
+import request from "@/utils/request.js";
+
+export function getCardList() {
+	return request({
+		url: '/api/pass/card',
+		method: 'get'
+	});
+}
+
+//pass/create
+export function createPass(data) {
+	return request({
+		url: '/api/pass/create',
+		method: 'post',
+		data
+	});
+}
+
+//获取广告信息
+export function getGG() {
+	// browse/data
+	return request({
+		url: '/api/browse/data',
+		method: 'get'
+	});
+}
+
+//browse/create
+export function createGG(data) {
+	// browse/data
+	return request({
+		url: '/api/browse/create',
+		method: 'get',
+		data
+	});
+}
+
+//广告生效
+export function ggGive(data) {
+	return request({
+		url: '/api/browse/valid',
+		method: 'post',
+		data
+	});
+}
+
+//挂售
+export function createGs(data) {
+	return request({
+		url: '/api/transaction/create',
+		method: 'post',
+		data
+	});
+}
+
+//挂售列表
+export function getGsList(data) {
+	return request({
+		url: '/api/pass/transaction',
+		method: 'get',
+		data
+	});
+}
+
+//
+export function passUser(data) {
+	return request({
+		url: '/api/pass/user',
+		method: 'get',
+		data
+	});
+}
+
+export function tradeMoney(data) {
+	return request({
+		url: '/api/pass/trade_money',
+		method: 'post',
+		data
+	});
+}
+
+export function passLst(data) {
+	return request({
+		url: '/api/pass/lst',
+		method: 'get',
+		data
+	});
+}

+ 5 - 4
manifest.json

@@ -2,8 +2,8 @@
     "name" : "精联惠选",
     "appid" : "__UNI__991D0D9",
     "description" : "精联惠选",
-    "versionName" : "1.0.3",
-    "versionCode" : 103,
+    "versionName" : "1.0.4",
+    "versionCode" : 104,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */
@@ -16,7 +16,8 @@
         },
         "modules" : {
             "Barcode" : {},
-            "Camera" : {}
+            "Camera" : {},
+            "VideoPlayer" : {}
         },
         /* 模块配置 */
         "distribute" : {
@@ -103,7 +104,7 @@
         "title" : "精联惠选",
         "domain" : "",
         "router" : {
-            "base" : "/index/",
+            "base" : "/test/",
             "mode" : "hash"
         },
         "devServer" : {

+ 54 - 7
pages.json

@@ -22,7 +22,7 @@
 		{
 			"path": "pages/index/zero",
 			"style": {
-				"navigationBarTitleText": "零撸板块"
+				"navigationBarTitleText": "零创业"
 			}
 		},
 		{
@@ -53,6 +53,53 @@
 				"navigationBarBackgroundColor": "#282623"
 			}
 		},
+		{
+			"path": "pages/zero/ren",
+			"style": {
+				"navigationBarTitleText": "视频任务",
+				"navigationBarTextStyle": "white",
+				"navigationBarBackgroundColor": "#f53935"
+			}
+		},
+		{
+			"path": "pages/zero/gs",
+			"style": {
+				"navigationBarTitleText": "挂售"
+			}
+		},
+		{
+			"path": "pages/zero/award",
+			"style": {
+				"navigationBarTitleText": "",
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/zero/gg",
+			"style": {
+				"navigationBarTitleText": "视频",
+				"navigationBarTextStyle": "white",
+				"navigationBarBackgroundColor": "#000000"
+			}
+		},
+		{
+			"path": "pages/zero/chou",
+			"style": {
+				"navigationBarTitleText": "摇奖"
+			}
+		},
+		{
+			"path": "pages/zero/jfhz",
+			"style": {
+				"navigationBarTitleText": "兑换阅读积分"
+			}
+		},
+		{
+			"path": "pages/zero/gfz",
+			"style": {
+				"navigationBarTitleText": "共富值"
+			}
+		},
 		{
 			"path": "pages/public/register",
 			"style": {
@@ -453,12 +500,12 @@
 				"selectedIconPath": "static/tabBar/xc-action.png",
 				"text": "我的薪酬"
 			},
-			// {
-			// 	"pagePath": "pages/index/zero",
-			// 	"iconPath": "static/tabBar/cart.png",
-			// 	"selectedIconPath": "static/tabBar/cart-action.png",
-			// 	"text": "零撸板块"
-			// },
+			{
+				"pagePath": "pages/index/zero",
+				"iconPath": "static/tabBar/ll.png",
+				"selectedIconPath": "static/tabBar/ll-action.png",
+				"text": "零创业"
+			},
 			{
 				"pagePath": "pages/user/user",
 				"iconPath": "static/tabBar/user.png",

+ 65 - 23
pages/index/gift.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="hot-list">
+		<empty v-if="loaded && goodList.length == 0"></empty>
 		<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">
@@ -14,28 +15,43 @@
 				</view>
 			</view>
 		</view>
-		<uni-load-more :status="loadingType"></uni-load-more>
+		<uni-load-more :status="loadingType" v-if="!(loaded && goodList.length == 0)"></uni-load-more>
 	</view>
 </template>
 
 <script>
+	import empty from '@/components/empty.vue'
 	import {
 		getBargainList,
 		getProducts,
 		goodsDetail,
-		poster
+		poster,
 	} from '@/api/product.js';
 	export default {
+		components: {
+			empty
+		},
 		data() {
 			return {
 				goodList: [], //商品列表
 				loadingType: 'more',
 				page: 1,
-				limit: 10
+				limit: 10,
+				type: 0,
+				loaded: false
 			}
 		},
-		onShow() {
+		onLoad(opt) {
+			if(opt.type) {
+				this.type = opt.type
+				uni.setNavigationBarTitle({
+					title: opt.tit
+				})
+			}
 			this.getGoodList()
+		},
+		onShow() {
+			
 		},
 		onReachBottom() {
 			this.getGoodList()
@@ -65,27 +81,53 @@
 					return
 				}
 				obj.loadingType = 'loading'
-				getProducts({
-					is_pack: 1,
-					page: obj.page,
-					limit:obj.limit,
-				}).then(res => {
-					if(type == 'down') {
-						obj.goodList = []
+				if(obj.type) {
+					getProducts({
+						page: obj.page,
+						limit:obj.limit,
+						cid: obj.type
+					}).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'
+						}
+						obj.loaded = true
+					}).catch(err => {
+						obj.loadingType = 'more'
 						uni.stopPullDownRefresh();
-					}
-					obj.goodList = obj.goodList.concat(res.data)
-					if (obj.limit == res.data.length) {
+					})
+				}else {
+					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'
+						}
+						obj.loaded = true
+						
+					}).catch(err => {
 						obj.loadingType = 'more'
-						obj.page++
-					} else {
-						obj.loadingType = 'noMore'
-					}
-					
-				}).catch(err => {
-					obj.loadingType = 'more'
-					uni.stopPullDownRefresh();
-				})
+						uni.stopPullDownRefresh();
+					})
+				}
+				
 			},
 		}
 	}

+ 15 - 15
pages/index/index.vue

@@ -21,7 +21,7 @@
 		<!-- 轮播图 end -->
 		<!-- 分类 start -->
 		<view class="cate-section flex">
-			<view class="cate-item flex"  v-for="citem in cateList" @click="gogogo(citem.path)">
+			<view class="cate-item flex"  v-for="citem in cateList" @click="gogogo(citem)">
 				<view class="img-wrapper flex">
 					<image :src="citem.img" mode=""></image>
 				</view>
@@ -125,37 +125,37 @@
 						tit: 'VIP商品'
 					},
 					{
-						path: '',
+						path: '/pages/index/gift?type=9',
 						img: '../../static/icon/inx2.png',
 						tit: '零创业'
 					},
 					{
-						path: '',
+						path: '/pages/index/gift?type=10',
 						img: '../../static/icon/inx3.png',
 						tit: '普惠商城'
 					},
 					{
-						path: '',
+						path: '/pages/index/gift?type=11',
 						img: '../../static/icon/inx4.png',
 						tit: '第三方商城'
 					},
 					{
-						path: '',
+						path: '/pages/index/gift?type=12',
 						img: '../../static/icon/inx5.png',
 						tit: '本地生活'
 					},
 					{
-						path: '',
+						path: '/pages/index/gift?type=13',
 						img: '../../static/icon/inx6.png',
 						tit: '超级秒杀'
 					},
 					{
-						path: '',
+						path: '/pages/index/gift?type=5',
 						img: '../../static/icon/inx7.png',
 						tit: '新能源'
 					},
 					{
-						path: '',
+						path: '/pages/index/gift?type=14',
 						img: '../../static/icon/inx8.png',
 						tit: '健康俱乐部'
 					}
@@ -262,19 +262,19 @@
 			this.loadData();
 		},
 		methods: {
-			gogogo(path) {
-				if(!path) {
+			gogogo(item) {
+				if(!item.path) {
 					uni.navigateTo({
 						url: '/pages/index/dkf'
 					})
 				}else {
+					
 					uni.navigateTo({
-						url: path,
+						url: item.path + '&tit=' + item.tit,
 						fail() {
-							uni.switchTab({
-								url:path
-							})
-						}
+							uni.navigateTo({
+								url: item.path
+							})					}
 					})
 				}
 			},

+ 522 - 46
pages/index/zero.vue

@@ -1,32 +1,32 @@
 <template>
-	<view class="">
+	<view class="" style="padding-top: 20rpx;">
 		<view class="flex center-box ">
-			<view class="flex center-item" @click="navto('/pages/user/xzdl?type=2')">
+			<!-- <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> -->
+			<view class="flex center-item" @click="navto('/pages/zero/gfz')">
 				<view class="val">
-					1000
+					{{pUser.holding_value || 0}}
 				</view>
 				<view class="name">我的共富值</view>
 			</view>
 			<view class="line">
 			</view>
-			<view class="flex center-item" @click="toTx">
+			<view class="flex center-item" >
 				<view class="val">
-					1000
+					{{pUser.pass || 0}}
 				</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>
+			<image src="../../static/img/yj.png" mode="" @click="navto('/pages/index/dkf')"></image>
 		</view>
 		<view class="flex nav">
 			<view class="nav-item" v-for="(item,index) in navList" :class="{'action': current == index}"
@@ -34,36 +34,103 @@
 				{{item.tit}}
 			</view>
 		</view>
-		<swiper disable-touch :current="current"  class="list-wrap" :style="{'height': maxHeight}">
+		<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>
+				<scroll-view scroll-y="true" class="" :style="{'height': maxHeight}" :class="{'p2':current == 1}" @scrolltolower="getMore(item.status)">
+					<view class="card-wrap flex" v-for="cardItem in item.list" v-if="item.status == 1">
+						<image :src="cardItem.image" mode="" class="card-img"></image>
 						<view class="flex card-info">
-							<view class="name clamp2">
-								普通卡
+							<view class="name ">
+									{{cardItem.name}}
 							</view>
-							<view class="">
-								价值1持包值
+	<!-- 						<view class="">
+								有效期{{cardItem.max_send ||0}}
+							</view> -->
+							<view class="" style="padding-right: 10rpx;">
+								周期{{cardItem.end_day || 0}}天,每日产出数量{{cardItem.day_pass || 0}},共富值+{{cardItem.holding_value || 0}}.最多可持有{{cardItem.max_count}}个
 							</view>
 							<view class="price">
 								<image src="../../static/icon/ydjf.png" mode=""></image>
-								<text>100</text> 阅读积分
+								<text class="show">{{cardItem.pay_points}}</text> 阅读积分 <text > (有效期{{cardItem.max_send ||0}})</text>
 							</view>
 						</view>
-						<view class="card-btn">
+						<view class="card-btn" :class="{'buyless': cardItem.activate == 0}" @click="open(cardItem)">
 							立即兑换
 						</view>
+						<view class="card-nun" v-if="cardItem.total">
+							进行中:{{cardItem.progress}}/{{cardItem.total}}
+						</view>
+					</view>
+					<view class="px-wrap flex" v-if="item.status == 2">
+						<view class="nav-item" :class="{ current: filterIndex === 0 }" @click="tabClick(0)">默认</view>
+						
+						<view class="nav-item" :class="{ current: filterIndex === 2 }" @click="tabClick(2)">
+							<text>单价</text>
+							<view class="p-box">
+								<text :class="{ active: priceOrder === 1 && filterIndex === 2 }" class="iconfont iconfold"></text>
+								<text :class="{ active: priceOrder === 2 && filterIndex === 2 }" class="iconfont iconfold xia"></text>
+							</view>
+						</view>
+						<view class="nav-item" :class="{ current: filterIndex === 1 }" @click="tabClick(1)">
+							<text>数量</text>
+							<view class="p-box">
+								<text :class="{ active: numberOrder === 1 && filterIndex === 1 }" class="iconfont iconfold"></text>
+								<text :class="{ active: numberOrder === 2 && filterIndex === 1 }" class="iconfont iconfold xia"></text>
+							</view>
+						</view>
+					</view>
+					<view class="order-wrap " v-for="orderItem in item.list" v-if="item.status == 2">
+						<view class="flex m-info">
+							<image src="../../static/icon/gs-av.png" mode="" class="card-img"></image>
+							<text style=" display: inline-block;line-height: 55rpx;">{{orderItem.phone}}</text>
+						</view>
+						<view class="price">
+							¥{{orderItem.total_price}}
+						</view>
+						<view class="num">
+							数量:{{orderItem.amount}}
+						</view>
+						<view class="num">
+							{{ getTime(orderItem.add_time)}}
+						</view>
+						<view class="order-btn" @click="makeCall(orderItem.phone)">
+							联系卖家
+						</view>
 					</view>
 					<uni-load-more :status="item.loadingType"></uni-load-more>
 				</scroll-view>
 			</swiper-item>
 		</swiper>
-		
+		<uni-popup ref="popup" type="bottom" @change="popChange">
+			<view class="" style="padding-bottom: 50px;background-color: #fff;">
+				<view class="a-t">
+					<image :src="buyItem.image"></image>
+					<view class="right">
+						<view class="good-name clamp">{{buyItem.name}}</view>
+						<text class="price">{{ buyItem.pay_points*1* goodsNumber }}</text>
+					</view>
+				</view>
+				<view class="attr-list" style="padding-bottom:40rpx;">
+					<text>兑换数量</text>
+					<view class="item-list">
+						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax"
+							@eventChange="numberChange"></uni-number-box>
+					</view>
+				</view>
+				<button class="btn" @click.stop="createPass">确定</button>
+			</view>
+		</uni-popup>
 	</view>
 </template>
 
 <script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	
+	import uniNumberBox from '@/components/uni-number-box.vue';
+	
 	import {
 		saveUrl,
 		interceptor
@@ -73,16 +140,27 @@
 		userPool,
 		goft
 	} from '@/api/user.js';
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
+	import { getCardList,createPass, getGsList,passUser } from '@/api/zero.js'
+	
 	export default {
+		components: {
+			uniNumberBox
+		},
 		data() {
 			return {
+				pUser: {},
+				order: 'id asc',
+				buyItem: {},//购买卡包信息
+				filterIndex: 0,
+				priceOrder: 0, //1 价格从低到高 2价格从高到低
+				numberOrder: 0, //1 销量从低到高 2销量从高到低
+				actionPrice: 100,
+				goodsNumber: 1,
+				goodsNumberMax: 1,
 				maxHeight: '',
 				current: 0,
 				navList: [{
+						status: 1,
 						tit: '消费包',
 						list: [],
 						loadingType: 'more',
@@ -91,6 +169,7 @@
 						limit: 10,
 					},
 					{
+						status: 2,
 						tit: '阅读积分交易',
 						list: [],
 						loadingType: 'more',
@@ -98,17 +177,19 @@
 						page: 1,
 						limit: 10,
 					}
-				]
+				],
+				loading: false
 			}
 		},
 		onLoad() {
 
 		},
 		onShow() {
-
+			this.loadBaseData()
+			this.getGsList()
 		},
 		computed: {
-			...mapState('user',['userInfo','hasLogin'])
+			...mapState('user', ['userInfo', 'hasLogin'])
 		},
 		onReady(res) {
 			var that = this;
@@ -123,18 +204,148 @@
 				},
 				fail: res => {}
 			});
-			
+
 		},
 		methods: {
+			...mapMutations('user', ['setUserInfo']),
+			passUser() {
+				passUser().then(res => {
+					// console.log(res);
+					this.pUser = res.data
+				})
+			},
+			getTime(time) {
+				const num =13 - (time+'').length;
+				let l = 1;//倍数
+				for (let i = 0; i < num; i++) {
+					l+='0';
+				}
+				// 重新解析为数字
+				l = parseInt(l)
+				const date = new Date(parseInt(time) * l);
+				const year = date.getFullYear();
+				const mon = date.getMonth() + 1;
+				const day = date.getDate();
+				const hours = date.getHours();
+				const minu = date.getMinutes();
+				const sec = date.getSeconds();
+				return year + '-' + mon + '-' + day + ' ' + hours + ':' + minu + ':' + sec;
+			},
+			getMore(status) {
+				if(status == 2) {
+					this.getGsList()
+				}
+			},
+			popChange(e) {
+				console.log(e)
+				if(!e.show) {
+					this.buyItem = {}
+					this.goodsNumber = 1
+					this.goodsNumberMax = 1
+				}
+			},
+			getCardList() {
+				getCardList().then(res => {
+					console.log(res);
+					this.navList[0].list = res.data
+					this.navList[0].loadingType = 'noMore'
+				})
+			},
+			createPass() {
+				let that = this
+				if(that.loading) {
+					return
+				}
+				that.loading = true
+				createPass({
+					card_id: that.buyItem.id,
+					num: that.goodsNumber
+				}).then(res => {
+					that.loading = false
+					uni.showToast({
+						title:'兑换成功',
+						duration:2000
+					});
+					that.loadBaseData()
+					that.$refs.popup.close()
+				}).catch(err => {
+					that.loading = false
+				})
+			},
+			// 购买数量变化
+			numberChange(e) {
+				this.goodsNumber = e.number;
+			},
+			//筛选点击
+			tabClick(index) {
+				// 防止重复点击综合排序
+				if (this.filterIndex === 0 && this.filterIndex === index) {
+					console.log('zhe')
+					return;
+				}
+				this.filterIndex = index;
+				if(index === 0) {
+					this.order = 'id asc'
+				}
+				// 判断是否为销量优先
+				if (index === 1) {
+					this.numberOrder = this.numberOrder === 1 ? 2 : 1;
+					this.order = this.numberOrder === 1 ? 'amount asc': 'amount desc'
+				}
+				// 判断是否为价格优先
+				if (index === 2) {
+					this.priceOrder = this.priceOrder === 1 ? 2 : 1;
+					this.order = this.priceOrder === 1 ? 'price asc': 'price desc'
+				}
+				// 初始化页数
+				// this.page = 1;
+				this.navList[1].list.page = 1
+				// 初始化数组
+				// uni.pageScrollTo({
+				// 	duration: 300,
+				// 	scrollTop: 0
+				// });
+				this.getGsList('re');
+				uni.showLoading({
+					title: '正在加载'
+				});
+			},
+			makeCall(item) {
+				uni.makePhoneCall({
+					phoneNumber:item + ''
+				})
+			},
+			loadBaseData(tit) {
+				const obj = this
+				getUserInfo({})
+					.then(({
+						data
+					}) => {
+						console.log(data,'data')
+						obj.setUserInfo(data);
+						obj.getCardList()
+						obj.passUser()
+					})
+					.catch(e => {
+						console.log(e);
+					});
+
+			},
+			buy() {},
 			changeTab(index) {
 				this.current = index
 				this.getList('tab')
 			},
 			getList(type) {
-
+				if(this.current == 1) {
+					console.log('ddddddddddddddddddd')
+					this.getGsList('re');
+				}else {
+					
+				}
 			},
 			navto(url) {
-				
+
 				if (!this.hasLogin) {
 					// 保存地址
 					saveUrl();
@@ -143,15 +354,56 @@
 				} else {
 					uni.navigateTo({
 						url,
-						 fail() {
-						 	uni.switchTab({
-						 		url
-						 	})
-						 }
+						fail() {
+							uni.switchTab({
+								url
+							})
+						}
 					})
 				}
-				
+
 			},
+			open(item) {
+				let that = this
+				if(!item.activate) {
+					return that.$api.msg('当前不可兑换')
+				}
+				that.buyItem = item
+				that.goodsNumberMax = item.max_count*1 - item.progress*1
+				this.$refs.popup.open()
+			},
+			getGsList(type) {
+				console.log('jinriu')
+				let that = this
+				let item = that.navList[1]
+				if(type == 're') {
+					item.list = []
+					item.loadingType = 'more'
+					item.page = 1
+					item.loaded = false
+				}
+				if(item.loadingType == 'loading' || item.loadingType == 'noMore') {
+					return
+				}
+				item.loadingType = 'loading'
+				getGsList({
+					// uid: this.userI.uid
+					page: item.page,
+					limit: item.limit,
+					order: that.order,
+				}).then(res => {
+					uni.hideLoading()
+					let arr = res.data.result.list
+					item.list =  item.list.concat(arr)
+					if(arr.length == item.limit) {
+						item.loadingType = 'more'
+					}else {
+						item.loadingType = 'noMore'
+					}
+					item.page++
+					item.loaded = true
+				})
+			}
 		}
 	}
 </script>
@@ -209,16 +461,18 @@
 		.nav-item {
 			flex-grow: 1;
 			text-align: center;
-			font-size: 34rpx;
+			font-size: 33rpx;
 			font-weight: bold;
-			color: #333333;
+			color: #333;
 		}
 
 		.action {
 			color: #FF4C4C;
 		}
 	}
+
 	.list-wrap {
+
 		// background-color: red;
 		.card-wrap {
 			width: 690rpx;
@@ -228,6 +482,7 @@
 			margin: 0 auto 20rpx;
 			padding: 20rpx;
 			justify-content: flex-start;
+			position: relative;
 			.card-img {
 				flex-shrink: 0;
 				width: 158rpx;
@@ -235,6 +490,7 @@
 				background-color: #eee;
 				margin-right: 20rpx;
 			}
+
 			.card-info {
 				flex-grow: 1;
 				font-size: 24rpx;
@@ -244,36 +500,44 @@
 				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;
+					color: $base-color;
 					line-height: 35rpx;
+					.show {
+					font-size: 36rpx;
+					font-weight: bold;
+					color: #FC4141;
+					vertical-align: bottom;
+					padding: 0 5rpx;
+				}
 					image {
 						width: 34rpx;
 						height: 33rpx;
-						vertical-align:bottom;
+						vertical-align: bottom;
 					}
+
 					text {
-						font-size: 36rpx;
-						font-weight: bold;
-						color: #FC4141;
-						vertical-align:bottom;
-						padding: 0 5rpx;
+						color: #999999;
 					}
 				}
 			}
+
 			.card-btn {
 				flex-shrink: 0;
 				width: 137rpx;
 				height: 52rpx;
-				background: #ff4c4c;
+				background: $base-color;
 				border-radius: 26rpx;
 				font-size: 26rpx;
 				font-weight: 500;
@@ -282,6 +546,218 @@
 				line-height: 50rpx;
 				align-self: flex-end;
 			}
+			.buyless {
+				background:#999 ;
+			}
+			.card-nun {
+				position: absolute;
+				top: 20rpx;
+				right: 20rpx;
+				font-size: 26rpx;
+				color: $base-color;
+			}
+		}
+
+		.order-wrap {
+			width: 686rpx;
+			height: 297rpx;
+			background: #FFFFFF;
+			box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
+			border-radius: 20rpx;
+			margin: 0 auto 20rpx;
+			padding: 33rpx 40rpx;
+			position: relative;
+
+			.m-info {
+				justify-content: flex-start;
+
+				image {
+					width: 55rpx;
+					height: 55rpx;
+					margin-right: 13rpx;
+				}
+
+				text {
+					font-size: 28rpx;
+					font-weight: bold;
+					color: #333333;
+				}
+			}
+
+			.price {
+				font-size: 40rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FF4C4C;
+				padding: 40rpx 0 30rpx;
+			}
+			
+			.num {
+				font-size: 26rpx;
+				font-weight: 500;
+				color: #888785;
+			}
+
+			.order-btn {
+				width: 148rpx;
+				height: 62rpx;
+				border: 2px solid #FF5570;
+				border-radius: 30rpx;
+				line-height: 62rpx;
+				text-align: center;
+				font-size: 28rpx;
+				font-weight: bold;
+				color: #FF4C4C;
+				position: absolute;
+				right: 40rpx;
+				bottom: 33rpx;
+			}
+		}
+	}
+
+	.attr-list {
+		display: flex;
+		flex-direction: column;
+		font-size: $font-base + 2rpx;
+		color: $font-color-base;
+		padding-top: 30rpx;
+		padding-left: 40rpx;
+		padding-right: 30rpx;
+	}
+
+	.item-list {
+		padding: 20rpx 0 0;
+		display: flex;
+		flex-wrap: wrap;
+
+		.tit {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			background: #eee;
+			// margin-left: 10rpx;
+			margin-right: 20rpx;
+			margin-bottom: 20rpx;
+			border-radius: 100rpx;
+			min-width: 60rpx;
+			height: 60rpx;
+			padding: 0 20rpx;
+			font-size: $font-base;
+			color: $font-color-dark;
+		}
+
+		.selected {
+			background: #fbebee;
+			color: $uni-color-primary;
+		}
+	}
+
+	.btn {
+		width: 750rpx;
+		height: 98rpx;
+		background: $base-color;
+		line-height: 98rpx;
+		// background: $uni-color-primary;
+		font-size: $font-base + 2rpx;
+		color: #fff;
+	}
+
+	.a-t {
+		padding: 0 30rpx;
+		display: flex;
+
+		image {
+			width: 170rpx;
+			height: 170rpx;
+			flex-shrink: 0;
+			border-radius: 8rpx;
+		}
+
+		.right {
+			display: flex;
+			flex-direction: column;
+			padding-left: 24rpx;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-base;
+			line-height: 42rpx;
+
+			.good-name {
+				padding-top: 20rpx;
+				max-width: 320rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #1d2023;
+				line-height: 42rpx;
+				margin-bottom: 15rpx;
+			}
+
+			.price {
+				font-size: 60rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: $base-color;
+				// font-size: $font-lg;
+				// color: $uni-color-primary;
+				// margin-bottom: 10rpx;
+				&::after {
+					content: '阅读积分';
+					font-size: 30rpx;
+					padding-left: 10rpx;
+				}
+			}
+			
+
+			.selected-text {
+				margin-right: 10rpx;
+			}
+		}
+	}
+
+	.px-wrap {
+		height: 60rpx;
+		background-color: #fff;
+		position: fixed;
+		width: 750rpx;
+		top: 0;
+		z-index: 999;
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 25rpx;
+			font-weight: 500;
+			color: #666666;
+			position: relative;
+			&.current {
+				color: $base-color;
+			}
 		}
+		.p-box {
+			display: flex;
+			flex-direction: column;
+			.iconfont {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				width: 30rpx;
+				height: 14rpx;
+				line-height: 1;
+				margin-left: 4rpx;
+				font-size: 20rpx;
+				color: #888;
+				&.active {
+					color: $base-color;
+				}
+			}
+			.xia {
+				transform: scaleY(-1);
+			}
+		}
+	}
+	.p2 {
+		padding-top: 80rpx;
 	}
 </style>

+ 1 - 1
pages/product/product.vue

@@ -71,7 +71,7 @@
 		<view class="page-bottom" v-if="goodsType == 0">
 			<view class="action-btn-group">
 				<view class="buy-now">
-					<button type="primary" class=" action-btn no-border buy-now-btn" @click.stop="toggleSpec(2)" v-if="goodsObjact.is_pack == 0">加入购物车</button>
+					<!-- <button type="primary" class=" action-btn no-border buy-now-btn" @click.stop="toggleSpec(2)" v-if="goodsObjact.is_pack == 0">加入购物车</button> -->
 					<button type="primary" class=" action-btn no-border  add-cart-btn" @click.stop="toggleSpec(1)">立即购买</button>
 				</view>
 				

+ 25 - 1
pages/user/sz.vue

@@ -129,7 +129,7 @@
 						}else {
 							qdata.pm = 0
 						}
-					}else {
+					}else if(that.type == 3){
 						status = 6
 						qdata.category = 'pool'
 						if(item.state == 1) {
@@ -137,6 +137,30 @@
 						}else {
 							qdata.pm = 0
 						}
+					}else if(that.type == 8) {
+						status = 8
+						qdata.category = 'points'
+						if(item.state == 1) {
+							qdata.pm = 1
+						}else {
+							qdata.pm = 0
+						}
+					}else if(that.type == 9) {
+						status = 9
+						qdata.category = 'pass'
+						if(item.state == 1) {
+							qdata.pm = 1
+						}else {
+							qdata.pm = 0
+						}
+					}else if(that.type == 10) {
+						status = 10
+						qdata.category = 'integral'
+						if(item.state == 1) {
+							qdata.pm = 1
+						}else {
+							qdata.pm = 0
+						}
 					}
 				}
 				

+ 1 - 1
pages/user/user.vue

@@ -14,7 +14,7 @@
 				<view class="user-name-id">
 					<view class="user-name clamp2">{{ userInfo.nickname || '游客'}}</view>
 					<view class="user-id" v-if="userInfo && userInfo.uid">
-						ID: {{userInfo.uid}}
+						UID: {{userInfo.uid}}
 					</view>
 					<view class="user-shop flex" v-if="userInfo.uid">
 						<view class="user-shop-item" v-if="userInfo.level> 0 " style="width: 180rpx;">

+ 61 - 20
pages/user/yjzz.vue

@@ -3,15 +3,16 @@
 		<view class="content-money">
 			<view class="flex">
 				<view class="buttom">
-					<view class="icon" v-if="type == 0">{{ userInfo.brokerage_price | getMoneyStyle }}</view>
-					<view class="icon" v-if="type == 1">{{ userInfo.now_money | getMoneyStyle }}</view>
+					<view class="icon" v-if="type == 0">{{  (userInfo.brokerage_price | getMoneyStyle) || 0}}</view>
+					<view class="icon" v-if="type == 1">{{ (userInfo.now_money | getMoneyStyle) || 0}}</view>
+					<view class="icon" v-if="type == 3">{{ pUser.points  || 0}}</view>
 					<text class="text">可转账余额</text>
 				</view>
 			</view>
 		</view>
 		<view class="row-box">
-			<view class="title">收款人UID/手机号</view>
-			<view class="row"><input class="input" type="number" v-model="phone" placeholder="请输入收款人UID/手机号"
+			<view class="title">收款人UID</view>
+			<view class="row"><input class="input" type="number" v-model="phone" placeholder="请输入收款人UID"
 					placeholder-class="placeholder" /></view>
 		</view>
 		<view class="row-box">
@@ -22,7 +23,8 @@
 				<view class="buttom" @click="getAll" >全部转账</view>
 			</view>
 		</view>
-		<button class="add-btn up" :class="{ action: loding }" @click="!loding ? confirm() : ''">转账</button>
+		<button class="add-btn up"  @click="!loding ? confirm('zz') : ''">转账</button>
+		<button class="add-btn up jy"  @click="!loding ? confirm('jy') : ''">交易</button>
 	</view>
 </template>
 
@@ -34,6 +36,7 @@
 		getUserInfo,
 		jfzz
 	} from '@/api/user.js';
+	import { passUser,createGs } from '@/api/zero.js'
 	import {
 		mapMutations,
 		mapState
@@ -54,7 +57,8 @@
 				weichatBsrowser: false,
 				// #endif
 				loding: true,
-				type: 0
+				type: 0,
+				pUser: {}
 			};
 		},
 		onLoad(options) {
@@ -68,6 +72,10 @@
 					uni.setNavigationBarTitle({
 						title:'消费积分转账'
 					})
+				}else if(this.type == 3) {
+					uni.setNavigationBarTitle({
+						title:'阅读积分转账'
+					})
 				}
 			}
 		},
@@ -76,11 +84,19 @@
 		},
 		methods: {
 			...mapMutations('user', ['setUserInfo']),
+			passUser() {
+				passUser().then(res => {
+					// console.log(res);
+					this.pUser = res.data
+				})
+			},
 			getAll() {
 				if(this.type == 0) {
 					this.withdrawal = this.userInfo.brokerage_price
-				}else {
+				}else if(this.type == 2){
 					this.withdrawal = this.userInfo.now_money
+				}else if(this.type == 3) {
+					this.withdrawal = this.pUser.points 
 				}
 			},
 			// 更新数据
@@ -91,6 +107,7 @@
 						obj.loding = false;
 						// 保存返回用户数据
 						obj.setUserInfo(e.data);
+						this.passUser()
 					})
 					.catch(e => {
 						console.log(e);
@@ -101,7 +118,7 @@
 				this.type = e.detail.value;
 			},
 			// 提交
-			confirm() {
+			confirm(tit) {
 				let obj = this;
 				obj.loding = true;
 				if(obj.phone == '') {
@@ -118,22 +135,41 @@
 					num: obj.withdrawal ,//金额
 					type: obj.type
 				};
-				jfzz(data)
-					.then(e => {
-						// 初始化提现金额
-						obj.withdrawal = '';
+				if(obj.type == 3) {
+					createGs({
+						amount: obj.withdrawal,
+						to_uid: obj.phone, 
+						type: tit == 'jy'? 1: 2
+					}).then(res => {
 						uni.showToast({
-							title: '转账成功',
-							duration: 2000,
-							position: 'top'
+							title: tit == 'jy'? '交易成功': '转账成功',
+							duration:2000
 						});
 						obj.dataUp();
-					})
-					.catch(e => {
-						obj.$api.msg(e.msg);
 						obj.loding = false;
-						console.log();
-					});
+					}).catch(err => {
+						obj.dataUp();
+						obj.loding = false;
+					})
+				}else {
+					jfzz(data)
+						.then(e => {
+							// 初始化提现金额
+							obj.withdrawal = '';
+							uni.showToast({
+								title: '转账成功',
+								duration: 2000,
+								position: 'top'
+							});
+							obj.dataUp();
+						})
+						.catch(e => {
+							obj.$api.msg(e.msg);
+							obj.loding = false;
+							console.log();
+						});
+				}
+				
 			},
 			boblack() {
 				uni.navigateBack({
@@ -356,4 +392,9 @@
 			color: #5771DF;
 		}
 	}
+	.jy {
+		background-color: $base-color;
+		color: #fff;
+		margin-top: 30rpx;
+	}
 </style>

+ 493 - 0
pages/zero/award.vue

@@ -0,0 +1,493 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="status_bar"><!-- 这里是状态栏 --></view>
+			<view class="body-title">
+				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
+				<view class="header">{{type == 1?'奖励积分池': '商城积分池'}}</view>
+			</view>
+			<view class="content-bg"><image src="../../static/img/tg-bg.png" mode=""></image></view>
+			<view class="money-box">
+				<template v-if="type == 9">
+					<view class="money" v-if="pUser && pUser.recommend">{{ pUser.recommend.total|| 0 }}</view>
+					<view class="money" v-else>0</view>
+				</template>
+				<template v-if="type == 10">
+					<view class="money" v-if="pUser && pUser.pass_integral">{{ pUser.pass_integral.total|| 0 }}</view>
+					<view class="money" v-else>0</view>
+				</template>
+			</view>
+		</view>
+		<view class="info-box flex">
+			<view class="info-item">
+				<view class="info-font">待释放</view>
+				<template v-if="type == 9">
+					<view class="info-num" v-if="pUser && pUser.recommend">{{pUser.recommend.progress || '0'}}</view>
+					<view class="info-num" v-else>0</view>
+				</template>
+				<template v-if="type == 10">
+					<view class="info-num" v-if="pUser && pUser.pass_integral">{{pUser.pass_integral.progress || '0'}}</view>
+					<view class="info-num" v-else>0</view>
+				</template>
+			</view>
+			<view class="shu"></view>
+			<view class="info-item">
+				<view class="info-font">已释放</view>
+				<template v-if="type == 9">
+					<view class="info-num" v-if="pUser && pUser.recommend">{{pUser.recommend.use_recommend || '0'}}</view>
+					<view class="info-num" v-else >{{pUser.recommend.use_recommend || '0'}}</view>
+				</template>
+				<template v-if="type == 10">
+					<view class="info-num" v-if="pUser && pUser.pass_integral">{{pUser.pass_integral.use_recommend || '0'}}</view>
+					<view class="info-num" v-else >{{pUser.pass_integral.use_recommend || '0'}}</view>
+				</template>
+			</view>
+		</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view>
+						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
+							<view class="title-box">
+								<view class="title">
+									<text>{{ item.title }}</text>
+								</view>
+								<view class="time">
+									<text>{{ item.add_time }}</text>
+								</view>
+							</view>
+							<view class="money">
+								<view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType" v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+import { getCommissionInfo,getUser } from '@/api/user.js';
+import { passUser } from '@/api/zero.js'
+import { getMoneyStyle } from '@/utils/rocessor.js';
+import { mapGetters } from 'vuex';
+import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+import empty from '@/components/empty';
+import { spreadCommission, userBalance,extractBank } from '@/api/wallet.js';
+export default {
+	filters: {
+		getMoneyStyle
+	},
+	components: {
+		empty,
+		uniLoadMore
+	},
+	onReady(res) {
+		var that = this;
+					uni.getSystemInfo({
+						success: resu => {
+							const query = uni.createSelectorQuery();
+							query.select('.swiper-box').boundingClientRect();
+							query.exec(function(res) {
+								that.height = resu.windowHeight - res[0].top + 'px';
+							});
+						},
+						fail: res => {}
+					});
+	},
+	data() {
+		return {
+			pUser: {
+				recommend: {
+					total: 0
+				},
+				pass_integral: {
+					total: 0
+				}
+			},
+			type: 9,
+			userInfo: {},
+			yj: '',
+			height: '',
+			// 头部图高度
+			maxheight: '',
+			tabCurrentIndex: 0,
+			orderStatusSum: 0,
+			recharge: 0,
+			navList: [
+				// {
+				// 	state: 0,
+				// 	text: '全部',
+				// 	loadingType: 'more',
+				// 	orderList: [],
+				// 	page: 1, //当前页数
+				// 	limit: 10 //每次信息条数
+				// },
+				{
+					pm: 0,
+					state: 4,
+					text: '支出',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 ,//每次信息条数
+					loaded: false
+				},
+				{	
+					pm: 1,
+					state: 3,
+					text: '收入',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 ,//每次信息条数
+					loaded: false
+				}
+			],
+			money: ''
+		};
+	},
+	onLoad(opt) {
+		this.type = opt.type
+	},
+	onShow() {
+		// this.extractBank()
+		// this.getUserInfo()
+		this.loadData();
+		this.passUser()
+	},
+	methods: {
+		passUser() {
+			passUser().then(res => {
+				// console.log(res);
+				this.pUser = res.data
+				
+			})
+		},
+		getUserInfo() {
+			getUser({}).then(({ data }) => {
+				this.userInfo = data
+			});
+		},
+		extractBank() {
+			extractBank().then(res => {
+				console.log(res)
+				this.yj = res.data.brokerage_price
+			})
+		},
+		toBack() {
+			uni.redirectTo({
+				url: '/pages/zero/task'
+			});
+		},
+		// 页面跳转
+		navto(e) {
+			uni.navigateTo({
+				url: e
+			});
+		},
+		//获取收入支出信息
+		async loadData(source) {
+			let obj = this;
+			//这里是将订单挂载到tab列表下
+			let index = this.tabCurrentIndex;
+			let navItem = this.navList[index];
+			// let state = navItem.state;
+			if (source === 'tabChange' && navItem.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return;
+			}
+			if (navItem.loadingType === 'loading') {
+				//防止重复加载
+				return;
+			}
+			// 修改当前对象状态为加载中
+			navItem.loadingType = 'loading';
+
+			spreadCommission({
+				page: navItem.page,
+				limit: navItem.limit,
+				pm: navItem.pm,
+				category: obj.type== 9? 'pass': 'integral' 
+			},obj.type)
+				.then(({ data }) => {
+					obj.$set(navItem, 'loaded', true);
+					if(data.length > 0) {
+						let arr = []
+						data.forEach(item => {
+							arr = arr.concat(item.list)
+							console.log(arr);
+						})
+						navItem.orderList = navItem.orderList.concat(arr);
+						navItem.page++;
+						if (navItem.limit == data.length) {
+							navItem.loadingType = 'more';
+							return;
+						} else {
+							navItem.loadingType = 'noMore';
+						}
+						// uni.hideLoading();
+						
+					}else {
+						navItem.loadingType = 'noMore'
+					}
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+
+		//swiper 切换
+		changeTab(e) {
+			this.tabCurrentIndex = e.target.current;
+			this.loadData('tabChange');
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: #f1f1f1;
+	height: 100%;
+}
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+}
+.content-money {
+	position: relative;
+	height: 480rpx;
+	.content-bg {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		width: 750rpx;
+		height: 480rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.body-title {
+		height: 80rpx;
+		text-align: center;
+		font-size: 35rpx;
+		position: relative;
+		.header {
+			position: absolute;
+			left: 0;
+			top: 0;
+			width: 100%;
+			font-size: 36rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #fffeff;
+			height: 80rpx;
+			font-size: 36rpx;
+			font-weight: 700;
+			z-index: 9;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+		}
+		.goback-box {
+			position: absolute;
+			left: 18rpx;
+			top: 0;
+			height: 80rpx;
+			display: flex;
+			align-items: center;
+		}
+
+		.goback {
+			z-index: 100;
+			width: 34rpx;
+			height: 34rpx;
+		}
+	}
+}
+.info-box {
+	width: 670rpx;
+	height: 186rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+	border-radius: 20rpx;
+	margin: -100rpx auto 0;
+	position: relative;
+	z-index: 2;
+	.info-item {
+		width: 50%;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		line-height: 1;
+		.info-font {
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #999999;
+		}
+		.info-num {
+			margin-top: 30rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #181818;
+		}
+	}
+	.shu {
+		width: 2rpx;
+		height: 74rpx;
+		background: #dcdfe6;
+	}
+}
+.money-box {
+	position: relative;
+	z-index: 2;
+	/* #ifdef H5 */
+	padding-top: 90rpx;
+	/* #endif */
+	color: #ffffff;
+	text-align: center;
+	/* #ifdef APP-PLUS */
+	height: 200rpx;
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	/* #endif */
+	/* #ifdef MP-WEIXIN */
+	padding-top: 40rpx;
+	/* #endif */
+
+	.money {
+		font-size: 72rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #ffffff;
+	}
+	.text {
+		font-size: 30rpx;
+	}
+}
+.moneybtn-box {
+	display: flex;
+	justify-content: space-between;
+	position: relative;
+	z-index: 2;
+	color: #ffffff;
+	padding: 0rpx 50rpx;
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #ffffff;
+}
+
+.navbar {
+	margin-top: 20rpx;
+	display: flex;
+	height: 88rpx;
+	padding: 0 5px;
+	background: #fff;
+	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+	position: relative;
+	z-index: 10;
+	.nav-item {
+		flex: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		font-size: 15px;
+		color: #999999;
+		position: relative;
+		&.current {
+			color: #000;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid #fe5b38;
+			}
+		}
+	}
+}
+//列表
+.swiper-box {
+	.order-item:last-child {
+		margin-bottom: 60rpx;
+	}
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+		.title-box {
+			.title {
+				font-size: $font-lg;
+				color: $font-color-base;
+			}
+			.time {
+				font-size: $font-base;
+				color: $font-color-light;
+			}
+		}
+		.money {
+			color: #fd5b23;
+			font-size: $font-lg;
+			text-align: right;
+			.status {
+				color: $font-color-light;
+			}
+		}
+	}
+}
+.list-scroll-content {
+	background: #ffffff;
+	height: 100%;
+}
+.content {
+	height: 100%;
+	.empty-content {
+		background-color: #ffffff;
+	}
+	
+}
+.btn-box {
+	width: 674rpx;
+	height: 88rpx;
+	background: linear-gradient(0deg, #2e58ff, #32c6ff);
+	border-radius: 44rpx;
+	font-size: 36rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #ffffff;
+	text-align: center;
+	line-height: 88rpx;
+	position: fixed;
+	bottom: 48rpx;
+	left: 0;
+	right: 0;
+	margin: 0 auto;
+}
+</style>

+ 99 - 0
pages/zero/chou.vue

@@ -0,0 +1,99 @@
+<template>
+	<view class="content">
+		<image src="../../static/img/ttchou.png" mode="" class="bg"></image>
+		<view class="flex v-list">
+			<view class="action">
+				已观看
+			</view>
+			<view class="">
+				未看完
+			</view>
+			<view class="">
+				未看完
+			</view>
+		</view>
+		<image src="../../static/img/golock.png" mode="" class="golock" @click="golock"></image>
+		<view class="zj-wrap">
+			
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		onLoad() {
+			
+		},
+		onShow() {
+			
+		},
+		onReachBottom() {
+			
+		},
+		onReady() {
+			
+		},
+		methods: {
+			golock() {
+				uni.navigateTo({
+					url:'/pages/zero/ren'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		background-color: #fb8048;
+		height: 100%;
+	}
+	.content {
+		padding-top: 95rpx;
+	}
+	.bg {
+		display: block;
+		width: 706rpx;
+		height: 1185rpx;
+		margin: auto;
+	}
+	.v-list {
+		width: 370rpx;
+		height: 30rpx;
+		// background-color: red;
+		// border: 1px solid red;
+		position: absolute;
+		top: 740rpx;
+		left: 215rpx;
+		font-size: 19rpx;
+		text-align: center;
+		view {
+			width: 29%;
+			color: #D0373D;
+		}
+		.action {
+			color: #999999;
+		}
+	}
+	.golock {
+		width: 354rpx;
+		height: 105rpx;
+		position: absolute;
+		left: 215rpx;
+		top: 890rpx;
+	}
+	.zj-wrap {
+		width: 560rpx;
+		height: 254rpx;
+		// background-color: #fff;
+		border: 1px solid red;
+		position: absolute;
+		left: 118rpx;
+		top: 1030rpx;
+	}
+</style>

+ 311 - 0
pages/zero/gfz.vue

@@ -0,0 +1,311 @@
+<template>
+	<view class="content">
+		<view class="" style="height: 20rpx;"></view>
+		<view class="top-wrap">
+			<view class="top-top flex">
+				<view class="item ">
+					<view class="val">
+						{{pUser.holding_value}}
+					</view>
+					<view class="name">
+						个人共富值
+					</view>
+				</view>
+				<view class="item">
+					<view class="val">
+						{{pUser.trem_holding_value}}
+					</view>
+					<view class="">
+						联盟共富值
+					</view>
+				</view>
+			</view>
+			<view class="flex top-btm">
+				<view class="">
+					当前等级:{{ pUser.zero_level ? pUser.zero_level.name:'暂无' }}
+				</view>
+				<view class="">
+				</view>
+			</view>
+		</view>
+
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300"
+			@change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex" >
+				<scroll-view scroll-y="true" class="good-content" @scrolltolower="loadData" :style="{ height: height }">
+					<empty v-if="tabItem.loaded === true && tabItem.list.length === 0"></empty>
+					<view>
+						<view class="order-item flex" v-for="(item, index) in tabItem.list" :key="index">
+							<view class="title-box">
+								<view class="title">
+									<text>{{ item.name }}</text>
+								</view>
+								<view class="time">
+									<text>{{getTime(item.add_time) }}</text>
+								</view>
+							</view>
+							<view class="money">
+								<view>{{ item.holding_value }}</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType" v-if="!(tabItem.list.length == 0 && tabItem.loaded)"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import empty from '@/components/empty.vue'
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+
+	import {
+		getCardList,
+		createPass,
+		getGsList,
+		passUser,
+		passLst
+	} from '@/api/zero.js'
+	export default {
+		components: {
+			empty
+		},
+		data() {
+			return {
+				height: '',
+				tabCurrentIndex: 0,
+				pUser: {
+					holding_value: 0,
+					trem_holding_value: 0,
+					zero_level: {
+						name: ''
+					}
+				},
+				navList: [{
+						text: '个人',
+						state: 1,
+						loaded: false,
+						list: [],
+						page: 1,
+						limit: 10,
+						loadingType: 'more'
+					},
+					{
+						text: '团队',
+						state: 2,
+						loaded: false,
+						list: [],
+						page: 1,
+						limit: 10,
+						loadingType: 'more'
+					}
+				]
+
+			}
+		},
+		onLoad() {
+
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		onShow() {
+			this.passUser()
+			this.loadData()
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+			var that = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						that.height = resu.windowHeight - res[0].top + 'px';
+					});
+				},
+				fail: res => {}
+			});
+		},
+		methods: {
+			getTime(time) {
+				const num =13 - (time+'').length;
+				let l = 1;//倍数
+				for (let i = 0; i < num; i++) {
+					l+='0';
+				}
+				// 重新解析为数字
+				l = parseInt(l)
+				const date = new Date(parseInt(time) * l);
+				const year = date.getFullYear();
+				const mon = date.getMonth() + 1;
+				const day = date.getDate();
+				const hours = date.getHours();
+				const minu = date.getMinutes();
+				const sec = date.getSeconds();
+				return year + '-' + mon + '-' + day + ' ' + hours + ':' + minu + ':' + sec;
+			},
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			},
+			passUser() {
+				passUser().then(res => {
+					// console.log()
+					this.pUser = res.data
+				})
+			},
+			loadData() {
+				let that = this;
+				let item = that.navList[that.tabCurrentIndex]
+				let qdata = {
+					page: item.page,
+					limit: item.limit
+				}
+				if (item.state == 1) {
+					qdata.uid = that.userInfo.uid
+				} else {
+					qdata.sp_uid = that.userInfo.uid
+				}
+				if(item.loadingType == 'loading' || item.loadingType == 'noMore') {
+					return 
+				}
+				item.loadingType = 'loading'
+				passLst(qdata).then(res => {
+					console.log(res)
+					let arr = res.data.result.list
+					item.list = item.list.concat(arr)
+					
+					if(item.limit == arr.length) {
+						item.page++
+						item.loadingType = 'more'
+					}else {
+						item.loadingType = 'noMore'
+					}
+					item.loaded = true
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.top-wrap {
+		width: 690rpx;
+		height: 320rpx;
+		padding: 43rpx;
+		padding-bottom: 0;
+		background-color: #ebd4be;
+		margin: auto;
+		border-radius: 20rpx;
+		text-align: center;
+		font-size: 29rpx;
+		font-weight: 400;
+		color: #6E4019;
+
+		.top-top {
+			height: 200rpx;
+
+			.item {
+				flex-grow: 1;
+
+				.val {
+					font-size: 63rpx;
+					font-weight: bold;
+				}
+
+			}
+		}
+
+		.top-btm {
+			border-top: 1px solid #E3C5A8;
+
+			view {
+				flex-grow: 1;
+				line-height: 80rpx;
+			}
+		}
+	}
+
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+
+		.title-box {
+			.title {
+				font-size: $font-lg;
+				color: $font-color-base;
+			}
+
+			.time {
+				font-size: $font-base;
+				color: $font-color-light;
+			}
+		}
+
+		.money {
+			color: #fd5b23;
+			font-size: $font-lg;
+			text-align: right;
+
+			.status {
+				color: $font-color-light;
+			}
+		}
+	}
+
+	.navbar {
+		margin-top: 20rpx;
+		display: flex;
+		height: 88rpx;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #999999;
+			position: relative;
+
+			&.current {
+				color: #000;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid $base-color;
+				}
+			}
+		}
+	}
+	.swiper-box {
+		background-color: #fff;
+	}
+</style>

+ 118 - 0
pages/zero/gg.vue

@@ -0,0 +1,118 @@
+<template>
+	<view class="content">
+		<view class="djs">
+			观看完视频后,可获得奖励
+		</view>
+		<video src="../../static/video/v1.mp4" class="gsjs" autoplay :muted="true" :controls="false"
+			:enable-progress-gesture="false" @play="vPlay" ref="vgg" @ended="vEnd"></video>
+	</view>
+</template>
+
+<script>
+	import {
+		ggGive
+	} from '@/api/zero.js'
+	export default {
+		data() {
+			return {
+				djs: 15,
+				isEnd: false,
+				id:0
+			}
+		},
+		onLoad(opt) {
+			this.id = opt.id
+		},
+		onShow() {
+
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+
+		},
+		onBackPress(event) {
+			console.log(event, 'black')
+			let that = this
+			if (!that.isEnd) {
+				that.$refs.vgg.pause()
+				uni.showModal({
+					title: '温馨提醒',
+					content: '观看完视频后,可获得奖励',
+					cancelText: '跳过视频',
+					confirmText: '继续观看',
+					complete(e) {
+						console.log(e)
+						if (e.confirm) {
+							// return 
+							that.$refs.vgg.play()
+
+						} else {
+							uni.redirectTo({
+								url: '/pages/zero/ren'
+							})
+						}
+					}
+				})
+				return true
+			}
+
+
+		},
+		methods: {
+			vPlay(e) {
+				console.log(e, '开始播放')
+			},
+			vEnd() {
+				this.isEnd = true
+				console.log(this.id)
+				//发放奖励
+				ggGive({
+					id: this.id
+				}).then(res => {
+					uni.showToast({
+						title:'奖励发放成功',
+						duration:2000
+					});
+					setTimeout(()=> {
+						uni.navigateBack({
+							fail() {
+								uni.redirectTo({
+									url: '/pages/zero/ren'
+								})
+							}
+						})
+					},1500)
+					
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		background-color: #000;
+		height: 100%;
+	}
+
+	.gsjs {
+		width: 750rpx;
+		position: absolute;
+		top: 0;
+		bottom: 0;
+		margin: auto;
+	}
+
+	.djs {
+		position: absolute;
+		top: 20rpx;
+		left: 20rpx;
+		color: #fff;
+		font-size: 28rpx;
+		padding: 5rpx 10rpx;
+		border: 1px solid #fff;
+		border-radius: 20rpx;
+	}
+</style>

+ 131 - 0
pages/zero/gs.vue

@@ -0,0 +1,131 @@
+<template>
+	<view class="content">
+		<view class="flex gs-item">
+			<view class="item-name">
+				参考价格
+			</view>
+			<input type="text" class="item-val val-red" disabled v-model="pUser.points_transaction"/>
+		</view>
+		<!-- //挂售价格(元) -->
+		<view class="flex gs-item">
+			<view class="item-name">
+				挂售价格(元)
+			</view>
+			<input type="text" class="item-val" placeholder="请输入您的挂售价(单价)" v-model="total_price"/>
+		</view>
+		<view class="flex gs-item">
+			<view class="item-name">
+				挂售数量
+			</view>
+			<input type="text" class="item-val" placeholder="请输入挂售数量" v-model="amount"/>
+		</view>
+		<view class="flex gs-item">
+			<view class="item-name">
+				联系方式
+			</view>
+			<input type="text" class="item-val" placeholder="请输入联系方式" v-model="phone"/>
+		</view>
+		<view class="fwf">
+			服务费:<text>{{(total_price * amount * pUser.fee_ratio / 100).toFixed(2) || 0}} 阅读积分</text>
+		</view>
+		<view class="btn" @click="createGs">
+			确认
+		</view>
+	</view>
+</template>
+
+<script>
+	import { createGs,passUser } from '@/api/zero.js'
+	export default {
+		data() {
+			return {
+				total_price: '',
+				amount: '',
+				 phone: '',
+				 pUser: {}
+			}
+		},
+		onLoad() {
+			
+		},
+		onShow() {
+			this.passUser()
+		},
+		onReachBottom() {
+			
+		},
+		onReady() {
+			
+		},
+		methods: {
+			passUser() {
+				passUser().then(res => {
+					this.pUser = res.data
+				})
+			},
+			createGs() {
+				let that = this
+				createGs({
+					total_price: that.total_price * that.amount,
+					amount: that.amount,
+					phone: that.phone,
+					type: 0
+				}).then(res => {
+					uni.showToast({
+						title:'挂售成功',
+						duration:2000
+					});
+					setTimeout(()=> {
+						uni.navigateBack()
+					},1500)
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.gs-item {
+		height: 135rpx;
+		background-color: #fff;
+		padding: 0 65rpx;
+		
+		.item-val {
+			width: 405rpx;
+			height: 87rpx;
+			background: #F4F4F4;
+			border-radius: 10rpx;
+			text-align: center;
+			font-size: 36rpx;
+			font-weight: bold;
+			
+		}
+		.val-red {
+			color: #FD3B39;
+		}
+	}
+	.fwf {
+		font-size: 30rpx;
+		font-weight: bold;
+		color: #333333;
+		text-align: right;
+		padding-right: 65rpx;
+		background-color: #fff;
+		padding-bottom: 62rpx;
+		text {
+			color: #FD3B39;
+		}
+	}
+	.btn {
+		width: 616rpx;
+		height: 88rpx;
+		background: #ff4c4c;
+		border-radius: 10rpx;
+		font-size: 36rpx;
+		font-weight: bold;
+		color: #FFFFFF;
+		line-height: 88rpx;
+		text-align: center;
+		margin: 60rpx auto ;
+	}
+</style>

+ 137 - 0
pages/zero/jfhz.vue

@@ -0,0 +1,137 @@
+<template>
+	<view class="content">
+		<view class="item flex">
+			<view class="tit">
+				可兑换{{type == 1 ? '商城积分': '通证积分'}}
+			</view>
+			<input type="text" placeholder="" v-model="allNum" disabled/>
+		</view>
+		<view class="item flex">
+			<view class="tit">
+				申请兑换数量
+			</view>
+			<input type="text" placeholder="请输入申请兑换数量" v-model="num" />
+		</view>
+		<view class="all" @click="getAll">
+			全部兑换
+		</view>
+		<view class="btn" @click="tradeMoney">
+			立即兑换
+		</view>
+	</view>
+</template>
+
+<script>
+	// tradeMoney
+	import { tradeMoney,passUser } from '@/api/zero.js'
+	export default {
+		data() {
+			return {
+				type: 0,// 0 通证-》阅读 1 商城-》复投
+				num: '',
+				allNum: 0,
+			}
+		},
+		onLoad(opt) {
+			this.type = opt.type
+			if(this.type == 1) {
+				uni.setNavigationBarTitle({
+					title: '兑换复投积分'
+				})
+			}
+			this.passUser()
+		},
+		onShow() {
+			
+		},
+		onReachBottom() {
+			
+		},
+		onReady() {
+			
+		},
+		methods: {
+			passUser() {
+				passUser().then(res => {
+					this.loading = false
+					if(this.type == 1) {
+						this.allNum = res.data.integral*1
+					}else {
+						this.allNum = res.data.pass ? res.data.pass:0
+					}
+				})
+			},
+			getAll() {
+				this.num = this.allNum
+			},
+			tradeMoney() {
+				// 
+				let that = this
+				if(!that.num) {
+					return that.$api.msg('请输入兑换数量')
+				}
+				if(that.num > that.allNum) {
+					return that.$api.msg('兑换数量超出可兑换数量')
+				}
+				that.loading = true
+				tradeMoney({
+					num: that.num,
+					type: that.type
+				}).then(res => {
+					uni.showToast({
+						title:'兑换成功',
+						duration:2000
+					});
+					this.num = ''
+					this.passUser()
+					
+				}).catch( err => {
+					that.loading = false
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		height: 100%;
+		background-color: #fff;
+	}
+	.item {
+		width: 710rpx;
+		margin: auto;
+		background-color: #fff;
+		height: 110rpx;
+		border-bottom: 1px solid #E6E6E6;
+		.tit {
+			line-height: 110rpx;
+			font-size: 32rpx;
+		}
+		input {
+			text-align: right;
+			font-size: 36rpx;
+			font-weight: bold;
+			color: #333333;
+		}
+	}
+	.all {
+		padding: 20rpx;
+		text-align: right;
+		font-size: 26rpx;
+		font-weight: 500;
+		color: #FF4C4C;
+	}
+	.btn {
+		width: 670rpx;
+		line-height: 88rpx;
+		background: #FF4C4C;
+		border-radius: 10rpx;
+		
+		font-size: 32rpx;
+		font-weight: bold;
+		color: #FFFFFF;
+		text-align: center;
+		margin: 60rpx auto;
+	}
+</style>

+ 187 - 0
pages/zero/ren.vue

@@ -0,0 +1,187 @@
+<template>
+	<view class="content">
+		<view class="top-bg">
+
+		</view>
+		<view class="top-wrap">
+			<view class="tit">
+				·我的收益
+			</view>
+			<view class="val">
+				{{userInfo.points || 0}}
+			</view>
+			<view class="">
+				累计收益
+			</view>
+		</view>
+		<view class="gg-wrap flex" v-for="(item,index) in ggInfo.day_video_count">
+			<image src="../../static/icon/jiang.png" mode=""></image>
+			<view class="gg-tit">
+				<view class="tit">
+					观看视频赚阅读积分
+				</view>
+				<view class="">
+					观看可获得阅读积分{{ggInfo.valid_bcount}}{{index}}
+				</view>
+			</view>
+			<view class="gg-btn" :class="{pass: ggInfo.valid_bcount*1 > index}" @click="ggInfo.valid_bcount*1 > index? '': goLock(index)">
+				{{ggInfo.valid_bcount*1 > index? '已观看': '去观看'}}
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+
+	import {
+		getGG,
+		createGG
+	} from '@/api/zero.js'
+	import {
+		getUserInfo,
+		getLevelList
+	} from '@/api/user.js';
+	export default {
+		data() {
+			return {
+				ggInfo: {},
+				id: 0
+			}
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'hasLogin'])
+		},
+		onLoad(opt) {
+			this.id = opt.id
+		},
+		onShow() {
+			this.loadBaseData()
+			this.getGG()
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo']),
+			loadBaseData() {
+				const obj = this
+				getUserInfo({})
+					.then(({
+						data
+					}) => {
+						obj.setUserInfo(data);
+						obj.getLevelList()
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			
+			},
+			getGG() {
+				getGG().then(res => {
+					console.log(res)
+					this.ggInfo = res.data
+				})
+			},
+			goLock() {
+				createGG({
+					ad_id: 0
+				}).then(res => {
+					uni.navigateTo({
+						url: '/pages/zero/gg?id=' + res.data.id
+					})
+				})
+
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.top-bg {
+		height: 210rpx;
+		background-color: #f53935;
+	}
+
+	.top-wrap {
+		width: 684rpx;
+		height: 254rpx;
+		background: linear-gradient(-70deg, #FF6362, #FF9465);
+		box-shadow: 0rpx 11rpx 17rpx 4rpx rgba(255, 76, 76, 0.1);
+		border-radius: 16rpx;
+		margin: -180rpx auto 20rpx;
+		text-align: center;
+		font-size: 20rpx;
+		font-weight: 500;
+		color: #fff;
+		padding: 30rpx;
+
+		.tit {
+			text-align: left;
+			font-size: 28rpx;
+			padding: 10rpx 0;
+		}
+
+		.val {
+			padding-bottom: 15rpx;
+			font-size: 80rpx;
+			font-weight: bold;
+		}
+	}
+
+	.gg-wrap {
+		width: 660rpx;
+		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;
+		}
+	}
+
+	.pass {
+		background: #999 !important;
+	}
+</style>

+ 115 - 25
pages/zero/task.vue

@@ -3,13 +3,19 @@
 		<view class="top-wrap">
 			<view class="user-calling">
 				<view class="calling">
-					<!-- <image src="../../static/img/calling.png" mode="" class="calling-img"></image> -->
+					<image class="avatar" :src="userInfo.avatar" mode="" v-if="userInfo.avatar"></image>
+					<image class="avatar" src="../../static/error/missing-face.png" mode="" v-else></image>
+					<view class="u-name">
+						{{userInfo.phone}}
+					</view>
+					<image class="user-shop-icon" v-if="pUser.zero_level" :src="pUser.zero_level.icon" mode=""
+						></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>
+			<image src="../../static/img/jfc.png" mode="" @click="navto('/pages/zero/award?type=9')"></image>
+			<image src="../../static/img/scjf.png" mode="" @click="navto('/pages/zero/award?type=10')"></image>
 		</view>
 		<view class="gg-wrap flex">
 			<image src="../../static/icon/jiang.png" mode=""></image>
@@ -21,7 +27,7 @@
 					观看可获得阅读积分
 				</view>
 			</view>
-			<view class="gg-btn">
+			<view class="gg-btn" @click="navto('/pages/zero/ren')">
 				去观看
 			</view>
 		</view>
@@ -30,17 +36,26 @@
 				<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'}}
+						余额:{{pUser[key.val]*1 || '0'}}
 					</view>
 				</view>
-				<view class="btn" v-if="key.agent" @click="goft">
-					复投
+				<!-- <view class="btn" v-if="key.hz" @click="navto('/pages/user/yjzz?type=3')">
+					互转/交易
+				</view> -->
+				<view class="btn" v-if="key.gs" @click="navto('/pages/zero/gs')">
+					挂售
+				</view>
+				<view class="btn" v-if="key.dy" @click="navto('/pages/zero/jfhz?type=0')">
+					兑换阅读积分
+				</view>
+				<view class="btn" v-if="key.agent" @click="navto('/pages/zero/jfhz?type=1')">
+					兑换复投积分
 				</view>
 				<view class="more" @click="navto('/pages/user/sz?type=' + key.type)">
 					查看明细
@@ -56,30 +71,45 @@
 		mapState,
 		mapMutations
 	} from 'vuex';
+	import { passUser } from '@/api/zero.js'
+	import {
+		getUserInfo,
+		getLevelList
+	} from '@/api/user.js';
 	export default {
 		data() {
 			return {
+				pUser: {},
+				listList: [],
 				navList: [{
 						name: '阅读积分',
-						val: 'resumption',
-						type: 1,
-						agent: true,
+						val: 'points',
+						type: 8,
+						hz: true,
+						gs: true,
+						dy: false,
+						agent: false,
 						img: '../../static/icon/task1.png',
 						bgc: '#fef2f2'
 					},
 					{
 						name: '通证',
-						val: 'brokerage_price',
-						type: 2,
+						val: 'pass',
+						type: 9,
+						gs: false,
+						hz: false,
+						dy: true,
 						agent: false,
 						img: '../../static/icon/task2.png',
 						bgc: '#fcf7e3'
 					},
 					{
 						name: '商场积分',
-						val: 'max_pool',
-						type: 3,
-						agent: false,
+						val: 'integral',
+						type: 10,
+						hz: false,
+						dy: false,
+						agent: true,
 						img: '../../static/icon/task3.png',
 						bgc: '#f7ecfc'
 					},
@@ -89,8 +119,41 @@
 		computed: {
 			...mapState('user', ['userInfo', 'hasLogin'])
 		},
+		onShow() {
+			this.getLevelList()
+			this.passUser()
+		},
 		methods: {
-
+			passUser() {
+				passUser().then(res => {
+					// console.log(res);
+					this.pUser = res.data
+				})
+			},
+			getLevelList() {
+				getLevelList().then(res => {
+					this.listList = res.data.list
+				})
+			},
+			showLevel(val) {
+				let data = this.listList.find(item => item.grade == val)
+				console.log(data);
+				if(data) {
+					return data.icon
+				}else {
+					return ''
+				}
+			},
+			navto(url) {
+				uni.navigateTo({
+					url,
+					fail() {
+						uni.switchTab({
+							url
+						})
+					}
+				})
+			},
 		}
 	}
 </script>
@@ -126,10 +189,29 @@
 		background-image: url('../../static/img/calling.png');
 		background-size: contain;
 		margin: auto;
-		// .calling-img {
-		// 	width: 100%;
-		// 	height: 100%;
-		// }
+		.avatar {
+			width: 106rpx;
+			height: 106rpx;
+			border-radius: 50%;
+			position: absolute;
+			top: 40rpx;
+			left: 48rpx;
+		}
+		.u-name {
+			position: absolute;
+			top: 57rpx;
+			left: 193rpx;
+			font-size: 36rpx;
+			font-weight: bold;
+			color: #773B00;
+		}
+		.user-shop-icon {
+			position: absolute;
+			top: 110rpx;
+			left: 193rpx;
+			width: 120rpx;
+			height: 40rpx;
+		}
 	}
 
 	.banne {
@@ -152,6 +234,7 @@
 			border-bottom: 1px solid #E8E8E8;
 
 			margin: auto;
+
 			.logo-wrap {
 				width: 81rpx;
 				height: 81rpx;
@@ -159,12 +242,13 @@
 				display: flex;
 				justify-content: center;
 				align-items: center;
+
 				.logo {
 					width: 40rpx;
 					height: 40rpx;
 				}
 			}
-			
+
 
 			.much {
 				padding-left: 14rpx;
@@ -182,8 +266,9 @@
 			}
 
 			.btn {
-				width: 127rpx;
+				// width: 127rpx;
 				height: 52rpx;
+				padding: 0 10px;
 				border: 2px solid #ff5050;
 				border-radius: 26rpx;
 				display: flex;
@@ -208,27 +293,31 @@
 			}
 		}
 	}
+
 	.gg-wrap {
 		width: 702rpx;
 		height: 140rpx;
 		background: #FEFEFE;
-		box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(231,71,68,0.09);
+		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;
@@ -236,6 +325,7 @@
 				color: #333333;
 			}
 		}
+
 		.gg-btn {
 			width: 125rpx;
 			height: 46rpx;

BIN
static/icon/gs-av.png


BIN
static/img/golock.png


BIN
static/img/ttchou.png


BIN
static/tabBar/ll-action.png


BIN
static/tabBar/ll.png