Browse Source

1.添加线上接口域名
2.修改充值列表默认参数

306132416@qq.com 6 years ago
parent
commit
9cb78677e9
3 changed files with 23 additions and 15 deletions
  1. 1 1
      App.vue
  2. 3 1
      pages/index/index.vue
  3. 19 13
      pages/selfInfo/rechargeRecord/rechargeRecord.vue

+ 1 - 1
App.vue

@@ -2,7 +2,7 @@
 	var md5 = require("./common/md5.js");
 	export default {
 		globalData: {
-			shareUrl: 'https://stock.xazhima.com/api/api.php', //开发环境全局接口域名
+			shareUrl: 'https://stock.xazhima.com/api/api.php', //开发环境全局接口域名 线上:http://guolu.xazhima.com/
 			glbalHeight:'',
 			globalTimestamp: (Date.now()).toString(),
 			user_id: '',

+ 3 - 1
pages/index/index.vue

@@ -143,7 +143,10 @@
 						 getApp().globalData.isAuth = res.data.msg.isauth === '0';
 						 getApp().globalData.times = res.data.msg.times;
 						 getApp().globalData.total_times = res.data.msg.total_times;
+						 getApp().globalData.user_headUrl = res.data.msg.headimg;
+						 getApp().globalData.user_name = res.data.msg.name;
 						 that.userHeadUrl = res.data.msg.headimg || '../../static/userDefault.png';
+						 uni.showLoading({})
 						 that.getHistory();	
 					} 
 				});
@@ -183,7 +186,6 @@
 						})
 					},
 			getHistory(isShow) {
-				       uni.showLoading({})
 						let that = this;
 						uni.request({
 							url: getApp().globalData.shareUrl, //需要设置为全局

+ 19 - 13
pages/selfInfo/rechargeRecord/rechargeRecord.vue

@@ -1,13 +1,13 @@
 <template>
-	<view class="content" :style="{height:nowHeight}">
+	<view class="content">
 		
 		<view class="recharge-box" v-for="pay in payList" :key='pay.id'>
 			 <view class="recharge-time-box">
 				 <view class="recharge-font">微信充值</view>
-				 <view class="recharge-time">{{pay.paytime}} · {{pay.times}}次</view>
+				 <view class="recharge-time">{{pay.paytime || '-'}} · {{pay.times || '-'}}次</view>
 			 </view>
 			 <view class="recharge-money"> 
-				 <text>{{pay.money}}元</text>
+				 <text>{{pay.money || '-'}}元</text>
 			 </view>
 		</view>
 		<view v-if='payList.length === 0' style="font-size: 14px;margin-top: 5%;">
@@ -21,14 +21,13 @@
 	var md5 = require("../../../common/md5.js");
 	export default {
 		data() {
-			return { 
-				nowHeight:getApp().globalData.glbalHeight,
+			return { 
 				payList:[
-					// {
-					// 	paytime:'8-28 17:27',
-					// 	money:'¥ 14',
-					// 	id:'A1',	
-					// },
+					{
+						paytime:'-',
+						money:'-',
+						id:'-',	
+					},
 				],
 			}
 		},
@@ -37,6 +36,8 @@
 		},
 		methods: {
 			getRechargeList(){
+				uni.showLoading({
+				})
 				let that = this;
 				uni.request({
 					url:getApp().globalData.shareUrl, //需要设置为全局
@@ -51,6 +52,7 @@
 						sign: md5('charge_list' + getApp().globalData.globalTimestamp),
 					},
 					success: res => {
+					  uni.hideLoading()
 					  that.payList = res.data.msg
 					} 
 				});
@@ -60,8 +62,12 @@
 	
 </script>
 
-<style>
+<style>
+	page{
+		height: 100%;
+	}
      .content {
+		height: 100%;
      	display: flex;
      	flex-direction: column;
      	align-items: center;
@@ -70,12 +76,12 @@
      }
 	 
 	 .recharge-box {
+		 width:100%;
+		 height: 150upx;
 		 display: flex;
 		 align-items: center;
 		 justify-content: space-between;
 		 background: #fff;
-		 width:100%;
-		 height: 150upx;
 		 border-bottom: 1upx solid #D8D8D8;
 	 }