Ver código fonte

意见反馈

mulioid 4 anos atrás
pai
commit
1ed856d7ef

+ 1 - 137
miniprogram/pages/opinion/opinion.js

@@ -5,33 +5,12 @@ Page({
    */
   data: {
     currentTab: 0,
-    winWidth: 0,
-    winHeight: 0,
-    inviteCode: "",
-    publisherName: "",
-    publisherContact: "",
-    publisherIntro: "",
-    publisherType: "",
-    publisherAvatar: [],
-    types: ["校级", "园级", "院级"],
-    stars: ["一星级", "二星级", "三星级", "四星级", "五星级"],
   },
 
   stopTouchMove: function () {
     return false;
   },
 
-  updateRadio: function (e) {
-    this.setData({
-      publisherType: e.detail.value
-    })
-  },
-
-  updatePublishAvatar: function (e) {
-    this.setData({
-      publisherAvatar: e.detail.images
-    })
-  },
 
   switch1: function (e) {
     this.setData({
@@ -45,126 +24,11 @@ Page({
     })
   },
 
-  switch3: function (e) {
-    this.setData({
-      currentTab: 3
-    })
-  },
-
-  switch4: function (e) {
-    this.setData({
-      currentTab: 4
-    })
-  },
-
-  switch4_1: function (e) {
-    this.setData({
-      currentTab: 41
-    })
-  },
-
-  switchend: function (e) {
-    if (this.data.inviteCode == "" || this.data.publisherName == "" || this.data.publisherContact == "" ||
-      this.data.publisherIntro == "" || this.data.publisherType == "" || this.data.publisherAvatar.length == 0) {
-      wx.showToast({
-        title: "请确认信息填写完整",
-        icon: "none"
-      })
-      return
-    }
-    const db = wx.cloud.database()
-    const _ = db.command
-    db.collection("inviteCodeData").where({
-      code: this.data.inviteCode,
-      used: false
-    }).get({
-      success: function (code) {
-        if (code.data.length == 0) {
-          wx.showToast({
-            title: "邀请码不存在",
-            icon: "none"
-          })
-          return
-        }
-        db.collection("publisherInfoData").where({
-          publisherName: this.data.publisherName
-        }).get({
-          success: function (res) {
-            if (res.data.length != 0) {
-              wx.showToast({
-                title: "名称已使用",
-                icon: "none"
-              })
-              return
-            }
-            wx.showLoading({
-              title: "入驻中"
-            })
-            wx.cloud.uploadFile({
-              cloudPath: "publisherAvater/" + this.data.publisherName + '.jpg',
-              filePath: this.data.publisherAvatar[0],
-              success: function (res) {
-                db.collection("publisherInfoData").add({
-                  data: {
-                    publisherAttribute: [this.data.currentTab == 2 ? "组织" : "社团"],
-                    publisherAvatar: res.fileID,
-                    publisherContact: this.data.publisherContact,
-                    publisherIntro: this.data.publisherIntro,
-                    publisherName: this.data.publisherName,
-                    publisherType: this.data.publisherType
-                  },
-                  success: function (res) {
-                    db.collection("inviteCodeData").doc(code.data[0]._id).update({
-                      data: {
-                        used: true,
-                        publisherId: res._id
-                      },
-                      success: function () {
-                        db.collection("userInfoData").get({
-                          success: function (user) {
-                            db.collection("userInfoData").doc(user.data[0]._id).update({
-                              data: {
-                                publisherId: _.push(res._id)
-                              },
-                              success: function () {
-                                this.setData({
-                                  currentTab: end
-                                })
-                                wx.hideLoading()
-                              }.bind(this)
-                            })
-                          }.bind(this)
-                        })
-                      }.bind(this)
-                    })
-                  }.bind(this)
-                })
-              }.bind(this)
-            })
-          }.bind(this)
-        })
-      }.bind(this)
-    })
-  },
-
-  returnToUser: function (e) {
-    wx.navigateBack()
-  },
-
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (e) {
-    wx.getSystemInfo({
-      success: function (res) {
-        this.setData({
-          winWidth: res.windowWidth
-        })
-        this.setData({
-          winHeight: res.windowHeight
-        })
-      }.bind(this),
-    })
+
   },
 
   updatePage: function (e) {

+ 0 - 65
miniprogram/pages/opinion/opinion.wxss

@@ -1,68 +1,3 @@
-.title {
-  font-size: 40rpx;
-  padding: 15px 20px;
-  height: 30px;
-  font-weight: 800;
-}
-
-.subTitle {
-  font-size: 35rpx;
-  margin: 20rpx 40rpx;
-}
-
-.thirdTitle {
-  font-size: 35rpx;
-  margin: 20rpx 40rpx;
-  font-weight: 600;
-}
-
-.radio {
-  transform: scale(0.8);
-  margin-left: 10rpx;
-}
-
-.radio-group {
-  width: 450rpx;
-}
-
-.text {
-  font-size: 30rpx;
-  margin: 10rpx 40rpx;
-}
-
-.button {
-  margin-top: 40rpx;
-  margin-bottom: 40rpx;
-  width: 250rpx !important;
-  font-size: 30rpx;
-  font-weight: normal !important;
-  border-radius: 90rpx;
-  border: none !important;
-}
-
-.button2 {
-  margin-bottom: 20rpx;
-  width: 350rpx !important;
-  font-size: 30rpx;
-  font-weight: normal !important;
-  border-radius: 90rpx;
-  background-color: transparent;
-}
-
-.title2 {
-  align-self: center;
-  font-size: 45rpx;
-  font-weight: 900;
-  margin-top: 100rpx;
-  margin-bottom: 100rpx;
-}
-
-.page2 {
-  display: flex;
-  align-items: center;
-  flex-direction: column;
-}
-
 .block {
   margin: 20rpx 0rpx;
   padding: 20rpx 40rpx 20rpx 40rpx;