浏览代码

1.修复首页图片搞定自适应
2.添加申请资格接口
3.积分样式居右

zizhong.wang 5 年之前
父节点
当前提交
0c6e85bc8e
共有 3 个文件被更改,包括 42 次插入5 次删除
  1. 2 2
      pages/index/index.vue
  2. 1 0
      pages/selfCenter/awardPage/index.vue
  3. 39 3
      pages/selfCenter/index.vue

+ 2 - 2
pages/index/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="content">
-		<image class="logo" :src="pageInfo.picture"></image>
+		<image class="logo" :src="pageInfo.picture" mode="widthFix"></image>
 		<view class="share-box">
 			<!-- <view>分销商分享给好友,好友购买产品成功后即可获</view>
 			<view>得分享奖励</view>
@@ -314,7 +314,7 @@
 	}
 
 	.logo {
-		height: 400px;
+		// height: 400px;
 		width: 100%;
 		margin-bottom: 30upx;
 	}

+ 1 - 0
pages/selfCenter/awardPage/index.vue

@@ -130,6 +130,7 @@ export default {
 	.count-sum {
 		color: red;
 		font-size: 32rpx;
+		margin-left: 5%;
 	}
 	
 	.count-deatil-box {

+ 39 - 3
pages/selfCenter/index.vue

@@ -213,14 +213,50 @@ export default {
 	 applyPower(){
 		 let that = this;
 		 if(that.userStatus === '点击申请'){
-		 	 that.$refs.showtip.open()  
+				that.getUserIsApply()
 		 }else{
-		 	 return false
+		 	 return false;
 		 }
+		 
+	 },
+	 getUserIsApply(){
+		 	 let that = this;
+		 		 uni.request({
+		 				url: getApp().globalData.shareUrl, //需要设置为全局
+		 				method: 'POST',
+		 				header: {
+		 					'content-type': 'application/x-www-form-urlencoded'
+		 				},
+		 				data: {
+		 					method: 'getApplyCompetency',
+		 					timestamp: getApp().globalData.globalTimestamp, //Date.now()
+		 					uid:getApp().globalData.user_id,
+		 					sign: md5('getApplyCompetency' + getApp().globalData.globalTimestamp)
+		 				},
+		 				success: res => {
+		 					if (res.data.code === 200) {
+								if(res.data.msg.status === 1){
+									 that.$refs.showtip.open() 
+								}else {
+									uni.showToast({
+										title: '您目前还没有分销资格',
+										icon: 'none',
+										duration:3000
+									});
+								}
+		 					}else {
+								uni.showToast({
+									title: res.data.msg,
+									icon: 'none',
+									duration:3000
+								});
+							}
+		 				}
+		 });	
 	 },
 	 submitApply(){
 		 let that = this;
-		uni.request({
+		 uni.request({
 				url: getApp().globalData.shareUrl, //需要设置为全局
 				method: 'POST',
 				header: {