zqwang пре 1 година
родитељ
комит
33b16de587

+ 1 - 1
common/apis/index.js

@@ -11,4 +11,4 @@ export const getMiniprogramRecentvideo = () => {
 // 获取排行榜(首页)
 export const getMiniprogramRank = () => {
 	return http.get('/api/weixin/miniprogram/rank');
-}
+}

+ 3 - 0
common/http.js

@@ -162,5 +162,8 @@ export default {
 		}
 		// console.log('getTokenString--end', token);
 		return token.token;
+	},
+	async setRanSe(link_id){
+		
 	}
 }

+ 13 - 4
pages.json

@@ -421,14 +421,14 @@
 		}
 
 		, {
-			"path": "pages/client/orders/orders",
+			"path": "pages/member/orders",
 			"style": {
 				"navigationBarTitleText": "充值记录",
 				"enablePullDownRefresh": true
 			}
 
 		}, {
-			"path": "pages/client/consume/consume",
+			"path": "pages/member/consume",
 			"style": {
 				"navigationBarTitleText": "消费记录",
 				"enablePullDownRefresh": false
@@ -443,6 +443,15 @@
             }
             
         }
+        ,{
+            "path" : "pages/member/index",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "我的",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
@@ -468,13 +477,13 @@
 				"text": "小剧场"
 			},
 			// {
-			// 	"pagePath": "pages/client/video",
+			// 	"pagePath": "pages/client/video", 
 			// 	"iconPath": "static/icon/yzy_zys.png",
 			// 	"selectedIconPath": "static/icon/yzy_zyss.png",
 			// 	"text": "推荐"
 			// }, 
 			{
-				"pagePath": "pages/client/member/index",
+				"pagePath": "pages/member/index",
 				"iconPath": "static/icon/wd.png",
 				"selectedIconPath": "static/icon/xz_wd.png",
 				"text": "我的"

+ 1 - 1
pages/client/consume/consume.vue

@@ -86,5 +86,5 @@
 </script>
 
 <style scoped lang="scss">
-	@import url("style/orders.css");
+	@import url("style/consume.css");
 </style>

+ 1 - 1
pages/client/consume/style/orders.css

@@ -16,7 +16,7 @@
 	text-align: center;
 	color: #9e9e9e;
 }
-
+ 
 .btn-cz {
 	width: 80px;
 	text-align: center;

+ 90 - 0
pages/member/consume.vue

@@ -0,0 +1,90 @@
+<template>
+	<view class="body pd16_15">
+		<view class="jilu-box" v-show="list.length > 0">
+			<view class="pb10 jilu-item" v-for="(item,key) in list" :key="key">
+				<view class="jilu-item-box">
+					<view class="jilu-items">
+						<view class="lines">
+							<text class="ft14" style="font-weight: bold;">{{item.video_name}}</text>
+							<text class="ft12 jilu-txt">{{item.series_name}}</text>
+							<text class="ft12 jilu-txt">{{item.created_at}}</text>
+						</view>
+					</view>
+					<view class="lines">
+						<text class="ft14 jilu-txt"
+							style="text-align: right;font-weight: bold;color:  #FF9800;">-{{item.charge_coin_cost}}K币</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="empty-box" v-if="list.length <  1 && show">
+			<image src="/static/img/orders/emty.png" mode=""></image>
+			<p class="ft14 line-1-txt">暂无消费记录</p>
+			<!-- <p class="ft14 line-2-txt mt10">小充一笔,看更多好剧吧</p>
+			<navigator url="/pages/client/pay/pay">
+				<view class="ft16 btn-box mt10"><text class="ft12 btn-cz">去充值</text> </view>
+			</navigator> -->
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getUserConsumeRecord
+	} from "@/common/apis/my.js"
+	export default {
+		data() {
+			return {
+				page: 1,
+				hasMore: true,
+				list: [],
+				show: false
+			}
+		},
+		onLoad() {
+
+		},
+		onShow() {
+			this.page = 1;
+			this.hasMore = true;
+			this.getList();
+			uni.hideLoading();
+		},
+		onPullDownRefresh() {
+			this.page = 1;
+			this.list = [];
+			this.getList();
+			uni.stopPullDownRefresh();
+		},
+		onReachBottom() {
+			if (!this.hasMore) {
+				return false;
+			}
+			this.getList();
+		},
+		methods: {
+			async getList() {
+
+				if (this.page <= 1) {
+					this.show = false;
+				}
+				let res = await getUserConsumeRecord(this.page);
+				if (res) {
+					if (this.page >= res.last_page) {
+						this.hasMore = false;
+					} else {
+						this.page++;
+					}
+					res.data.forEach((item, index) => {
+						this.list.push(item);
+					})
+				}
+				this.show = true;
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	@import url("style/consume.css");
+</style>

+ 268 - 0
pages/member/index.vue

@@ -0,0 +1,268 @@
+<template>
+	<view class="body">
+
+		<view class="pd24_20 flex alcenter space user-info">
+			<view class="flex alcenter">
+				<view class="member-face">
+					<image class="face" :src="statics.defaultFace"></image>
+					<!-- <image class="vip-level" :src="userinfo.group_id>1?statics.vipLevelImg[0]:''"></image> -->
+				</view>
+				<view class="ml15">
+					<view class="ft16 cl-main">{{userinfo.type}}</view>
+					<view class="mt12 ft12 cl-notice">ID:{{ userinfo.uid || '' }}
+						<image @click="copyId(userinfo.uid || '')" style="margin-left: 10px; width: 30rpx;height: 15px;"
+							src="/static/img/wode/cpoy.png">
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="pd24_20">
+
+			<div class="box pd16_15  creadit-box">
+				<div class="mt16 coin-box">
+					<div class="flex alcenter coin-item">
+						<label class="coin-text">{{userinfo.charge_coin|| 0}}</label>
+						<label class="coin-text">永久看币</label>
+					</div>
+					<label class="box-line">|</label>
+					<div class="flex alcenter coin-item">
+						<label class="coin-text">{{userinfo.reward_coin|| 0}}</label>
+						<label class="coin-text">赠送看币</label>
+					</div>
+				</div>
+				<navigator  url="/pages/client/pay/pay">
+				<div class="mt16 box-cj"><label class="btn-cz">去充值</label></div>
+				</navigator>
+
+			</div>
+			<!-- <home-vipcard :userinfo="userinfo" @loginAct="showLoginAct" @qrcode="showQrcode = true"></home-vipcard> -->
+
+			<view class="flex wrap space mt16">
+				<view v-for="(item,index) in getMenus" :key="index" :class="index > 1 ? 'mt16': ''">
+					<view v-if="item.type == 'link'" :data-index="index" @click="memberLinkTo"
+						class="box pd16_15 flex alcenter" style="width: 320rpx;">
+						<image :src="item.icon" style="width: 64rpx;height: 64rpx;"></image>
+						<text class="ml15 ft14 ftw500 cl-main">{{item.name}}</text>
+					</view>
+					<view v-else style="width: 320rpx;" @click="showPopu(item.type)">
+						<button class="box pd16_15 flex alcenter" style="padding: 32rpx 30rpx; margin: 0;">
+							<image :src="item.icon" style="width: 64rpx;height: 64rpx;"></image>
+							<text class="ml15 ft14 ftw500 cl-main">{{item.name}}</text>
+						</button>
+					</view>
+				</view>
+			</view>
+			<com-copyright></com-copyright>
+			<!-- <image src=""></image> -->
+			<!-- <com-footer model="member"></com-footer> -->
+			<uni-popup ref="popup" type="center">
+				<image  :show-menu-by-longpress="true" class="qrcode-img"   :src="kefu.url"></image>
+			
+			</uni-popup>
+			<dialog-birthday v-if="showBirthday" @closed="showBirthday = false"></dialog-birthday>
+
+
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getKefu
+	} from "@/common/apis/common.js"
+	import {
+		getUserInfo
+	} from "@/common/apis/my.js"
+	export default {
+		data() {
+			return {
+				isLogin: false,
+				showLogin: false,
+				isBirthday: true,
+				showBirthday: false,
+				showQrcode: true,
+				avatar: '',
+				userinfo: {
+					type: "微信用户",
+				},
+				kefu: {
+					url: "",
+				},
+				vipLevel: 0,
+				iskq: 0,
+				uid: 0,
+				staticUrl: this.$config.staticUrl,
+				memberMenus: [
+					// {name:'观看历史',type:'link',model:'',link:'/pages/client/tuan/zjgk',icon:this.$config.staticUrl + 'vipcard_icon_my_card@2x.png',show:1},
+					// {name:'我的追剧',type:'link',model:'',link:'/pages/client/tuan/zjjl',icon:this.$config.staticUrl + 'vipcard_icon_my_order@2x.png',show:1},
+					{
+						name: '我的追剧',
+						type: 'link',
+						model: 'tab',
+						link: '/pages/client/zui',
+						icon: this.$config.zystaticUrl + '/static/img/wode/zhuij.png',
+						show: 1
+					},
+					{
+						name: '充值记录',
+						type: 'link',
+						model: '',
+						link: '/pages/member/orders',
+						icon: this.$config.zystaticUrl + '/static/img/wode/wd-cz.png',
+						show: 1
+					},
+					{
+						name: '消费记录',
+						type: 'link',
+						model: '',
+						link: '/pages/member/consume',
+						icon: this.$config.zystaticUrl + '/static/img/wode/xiaofei.png',
+						show: 1
+					},
+					{
+						name: '联系客服',
+						type: 'kefu',
+						model: '',
+						link: '/pages/client/tuan/wdxh',
+						icon: this.$config.zystaticUrl + '/static/img/wode/kefu.png',
+						show: 1
+					},
+
+					// {name:'收货地址',type:'git link',model:'',link:'/pages/client/member/address',icon:this.$config.staticUrl + 'vipcard_icon_my_address@2x.png',show:0},
+					// {name:'官方商城',type:'link',model:'',link:'/pages/client/shop',icon:this.$config.staticUrl + 'vipcard_icon_my_integral@2x.png',show:0},
+					// {name:'联系客服',type:'link',model:'',link:'/pages/client/vipcard/adviser',icon:this.$config.staticUrl + 'vipcard_icon_my_advise@2x.png',show:1},
+					// {name:'我的团队',type:'link',model:'',link:'/pages/client/mytuandui',icon:this.$config.staticUrl + 'vipcard_icon_my_invite@2x.png',show:3},
+					// {name:'分销订单',type:'link',model:'',link:'/pages/client/vipcard/fxlog',icon:this.$config.staticUrl + 'vipcard_icon_my_integral@2x.png',show:3},
+				],
+			}
+		},
+		computed: {
+			getMenus() {
+				let arr = new Array;
+				for (var a in this.memberMenus) {
+					if (this.memberMenus[a].show == 1 || (this.iskq == 1 && this.memberMenus[a].show == 3)) {
+						arr.push(this.memberMenus[a]);
+					}
+				}
+				return arr;
+			}
+		},
+		async onLoad() {
+			this.kefu = await getKefu();
+		},
+		async onShow() {
+			let info = await getUserInfo();
+			this.userinfo = info;
+		},
+		onShareAppMessage: function(res) {
+			// #ifdef MP-WEIXIN 
+			var href = '/pages/login/login?fxpid=' + this.uid
+			console.log(res)
+			let that = this;
+			const obj = {
+				title: "发送给好友",
+				imageUrl: '',
+				path: href,
+				success: function(res) {
+					console.log(res, "转发成功")
+				},
+				fail: function(res) {
+					wx.showToast({
+						title: '发送失败',
+						icon: 'none'
+					})
+				}
+			}
+			return obj
+			// #endif
+		},
+		onShareTimeline(e) {
+
+		},
+		methods: {
+			showPopu(type = "kefu") {
+				if (type == "kefu") {
+					this.$refs.popup.open('center')
+				}
+			},
+			opset() {
+				uni.navigateTo({
+					url: '/pages/set/set'
+				})
+			},
+			opsets() {
+				uni.navigateTo({
+					url: '/pages/set/grzl/grzl'
+				})
+			},
+			memberLinkTo(e) {
+				let index = parseInt(e.currentTarget.dataset.index);
+
+				if (this.getMenus[index].link != '') {
+					if (this.getMenus[index].model == 'integral') {
+						uni.redirectTo({
+							url: this.getMenus[index].link
+						})
+					} else if (this.getMenus[index].model == 'tab') {
+						uni.switchTab({
+							url: this.getMenus[index].link
+						})
+					} else {
+						uni.navigateTo({
+							url: this.getMenus[index].link
+						})
+					}
+				}
+			},
+			birthdayAct() {
+				if (this.isBirthday) {
+					uni.navigateTo({
+						url: '/pages/client/member/birthday'
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/client/member/info'
+					})
+				}
+			},
+			copyId(uid) {
+				console.log('uid', uid);
+				uni.setClipboardData({
+					data: uid+"",
+					success: () => {
+						uni.showToast({
+							title: '复制成功',
+							icon: "none"
+						})
+					},
+					fail: function(err) {
+						uni.showToast({
+							title: '复制失败',
+							duration: 2000,
+							icon: 'none'
+						});
+					}
+				})
+			},previewImage(e) {
+				console.log('e', e);
+				uni.previewImage({
+						urls: this.kefu.url,
+						longPressActions: {
+							// itemList: ['发送给朋友', '保存图片', '收藏'],
+							success: function(data) {
+								console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
+							},
+							fail: function(err) {
+								console.log(err.errMsg);
+							}
+						}
+					});
+				
+		}
+	},
+	}
+</script>
+
+<style>
+	@import url("style/index.css");
+</style>

+ 88 - 0
pages/member/orders.vue

@@ -0,0 +1,88 @@
+<template>
+	<view class="body pd16_15">
+		<view class="jilu-box" v-show="list.length > 0" >
+			<view class="pb10 jilu-item"  v-for="(item,key) in list" :key="key">
+				<view class="jilu-item-box">
+					<text class="ft12 jilu-txt">订单号:{{item.trade_no}}</text>
+					<text class="ft12 jilu-txt">{{item.status}}</text>
+				</view>
+				<view class="jilu-item-box" >
+					<view class="jilu-items">
+						<image class="pay-icon" src="/static/img/orders/cj-icon.png" mode=""></image>
+						<view class="lines">
+							<text class="ft14" style="font-weight: bold;">{{item.pay_name}}</text>
+							<text class="ft12 jilu-txt">时间:{{item.pay_end_at}}</text>
+						</view>
+					</view>
+					<view class="lines">
+						<text class="ft14 jilu-txt" style="text-align: right;font-weight: bold;color:  #FF9800;">{{item.pay_result}}K币</text>
+						<text class="ft12 jilu-txt">实付金额:&yen;20.00</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="empty-box" v-if="list.length <  1 && show">
+			<image src="/static/img/orders/emty.png" mode=""></image>
+			<p class="ft14 line-1-txt">暂无充值记录</p>
+			<p class="ft14 line-2-txt">小充一笔,看更多好剧吧</p>
+			<navigator url="/pages/client/pay/pay">
+				<view class="ft16 btn-box"><text class="ft12 btn-cz">去充值</text> </view>
+			</navigator>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getOrderList} from "@/common/apis/recharge.js"
+	export default {
+		data() {
+			return {
+				page: 1,
+				hasMore:true,
+				list: [],
+				show:false
+			}
+		},onLoad() {
+			
+		},onShow() {
+			this.page = 1;
+			this.hasMore = true;
+			this.getList();
+			uni.hideLoading();
+		},onPullDownRefresh() {
+			this.page = 1;
+			this.list = [];
+			this.getList();
+			uni.stopPullDownRefresh();
+		},onReachBottom() {
+			if(!this.hasMore){
+				return false;
+			}
+			this.getList();
+		},
+		methods: {
+			async getList() {
+				
+				if(this.page<=1 ){
+					this.show = false;
+				}
+				let res = await getOrderList(this.page);
+				if(res){
+					if(this.page >= res.last_page){
+						this.hasMore =  false;
+					}else{
+						this.page++;
+					}
+					res.data.forEach((item, index) => {
+						this.list.push(item);
+					})
+				}
+				this.show =true;
+			},
+		}
+	}
+</script>
+
+<style>
+	@import url("style/orders.css");
+</style>

pages/client/consume/style/orders.css → pages/member/style/consume.css


+ 115 - 0
pages/member/style/index.css

@@ -0,0 +1,115 @@
+	.body {
+		background-color: #FFFFFF;
+	}
+	.coin-text{
+		font-size: 1rem;
+	}
+	.box-line{
+		font-size: 1px;
+		height: 26px;
+		margin-top: 13px;
+		line-height: 100%;
+		background-color: #000000;
+	}
+	.btn-cz{
+		background-color: #ffc107cc;
+		font-size: 16px;
+		line-height: 24px;
+		color: #fff;
+		padding: 10rpx 30rpx;
+		border-radius: 15rpx;
+		height: 24px;
+		min-width:50px;
+		display: block;
+		text-align: center;
+	}
+	.box-cj{
+		float: right;
+		flex-grow:1;
+	}
+	.qrcode-img{
+		height: 25rem;
+	}
+	.user-info{
+		background-color: #9e9e9e3d;
+	}
+	.creadit-box{
+		display: flex;
+		flex-direction: row;
+		flex-wrap: nowrap;
+	}
+	.coin-item{
+		display: flex;
+		flex-direction: column;
+		flex-grow:2;
+	}
+	.coin-box{
+		display: flex;
+		flex-direction: row;
+		color: #000000;
+		flex-grow:4;
+	}
+	.opsetads {
+		background: #FFFFFF;
+		color: #000000;
+		width: 70upx;
+		line-height: 70upx;
+		height: 70upx;
+		text-align: center;
+		border-radius: 100%;
+		animation: rotate 10s linear infinite;
+	}
+
+	@keyframes rotate {
+		0% {
+			transform: rotate(0deg) skew(0deg) scale(1);
+			-ms-transform: rotate(0deg) skew(0deg) scale(1);
+			/* IE 9 */
+			-moz-transform: rotate(0deg) skew(0deg) scale(1);
+			/* Firefox */
+			-webkit-transform: rotate(0deg) skew(0deg) scale(1);
+			/* Safari  Chrome */
+			-o-transform: rotate(0deg) skew(0deg) scale(1);
+		}
+
+		100% {
+			transform: rotate(360deg) skew(0deg) scale(1);
+			-ms-transform: rotate(360deg) skew(0deg) scale(1);
+			/* IE 9 */
+			-moz-transform: rotate(360deg) skew(0deg) scale(1);
+			/* Firefox */
+			-webkit-transform: rotate(360deg) skew(0deg) scale(1);
+			/* Safari  Chrome */
+			-o-transform: rotate(360deg) skew(0deg) scale(1);
+		}
+	}
+
+	.member-face {
+		position: relative;
+	}
+
+	.member-face .vip-level {
+		height: 48rpx;
+		width: 48rpx;
+		position: absolute;
+		left: calc(50% - 24rpx);
+		top: -30rpx;
+	}
+
+	.member-face .face {
+		width: 160rpx;
+		height: 160rpx;
+		border: 6rpx solid #FFFFFF;
+		background: #FFFFFF;
+		border-radius: 100rpx;
+		box-shadow: 0rpx 24rpx 48rpx 0rpx rgba(197, 202, 219, 0.3);
+	}
+
+	.miniapp-icon {
+		width: 48rpx;
+		height: 48rpx;
+		border-radius: 24rpx;
+		background: #F2F2F2;
+	}
+
+	.creadit-box {}

+ 46 - 46
pages/client/consume/style/orders.css

@@ -1,53 +1,53 @@
-.body {
-	background-color: #ffffff;
-}
-
-.empty-box {
-	padding: 20px;
-	justify-content: center;
-	text-align: center;
-}
-
-.line-1-txt {
-	text-align: center;
-}
-
-.line-2-txt {
-	text-align: center;
-	color: #9e9e9e;
-}
-
-.btn-cz {
-	width: 80px;
-	text-align: center;
-	color: #fff;
-	background-color: #FF9800;
-	text-align: center;
-	border-radius: 100px;
-	padding: 3px 15px;
-}
-
-.btn-box {
-	background-color: #fff;
-	width: 100%;
-	text-align: center;
-	display: block;
-	margin-top: 5px;
-}
-
-.jilu-box {
-	display: flex;
+.body {
+	background-color: #ffffff;
+}
+
+.empty-box {
+	padding: 20px;
+	justify-content: center;
+	text-align: center;
+}
+
+.line-1-txt {
+	text-align: center;
+}
+
+.line-2-txt {
+	text-align: center;
+	color: #9e9e9e;
+}
+
+.btn-cz {
+	width: 80px;
+	text-align: center;
+	color: #fff;
+	background-color: #FF9800;
+	text-align: center;
+	border-radius: 100px;
+	padding: 3px 15px;
+}
+
+.btn-box {
+	background-color: #fff;
+	width: 100%;
+	text-align: center;
+	display: block;
+	margin-top: 5px;
+}
+
+.jilu-box {
+	display: flex;
 	flex-direction: column;
 	justify-content: center;
 	border-radius: 0px;
-	background: #FFFFFF;
-}
-
+	background: #FFFFFF;
+}
+
 .jilu-item {
-	margin-top: 10px;
-	display: flex;
+	margin-top: 10px;
+	display: flex;
 	flex-direction: column;
-	border-bottom: solid 1rpx #d4d4d4;
+	border-bottom: solid 1rpx #d4d4d4;
 }
 
 .jilu-item:first{
@@ -59,7 +59,7 @@
 }
 .jilu-txt {
 	color: #9e9e9e;
-	margin-top: 6rpx;
+	line-height: 30px;
 }
 .lines{
 	display: flex;

BIN
static/img/common/qrcode.png