Rorschach преди 6 години
родител
ревизия
e34acbd666

+ 53 - 41
component/follow/follow.js

@@ -1,61 +1,73 @@
 import httpRequestApi from '../../utils/APIClient';
+import {
+  formatDate
+} from '../../utils/util';
 export const followInit = (that) => {
   that.setData({
-    followData: {
-      title: '关注',
-      wareCards: [{
-          title: "铺满色巴掌的水泥道",
-          grade: "一年级 上学期",
-          img: "../../static/image/timg.jpg",
-          plays: "1",
-          likes: "2",
-          classId: "1",
-          avatar: '../../static/image/timg.jpg',
-          nickName: '萝莉小猫咪',
-          time: '11-01 14:14'
-        },
-        {
-          title: "铺满色巴掌的水泥道",
-          grade: "一年级 上学期",
-          img: "../../static/image/timg.jpg",
-          plays: "1",
-          likes: "2",
-          classId: "1",
-          avatar: '../../static/image/timg.jpg',
-          nickName: '萝莉小猫咪',
-          time: '11-01 14:14'
-        },
-        {
-          title: "铺满色巴掌的水泥道",
-          grade: "一年级 上学期",
-          img: "../../static/image/timg.jpg",
-          plays: "1",
-          likes: "2",
-          classId: "1",
-          avatar: '../../static/image/timg.jpg',
-          nickName: '萝莉小猫咪',
-          time: '11-01 14:14'
-        },
-      ]
-    }
+    followData: []
+    //   title: '关注',
+    //   wareCards: [{
+    //       title: "铺满色巴掌的水泥道",
+    //       grade: "一年级 上学期",
+    //       img: "../../static/image/timg.jpg",
+    //       plays: "1",
+    //       likes: "2",
+    //       classId: "1",
+    //       avatar: '../../static/image/timg.jpg',
+    //       nickName: '萝莉小猫咪',
+    //       time: '11-01 14:14'
+    //     },
+    //     {
+    //       title: "铺满色巴掌的水泥道",
+    //       grade: "一年级 上学期",
+    //       img: "../../static/image/timg.jpg",
+    //       plays: "1",
+    //       likes: "2",
+    //       classId: "1",
+    //       avatar: '../../static/image/timg.jpg',
+    //       nickName: '萝莉小猫咪',
+    //       time: '11-01 14:14'
+    //     },
+    //     {
+    //       title: "铺满色巴掌的水泥道",
+    //       grade: "一年级 上学期",
+    //       img: "../../static/image/timg.jpg",
+    //       plays: "1",
+    //       likes: "2",
+    //       classId: "1",
+    //       avatar: '../../static/image/timg.jpg',
+    //       nickName: '萝莉小猫咪',
+    //       time: '11-01 14:14'
+    //     },
+    //   ]
+    // }
   })
   //请求数据封装
   that.getWorks = (uid, pageNo, pageSize) => {
     httpRequestApi.getFollowWorks(uid, pageNo, pageSize).success(res => {
+      console.log(res)
       const followData = res.data.data.list;
-      const followTemp = [];
+      // const followTemp = [];
       followData.forEach(item => {
         const temp = {};
+        console.log(item.userRead.id)
         temp.nickName = item.user.wechatName;
         temp.avatar = item.user.avatar;
         temp.plays = item.userRead.playAmount;
         temp.likes = item.userRead.likeAmount;
+        temp.img = item.userRead.iconImg;
         temp.id = item.userRead.id;
+        temp.title = item.userRead.title;
+        temp.time = formatDate(item.userRead.gmtCreated, 3);
         // 还差一些字段
-        followTemp.push(temp);
+        that.data.followData.push(temp);
       });
-      console.log(followTemp);
+      // console.log(followTemp);
+      that.setData({
+        followData: that.data.followData,
+        followPageTotalNo: res.data.data.totalNo
+      })
     });
   }
-  that.getWorks(1, 1, 10);
+  that.getWorks(that.uid, 1, 5);
 }

+ 1 - 1
component/follow/follow.wxml

@@ -1,6 +1,6 @@
 <template name="follow">
   <view class="followWares" style="flex-direction:row;">
-    <view wx:for="{{followData.wareCards}}" wx:key="{{index}}" class="followWareCard" bindtap="openWorks" data-uid="{{item.classId}}" data-title="{{item.title}}">
+    <view wx:for="{{followData}}" wx:key="{{index}}" class="followWareCard" bindtap="openWorks" data-readid="{{item.id}}" data-title="{{item.title}}">
       <view class="userCard">
         <image class="avatar" src="{{item.avatar}}" />
         <view class="nameCross">

+ 1 - 1
component/hot/hot.js

@@ -148,5 +148,5 @@ export const hotInit = (that) => {
     console.log(e)
   }
   that.getIndex();
-  that.getHotRecommend(1, 1, 3)
+  that.getHotRecommend(that.uid, 1, 3)
 }

+ 63 - 10
component/share/share.js

@@ -1,4 +1,5 @@
 // component/shar-dialog/shar-dialog.js
+import httpRequestApi from '../../utils/APIClient';
 Component({
   /**
    * 组件的属性列表
@@ -20,6 +21,7 @@ Component({
     author: '',
     iconImg: '',
     title: '',
+    path: ''
   },
 
   /**
@@ -38,6 +40,12 @@ Component({
       ctx.fill()
       ctx.arc(185, 48, 37, 0, 2 * Math.PI, false)
       ctx.clip(); //画了圆 再剪切  原始画布中剪切任意形状和尺寸。一旦剪切了某个区域,则所有之后的绘图都会被限制在被剪切的区域内  
+      // wx.downloadFile({
+      //   url: this.data.avatar,
+      //   success(res) {
+      //     ctx.drawImage(res.tempFilePath, 148, 8, 100, 100);
+      //   }
+      // });
       ctx.drawImage(this.data.avatar, 148, 8, 100, 100); //插入图片  
       ctx.restore(); //恢复之前保存的绘图上下文 恢复之前保存的绘图上下午即状态 可以继续绘制
       ctx.setFontSize(20)
@@ -48,7 +56,15 @@ Component({
         ctx.fillText('已使出洪荒之力,声情并茂的为', (370 - ctx.measureText('已使出洪荒之力,声情并茂的为').width) / 2, 138)
         ctx.fillText(`《${this.data.title}》`, (370 - ctx.measureText(`《${this.data.title}》`).width) / 2, 160)
         ctx.fillText(`配了一段惊世之作`, (370 - ctx.measureText(`配了一段惊世之作`).width) / 2, 182)
-        // ctx.drawImage(this.data.iconImg, 9, 205, 352, 145);
+        // 保存图片到本地
+        // wx.downloadFile({
+        //   url: this.data.iconImg,
+        //   success(res) {
+        //     console.log(res)
+        //     ctx.drawImage(res.tempFilePath, 9, 205, 352, 145);
+        //   }
+        // });
+        ctx.drawImage(this.data.iconImg, 9, 205, 352, 145);
         ctx.setFontSize(18)
         ctx.setFillStyle('#000')
         ctx.drawImage('../../../static/groupImg/share_bottom.png', 3, 419, 370, 192);
@@ -101,12 +117,12 @@ Component({
           canvasId: 'myCanvas',
           success: (res) => {
             console.log(res.tempFilePath)
-            // wx.saveImageToPhotosAlbum({
-            //   filePath: res.path,
-            //   success(res) {
-            //     console.log(res);
-            //    }
-            // })
+            wx.saveImageToPhotosAlbum({
+              filePath: res.path,
+              success(res) {
+                console.log(res);
+              }
+            })
             that.setData({
               imgUrls: res.tempFilePath
             })
@@ -120,12 +136,39 @@ Component({
     share: function (data) {
       console.log(this.data)
       console.log(data)
+      // 下载icon
+      wx.downloadFile({
+        url: data.iconImg,
+        success: (res) => {
+          this.setData({
+            iconImg: res.tempFilePath
+          })
+        }
+      });
+      // 下载头像
+      wx.downloadFile({
+        url: data.avatar,
+        success: (res) => {
+          this.setData({
+            avatar: res.tempFilePath
+          })
+        }
+      });
+      // 生成二维码并下载
+      httpRequestApi.createQRCode({
+        page: data.path,
+        scene: "par=no"
+      }).success(res => {
+        console.log(data.path)
+        console.log(res)
+      })
       this.setData({
         shareFlag: !this.data.shareFlag,
-        avatar: data.avatar,
+        // avatar: data.avatar,
         author: data.author,
-        iconImg: data.iconImg,
+        // iconImg: data.iconImg,
         title: data.title,
+        path: data.path
       })
     },
     PreservationImg: function () {
@@ -139,5 +182,15 @@ Component({
     shareFriend: function () {
       this.triggerEvent('customevent', {})
     }
-  }
+  },
+  onShareAppMessage: (res) => {
+    if (res.from === 'button') {
+      // 来自页面内转发按钮
+      console.log(res.target)
+    }
+    return {
+      title: this.data.title,
+      path: this.data.path
+    }
+  },
 })

+ 14 - 1
pages/index/index.js

@@ -41,10 +41,11 @@ Page({
     ],
     winH: 568,
     myIndex: 1,
+    followData:[],
     recommendPageNo:1,
     recommendTotalNo:0,
     followPageNo:1,
-    followPageSize:0,
+    followPageTotalNo:0,
     templates: 'hot',
     title: 'index中的title',
     jurisdictionFlag: true,
@@ -144,5 +145,17 @@ Page({
         console.log('没有更多')
       }
     }
+    if(this.data.myIndex === 2){
+      console.log(this.data.followPageTotalNo)
+      this.setData({
+        followPageNo: this.data.followPageNo+1
+      })
+      if(this.data.followPageNo <= this.data.followPageTotalNo ){
+        this.getWorks(this.uid, this.data.followPageNo, 5);
+        
+      } else {
+        console.log('没有更多')
+      }
+    }
   }
 })

+ 18 - 8
pages/main/class/class.js

@@ -15,6 +15,8 @@ Page({
     title: '',
     id: '',
     iconImg: '',
+    pageNo: 1,
+    totalNo: 0,
     collectFlag: false,
   },
   onLoad: function (option) {
@@ -54,7 +56,7 @@ Page({
     let id = this.data.id;
     let title = this.data.title;
     wx.navigateTo({
-      url: `../../main/reading/reading?id=${id}&title=${this.data.title}&img=${this.data.iconImg}&video=${this.data.videoUrl}`
+      url: `../../main/reading/reading?id=${id}`
     })
   },
   goToWorks: function (e) {
@@ -83,9 +85,9 @@ Page({
   getReadInfo: function (pageNo, pageSize) {
     // const uid =  wx.getStorageSync('uid');
     const data = {
-      lessonId: 1,
-      pageNo: pageNo,
-      pageSize: pageSize
+      lessonId: this.data.id,
+      pageNo: this.data.pageNo,
+      pageSize: 1
     };
     httpRequestApi.getClassRead(this.uid, data).success(res => {
       const readInfo = res.data.data.list;
@@ -98,16 +100,24 @@ Page({
         temp.likes = item.userRead.likeAmount ? item.userRead.likeAmount : 0;
         temp.uid = item.userRead.uid;
         temp.id = item.userRead.id;
-        readTemp.push(temp);
+        this.data.works.push(temp);
       });
       this.setData({
+        totalNo: res.data.data.totalNo,
         total: res.data.data.totalSize,
-        works: readTemp
+        works: this.data.works
       })
     });
   },
   // 下拉加载
-  scrollUpdate: function (e) {
-    console.log(e)
+  onReachBottom: function(e){
+    console.log(this.data.totalNo);
+    this.setData({
+      pageNo: this.data.pageNo+1
+    })
+    if(this.data.pageNo <= this.data.totalNo ){
+      this.getReadInfo();
+      
+    }
   }
 })

+ 5 - 1
pages/main/class/class.json

@@ -1 +1,5 @@
-{}
+{
+    "window": {
+        "onReachBottomDistance": 50
+      }
+}

+ 2 - 2
pages/main/class/class.wxml

@@ -1,6 +1,6 @@
 <view class="classPage">
     <video id="classVideo" class="videoSection" src="{{videoUrl}}" controls show-fullscreen-btn="{{fullScreenBtn}}" show-play-btn="{{playBtn}}"></video>
-    <scroll-view class="readWorksSection" lower-threshold="160" bindscrolltolower="scrollUpdate">
+    <view class="readWorksSection" >
         <view class="peopleNum">
             <image class="peoplesIcon" src="../../../static/image/peoples.png" />
             <view class="title">共有{{total}}人完成了录音</view>
@@ -16,7 +16,7 @@
                 <text class="likeNum">{{item.likes}}</text>
             </view>
         </view>
-    </scroll-view>
+    </view>
     <view class="footSection">
         <image class="blackbord" src="../../../static/image/blackbord.png" />
         <view class="collectBtn footerBtn" bindtap="collect">

+ 2 - 1
pages/main/class/class.wxss

@@ -95,7 +95,8 @@
 
 .readWorksSection .workCard {
     width: 716rpx;
-    height: 132rpx;
+    /* height: 132rpx; */
+    height: 700rpx;
     display: flex;
     align-items: center;
     flex-direction: row;

Файловите разлики са ограничени, защото са твърде много
+ 26 - 12
pages/main/reading/reading.js


+ 22 - 14
pages/social/works/works.js

@@ -20,6 +20,7 @@ Page({
         moneyNormal: 'moneyNormal',
         ifReward: false,
         id: '',
+        path:'',
         replyModal: false
         // shareFlag: false
     },
@@ -62,6 +63,7 @@ Page({
                 videoSrc: works.originVideo,
                 audioSrc: works.audioPath,
                 iconImg: works.iconImg,
+                classId: works.lessonId,
                 isLike: res.data.data.isLike,
                 isFans: res.data.data.isFans,
             })
@@ -84,13 +86,17 @@ Page({
             return;
         }
         httpRequestApi.likeWorks(this.uid, this.data.id).success(res => {
-            console.log(this.uid)
-            wx.showToast({
-                title: '点赞数+1',
-                icon: 'success',
-                duration: 1000
-              })
-        });
+            this.setData({
+                isLike: true
+            },()=>{
+                wx.showToast({
+                    title: '点赞数+1',
+                    icon: 'success',
+                    duration: 1000
+                  })
+            });
+            })
+            
     },
     // 弹出分享框
     openShare: function (e) {
@@ -103,6 +109,7 @@ Page({
             author: this.data.author,
             iconImg: this.data.iconImg,
             title: this.data.title,
+            path: `pages/social/works/works?id=${this.data.id}&title=${this.data.title}`
             // tip: this.data.tip,
         }
         this.shareDialog.share(data);
@@ -123,19 +130,20 @@ Page({
         let id = this.data.id;
         let title = this.data.title;
         wx.navigateTo({
-            url: `../../main/reading/reading?id=${id}&title=${title}&img=${this.data.iconImg}&video=${this.data.videoSrc}`
+            url: `../../main/reading/reading?id=${this.data.classId}`
         })
     },
-    onShareAppMessage: function (res) {
+    onShareAppMessage: function(res) {
         if (res.from === 'button') {
-            // 来自页面内转发按钮
-            console.log(res.target)
+          // 来自页面内转发按钮
+          console.log(res.target)
         }
         return {
-            title: '测试',
-            path: '/pages/social/works/works'
+          title: this.data.title,
+          path: `pages/social/works/works?id=${this.data.id}&title=${this.data.title}`,
+          imageUrl: this.data.iconImg
         }
-    },
+      },
     follow: function () {
         // let uid = wx.getStorageSync('uid');
         let followUid = this.data.authorUid;

+ 1 - 1
pages/social/works/works.wxml

@@ -4,7 +4,7 @@
         <image class="avatar" src="{{authorAvatar}}" />
         <text class="nickName">{{author}}</text>
         <view class="like" bindtap="likeWorks">
-            <image src="../../../static/image/liked.png" />
+            <image src="{{isLike? '../../../static/image/liked.png' : '../../../static/image/like.png'}}" />
             <text class="likeBtn">{{isLike ? '已' : ''}}点赞</text>
         </view>
         <view class="follow">

+ 10 - 3
project.config.json

@@ -36,7 +36,7 @@
 			"list": []
 		},
 		"miniprogram": {
-			"current": 7,
+			"current": 8,
 			"list": [
 				{
 					"id": 0,
@@ -81,10 +81,17 @@
 					"query": ""
 				},
 				{
-					"id": -1,
+					"id": 7,
 					"name": "作品页面",
 					"pathName": "pages/social/works/works",
-					"query": "id=1541489786444388&title=铺满色巴掌的水泥道"
+					"query": "id=1541683622900612&title=【课文1】秋天"
+				},
+				{
+					"id": 8,
+					"name": "测试的",
+					"pathName": "pages/social/works/works",
+					"query": "id=1541743536238348&title=【课文6】比尾巴",
+					"scene": "1012"
 				}
 			]
 		}

+ 56 - 49
utils/APIClient.js

@@ -37,7 +37,7 @@ module.exports = {
 		}).url(url).send();
 	},
 	// 获取全部课本
-	getAllBooks(pageNo,pageSize) {
+	getAllBooks(pageNo, pageSize) {
 		let url = getProductUrl('wx/product');
 		return request.getInstance().header({
 			uid: wx.getStorageSync('uid')
@@ -47,41 +47,41 @@ module.exports = {
 		}).send();
 	},
 	// 获取课本详情
-	getBookDetail(uid,id) {
+	getBookDetail(uid, id) {
 		let url = getProductUrl(`wx/product/${id}`);
 		return request.getInstance().header({
 			uid
 		}).url(url).send();
 	},
 	// 获取单课详情
-	getClassDetail(uid,id) {
+	getClassDetail(uid, id) {
 		let url = getProductUrl(`wx/lesson/${id}`);
 		return request.getInstance().header({
 			uid
 		}).url(url).send();
 	},
 	// 检查是否收藏过课程
-	classIsLike(uid,data){
+	classIsLike(uid, data) {
 		let url = getProductUrl(`wx/favorites/isLike`);
 		return request.getInstance().header({
 			uid
 		}).url(url).data(data).send();
 	},
-	getClassDetail(uid,id) {
+	getClassDetail(uid, id) {
 		let url = getProductUrl(`wx/lesson/${id}`);
 		return request.getInstance().header({
 			uid
 		}).url(url).send();
 	},
 	// 获取单课朗读信息
-	getClassRead(uid,data){
+	getClassRead(uid, data) {
 		let url = getBaseUrl(`wx/userRead`);
 		return request.getInstance().header({
 			uid
 		}).data(data).url(url).send();
 	},
 	// 作品播放了+1
-	playWorks(uid,readId){
+	playWorks(uid, readId) {
 		let url = getBaseUrl(`wx/userRead/play/${readId}`);
 		return request.getInstance().header({
 			uid
@@ -96,7 +96,7 @@ module.exports = {
 		}).url(url).data(data).method('POST').send();
 	},
 	// 点赞作品
-	likeWorks(uid,readId){
+	likeWorks(uid, readId) {
 		let url = getBaseUrl(`wx/userRead/like/${readId}`);
 		return request.getInstance().header({
 			uid
@@ -132,19 +132,19 @@ module.exports = {
 		}).send();
 	},
 	// 搜索
-	getSearchResult(uid,key,pageNo,pageSize){
+	getSearchResult(uid, key, pageNo, pageSize) {
 		let url = getProductUrl(`wx/lesson`);
 		return request.getInstance().header({
 			uid
 		}).url(url).data({
-			title:key,
+			title: key,
 			productId: '',
 			pageNo: pageNo,
 			pageSize: pageSize
 		}).send();
 	},
 	// 获取回复信息
-	getReply(uid, columnId, pageNo, pageSize){
+	getReply(uid, columnId, pageNo, pageSize) {
 		let url = getBaseUrl(`wx/posts/reply`);
 		return request.getInstance().header({
 			uid
@@ -155,56 +155,56 @@ module.exports = {
 		}).send();
 	},
 	// 获取回复(楼中楼)
-	getReplyComment(uid, postId){
+	getReplyComment(uid, postId) {
 		let url = getBaseUrl(`wx/posts/one/${postId}`);
 		return request.getInstance().header({
 			uid
 		}).url(url).send();
 	},
 	// 发布回复(楼中楼)
-	postReplyComment(uid, data){
+	postReplyComment(uid, data) {
 		let url = getBaseUrl(`wx/reply`);
 		return request.getInstance().header({
 			uid
 		}).url(url).data(data).method('POST').send();
 	},
 	// 点赞评论
-	likeCommend(uid,likeUid){
+	likeCommend(uid, likeUid) {
 		let url = getBaseUrl(`wx/posts/attribute/${likeUid}`);
 		return request.getInstance().header({
 			uid
 		}).url(url).method('GET').send();
 	},
 	// 发布讨论
-	postReply(uid, data){
+	postReply(uid, data) {
 		let url = getBaseUrl(`wx/posts`);
 		return request.getInstance().header({
 			uid
 		}).url(url).data(data).method('POST').send();
 	},
 	// 获取推荐团购信息
-	getGroupList () {
+	getGroupList() {
 		let url = getBaseUrl(`wx/groupPurchaseInfo/recommend`);
 		return request.getInstance().header({
 			uid: wx.getStorageSync('uid')
 		}).url(url).send();
 	},
 	// 获取课程团购信息
-	getGroupPurchaseInfo (productId) {
+	getGroupPurchaseInfo(productId) {
 		let url = getBaseUrl(`wx/groupPurchaseInfo/info/${productId}`);
 		return request.getInstance().header({
 			uid: wx.getStorageSync('uid')
 		}).url(url).send();
 	},
 	// 发起团购
-	SendGroupPurchas (data) {
+	SendGroupPurchas(data) {
 		let url = getBaseUrl(`wx/groupPurchase/create`);
 		return request.getInstance().header({
 			uid: wx.getStorageSync('uid')
 		}).url(url).data(data).method('POST').send();
 	},
 	// 参加团购
-	JoinGroupPurchas (orderId) {
+	JoinGroupPurchas(orderId) {
 		let url = getBaseUrl(`wx/groupPurchase/join`);
 		return request.getInstance().header({
 			uid: wx.getStorageSync('uid')
@@ -213,14 +213,14 @@ module.exports = {
 		}).method('POST').send();
 	},
 	// 收藏课程
-	collectClass(uid, data){
+	collectClass(uid, data) {
 		let url = getProductUrl(`wx/favorites`);
 		return request.getInstance().header({
 			uid
 		}).url(url).data(data).method('POST').send();
 	},
 	//我的团
-	getMygroup () {
+	getMygroup() {
 		let url = getBaseUrl(`wx/groupPurchase/my`);
 		return request.getInstance().header({
 			uid: wx.getStorageSync('uid')
@@ -230,51 +230,58 @@ module.exports = {
 		}).send();
 	},
 	//获取团购详情
-	getMygroupInfo (orderId) {
+	getMygroupInfo(orderId) {
 		let url = getBaseUrl(`wx/groupPurchase/info/${orderId}`);
 		return request.getInstance().header({
 			uid: wx.getStorageSync('uid')
 		}).url(url).send();
 	},
 	//团购是否成功
-	groupSuccess (orderId) {
+	groupSuccess(orderId) {
 		let url = getBaseUrl(`wx/groupPurchase/joinStatus`);
 		return request.getInstance().header({
 			uid: wx.getStorageSync('uid')
 		}).url(url).data({
 			orderId
 		}).send();
-	},	
+	},
 	// 发起奖励
-	rewardMoney(uid, data){
+	rewardMoney(uid, data) {
 		let url = getBaseUrl(`wx/wallet/award`);
 		return request.getInstance().header({
 			uid
 		}).url(url).data(data).method('POST').send();
 	},
-  // 修改资料
-  settingUserInfo(wechatName, mobile, gender, schoolProvince, schoolCity, schoolName, profession, birthday){
-    let url = getBaseUrl(`wx/user`);
-    return request.getInstance().header({
-      uid: wx.getStorageSync('uid')
-    }).data({
-      wechatName: wechatName,
-      mobile: mobile,
-      gender: gender,
-      schoolProvince: schoolProvince,
-      schoolCity: schoolCity,
-      schoolName: schoolName,
-      profession: profession,
-      birthday: birthday
-      }).url(url).method('PUT').send();
-  },
-  //获取个人信息
-	getUserInfo () {
-    let url = getBaseUrl(`wx/user`);
-    return request.getInstance().header({
-        uid: wx.getStorageSync('uid')
-    }).data({
-        uid: wx.getStorageSync('uid')
-    }).url(url).send();
+	// 修改资料
+	settingUserInfo(wechatName, mobile, gender, schoolProvince, schoolCity, schoolName, profession, birthday) {
+		let url = getBaseUrl(`wx/user`);
+		return request.getInstance().header({
+			uid: wx.getStorageSync('uid')
+		}).data({
+			wechatName: wechatName,
+			mobile: mobile,
+			gender: gender,
+			schoolProvince: schoolProvince,
+			schoolCity: schoolCity,
+			schoolName: schoolName,
+			profession: profession,
+			birthday: birthday
+		}).url(url).method('PUT').send();
+	},
+	//获取个人信息
+	getUserInfo() {
+		let url = getBaseUrl(`wx/user`);
+		return request.getInstance().header({
+			uid: wx.getStorageSync('uid')
+		}).data({
+			uid: wx.getStorageSync('uid')
+		}).url(url).send();
+	},
+	// 生成二维码
+	createQRCode(data){
+		let url = getBaseUrl(`wx/qrCode`);
+		return request.getInstance().header({
+			uid: wx.getStorageSync('uid')
+		}).data(data).url(url).send();
 	}
 }