Bläddra i källkod

1、奖励记录中的积分右对齐
2、产品详情、帮助中心的详情页两边留几像素
3、奖励记录、分销团队进去闪一下undefined的优化
4、添加更换手机号码功能

zizhong.wang 6 år sedan
förälder
incheckning
ec5cbb7456

+ 17 - 4
pages/index/detailPage/index.vue

@@ -3,8 +3,8 @@
 	<view class="content">
 		<image class="logo" :src="detailObj.picture" mode='aspectFill'></image>
 		<view class="detail-title">
-			<text class="detail-font">{{detailObj.desc}}</text>
-		    <text class="price-style">¥{{detailObj.money}}</text> 
+			<text class="detail-font">{{detailObj.desc || '-'}}</text>
+		    <text class="price-style">¥{{detailObj.money || '-'}}</text> 
 		</view>
 		
 	<view class="share-box">
@@ -19,7 +19,7 @@
 	</view>
 		
 		<view class="product-title">产品详情</view>
-	    <view>
+	    <view class="rich-text-box" style="padding: 10px;">
 			<u-parse :content="detailObj.content"></u-parse>
 		</view>
 		<!-- <image class="logo-footer" src="/static/detail-bg2.png"></image> -->
@@ -69,6 +69,9 @@
 		},
 		methods: {
 			getDetailInfo(dId){
+				 uni.showLoading({
+					title: '加载中',
+				});
 				let that = this;
 				uni.request({
 					url: getApp().globalData.shareUrl, //需要设置为全局
@@ -84,6 +87,7 @@
 					},
 					success: res => {
 						if (res.data.code === 200) {
+							uni.hideLoading();
 							that.detailObj = res.data.msg;
 							that.shareContent = getApp().globalData.shareContent;
 							that.shareCode = getApp().globalData.shareTaobaoCode
@@ -197,7 +201,16 @@
 		margin-bottom: 2%;
 		font-size: 32rpx;
 	}
-		//分享模态框
+	
+	.rich-text-box {
+		font-size: 30rpx;
+		background: #fff;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+	}
+	
+	/* //分享模态框 */
 	.uni-share-content {
 		display: flex;
 		flex-wrap: wrap;

+ 9 - 5
pages/selfCenter/awardPage/index.vue

@@ -4,7 +4,7 @@
 		<view class="header-box"></view>
 		<view class="header-title">
 			<text style="margin-top: 4%;">累计积分</text>
-			<text style="margin-top: 2%;font-size: 36rpx;">{{totalNums || '0'}}</text>
+			<text style="margin-top: 2%;font-size: 36rpx;">{{totalNums || '-'}}</text>
 		</view>
 		
 		
@@ -23,11 +23,11 @@
 						<text>购买了产品</text>
 					</view>
 					<view>
-						<text style="color:#ccc;font-size: 28rpx;">{{item.time}}</text>
+						<text style="color:#ccc;font-size: 28rpx;">{{item.time || '-'}}</text>
 					</view>
 				</view>
 				<view class="count-sum">
-					{{item.score}}
+					{{item.score || '-'}}
 				</view>
 			</view>
 		
@@ -76,6 +76,9 @@ export default {
 	},
 	methods: {
 		 getScoreList(){
+			 uni.showLoading({
+			 	title: '加载中',
+			 });
 			 let that = this;
 			 uni.request({
 				url: getApp().globalData.shareUrl, //需要设置为全局
@@ -94,7 +97,7 @@ export default {
 				},
 				success: res => {
 					if (res.data.code === 200) {
-						console.log(res.data.msg)
+						uni.hideLoading();
 						that.totalNums = res.data.msg.totality;
 						that.teamList = res.data.msg.list || [];
 					}
@@ -130,7 +133,8 @@ export default {
 	.count-sum {
 		color: red;
 		font-size: 32rpx;
-		margin-left: 5%;
+		text-align: right;
+		width: 20%;
 	}
 	
 	.count-deatil-box {

+ 5 - 2
pages/selfCenter/cashoutPage/applyPage/index.vue

@@ -10,7 +10,7 @@
 		</view>
 		
 		<view class="all-cash-out-box">
-			<text>当前积分为{{userInfoObj.scorenumber || '0'}},可抵现金{{userInfoObj.nowmoney || '0'}},</text>
+			<text>当前积分为{{userInfoObj.scorenumber || '-'}},可抵现金{{userInfoObj.nowmoney || '-'}},</text>
 			<text style="color: #1a9ed3;" @click.stop="getAll">全部提现</text>
 		</view>
 		
@@ -35,6 +35,9 @@ export default {
 	},
 	methods: {
 		getUserInfo(){
+				 uni.showLoading({
+					title: '加载中',
+				});
 				  let that = this;
 					 uni.request({
 						url: getApp().globalData.shareUrl, //需要设置为全局
@@ -50,7 +53,7 @@ export default {
 						},
 						success: res => {
 							if (res.data.code === 200) {
-								console.log(res.data.msg)
+								uni.hideLoading();
 								that.userInfoObj = res.data.msg
 							}
 						}

+ 6 - 3
pages/selfCenter/cashoutPage/index.vue

@@ -4,7 +4,7 @@
 		<view class="header-box"></view>
 		<view class="header-title">
 			<text style="margin-top: 4%;">已提现(元)</text>
-			<text style="margin-top: 2%;font-size: 36rpx;">{{cashObj.totality || '0'}}</text>
+			<text style="margin-top: 2%;font-size: 36rpx;">{{cashObj.totality || '-'}}</text>
 		    <view class="apply-cash-box" @click.stop="goApplyCash">
 				<text>申请提现</text>
 				<image src="/static/arrow-go2.png" mode=""></image>
@@ -26,7 +26,7 @@
 				</view>
 				<view class="display-column">
 					<view class="count-sum">
-						{{item.money}}
+						{{item.money || '-'}}
 					</view>
 					<view class="count-sum" style="color: #ccc;">
 						{{item.status === '1' ? '已到账' : '进行中'}}
@@ -91,6 +91,9 @@ export default {
 			});
 		},
 		 getCashOutList(){
+			  uni.showLoading({
+			 	title: '加载中',
+			 });
 			 let that = this;
 			 uni.request({
 				url: getApp().globalData.shareUrl, //需要设置为全局
@@ -108,7 +111,7 @@ export default {
 				},
 				success: res => {
 					if (res.data.code === 200) {
-						console.log(res.data.msg)
+						uni.hideLoading();
 						that.cashObj = res.data.msg;
 						//that.cashOutList = res.data.msg
 					}

+ 6 - 4
pages/selfCenter/helpPage/helpDetail/index.vue

@@ -1,7 +1,7 @@
 <template>
 		<view>
 			<view>
-				<view class="help-content">
+				<view class="help-content" style="padding: 10px;">
 					<u-parse :content="helpHtmlParse"></u-parse>
 					<!-- <text style="margin-right: 75%;"> 如何分销?</text>
 					<text> 对于小程序所有授权用户,均可以进行分销推广产品以获得分销奖励</text>
@@ -31,7 +31,10 @@
 		},
 		methods: {
 			getDetail(id){
-					 let  that = this;
+				 uni.showLoading({
+					title: '加载中',
+				});
+				let  that = this;
 				uni.request({
 					url: getApp().globalData.shareUrl, //需要设置为全局
 					method: 'POST',
@@ -46,8 +49,8 @@
 					},
 					success: res => {
 						if (res.data.code === 200) {
+							uni.hideLoading();
 							that.helpHtmlParse = res.data.msg.content
-							console.log(res.data.msg)
 						}
 					}
 				});
@@ -59,7 +62,6 @@
 <style lang="scss">
 	// @import url("../../../../components/gaoyia-parse/parse.css");
 	.help-content {
-		padding: 15px;
 		font-size: 30rpx;
 		background: #fff;
 		display: flex;

+ 4 - 1
pages/selfCenter/helpPage/index.vue

@@ -54,6 +54,9 @@
 			 });
 		 },
 		 getHelpList(){
+			  uni.showLoading({
+			 	title: '加载中',
+			 });
 			 let  that = this;
 			 uni.request({
 			 	url: getApp().globalData.shareUrl, //需要设置为全局
@@ -70,7 +73,7 @@
 			 	},
 			 	success: res => {
 			 		if (res.data.code === 200) {
-			 			console.log(res.data.msg)
+			 			uni.hideLoading();
 						that.helpList = res.data.msg
 			 		}
 			 	}

+ 28 - 1
pages/selfCenter/index.vue

@@ -65,6 +65,16 @@
 					<image src="../../static/arrow-right2.png" mode=""></image>
 				</view>
 			</view>
+			
+			<button class="list-content change-phone" style="border-bottom: none;" 
+			 open-type="getPhoneNumber" @getphonenumber="changePhoneNumber">
+				<text class="margin-left5">更改手机号码</text>
+				<view class="apply-box">
+					<text style="color: #999;visibility: hidden;">点击申请</text>
+					<image src="../../static/arrow-right2.png" mode=""></image>
+				</view>
+			</button>
+			
 		</view>
 		<uni-popup ref="showtip" type="center" :mask-click="false" @change="change">
 			<view class="uni-tip">
@@ -294,9 +304,20 @@ export default {
 		 	complete: () => {}
 		 });
 	 },
+	 changePhoneNumber(e){
+		let that = this;
+		console.log(e,'change')
+		 if (e.detail.errMsg == 'getPhoneNumber:ok') { //允许授权执行跳转
+		     console.log(e.detail.iv)
+			 that.phoneRequest(e.detail.iv, e.detail.encryptedData, getApp().globalData.session_key)  
+			} 
+		else { 
+			 // that.isNeedPhone = false;
+		} 
+	 },
 	 getPhoneNumber(e){
 	 	let that = this;
-		console.log(e)
+		console.log(e,'get')
 	 	 if (e.detail.errMsg == 'getPhoneNumber:ok') { //允许授权执行跳转
 		     console.log(e.detail.iv)
 			that.phoneRequest(e.detail.iv, e.detail.encryptedData, getApp().globalData.session_key)  
@@ -423,6 +444,12 @@ export default {
 	height: 100rpx;
 	border-bottom: 1px solid #dbdbdb;
 }
+.change-phone {
+	padding-left: 0!important;
+	padding-right: 0!important;
+	color: #000!important;
+	font-size: 30rpx!important;
+}
 .apply-box {
 	display: flex;
 	align-items: center;

+ 23 - 20
pages/selfCenter/recommendTeam/index.vue

@@ -116,26 +116,29 @@ export default {
 			return arr;
 		},
 		getTeamRequest(){
-			  let that = this;
-						 uni.request({
-							url: getApp().globalData.shareUrl, //需要设置为全局
-							method: 'POST',
-							header: {
-								'content-type': 'application/x-www-form-urlencoded'
-							},
-							data: {
-								method: 'getUserTeamList',
-								timestamp: getApp().globalData.globalTimestamp, //Date.now()
-								uid:getApp().globalData.user_id,
-								sign: md5('getUserTeamList' + getApp().globalData.globalTimestamp)
-							},
-							success: res => {
-								if (res.data.code === 200) {
-									console.log(res.data.msg)
-									that.teamList = that.filterSelf(res.data.msg)
-								}
-							}
-						 }); 
+			 uni.showLoading({
+				title: '加载中',
+			});
+			 let that = this;
+			 uni.request({
+				url: getApp().globalData.shareUrl, //需要设置为全局
+				method: 'POST',
+				header: {
+					'content-type': 'application/x-www-form-urlencoded'
+				},
+				data: {
+					method: 'getUserTeamList',
+					timestamp: getApp().globalData.globalTimestamp, //Date.now()
+					uid:getApp().globalData.user_id,
+					sign: md5('getUserTeamList' + getApp().globalData.globalTimestamp)
+				},
+				success: res => {
+					if (res.data.code === 200) {
+						uni.hideLoading();
+						that.teamList = that.filterSelf(res.data.msg)
+					}
+				}
+			 }); 
 		},
 		showChild(index) {
 			this.arrowFlagList.splice(index, 1, !this.arrowFlagList[index]);