Tang 4 tahun lalu
induk
melakukan
06125f77d4
4 mengubah file dengan 19 tambahan dan 15 penghapusan
  1. 2 2
      common/request.js
  2. 14 10
      pages/index/index.vue
  3. 2 2
      pages2/study/index.vue
  4. 1 1
      pages2/wd/ranking.vue

+ 2 - 2
common/request.js

@@ -1,7 +1,7 @@
 
-// const BASE_URL = 'http://192.168.1.222:8088'
+const BASE_URL = 'http://192.168.1.222:8088'
  // const BASE_URL = 'http://192.168.1.104:8088' 
-const BASE_URL = 'https://api.xyyxt.net' 
+// const BASE_URL = 'https://api.xyyxt.net' 
 // const BASE_URL = 'http://127.0.0.1:8088' 
 // const BASE_URL = 'https://api.xyyxt.net'  //
 import store from '@/store/index.js'

+ 14 - 10
pages/index/index.vue

@@ -38,20 +38,24 @@ export default {
 	onLoad(option) {},
 	onShow() {},
 	onShareAppMessage: function(res) {
-		var self = this
+		var self = this;
 		return {
 			title: '中正',
 			path: `/pages/index/index`,
-			success: function(){
-				if(self.$store.state.userInfo !== null){
-					console.log('已登录')
-				var data = {
-					taskType : 3
-				}
-				self.$api.taskShare(data).then(result => {
-					
-				})
+			success(res) {
+				if (self.$store.state.userInfo !== null) {
+					console.log('已登录');
+					var data = {
+						taskType: 3
+					};
+					self.$api.taskShare(data).then(result => {});
 				}
+			},
+			fail(res) {
+				uni.showToast({
+					title: '分享失败',
+					icon: 'none'
+				});
 			}
 		};
 	},

+ 2 - 2
pages2/study/index.vue

@@ -14,7 +14,7 @@
 							</u-col>
 							<u-col span="7">
 								<view style="position: relative;height: 134rpx;padding-left: 10rpx;">
-									<view class="c_title">{{ item.categoryName }}</view>
+									<view class="c_title">{{ item.courseName }}</view>
 								</view>
 							</u-col>
 						</u-row>
@@ -176,7 +176,7 @@ export default {
 .content {
 	margin-top: 20rpx;
 	width: 100%;
-	height: 225rpx;
+	height: 165rpx;
 	background: #ffffff;
 	box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
 	border-radius: 32rpx;

+ 1 - 1
pages2/wd/ranking.vue

@@ -22,7 +22,7 @@
 					<view class="fie" style="display: flex;align-items: center;font-size: 28rpx;color: #0183fe;font-weight: 500;">
 						<span>第{{ info2.rank }}名</span>
 						<view class="ics" style="margin: 0rpx 17rpx;width: 1rpx;height: 26rpx;background-color: #d9edff;border-radius: 1rpx;"></view>
-						<span>{{ info2.hourse }}h</span>
+						<span>{{info2.hourse === null ? '0' : info2.hourse }}h</span>
 					</view>
 				</view>