pengcheng 6 days ago
commit
b025d1188e
100 changed files with 6164 additions and 0 deletions
  1. 10 0
      .vscode/settings.json
  2. 2 0
      README.md
  3. 767 0
      activity/activity/activity.js
  4. 4 0
      activity/activity/activity.json
  5. 301 0
      activity/activity/activity.wxml
  6. 309 0
      activity/activity/activity.wxss
  7. 197 0
      activity/activity/release.js
  8. 5 0
      activity/activity/release.json
  9. 43 0
      activity/activity/release.wxml
  10. 179 0
      activity/activity/release.wxss
  11. 129 0
      activity/activityInfo/activityInfo.js
  12. 4 0
      activity/activityInfo/activityInfo.json
  13. 32 0
      activity/activityInfo/activityInfo.wxml
  14. 89 0
      activity/activityInfo/activityInfo.wxss
  15. 166 0
      activity/detail/detail.js
  16. 6 0
      activity/detail/detail.json
  17. 119 0
      activity/detail/detail.wxml
  18. 1195 0
      activity/detail/detail.wxss
  19. 173 0
      activity/map/map.js
  20. 4 0
      activity/map/map.json
  21. 4 0
      activity/map/map.wxml
  22. 10 0
      activity/map/map.wxss
  23. 497 0
      app.js
  24. 172 0
      app.json
  25. 75 0
      app.wxss
  26. BIN
      assets/images/login.png
  27. BIN
      assets/images/member.png
  28. BIN
      assets/images/menu.png
  29. BIN
      assets/images/tabbar/tab1.png
  30. BIN
      assets/images/tabbar/tab11.png
  31. BIN
      assets/images/tabbar/tab2.png
  32. BIN
      assets/images/tabbar/tab22.png
  33. BIN
      assets/images/tabbar/tab3.png
  34. BIN
      assets/images/tabbar/tab33.png
  35. BIN
      assets/images/tabbar/tab4.png
  36. BIN
      assets/images/tabbar/tab44.png
  37. BIN
      assets/images/tabbar/tab5.png
  38. BIN
      assets/images/tabbar/tab55.png
  39. 6 0
      components/location/config.wxs
  40. 132 0
      components/location/index.js
  41. 3 0
      components/location/index.json
  42. 45 0
      components/location/index.wxml
  43. 157 0
      components/location/index.wxss
  44. 66 0
      components/popup/popup.js
  45. 3 0
      components/popup/popup.json
  46. 13 0
      components/popup/popup.wxml
  47. 83 0
      components/popup/popup.wxss
  48. 83 0
      components/popup2/popup.js
  49. 3 0
      components/popup2/popup.json
  50. 24 0
      components/popup2/popup.wxml
  51. 129 0
      components/popup2/popup.wxss
  52. 79 0
      components/popup3/popup.js
  53. 4 0
      components/popup3/popup.json
  54. 17 0
      components/popup3/popup.wxml
  55. 71 0
      components/popup3/popup.wxss
  56. 53 0
      components/uploadImage/index.js
  57. 3 0
      components/uploadImage/index.json
  58. 14 0
      components/uploadImage/index.wxml
  59. 35 0
      components/uploadImage/index.wxss
  60. 47 0
      dist/action-sheet/index.js
  61. 8 0
      dist/action-sheet/index.json
  62. 23 0
      dist/action-sheet/index.wxml
  63. 1 0
      dist/action-sheet/index.wxss
  64. 37 0
      dist/alert/index.js
  65. 7 0
      dist/alert/index.json
  66. 15 0
      dist/alert/index.wxml
  67. 1 0
      dist/alert/index.wxss
  68. 29 0
      dist/badge/index.js
  69. 3 0
      dist/badge/index.json
  70. 5 0
      dist/badge/index.wxml
  71. 1 0
      dist/badge/index.wxss
  72. 37 0
      dist/base/index.js
  73. 80 0
      dist/button/index.js
  74. 3 0
      dist/button/index.json
  75. 20 0
      dist/button/index.wxml
  76. 1 0
      dist/button/index.wxss
  77. 26 0
      dist/card/index.js
  78. 3 0
      dist/card/index.json
  79. 11 0
      dist/card/index.wxml
  80. 1 0
      dist/card/index.wxss
  81. 33 0
      dist/cell-group/index.js
  82. 3 0
      dist/cell-group/index.json
  83. 3 0
      dist/cell-group/index.wxml
  84. 86 0
      dist/cell/index.js
  85. 3 0
      dist/cell/index.json
  86. 16 0
      dist/cell/index.wxml
  87. 1 0
      dist/cell/index.wxss
  88. 38 0
      dist/checkbox-group/index.js
  89. 7 0
      dist/checkbox-group/index.json
  90. 3 0
      dist/checkbox-group/index.wxml
  91. 0 0
      dist/checkbox-group/index.wxss
  92. 56 0
      dist/checkbox/index.js
  93. 7 0
      dist/checkbox/index.json
  94. 8 0
      dist/checkbox/index.wxml
  95. 1 0
      dist/checkbox/index.wxss
  96. 20 0
      dist/col/index.js
  97. 3 0
      dist/col/index.json
  98. 1 0
      dist/col/index.wxml
  99. 1 0
      dist/col/index.wxss
  100. 0 0
      dist/collapse-item/index.js

+ 10 - 0
.vscode/settings.json

@@ -0,0 +1,10 @@
+{
+  "files.associations": {
+    "*.cjson": "jsonc",
+    "*.wxss": "css",
+    "*.wxs": "javascript",
+    "*.wpy": "vue",
+    "*.ttml": "xml",
+    "*.ttss": "css"
+  }
+}

+ 2 - 0
README.md

@@ -0,0 +1,2 @@
+# middle-international-web
+

+ 767 - 0
activity/activity/activity.js

@@ -0,0 +1,767 @@
+// pages/my/activity/activity.js
+const App = getApp();
+const util = require("../../utils/tool");
+let CityArray0 = [];
+let CityArray1 = [];
+let CityArray2 = [];
+Page({
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    appAssetsUrl2: App.appAssetsUrl2,
+    user: wx.getStorageSync("USER"),
+    lng: null,
+    lat: null,
+    activityId: null,
+    detail: {},
+    region: [],
+    // 负责人
+    staffId: null,
+    // 负责人联系电话
+    teacherPhone: null,
+    // 活动标题
+    title: null,
+    // 省
+    province: null,
+    // 市
+    city: null,
+    // 区
+    area: null,
+    // 活动地址
+    address: null,
+    // 坐标
+    coordinate: null,
+    // 活动时间
+    startTime: null,
+    endTime: null,
+    startTimeDate: null,
+    startTimeHS: null,
+    endTimeDate: null,
+    endTimeHS: null,
+    // 报名截止
+    registrationEnd: null,
+    registrationEndDate: null,
+    registrationEndHS: null,
+    // 集合时间
+    meetingTime: null,
+    // 集合日期
+    meetingTimeDate: null,
+    // 集合日期时间
+    meetingTimeHS: null,
+    // 活动费用
+    isNeedVip: 0,
+    money: null,
+    // 是否推荐至首页
+    isTop: null,
+    // 报名数
+    willnum: null,
+    // 活动封面图
+    thumbnailImg: null,
+    // 兼职banner图
+    bannerImg: null,
+    // 活动详情
+    content: null,
+    // 联系二维码
+    qrCodePicture: null,
+    contactInstructions: null,
+    multiArray: [],
+    multiIndex: [],
+    activityjs: null,
+    activityyq: null,
+    activitysx: null,
+    auditStatus: null,
+	labelListIndex: null,
+	labelList: []
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    if (options.activityId) {
+      this.setData({
+        activityId: options.activityId,
+      });
+      this.getDetail();
+    } else {
+      this.getProvince();
+    }
+    this.setData({
+      staffId: this.data.user.id,
+      teacherPhone: this.data.user.phone,
+    });
+    this.getCoord();
+	this.getLabel()
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {},
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {},
+
+  // 获取经纬度
+  getCoord() {
+    wx.getLocation({
+      type: "gcj02",
+      success: (res) => {
+        const latitude = res.latitude;
+        const longitude = res.longitude;
+        this.setData({
+          lng: Number(longitude),
+          lat: Number(latitude),
+        });
+      },
+      fail: (e) => {},
+    });
+  },
+
+  // 获取省
+  getProvince() {
+    App._get("region/provinceList", {}, (res) => {
+      let pId = "";
+      let prov = "";
+      if (res.code === 0) {
+        let provice = res.data;
+        this.data.multiArray[0] = provice;
+        CityArray0 = provice;
+        if (CityArray0.length) {
+          for (let i = 0; i < CityArray0.length; i++) {
+            if (CityArray0[i].id == this.data.province) {
+              this.data.multiIndex[0] = i;
+              break;
+            } else {
+              this.data.multiIndex[0] = 0;
+              // break;
+            }
+          }
+        }
+        if (this.data.province) {
+          pId = this.data.province;
+        } else {
+          //根据默认省,获取默认市
+          if (this.data.multiArray[0].length) {
+            pId = this.data.multiArray[0][0].id;
+          }
+        }
+        this.getCity(pId);
+      }
+    });
+  },
+	//选择标签
+	labelPickerChange(e){
+		let labelListIndex = e.detail.value;
+		this.setData({
+			labelListIndex
+		})
+	},
+	// labelList
+	getLabel() {
+		let that = this;
+		App._post_form('bizcatelog/apiSelectBizcatelog/act_title', '', null,
+			function(res) {
+				if(res.code == 0){
+					that.setData({
+						labelList: res.dictList
+					})
+				}
+			})
+	},
+  getCity(pId) {
+    App._get(`region/urbanDistrictList?id=${pId}`, {}, (res) => {
+      // App._get(`region/urbanDistrictList?id=420000`, {}, res => {
+      if (res.code === 0) {
+        let city = res.data;
+        this.data.multiArray[1] = city;
+        CityArray1 = city;
+        if (CityArray1.length) {
+          for (let i = 0; i < CityArray1.length; i++) {
+            // console.log(CityArray1[i].id, pId, 222)
+            if (CityArray1[i].pid === pId) {
+              this.data.multiIndex[1] = i;
+              break;
+            }
+          }
+        }
+        let cityId = "";
+        if (this.data.city) {
+          cityId = this.data.city;
+        } else {
+          if (this.data.multiArray[1].length) {
+            cityId = this.data.multiArray[1][0].id;
+          }
+        }
+        this.getArea(cityId);
+        this.setData({
+          multiArray: this.data.multiArray,
+          multiIndex: this.data.multiIndex,
+        });
+      }
+    });
+  },
+
+  // 获取区
+  getArea(cityId) {
+    for (let i = 0; i < this.data.multiArray[1].length; i++) {
+      console.log(this.data.multiArray[1], cityId, "area");
+      if (this.data.multiArray[1][i].id === cityId) {
+        CityArray2 = this.data.multiArray[1][i].childRegionList;
+        this.data.multiArray[2] = this.data.multiArray[1][i].childRegionList;
+        this.data.multiIndex[2] = i;
+        break;
+      }
+    }
+    if (this.data.area) {
+      for (let j = 0; j < this.data.multiArray[2].length; j++) {
+        if (this.data.multiArray[2][j].id === this.data.area) {
+          this.data.multiIndex[2] = j;
+          break;
+        }
+      }
+    }
+    this.setData({
+      multiArray: this.data.multiArray,
+      multiIndex: this.data.multiIndex,
+    });
+    console.log(this.data.multiArray, this.data.multiIndex, 1111);
+  },
+
+  areaChange(e) {
+    this.data.multiIndex[0] = e.detail.value[0];
+    this.data.multiIndex[1] = e.detail.value[1];
+    this.data.multiIndex[2] = e.detail.value[2];
+    let province = CityArray0[e.detail.value[0]].id;
+    let city = CityArray1[e.detail.value[1]].id;
+    let area = CityArray2[e.detail.value[2]].id;
+    this.setData({
+      multiIndex: this.data.multiIndex,
+      province: province,
+      city: city,
+      area: area,
+    });
+  },
+
+  MultiPickerAreaChange(e) {
+    if (e.detail.column == 0) {
+      let pid = CityArray0[e.detail.value].id;
+      this.data.multiIndex[0] = e.detail.value;
+      this.getCity(pid);
+    } else if (e.detail.column == 1) {
+      let pid = CityArray1[e.detail.value].id;
+      this.data.multiIndex[1] = e.detail.value;
+      this.getArea(pid);
+    } else {
+      this.data.multiIndex[2] = e.detail.value;
+    }
+    this.setData({
+      multiIndex: this.data.multiIndex,
+    });
+  },
+
+  // 活动时间
+  startTimeBindDateChange(e) {
+    this.setData({
+      startTimeDate: e.detail.value,
+    });
+  },
+
+  startTimeBindTimeChange(e) {
+    this.setData({
+      startTimeHS: e.detail.value,
+    });
+  },
+
+  endTimeBindDateChange(e) {
+    this.setData({
+      endTimeDate: e.detail.value,
+    });
+  },
+
+  endTimeBindTimeChange(e) {
+    this.setData({
+      endTimeHS: e.detail.value,
+    });
+  },
+
+  // 报名截止
+  registrationEndBindDateChange(e) {
+    this.setData({
+      registrationEndDate: e.detail.value,
+    });
+  },
+
+  registrationEndBindTimeChange(e) {
+    this.setData({
+      registrationEndHS: e.detail.value,
+    });
+  },
+
+  // 集合时间
+  meetingBindDateChange(e) {
+    this.setData({
+      meetingTimeDate: e.detail.value,
+    });
+  },
+
+  meetingBindTimeChange(e) {
+    this.setData({
+      meetingTimeHS: e.detail.value,
+    });
+  },
+
+  // 活动 免费
+  freeRadioChange(e) {
+    if (e.detail.value == 1) {
+      this.data.money = 0;
+    }
+    this.setData({
+      isNeedVip: e.detail.value,
+      money: this.data.money,
+    });
+  },
+
+  // 推荐首页
+  recommendRadioChange(e) {
+    this.setData({
+      isTop: e.detail.value,
+    });
+  },
+
+  changeAddress() {
+    if (this.data.auditStatus == 1) {
+      wx.showToast({
+        icon: "none",
+        title: "活动进行中",
+      });
+      return false;
+    }
+    wx.chooseLocation({
+      success: (res) => {
+        console.log(res, 1111);
+        wx.showLoading({
+          title: "获取位置中...",
+        });
+        App._get(
+          "store/getDetailsAddress",
+          {
+            lon: res.longitude,
+            lat: res.latitude,
+          },
+          (res2) => {
+            if (res2.code === 0) {
+              wx.hideLoading();
+              this.setData({
+                address: res2.data.street_number,
+                coordinate: res.longitude + "," + res.latitude,
+              });
+            }
+          }
+        );
+      },
+    });
+    // wx.navigateTo({
+    //   url: `/activity/map/map?lng=${this.data.lng}&lat=${this.data.lat}`,
+    // })
+  },
+
+  uploadHandle(e) {
+    if (this.data.auditStatus == 1) {
+      wx.showToast({
+        icon: "none",
+        title: "活动进行中",
+      });
+      return false;
+    }
+    console.log(e, 11111111);
+    let currentIndex = e.currentTarget.dataset.index;
+    // if (this.data.list.length == 3) {
+    //   return false
+    // }
+    let _this = this;
+    var tempFile;
+    wx.showActionSheet({
+      itemList: ["拍照上传", "从相册中选择"],
+      success(res) {
+        if (res.tapIndex === 0) {
+          wx.chooseImage({
+            count: 1,
+            sizeType: ["original", "compressed"],
+            sourceType: ["camera"],
+            success(res) {
+              const tempFilePaths = res.tempFilePaths;
+              wx.uploadFile({
+                url: App.apiRoot + "file/upload",
+                filePath: tempFilePaths[0],
+                name: "file",
+                success: function (res) {
+                  if (res.errMsg === "uploadFile:ok") {
+                    wx.showToast({
+                      title: "上传成功",
+                      image: "",
+                      duration: 1500,
+                      mask: false,
+                    });
+                    let data = JSON.parse(res.data);
+                    if (currentIndex == 0) {
+                      _this.data.thumbnailImg = data.data;
+                      _this.setData({
+                        thumbnailImg: _this.data.thumbnailImg,
+                      });
+                    } else if (currentIndex == 1) {
+                      _this.data.bannerImg = data.data;
+                      _this.setData({
+                        bannerImg: _this.data.bannerImg,
+                      });
+                    } else {
+                      _this.data.qrCodePicture = data.data;
+                      _this.setData({
+                        qrCodePicture: _this.data.qrCodePicture,
+                      });
+                    }
+                  }
+                },
+                function() {
+                  wx.showToast({
+                    title: "上传失败",
+                    icon: "none",
+                    image: "",
+                    duration: 1500,
+                    mask: false,
+                  });
+                },
+              });
+            },
+          });
+        } else if (res.tapIndex === 1) {
+          wx.chooseImage({
+            count: 1,
+            sizeType: ["original", "compressed"],
+            sourceType: ["album"],
+            success(res) {
+              const tempFilePaths = res.tempFilePaths;
+              wx.uploadFile({
+                url: App.apiRoot + "file/upload",
+                filePath: tempFilePaths[0],
+                name: "file",
+                success: function (res) {
+                  if (res.errMsg === "uploadFile:ok") {
+                    wx.showToast({
+                      title: "上传成功",
+                      image: "",
+                      duration: 1500,
+                      mask: false,
+                    });
+
+                    let data = JSON.parse(res.data);
+                    if (currentIndex == 0) {
+                      _this.data.thumbnailImg = data.data;
+                      _this.setData({
+                        thumbnailImg: _this.data.thumbnailImg,
+                      });
+                    } else if (currentIndex == 1) {
+                      _this.data.bannerImg = data.data;
+                      _this.setData({
+                        bannerImg: _this.data.bannerImg,
+                      });
+                    } else {
+                      _this.data.qrCodePicture = data.data;
+                      _this.setData({
+                        qrCodePicture: _this.data.qrCodePicture,
+                      });
+                    }
+                  }
+                },
+                function() {
+                  wx.showToast({
+                    title: "上传失败",
+                    icon: "none",
+                    image: "",
+                    duration: 1500,
+                    mask: false,
+                    success: (result) => {},
+                    fail: () => {},
+                    complete: () => {},
+                  });
+                },
+              });
+            },
+          });
+        }
+      },
+      fail(res) {},
+    });
+  },
+
+  submit() {
+    let startTime = this.data.startTimeDate + " " + this.data.startTimeHS;
+    let endTime = this.data.endTimeDate + " " + this.data.endTimeHS;
+    if (!this.data.title) {
+      return util.alert("请先填写活动标题");
+    }
+    if (!this.data.city || !this.data.area) {
+      return util.alert("请先选择所属区域");
+    }
+    if (!this.data.address) {
+      return util.alert("请先选择活动地址");
+    }
+    // if (!startTime || !endTime) {
+    //   return util.alert("请先选择活动时间");
+    // }
+	if (!this.data.startTimeDate || !this.data.startTimeHS || !this.data.endTimeDate || !this.data.endTimeHS) {
+	  return util.alert("请先选择活动时间");
+	}
+    if (!this.data.registrationEndDate || !this.data.registrationEndHS) {
+      return util.alert("请先选择报名截止时间");
+    }
+    if (!this.data.meetingTimeDate || !this.data.meetingTimeHS) {
+      return util.alert("请先选择集合时间");
+    }
+	console.log(this.data.money,'this.data.money')
+	if (this.data.money === null) {
+	  return util.alert("请填写活动费用");
+	}
+	
+    if (!this.data.willnum) {
+      return util.alert("请输入报名人数");
+    }
+    if (!this.data.thumbnailImg) {
+      return util.alert("请先上传活动封面缩略图");
+    }
+    if (!this.data.bannerImg) {
+      return util.alert("请先上传兼职详情banner图");
+    }
+    if (!this.data.qrCodePicture) {
+      return util.alert("请先上传联系二维码图");
+    }
+    if (!this.data.contactInstructions) {
+      return util.alert("请先填写联系说明");
+    }
+    wx.showLoading({
+      title: "提交中,请稍后",
+    });
+    let list = [
+      this.data.activityjs,
+      this.data.activityyq,
+      this.data.activitysx,
+    ];
+    let obj = {
+      address: this.data.address,
+      area: this.data.area,
+      bannerImg: this.data.bannerImg,
+      city: this.data.city,
+      activityAppletsDetailsList: list,
+      coordinate: this.data.coordinate,
+      // endTime: this.data.endTimeDate + ' ' + this.data.endTimeHS,
+      endTime: endTime,
+      isNeedVip: this.data.isNeedVip,
+      isTop: this.data.isTop,
+      meetingTime: this.data.meetingTimeDate + " " + this.data.meetingTimeHS,
+      money: this.data.money,
+      province: this.data.province,
+      registrationEnd:
+        this.data.registrationEndDate + " " + this.data.registrationEndHS,
+      staffId: this.data.staffId,
+      // startTime: this.data.startTimeDate + ' ' + this.data.startTimeHS,
+      startTime: startTime,
+      teacherPhone: this.data.teacherPhone,
+      thumbnailImg: this.data.thumbnailImg,
+      qrCodePicture: this.data.qrCodePicture,
+      contactInstructions: this.data.contactInstructions,
+      title: this.data.title,
+      willnum: this.data.willnum,
+      memberId: this.data.user.id,
+      // is_applets_release 是否是小程序发布 1是 0否
+      isAppletsRelease: 1,
+	  titleCode:this.data.labelList[this.data.labelListIndex].itemcode
+    };
+    wx.setStorageSync("activityDetail", obj);
+    if (this.data.activityId) {
+      wx.navigateTo({
+        url: "/activity/detail/detail?activityId=" + this.data.activityId,
+      });
+    } else {
+      wx.navigateTo({
+        url: "/activity/detail/detail",
+      });
+    }
+    return false;
+    // if (this.data.activityId) {
+    //   App._put_form('activity/updateActivity', '', {
+    //     ...obj,
+    //     id: this.data.activityId
+    //   }, res => {
+    //     if (res.code === 0) {
+    //       wx.showToast({
+    //         title: '修改成功',
+    //       })
+    //     }
+    //   }, err => {}, complete => {
+    //     setTimeout(() => {
+    //       wx.hideLoading()
+    //     }, 300)
+    //   })
+    // } else {
+    //   App._post_form('activity/saveActivity', '', obj, res => {
+    //     if (res.code === 0) {
+    //       wx.showToast({
+    //         title: '添加成功',
+    //       })
+    //     }
+    //   }, err => {}, complete => {
+    //     setTimeout(() => {
+    //       wx.hideLoading()
+    //     }, 300)
+    //   })
+    // }
+  },
+
+  // 获取活动详情
+  getDetail() {
+    wx.showLoading({
+      title: "努力加载中...",
+    });
+    App._post_form(
+      "act/one",
+      "",
+      {
+        id: this.data.activityId,
+        stuId: this.data.user.id,
+      },
+      (res) => {
+        if (res.code === 0) {
+          this.setData({
+            detail: res.data,
+            title: res.data.title,
+            province: res.data.province,
+            city: res.data.city,
+            area: res.data.area,
+            // provincename: res.data.provincename,
+            // cityname: res.data.cityname,
+            // areaName: res.data.areaName,
+            address: res.data.address,
+            coordinate: res.data.coordinate,
+            startTime: res.data.startTime,
+            endTime: res.data.endTime,
+            startTimeDate: res.data.startTime.split(" ")[0],
+            startTimeHS: res.data.startTime.split(" ")[1],
+            endTimeDate: res.data.endTime.split(" ")[0],
+            endTimeHS: res.data.endTime.split(" ")[1],
+            registrationEnd: res.data.registrationEnd,
+            registrationEndDate: res.data.endTime.split(" ")[0],
+            registrationEndHS: res.data.endTime.split(" ")[1],
+            meetingTime: res.data.meetingTime,
+            meetingTimeDate: res.data.endTime.split(" ")[0],
+            meetingTimeHS: res.data.endTime.split(" ")[1],
+            isNeedVip: res.data.isNeedVip,
+            money: res.data.money,
+            isTop: res.data.isTop,
+            willnum: res.data.willnum,
+            thumbnailImg: res.data.thumbnailImg,
+            bannerImg: res.data.bannerImg,
+            qrCodePicture: res.data.qrCodePicture,
+            contactInstructions: res.data.contactInstructions,
+            activityjs: res.data.activityAppletsDetailsList[0],
+            activityyq: res.data.activityAppletsDetailsList[1],
+            activitysx: res.data.activityAppletsDetailsList[2],
+            auditStatus: res.data.auditStatus,
+          });
+          this.getProvince();
+        }
+      },
+      (err) => {},
+      (complete) => {
+        setTimeout(() => {
+          wx.hideLoading();
+        }, 300);
+      }
+    );
+  },
+
+  // 取消活动
+  // cancel() {
+  //   let parm = {
+  //     sid: this.data.user.id,
+  //     aid: this.data.activityId,
+  //   };
+  //   App._post_form(
+  //     "act/cancel",
+  //     "application/json",
+  //     JSON.stringify(parm),
+  //     (res) => {
+  //       if (res.code === 0) {
+  //         wx.showModal({
+  //           title: "温馨提示",
+  //           content: "取消成功",
+  //           showCancel: false,
+  //         });
+  //         wx.navigateBack();
+  //       }
+  //     }
+  //   );
+  // },
+	cancel() {
+	  // let parm = {
+	  //   sid: this.data.user.id,
+	  //   aid: this.data.activityId,
+	  // };
+	  App._put_form(
+	    "activity/cancelActivity/"+this.data.activityId,
+	    "",
+	    {},
+	    (res) => {
+	      if (res.code === 0) {
+	       wx.showModal({
+	         title: "温馨提示",
+	         content: "取消成功",
+	         showCancel: false,
+	       });
+	       wx.navigateBack();
+	      }
+	    },
+	    err => {
+	      wx.showToast({
+	        icon: 'error',
+	        title: '服务端异常',
+	      })
+	    }
+	  );
+	},
+  // 查看报名信息
+  toApply() {
+    wx.navigateTo({
+      url:
+        "/activity/activityInfo/activityInfo?activityId=" +
+        this.data.activityId + "&willnum=" + this.data.willnum
+    });
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {},
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {},
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {},
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {},
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {},
+});

+ 4 - 0
activity/activity/activity.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "活动发布",
+  "usingComponents": {}
+}

+ 301 - 0
activity/activity/activity.wxml

@@ -0,0 +1,301 @@
+<!--pages/my/activity/activity.wxml-->
+<view class="job-container">
+  <view class="title">创建你的活动</view>
+  <form class="form" action="">
+    <view class="job-item">
+      <view class="label">
+        <text>活动负责人</text>
+      </view>
+      <view class="input-box">
+        <input class="input-label" disabled="true" type="text" model:value="{{user.vipname}}" placeholder="请输入活动负责人" />
+      </view>
+    </view>
+    <view class="job-item">
+      <view class="label">
+        <text>负责人联系电话</text>
+      </view>
+      <view class="input-box">
+        <input class="input-label" disabled="true" type="text" model:value="{{teacherPhone}}" placeholder="请输入负责人联系电话" />
+      </view>
+    </view>
+    <view class="job-item">
+      <view class="label">
+        <text class="required">*</text>
+        <text>活动标题</text>
+      </view>
+      <textarea disabled="{{auditStatus == 1}}" class="input-textarea" maxlength="30" type="text" model:value="{{title}}" placeholder="请填写活动标题"></textarea>
+    </view>
+    <view class="job-item">
+      <view class="label">
+        <text class="required">*</text>
+        <text>所属区域</text>
+      </view>
+      <view class="input-box area">
+        <view class="section txt-color">
+          <picker disabled="{{auditStatus == 1}}" mode="multiSelector" bindchange="areaChange" bindcolumnchange="MultiPickerAreaChange" value="{{multiIndex}}" range="{{multiArray}}" range-key="name">
+            <view class="picker">
+              <text>{{multiArray[0][multiIndex[0]].name}} {{multiArray[1][multiIndex[1]].name}} {{multiArray[2][multiIndex[2]].name}}</text>
+              <text class="iconfont icon-xiayibu font35 right-icon"></text>
+            </view>
+            <!-- <view wx:else class="picker">
+              暂无
+              <text class="iconfont icon-xiayibu font35 right-icon"></text>
+            </view> -->
+          </picker>
+        </view>
+      </view>
+    </view>
+    <view class="job-item">
+      <view class="label">
+        <text class="required">*</text>
+        <text>活动地址</text>
+      </view>
+      <view class="input-box">
+        <view class="section txt-color">
+          <view class="picker" bindtap="changeAddress">
+            <text>{{address ? address : '请填写活动地址'}}</text>
+            <view>
+              <image class="address-icon" src="{{appAssetsUrl2}}wjxy/mine/address-icon.png"></image>选择
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="job-item">
+      <view class="label">
+        <text class="required">*</text>
+        <text>活动时间</text>
+      </view>
+      <view class="input-box">
+        <view class="section txt-color picker-box">
+          <i class="iconfont1 icon-date date-icon"></i>
+          <picker disabled="{{auditStatus == 1}}" mode="date" start="2022-09-01" end="2025-09-01" value="{{startTimeDate}}" bindchange="startTimeBindDateChange">
+            <view wx:if="{{startTimeDate}}" class="picker">
+              {{startTimeDate}}
+            </view>
+            <view wx:else class="picker time">
+              <text>选择日期</text>
+            </view>
+          </picker>
+          <picker disabled="{{auditStatus == 1}}" mode="time" start="00:00" end="23:59" value="{{startTimeHS}}" bindchange="startTimeBindTimeChange">
+            <view wx:if="{{startTimeHS}}" class="picker">
+              {{startTimeHS}}
+            </view>
+            <view wx:else class="picker time">
+              <text>选择时间</text>
+            </view>
+          </picker>
+        </view>
+        <text>至</text>
+        <view class="section txt-color picker-box">
+          <i class="iconfont1 icon-date date-icon"></i>
+          <picker disabled="{{auditStatus == 1}}" mode="date" start="2022-09-01" end="2025-09-01" value="{{endTimeDate}}" bindchange="endTimeBindDateChange">
+            <view wx:if="{{endTimeDate}}" class="picker">
+              {{endTimeDate}}
+            </view>
+            <view wx:else class="picker time">
+              <text>选择日期</text>
+            </view>
+          </picker>
+          <picker disabled="{{auditStatus == 1}}" mode="time" start="00:00" end="23:59" value="{{endTimeHS}}" bindchange="endTimeBindTimeChange">
+            <view wx:if="{{endTimeHS}}" class="picker">
+              {{endTimeHS}}
+            </view>
+            <view wx:else class="picker time">
+              <text>选择时间</text>
+            </view>
+          </picker>
+        </view>
+      </view>
+    </view>
+    <view class="job-item">
+      <view class="label">
+        <text class="required">*</text>
+        <text>报名截止</text>
+      </view>
+      <view class="input-box">
+        <view class="section txt-color picker-box">
+          <i class="iconfont1 icon-date date-icon"></i>
+          <picker disabled="{{auditStatus == 1}}" mode="date" start="2022-09-01" end="2025-09-01" value="{{registrationEndDate}}" bindchange="registrationEndBindDateChange">
+            <view wx:if="{{registrationEndDate}}" class="picker">
+              {{registrationEndDate}}
+            </view>
+            <view wx:else class="picker time">
+              <text>选择日期</text>
+            </view>
+          </picker>
+          <picker disabled="{{auditStatus == 1}}" mode="time" start="00:00" end="23:59" value="{{registrationEndHS}}" bindchange="registrationEndBindTimeChange">
+            <view wx:if="{{registrationEndHS}}" class="picker">
+              {{registrationEndHS}}
+            </view>
+            <view wx:else class="picker time">
+              <text>选择时间</text>
+            </view>
+          </picker>
+        </view>
+      </view>
+    </view>
+    <view class="job-item">
+      <view class="label">
+        <text class="required">*</text>
+        <text>集合时间</text>
+      </view>
+      <view class="input-box">
+        <view class="section txt-color picker-box">
+          <i class="iconfont1 icon-date date-icon"></i>
+          <picker disabled="{{auditStatus == 1}}" mode="date" start="2022-09-01" end="2025-09-01" value="{{meetingTimeDate}}" bindchange="meetingBindDateChange">
+            <view wx:if="{{meetingTimeDate}}" class="picker">
+              {{meetingTimeDate}}
+            </view>
+            <view wx:else class="picker time">
+              <text>选择日期</text>
+            </view>
+          </picker>
+          <picker disabled="{{auditStatus == 1}}" mode="time" start="00:00" end="23:59" value="{{meetingTimeHS}}" bindchange="meetingBindTimeChange">
+            <view wx:if="{{meetingTimeHS}}" class="picker">
+              {{meetingTimeHS}}
+            </view>
+            <view wx:else class="picker time">
+              <text>选择时间</text>
+            </view>
+          </picker>
+        </view>
+      </view>
+    </view>
+    <view class="job-item">
+      <view class="label">
+        <text>活动费用</text>
+      </view>
+      <view class="input-box">
+        <radio-group class="group" bindchange="freeRadioChange">
+          <label class="radio">
+            <radio disabled="{{auditStatus == 1}}" value="1" checked="{{isNeedVip == 1 ? true : false}}" />会员免费
+          </label>
+          <label class="radio">
+            <radio disabled="{{auditStatus == 1}}" value="0" checked="{{isNeedVip == 0 ? true : false}}" />不免费
+          </label>
+        </radio-group>
+      </view>
+    </view>
+    <!-- wx:if="{{isNeedVip == 0}}" -->
+    <view class="job-item">
+      <view class="input-box">
+        <input style="width:500rpx;" disabled="{{auditStatus == 1}}" class="input-label" type="text" model:value="{{money}}" placeholder="请填写活动费用,如不收费填写0" />
+      </view>
+    </view>
+    <view class="job-item">
+      <view class="label">
+        <text>是否推荐至首页</text>
+      </view>
+      <view class="input-box">
+        <radio-group class="group" bindchange="recommendRadioChange">
+          <label class="radio">
+            <radio disabled="{{auditStatus == 1}}" value="1" checked="{{isTop == 1 ? true : false}}" />是
+          </label>
+          <label class="radio">
+            <radio disabled="{{auditStatus == 1}}" value="0" checked="{{isTop == 0 ? true : false}}" />否
+          </label>
+        </radio-group>
+
+      </view>
+    </view>
+	<view class="job-item">
+	  <view class="label">
+	    <text>标签选择</text>
+	  </view>
+	  <view class="input-box">
+		<picker bindchange="labelPickerChange" style="width:100%;" value="{{labelListIndex}}" range="{{labelList}}"
+			range-key='itemname'>
+			<view class="picker-label">
+				<text class="pla" wx:if="{{labelListIndex == null}}">请选择标签</text>
+				<text class="la" wx:else>{{labelList[labelListIndex].itemname}}</text>
+			</view>
+		</picker>
+	  </view>
+	</view>
+	
+    <view class="job-item">
+      <view class="input-box">
+        <input disabled="{{auditStatus == 1}}" class="input-label" type="text" model:value="{{willnum}}" placeholder="请输入最大参与报名人数" />
+      </view>
+    </view>
+    <view class="job-item">
+      <view class="label">
+        <text class="required">*</text>
+        <text>活动封面缩略图<text class="tip">(建议图片尺寸为:200*250)</text></text>
+      </view>
+      <view class="box flex-upload" data-index="0" bindtap="uploadHandle">
+        <image class="img" wx:if="{{thumbnailImg}}" src="{{thumbnailImg}}"></image>
+        <view wx:else class="upload-box">
+          <image class="upload-img" src="{{appAssetsUrl2}}wjxy/upload-img.png"></image>
+          <text class="upload-tip">点击上传封面</text>
+        </view>
+      </view>
+    </view>
+    <view class="job-item">
+      <view class="label">
+        <text class="required">*</text>
+        <text>活动详情banner图<text class="tip">(建议图片尺寸为:200*250)</text></text>
+      </view>
+      <view class="box flex-upload" data-index="1" bindtap="uploadHandle">
+        <image class="img" wx:if="{{bannerImg}}" src="{{bannerImg}}"></image>
+        <view wx:else class="upload-box">
+          <image class="upload-img" src="{{appAssetsUrl2}}wjxy/upload-img.png"></image>
+          <text class="upload-tip">点击上传封面</text>
+        </view>
+      </view>
+    </view>
+    <view class="job-item">
+      <view class="label">
+        <text>活动详情</text>
+      </view>
+      <view class="box activity">
+        <view class="label">
+          <text>【活动介绍】</text>
+          <textarea disabled="{{auditStatus == 1}}" class="activity-box" model:value="{{activityjs}}" name="" id="" cols="30" rows="10"></textarea>
+        </view>
+        <view class="label">
+          <text>【活动要求】</text>
+          <textarea disabled="{{auditStatus == 1}}" class="activity-box" model:value="{{activityyq}}" name="" id="" cols="30" rows="10"></textarea>
+        </view>
+        <view class="label">
+          <text>【注意事项】</text>
+          <textarea disabled="{{auditStatus == 1}}" class="activity-box" model:value="{{activitysx}}" name="" id="" cols="30" rows="10"></textarea>
+        </view>
+      </view>
+    </view>
+    <view class="job-item">
+      <view class="label">
+        <text class="required">*</text>
+        <text>联系二维码</text>
+      </view>
+      <input class="phone" type="text" model:value="{{contactInstructions}}" placeholder="请输入联系说明" />
+      <view class="box flex-upload" data-index="2" bindtap="uploadHandle">
+        <image class="img qrcode" wx:if="{{qrCodePicture}}" src="{{qrCodePicture}}"></image>
+        <view wx:else class="upload-box">
+          <image class="upload-img" src="{{appAssetsUrl2}}wjxy/upload-img.png"></image>
+          <text class="upload-tip">点击上传二维码</text>
+        </view>
+      </view>
+    </view>
+  </form>
+  <view class="footer">
+    <button class="btn" bindtap="submit" wx:if="{{!activityId}}">提交预览</button>
+    <button class="btn" bindtap="cancel" wx:if="{{auditStatus == 0}}">取消活动</button>
+    <block wx:if="{{auditStatus == 1}}">
+      <view class="tip">
+        活动审核通过,发布成功
+      </view>
+      <button class="btn" bindtap="toApply">查看报名信息</button>
+    </block>
+    <block wx:if="{{auditStatus == 2}}">
+      <view class="error">
+		  <!-- detail.auditReason -->
+        {{detail.auditReason}} {{detail.auditTime}}
+      </view>
+      <button class="btn" bindtap="submit">提交预览</button>
+    </block>
+  </view>
+  <!-- <button class="btn">取消活动</button>
+  <button class="btn">查看报名信息</button> -->
+</view>

File diff suppressed because it is too large
+ 309 - 0
activity/activity/activity.wxss


+ 197 - 0
activity/activity/release.js

@@ -0,0 +1,197 @@
+// pages/my/activity/release.js
+const App = getApp();
+var util = require("../../utils/util.js");
+Page({
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    appAssetsUrl2: App.appAssetsUrl2,
+    cityInfo: wx.getStorageSync("CHOOSECITY"),
+    memberId: null,
+    nodata: util.nodata(),
+    tabs: [
+      {
+        i: 0,
+        label: "待发布",
+      },
+      {
+        i: 1,
+        label: "进行中",
+      },
+      {
+        i: 2,
+        label: "已结束",
+      },
+    ],
+    currentTab: 0,
+    queryParams: {
+      page: 1,
+      limit: 10,
+    },
+    status: "",
+    isPublish: 0,
+    list: [],
+    total: 0,
+    currPage: null,
+    totalPage: null,
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.setData({
+      memberId: options.memberId,
+    });
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {},
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+	  this.setData({
+	    list: [],
+	    currPage: 1,
+	  });
+    this.getlist();
+  },
+
+  getlist() {
+    
+    wx.showLoading({
+      title: "努力加载中...",
+    });
+    let params = {
+      memberId: this.data.memberId,
+      status: this.data.status,
+      city: this.data.cityInfo.cityId,
+      ...this.data.queryParams,
+    }
+    if (this.data.currentTab == 0 || this.data.currentTab == 1) {
+      params.isPublish = this.data.isPublish
+    }
+    // 全部 ''
+    App._post_form(
+      "act/postEventList",
+      "",
+      params,
+      (res) => {
+        if (res.code === 0) {
+          this.setData({
+            list: [...this.data.list, ...res.page.list],
+            total: res.page.totalCount,
+            currPage: res.page.currPage,
+            totalPage: res.page.totalPage,
+          });
+          wx.hideLoading();
+          console.log(this.data.list, 111);
+        }
+      },
+      (err) => {
+        wx.showToast({
+          icon: "error",
+          title: "服务端异常",
+        });
+      },
+      (complete) => {}
+    );
+  },
+
+  tabChange(e) {
+    console.log(e);
+    if (this.data.currentTab == e.currentTarget.dataset.index) {
+      return;
+    }
+    if (e.currentTarget.dataset.index == 0) {
+      this.data.isPublish = 0;
+      this.data.status = "";
+    } else if (e.currentTarget.dataset.index == 1) {
+      this.data.status = "";
+      this.data.isPublish = 1;
+    } else {
+      this.data.status = 6;
+      this.data.isPublish = 1;
+    }
+    this.setData({
+      currentTab: e.currentTarget.dataset.index,
+      isPublish: this.data.isPublish,
+      status: this.data.status,
+    });
+    this.init();
+  },
+
+  init() {
+    this.setData({
+      queryParams: {
+        page: 1,
+        limit: 10,
+      },
+      total: 0,
+      list: [],
+    });
+    this.getlist();
+  },
+
+  addActivity(e) {
+    if (e && e.currentTarget.dataset.activityid) {
+      wx.navigateTo({
+        url:
+          "/activity/activity/activity?activityId=" +
+          e.currentTarget.dataset.activityid,
+      });
+    } else
+      [
+        wx.navigateTo({
+          url: "/activity/activity/activity",
+        }),
+      ];
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {},
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {},
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {},
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+	  if (this.data.total > 0) {
+	    if (this.data.currPage == this.data.totalPage) {
+	      wx.showToast({
+	        title: "没有更多了哦~",
+	        icon: "none",
+	      });
+	      return false;
+	    }
+	  }
+    this.setData({
+      queryParams: {
+        page: ++this.data.queryParams.page,
+        limit: 10,
+      },
+    });
+    this.getlist();
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {},
+});

+ 5 - 0
activity/activity/release.json

@@ -0,0 +1,5 @@
+{
+  "navigationBarTitleText": "活动发布",
+  "onReachBottomDistance": 50,
+  "usingComponents": {}
+}

+ 43 - 0
activity/activity/release.wxml

@@ -0,0 +1,43 @@
+<!--pages/my/activity/release.wxml-->
+<view class="activity-release-container">
+  <view class="tabs">
+    <view class="tab {{index == currentTab ? 'tab-active' : ''}}" wx:for="{{tabs}}" data-index="{{index}}" bindtap="tabChange">{{item.label}}</view>
+  </view>
+
+  <view class="body">
+    <view class="activity-box" wx:for="{{list}}" wx:key="{{item.id}}" data-activityId="{{item.id}}" bindtap="addActivity">
+      <view class="status">
+        <text wx:if="{{item.isPublish == 0}}">待发布</text>
+        <text wx:else>{{item.statusName}}</text>
+      </view>
+      <view class="pic-box">
+        <image src="{{item.thumbnailImg}}" class="status-pic"></image>
+        <image class="pic" src="{{appAssetsUrl2}}wjxy/reject-icon.png" wx:if="{{item.auditStatus == 2}}"></image>
+        <i class="iconfont1 icon-daishenhe pic" wx:if="{{item.auditStatus == 0}}"></i>
+        <i class="iconfont1 icon-yitongguo pic" wx:if="{{item.auditStatus == 1}}"></i>
+        <!-- <i class="iconfont1 icon-yiwancheng pic" wx:if="{{item.auditStatus == 2}}"></i> -->
+      </view>
+      <view class=" info">
+        <view class="title">{{item.title}}</view>
+        <view class="time">活动时间:{{item.startTime}} - {{item.endTime}}</view>
+        <view class="info-box">
+          <view class="person-num" wx:if="{{item.willnum}}">名额:{{item.willnum}}</view>
+          <view class="activity-price">¥<text class="price-num">{{item.money || '0'}}</text>元</view>
+        </view>
+        <view class="info-box">
+          <view class="address">{{item.address}}</view>
+          <view class="free">潮兼职免费</view>
+        </view>
+      </view>
+    </view>
+    <block wx:if="{{total<=0}}">
+      <view class='tc h100'>
+        <image src="{{nodata}}" class='nodata-img'></image>
+      </view>
+    </block>
+  </view>
+
+  <view class="footer">
+    <button class="btn" bindtap="addActivity">新增发布</button>
+  </view>
+</view>

+ 179 - 0
activity/activity/release.wxss

@@ -0,0 +1,179 @@
+/* pages/my/activity/release.wxss */
+page {
+  width: 100%;
+  /* height: 100%; */
+}
+
+.activity-release-container {
+  padding-top: 100rpx;
+  padding-bottom: calc(100rpx + constant(safe-area-inset-bottom));
+  /*兼容 IOS<11.2*/
+  padding-bottom: calc(100rpx + env(safe-area-inset-bottom));
+  /*兼容 IOS>11.2*/
+}
+
+.tabs {
+  position: fixed;
+  top: 0;
+  left: 0;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  width: 100%;
+  height: 100rpx;
+  padding: 0 60rpx;
+  font-size: 28rpx;
+  font-family: 'PingFang SC, PingFang SC-Regular';
+  font-weight: 400;
+  color: #666666;
+  background-color: #fff;
+  box-sizing: border-box;
+  z-index: 9;
+}
+
+.tabs .tab {
+  position: relative;
+  height: 100%;
+  line-height: 100rpx;
+}
+
+.tabs .tab-active {
+  font-size: 32rpx;
+  font-family: 'PingFang SC, PingFang SC-Bold';
+  font-weight: 700;
+  color: #1a1a1a;
+}
+
+.tabs .tab-active::after {
+  display: block;
+  position: absolute;
+  bottom: 0;
+  content: '';
+  width: 100%;
+  height: 4rpx;
+  background: #ffdd36;
+  border-radius: 2rpx;
+  z-index: 1;
+}
+
+.body {
+  padding: 30rpx 30rpx;
+}
+
+.activity-box {
+  position: relative;
+  height: 461rpx;
+  background: #ffffff;
+  border-radius: 8rpx;
+  margin-bottom: 20rpx;
+  overflow: hidden;
+}
+
+.status {
+  position: absolute;
+  top: 0;
+  left: 0;
+  padding: 3rpx 20rpx;
+  font-size: 24rpx;
+  background-color: #ffdb29;
+  border-radius: 8rpx 0 8rpx 0;
+  font-family: 'PingFang SC, PingFang SC-Regular';
+  font-weight: 400;
+  color: #51491d;
+  z-index: 3;
+}
+
+.pic-box {
+  position: relative;
+  margin-bottom: 10rpx;  overflow: hidden;
+}
+
+.pic-box .status-pic {
+  width: 100%;
+  height: 260rpx;
+}
+
+.pic-box .pic {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  width: 133rpx;
+  height: 116rpx;
+  font-size: 130rpx;
+  color: #fff;
+  transform: translate(-50%, -50%);
+}
+
+.activity-box .info {
+  padding: 0 30rpx;
+}
+
+.activity-box .info .title {
+  font-size: 28rpx;
+  font-family: 'PingFang SC, PingFang SC-Bold';
+  font-weight: 700;
+  color: #1a1a1a;
+  margin-bottom: 7rpx;
+}
+
+.activity-box .info {
+  font-size: 24rpx;
+  font-family: 'PingFang SC, PingFang SC-Regular';
+  font-weight: 400;
+  color: #333333;
+}
+
+.activity-box .info .time {
+  color: #333333;
+  margin-bottom: 7rpx;
+}
+
+.activity-box .info .info-box {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 7rpx;
+}
+
+.activity-box .info .info-box .activity-price {
+  font-size: 20rpx;
+  color: #ec2e26;
+  font-weight: 500;
+}
+
+.activity-box .info .info-box .activity-price .price-num {
+  font-size: 32rpx;
+  color: #ec2e26;
+  font-weight: 700;
+}
+
+.activity-box .info .info-box .address {
+  color: #999999;
+}
+
+.footer {
+  position: fixed;
+  left: 50%;
+  bottom: 0;
+  width: 100%;
+  padding: 30rpx;
+  background-color: #fff;
+  transform: translateX(-50%);
+  padding-bottom: constant(safe-area-inset-bottom);
+  /*兼容 IOS<11.2*/
+  padding-bottom: env(safe-area-inset-bottom);
+}
+
+.footer .btn {
+  width: 690rpx;
+  height: 85rpx;
+  background: #ffdc2f;
+  border-radius: 43rpx;
+  font-size: 30rpx;
+  font-family: 'PingFang SC, PingFang SC-Regular';
+  font-weight: 400;
+  text-align: center;
+  color: #1a1a1a;
+  color: #fff;
+  line-height: 85rpx;
+}

+ 129 - 0
activity/activityInfo/activityInfo.js

@@ -0,0 +1,129 @@
+// pages/my/activityInfo/activityInfo.js
+const App = getApp()
+const util = require('../../utils/util')
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    activityId: null,
+    num: 0,
+    list: [],
+    willnum: 0,
+    queryParams: {
+      page: 1,
+      limit: 10
+    },
+    page: {
+      total: null,
+      currPage: null,
+      totalPage: null,
+    },
+    nodata: util.nodata(),
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    console.log(options, 111)
+    if (options && options.activityId) {
+      this.setData({
+        activityId: options.activityId,
+        willnum: options.willnum
+      })
+      this.getlist()
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  getlist() {
+    if (this.data.queryParams.page > 1) {
+      if (this.data.page.currPage == this.data.page.totalPage) {
+        wx.showToast({
+          icon: 'none',
+          title: '没有更多哦~',
+        })
+        return false
+      }
+    }
+
+    wx.showLoading({
+      title: '努力加载中...',
+    })
+    App._get('activitystu/list', {
+      ...this.data.queryParams,
+      pid: this.data.activityId
+    }, res => {
+      if (res.code === 0) {
+        this.setData({
+          list: res.page.list,
+          page: {
+            total: res.page.totalCount,
+            currPage: res.page.currPage,
+            totalPage: res.page.totalPage
+          }
+        })
+      }
+    }, err => {}, complete => {
+      setTimeout(() => {
+        wx.hideLoading()
+      }, 500)
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+    this.setData({
+      queryParams: {
+        page: ++this.data.queryParams.page,
+        limit: 10
+      }
+    })
+    this.getlist()
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 4 - 0
activity/activityInfo/activityInfo.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "报名信息",
+  "usingComponents": {}
+}

+ 32 - 0
activity/activityInfo/activityInfo.wxml

@@ -0,0 +1,32 @@
+<!--pages/my/activityInfo/activityInfo.wxml-->
+<!--pages/my/myInvite/myInvite.wxml-->
+<view class="invite-container">
+  <view class="filtrate">
+    <text>报名用户:<text class="num">{{page.total || 0}}/{{willnum}}</text></text>
+  </view>
+  <view class="table">
+    <view class="thead">
+      <view class="thead-title">姓名</view>
+      <view class="thead-title">性别</view>
+      <view class="thead-title">昵称</view>
+      <view class="thead-title">注册时间</view>
+      <view class="thead-title">会员状态</view>
+    </view>
+    <view class="tbody" wx:for="{{list}}" wx:key="{{item.id}}">
+      <view class="tbody-title name">{{item.name}}</view>
+      <view class="tbody-title name">{{item.sex == '010' ? '男' : item.sex == '020' ? '女' : ''}}</view>
+      <view class="tbody-title phonenum">{{item.vipName}}</view>
+      <view class="tbody-title time">{{item.inputTime}}</view>
+      <view class="tbody-title status">
+        <text wx:if="{{item.memberState == 0}}">普通</text>
+        <text wx:if="{{item.memberState == 1}}">年费</text>
+        <text wx:if="{{item.memberState == 2}}">终身</text>
+      </view>
+    </view>
+    <block wx:if="{{page.total <= 0}}">
+      <view class='tc h100'>
+        <image src="{{nodata}}" class='nodata-img'></image>
+      </view>
+    </block>
+  </view>
+</view>

+ 89 - 0
activity/activityInfo/activityInfo.wxss

@@ -0,0 +1,89 @@
+/* pages/my/activityInfo/activityInfo.wxss */
+page {
+  width: 100%;
+  height: 100%;
+  background-color: #fff;
+}
+
+.invite-container {
+  padding-top: calc(120rpx + 90rpx);
+}
+
+.filtrate {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 120rpx;
+  line-height: 120rpx;
+  padding-left: 30rpx;
+  font-size: 30rpx;
+  font-family: 'PingFang SC, PingFang SC-Bold';
+  font-weight: 400;
+  color: #333333;
+  background-color: #fff;
+  box-sizing: border-box;
+}
+
+.filtrate .num {
+  color: #808080;
+}
+
+.table {}
+
+.table .thead {
+  position: fixed;
+  top: 120rpx;
+  left: 0;
+  width: 100%;
+  border-top: 1rpx solid #e6e6e6;
+}
+
+.table .thead,
+.table .tbody {
+  display: flex;
+  height: 90rpx;
+  background: #fffae1;
+  font-size: 28rpx;
+  font-family: 'PingFang SC, PingFang SC-Bold';
+  font-weight: 700;
+  color: #1a1a1a;
+  border-bottom: 1rpx solid #e6e6e6;
+}
+
+.table .thead .thead-title,
+.table .tbody .tbody-title {
+  flex: 1;
+  height: 100%;
+  text-align: center;
+  /* line-height: 90rpx; */
+  border-right: 1rpx solid #e6e6e6;
+  display: flex;
+  align-items: center;
+  word-break: break-all;
+  justify-content: center;
+}
+
+.table .thead .thead-title:last-child {
+  border: none;
+}
+
+.table .tbody {
+  height: 80rpx;
+  background-color: #fff;
+  font-weight: 500;
+  color: #666666;
+}
+
+.table .tbody .tbody-title {
+  /* line-height: 80rpx; */
+  font-size: 22rpx;
+  display: flex;
+  align-items: center;
+  word-break: break-all;
+  justify-content: center;
+}
+.time {
+	/* padding: 0 20rpx;
+	box-sizing: border-box; */
+}

+ 166 - 0
activity/detail/detail.js

@@ -0,0 +1,166 @@
+var app = getApp();
+var util = require("../../utils/util.js")
+let wxParse = require("../../wxParse/wxParse.js");
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    activityId: null,
+    user: {},
+    bottomLeft: app.bottomLeft,
+    appAssetsUrl: app.appAssetsUrl,
+	appAssetsUrl2: app.appAssetsUrl2,
+    detail: {},
+    member: {},
+    content: '',
+    schoolInfo: {},
+    vipMessage: '',
+    roleList: ['平台管理员', '校园代理人', '行家', '行家;平台管理员', '行家;校园代理人'],
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    if (options.activityId) {
+      this.setData({
+        activityId: options.activityId
+      })
+    }
+    this.setData({
+      detail: wx.getStorageSync('activityDetail'),
+      user: wx.getStorageSync('USER')
+    })
+    this.loadVipSel()
+	console.log(this.data.detail.activityAppletsDetailsList,'detail.activityAppletsDetailsList')
+  },
+
+  // 查看地图
+  goLocal() {
+    let that = this
+    let [latitude, longitude] = [this.data.detail.coordinate.split(',')[0], this.data.detail.coordinate.split(',')[1]]
+    console.log(Number(latitude), Number(longitude))
+    wx.openLocation({
+      latitude: Number(longitude),
+      longitude: Number(latitude),
+      name: that.data.title,
+      address: that.data.address,
+      success: function () {
+        console.log("success");
+      },
+    });
+  },
+
+  loadVipSel() {
+    let _this = this;
+    wx.showLoading({
+      title: '努力加载中...',
+    })
+    app._post_form('wgfillinfo/apiSelectwgfillinfo', 'application/json',
+      null,
+      function (res) {
+        if (res.code === 0) {
+          setTimeout(function () {
+            wxParse.wxParse('vipMessage', 'html', res.wgFillInfo.vipMessage, _this, 5)
+          }, 300)
+        }
+      }
+    )
+  },
+  // 查看二维码
+  seeCode() {
+    this.popup3.showPopup();
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+    //获得popup组件
+    this.popup3 = this.selectComponent("#popup3"); // 二维码
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {},
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {},
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {},
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+  submit() {
+    wx.showLoading({
+      title: '提交中...',
+    })
+    if (this.data.activityId) {
+      app._put_form('activity/updateActivity', '', {
+        ...this.data.detail,
+        id: this.data.activityId
+      }, res => {
+        if (res.code === 0) {
+          wx.showToast({
+            title: '修改成功',
+          })
+          wx.removeStorageSync('activityDetail')
+          wx.switchTab({
+            url: '/pages/home/index/index',
+          })
+        }
+      }, err => {}, complete => {
+        setTimeout(() => {
+          wx.hideLoading()
+        }, 300)
+      })
+    } else {
+      app._post_form('activity/saveActivity', '', this.data.detail, res => {
+        if (res.code === 0) {
+          wx.showToast({
+            title: '添加成功',
+          })
+          wx.removeStorageSync('activityDetail')
+          wx.switchTab({
+            url: '/pages/home/index/index',
+          })
+        }
+      }, err => {}, complete => {
+        setTimeout(() => {
+          wx.hideLoading()
+        }, 300)
+      })
+    }
+  },
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {},
+  //取消事件
+  _error(e) {
+    this.popup3.hidePopup();
+  },
+  //确认事件 
+  _success(e) {
+    this.popup3.hidePopup();
+  }
+})

+ 6 - 0
activity/detail/detail.json

@@ -0,0 +1,6 @@
+{
+  "navigationBarTitleText": "最会玩",
+  "usingComponents": {
+    "popup2": "../../components/popup2/popup"
+  }
+}

+ 119 - 0
activity/detail/detail.wxml

@@ -0,0 +1,119 @@
+<!--activity/detail/detail.wxml-->
+<import src="../../wxParse/wxParse.wxml" />
+<view class="partcontent">
+  <image mode="aspectFill" src="{{detail.bannerImg}}" lazy-load="{{true}}" class="partbg" />
+  <view class='partime-container'>
+    <view class="acitemwrap">
+      <!-- <view class="flex-bet w100  apwrap">
+				<view class="w70 price activeity-price-c">
+					<label>名额:</label>
+					<text class="num">{{detail.willnum}}</text>
+					<text class="company">人</text>
+				</view>
+				<view class="w30 tc status flex-xy-center activeity-price-d">
+					<text>{{detail.statusName}}</text>
+				</view>
+			</view> -->
+      <view class="content">
+        <view class="name-price">
+          <view class="title">{{detail.title}}</view>
+          <view class="price">
+            <text class="p1">¥</text>
+            <text class="p2">{{ detail.money }}</text>
+            <text class="p1">{{'元'}}</text>
+          </view>
+        </view>
+        <view class="type-state">
+          <view>
+            <view class="type" wx:if="{{ detail.isNeedVip == 0 }}">无界会员免费</view>
+          </view>
+
+          <!-- <view class="sub-btn {{detail.statusName=='报名中'?'green':''}}">{{detail.statusName}}</view> -->
+        </view>
+        <!-- <view class="list">活动日期:{{detail.startDate}} — {{detail.endDate}}</view> -->
+        <view class="list">活动时间:{{detail.startTime}} — {{detail.endTime}}</view>
+        <view class="list" bindtap="goLocal">
+          <view><i style="font-size:40rpx;" class="iconfont icon-dizhi icon-home-dizhi"></i>
+            地址:{{detail.address}}</view>
+          <i class="iconfont1 icon-jinrujiantouxiao righticon"></i>
+        </view>
+      </view>
+    </view>
+    <!-- 项目信息 -->
+    <view class="product-box">
+      <view class="hot-title">
+        <view class="line"></view>
+        <view class="title">项目信息</view>
+      </view>
+      <view class="list">报名截止:{{detail.registrationEnd}}</view>
+      <view class="list">集合截止:{{detail.meetingTime}}</view>
+      <view class="list">已报名/名额:0/{{ detail.willnum }}</view>
+    </view>
+    <!-- 个人信息 -->
+    <view class="user-box">
+      <image mode="aspectFill" src="{{user.memberphoto}}" lazy-load="{{true}}" class="user-img" />
+      <view class="user-right">
+        <view>
+          <view class="name-sex">
+            <view wx:if="{{user.vipname}}">
+              {{user.vipname}}
+            </view>
+            <image mode="aspectFill" wx:if="{{schoolInfo.sex}}" src="{{ vipname.sex == '010' ? appAssetsUrl2+'wjxy/man.png' : appAssetsUrl2+'wjxy/wumen.png'}}" class="user-sex" />
+          </view>
+          <view class="zhiwei">{{roleList[user.memberRoleStatus - 1]}}</view>
+        </view>
+        <!-- <view class="right-box" bindtap="perDetail">
+          TA的发布
+          <i style="font-size:40rpx;color:#000000;" class="iconfont1 icon-jinrujiantouxiao righticon"></i>
+        </view> -->
+      </view>
+    </view>
+    <view class='partime-bg'>
+      <view class='partime-detail'>
+        <view class='partime-detail-container'>
+          <text class='partime-detail-title hk-leftt'>活动详情</text>
+          <view class='circle'></view>
+        </view>
+      </view>
+      <view class='content'>
+        <view class="" wx:if="{{detail.isAppletsRelease == 1}}">
+          <view wx:for="{{detail.activityAppletsDetailsList}}">{{item === null ? '' : item}}</view>
+        </view>
+        <!-- <template is="wxParse" wx:else data="{{wxParseData:content.nodes}}" /> -->
+      </view>
+    </view>
+
+    <view class='partime-bg member partime-listcolor'>
+      <view class='partime-detail'>
+        <view class='partime-detail-container'>
+          <text class='partime-detail-title hk-leftt'>会员须知</text>
+          <view class='circle'></view>
+        </view>
+      </view>
+      <view class='partime-member-info '>
+        <template is="wxParse" data="{{wxParseData:vipMessage.nodes}}" class="partime-detail-info" />
+      </view>
+
+      <!-- <view class="mask {{maskShow?'':'hidden'}}" catchtouchmove="preventTouchMove" bindtap='maskClose'>
+      </view> -->
+    </view>
+    <view class='botm zindex' style="bottom: {{bottomLeft}}px;">
+      <view class="btn-box">
+        <view class="see-code" bindtap="seeCode">查看二维码</view>
+        <view class="btn" bindtap="submit">提交发布</view>
+      </view>
+
+    </view>
+  </view>
+  <view style="height: {{bottomLeft}}px;width: 100%;position: fixed;bottom: 0;background: white;z-index: 1000;"></view>
+
+  <popup2 id='popup3' title='查看二维码' content="{{['']}}" btn2="{{false}}" btn_no='' btn_ok='知道了' bind:error="_error" bind:success="_success" data-name="popup3">
+    <view slot="content" style="width: 85%;padding: 44rpx 0 38rpx 0;">
+      <view class="code-tip">{{detail.contactInstructions}}</view>
+      <image class="code-img" src='{{detail.qrCodePicture}}' />
+    </view>
+  </popup2>
+</view>
+<!-- <button class="custCare" open-type="contact" session-from="sessionFrom" style="bottom: calc(150rpx + {{bottomLeft}}px);">
+	<image mode="aspectFill" src="{{appAssetsUrl}}/images/custCare.png"></image>
+</button> -->

File diff suppressed because it is too large
+ 1195 - 0
activity/detail/detail.wxss


+ 173 - 0
activity/map/map.js

@@ -0,0 +1,173 @@
+// activity/map/map.js
+const App = getApp()
+var QQMapWX = require('../../utils/qqmap-wx-jssdk.js');
+const {
+  timestampToTime
+} = require('../../utils/util.js');
+var map;
+map = new QQMapWX({
+  key: 'RA3BZ-PSGW4-GZUUX-DDAU7-6B54E-KJFQ7' // 必填
+});
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    lat: '',
+    lng: '',
+    markers: []
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    this.setData({
+      lng: options.lng,
+      lat: options.lat
+    })
+    // this.getCoord()
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  // 获取经纬度
+  getCoord() {
+    wx.getLocation({
+      type: 'gcj02',
+      success: (res) => {
+        const latitude = res.latitude
+        const longitude = res.longitude
+        this.setData({
+          lng: Number(longitude),
+          lat: Number(latitude)
+        })
+      },
+      fail: (e) => {}
+    })
+  },
+
+
+  selectAddress(e) {
+    var pages = getCurrentPages();
+    var currPage = pages[pages.length - 1]; //当前页面
+    var prevPage = pages[pages.length - 2]; //上一个页面
+    prevPage.setData({
+      address: e,
+      coordinate: this.data.lng + ',' + this.data.lat
+    })
+    wx.navigateBack()
+  },
+
+  mapTap(e) {
+    wx.showLoading({
+      title: '获取位置中...',
+    })
+    let lat = e.detail.latitude
+    let lng = e.detail.longitude
+    let obj = {
+      latitude: lat,
+      longitude: lng,
+      width: 17,
+      height: 24
+    }
+    this.data.markers.push(obj)
+    this.setData({
+      markers: this.data.markers
+    })
+    App._get('store/getDetailsAddress', {
+      lon: lng,
+      lat: lat
+    }, res => {
+      console.log(res, 111)
+      if (res.code === 0) {
+        wx.hideLoading()
+        this.selectAddress(res.data.street_number)
+      }
+
+    })
+    // this.pointToAddress(lat, lng, res => {
+    //   console.log(res, 11111111)
+    // })
+  },
+
+  bindmarkertap(e) {
+    console.log(e, 222)
+  },
+
+  bindpoitap(e) {
+    console.log(e, 222)
+  },
+
+  bindlabeltap(e) {
+    console.log(e, 333)
+  },
+
+  // 定义 pointToAddress 方法
+  pointToAddress: function (latitude, longitude, callback) {
+    var _this = this;
+    // 调用接口
+    map.reverseGeocoder({
+      location: {
+        latitude: latitude,
+        longitude: longitude
+      },
+      success: function (res) {
+        // 解析成功返回地址
+        callback(res.result.ad_info);
+      },
+      fail: function (res) {
+        console.log(res);
+      },
+      complete: function (res) {}
+    });
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 4 - 0
activity/map/map.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "地图",
+  "usingComponents": {}
+}

+ 4 - 0
activity/map/map.wxml

@@ -0,0 +1,4 @@
+<!--activity/map/map.wxml-->
+<view class="map-container">
+  <map id="map" markers="{{markers}}" longitude="{{lng}}" latitude="{{lat}}" show-location show-compass show-scale bindtap="mapTap" bindmarkertap="bindmarkertap" bindpoitap="bindpoitap" bindlabeltap="bindlabeltap"></map>
+</view>

+ 10 - 0
activity/map/map.wxss

@@ -0,0 +1,10 @@
+/* activity/map/map.wxss */
+page {
+  width: 100%;
+  height: 100%;
+}
+
+#map {
+  width: 100%;
+  height: 100vh;
+}

+ 497 - 0
app.js

@@ -0,0 +1,497 @@
+//var bmap = require('/mapjs/bmap-wx.min.js');
+var QQMapWX = require("./utils/qqmap-wx-jssdk.js");
+
+var map;
+
+App({
+  /**
+   * 全局变量
+   */
+  // apiRoot: "https://wj.songlanyun.com/wjxy/api/", // api地址
+  apiRoot: 'http://192.168.0.101:8687/wjxy/api/',  
+  // apiRoot: 'http://47.104.208.8:8086/wjxy/api/',
+  // apiRoot: 'https://wjxy.songlanyun.com/wjxy/api/', // 线上
+  // apiRoot: 'http://192.168.0.232:8687/wjxy/api/', //黄理志
+  // apiRoot: 'http://192.168.0.186:8687/wjxy/api/',
+  siteInfo: require("siteinfo.js"),
+  token: "",
+  // appAssetsUrl: 'https://pm.lanzhongrenli.com/qmjz/app', //静态资源服务器
+  appAssetsUrl: "https://wj.songlanyun.com/wjxy/statics/images/app", //静态资源服务器
+  // appAssetsUrl2: 'http://192.168.0.75:8687/wjxy/statics/images/app/images/', //静态资源服务器
+  appAssetsUrl2: "https://wj.songlanyun.com/wjxy/statics/images/app/images/", //静态资源服务器
+  //自定义参数
+  params: {
+    pePageToIndex: "",
+  },
+  bottomLeft: 0,
+  sexList: [],
+  /**
+   * 生命周期函数--监听小程序初始化
+   */
+  onLaunch: function () {
+    let that = this;
+    map = new QQMapWX({
+      key: "RA3BZ-PSGW4-GZUUX-DDAU7-6B54E-KJFQ7", // 必填
+    });
+    console.log("首次启动");
+    const updateManager = wx.getUpdateManager();
+
+    updateManager.onCheckForUpdate(function (res) {
+      // 请求完新版本信息的回调
+      console.log(res.hasUpdate);
+    });
+
+    updateManager.onUpdateReady(function () {
+      wx.showModal({
+        title: "更新提示",
+        content: "新版本已经准备好,是否重启应用?",
+        success(res) {
+          if (res.confirm) {
+            // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+            updateManager.applyUpdate();
+          }
+        },
+      });
+    });
+
+    updateManager.onUpdateFailed(function () {
+      // 新版本下载失败
+      wx.showToast({
+        title: "版本更新失败,请检查网络!",
+        icon: "none",
+        duration: 1500,
+      });
+    });
+    /* setInterval(function(){
+       wx.removeStorageSync('Weather');
+      that.getWeaTher();
+       console.log("天气已更新");
+     },7200000);*/
+
+    //that.getWeaTher();
+
+    // http://zqgj.vaiwan.com
+    // this.setApiRoot("http://zqgj.vaiwan.com/zqgj");
+    /* wx.getNetworkType({
+       success(res) {
+         const networkType = res.networkType
+         wx.showToast({
+           title: '当前网络为' + networkType + '',
+           icon: 'none'
+         })
+       }
+     })*/
+    //this.getLocal();
+    //ios安全区域
+    wx.getSystemInfo({
+      success: (res) => {
+        this.bottomLeft = res.screenHeight - res.safeArea.bottom;
+      },
+    });
+    wx.request({
+      url: this.apiRoot + "bizlibrary/infoList/gender",
+      method: "get",
+      success: function (res) {
+        console.log(res);
+        if (res.data.code == 0) {
+          that.sexList = res.data.dictList;
+        }
+      },
+    });
+
+    // that.font();
+  },
+
+  font() {
+    wx.loadFontFace({
+      family: "FZZhunYuan-M02S",
+      global: true,
+      source:
+        'url("https://wujiexiaoyuan-wechat.oss-cn-hangzhou.aliyuncs.com/font/FZZhunYuan-M02S.woff2")',
+      // source: 'url("https://wujiexiaoyuan-wechat.oss-cn-hangzhou.aliyuncs.com/font/FZZhunYuan-M02S.ttf")',
+      success: (msg) => {
+        console.log(msg);
+      },
+      fail: (err) => {
+        console.log(err);
+      },
+      complete: (res) => {
+        console.log(res);
+      },
+    });
+    wx.loadFontFace({
+      family: "FZCuYuan-M03",
+      global: true,
+      source:
+        'url("https://wujiexiaoyuan-wechat.oss-cn-hangzhou.aliyuncs.com/font/yuanGBK.woff2")',
+      // source: 'url("https://wujiexiaoyuan-wechat.oss-cn-hangzhou.aliyuncs.com/font/yuanGBK.ttf")',
+      success: (msg) => {
+        console.log(msg);
+      },
+      fail: (err) => {
+        console.log(err);
+      },
+      complete: (res) => {
+        console.log(res);
+      },
+    });
+  },
+  getLocal() {
+    const _this = this;
+    wx.getLocation({
+      type: "gcj02",
+      success(res) {
+        const latitude = res.latitude;
+        const longitude = res.longitude;
+        //通过【小程序定位】获取经纬度,在通过第三方sdk获取的地址信息
+        _this.pointToAddress(latitude, longitude, function (address) {
+          if (address) {
+            wx.setStorageSync("CHOOSECITY", {
+              cityName: address.city,
+              areaName: address.district,
+            });
+            let pages = getCurrentPages();
+            let prevpage = pages[pages.length - 1];
+            if (prevpage.hasOwnProperty("loadCity")) {
+              prevpage.loadCity();
+            }
+          }
+        });
+      },
+      fail() {
+        let pages = getCurrentPages();
+        let prevpage = pages[pages.length - 1];
+        if (prevpage.hasOwnProperty("loadCity")) {
+          prevpage.loadCity();
+        }
+      },
+    });
+  },
+
+  // 定义 pointToAddress 方法
+  pointToAddress: function (latitude, longitude, callback) {
+    var _this = this;
+    // 调用接口
+    map.reverseGeocoder({
+      location: {
+        latitude: latitude,
+        longitude: longitude,
+      },
+      success: function (res) {
+        // 解析成功返回地址
+        callback(res.result.ad_info);
+      },
+      fail: function (res) {
+        console.log(res);
+      },
+      complete: function (res) {},
+    });
+  },
+
+  /**
+   * 当小程序启动,或从后台进入前台显示,会触发 onShow
+   */
+  /*
+    onShow: function (options) {
+      // 获取小程序基础信息
+      this.getWxappBase(function (wxapp) {
+        // 设置navbar标题、颜色
+        wx.setNavigationBarColor({
+          frontColor: wxapp.navbar.top_text_color.text,
+          backgroundColor: wxapp.navbar.top_background_color
+        })
+      });
+    },*/
+
+  onShow: function (ops) {
+    var that = this;
+    wx.checkSession({
+      success: function () {
+        console.log("当前登录状态:有效");
+      },
+      fail: function () {},
+    });
+
+    wx.onNetworkStatusChange(function (res) {
+      if (res.isConnected) {
+        if (res.networkType !== "wifi") {
+          wx.showToast({
+            title: "注意!您正在使用" + res.networkType + "网络",
+            icon: "none",
+          });
+        }
+      }
+    });
+  },
+  getWeaTher: function () {
+    if (!wx.getStorageSync("Weather")) {
+      // 新建百度地图对象
+      var BMap = new bmap.BMapWX({
+        ak: "pSzxYKshUcuo1Y9pPrbFs6r7LGvx8sxg",
+      });
+      var fail = function (data) {
+        // console.log(data)
+      };
+      var success = function (data) {
+        var weatherData = data.currentWeather[0];
+        /*  weatherData = '城市:' + weatherData.currentCity + '\n' + 'PM2.5:' + weatherData.pm25 + '\n' + '日期:' + weatherData.date + '\n' + '温度:' + weatherData.temperature + '\n' + '天气:' + weatherData.weatherDesc + '\n' + '风力:' + weatherData.wind + '\n';*/
+        //Weather(weatherData.weatherDesc, _this, weatherData);
+        wx.setStorageSync("Weather", weatherData);
+      };
+      // 发起weather请求
+      BMap.weather({
+        fail: fail,
+        success: success,
+      });
+    }
+  },
+  /**
+   * 设置api地址
+   */
+  setApiRoot: function () {
+    //this.apiRoot = this.siteInfo.siteroot + '/api/';
+  },
+
+  /**
+   * 获取小程序基础信息
+   */
+  /*
+    getWxappBase: function (callback) {
+      let App = this;
+      App._get('wxapp/base', {}, function (result) {
+        // 记录小程序基础信息
+        wx.setStorageSync('wxapp', result.data.wxapp);
+        callback && callback(result.data.wxapp);
+      }, false, false);
+    },*/
+
+  /**
+   * 显示成功提示框
+   */
+  showSuccess: function (msg, callback) {
+    wx.showToast({
+      title: msg,
+      icon: "success",
+      success: function () {
+        callback &&
+          setTimeout(function () {
+            callback();
+          }, 1500);
+      },
+    });
+  },
+
+  /**
+   * 显示失败提示框
+   */
+  showError: function (msg, callback) {
+    wx.showToast({
+      title: msg,
+      icon: "none",
+      duration: 2000,
+      success: function (res) {
+        callback && callback();
+      },
+    });
+  },
+
+  /**
+   * get请求
+   */
+  _get: function (url, data, success, fail, complete) {
+    wx.showNavigationBarLoading();
+    let App = this;
+    // 构造请求参数
+    data = data || {};
+    wx.request({
+      url: App.apiRoot + url,
+      data: data,
+      method: "get",
+      success: function (res) {
+        wx.hideNavigationBarLoading();
+        wx.hideLoading();
+        if (res.statusCode !== 200 || typeof res.data !== "object") {
+          return false;
+        }
+        if (res.data.code === -1) {
+          // 登录态失效, 重新登录
+          return false;
+        } else {
+          success && success(res.data);
+        }
+      },
+      fail: function (res) {
+        wx.hideNavigationBarLoading();
+        // console.log(res);
+        App.showError(res.errMsg, function () {
+          fail && fail(res);
+        });
+      },
+      complete: function (res) {
+        wx.hideNavigationBarLoading();
+
+        complete && complete(res);
+      },
+    });
+  },
+
+  /**
+   * post提交
+   */
+  _post_form: function (url, header, data, success, fail, complete) {
+    wx.showNavigationBarLoading();
+    let App = this;
+    wx.request({
+      url: App.apiRoot + url,
+      header: {
+        "content-type": header,
+      },
+      method: "POST",
+      data: data,
+      success: function (res) {
+        wx.showNavigationBarLoading();
+        wx.hideLoading();
+        if (res.statusCode !== 200 && typeof res.data.code !== 1) {
+          App.showError("网络请求出错");
+          return false;
+        }
+        if (res.data.code === -1) {
+          // 登录态失效, 重新登录
+          App.doLogin(function () {
+            App._post_form(url, data, success, fail);
+          });
+          return false;
+        } else if (res.data.code === 0) {
+          success && success(res.data);
+        } else if (res.data.retCode === "000000") {
+          success && success(res.data);
+          return;
+        } else {
+          var msg = "";
+          if (res.data.message) {
+            msg = res.data.message;
+          } else if (res.data.msg) {
+            msg = res.data.msg;
+          }
+          App.showError(msg);
+          success && success(res.data);
+          return false;
+        }
+      },
+      fail: function (res) {
+        wx.showNavigationBarLoading();
+        App.showError(res.errMsg, function () {
+          fail && fail(res);
+        });
+      },
+      complete: function (res) {
+        complete && complete(res);
+
+        wx.hideNavigationBarLoading();
+      },
+    });
+  },
+
+  // put 请求
+  _put_form: function (url, header, data, success, fail, complete) {
+    wx.showNavigationBarLoading();
+    let App = this;
+    wx.request({
+      url: App.apiRoot + url,
+      header: {
+        "content-type": header,
+      },
+      method: "PUT",
+      data: data,
+      success: function (res) {
+        wx.showNavigationBarLoading();
+        wx.hideLoading();
+        if (res.statusCode !== 200 && typeof res.data.code !== 1) {
+          App.showError("网络请求出错");
+          return false;
+        }
+        if (res.data.code === -1) {
+          // 登录态失效, 重新登录
+          App.doLogin(function () {
+            App._post_form(url, data, success, fail);
+          });
+          return false;
+        } else if (res.data.code === 0) {
+          success && success(res.data);
+        } else if (res.data.retCode === "000000") {
+          success && success(res.data);
+          return;
+        } else {
+          var msg = "";
+          if (res.data.message) {
+            msg = res.data.message;
+          } else if (res.data.msg) {
+            msg = res.data.msg;
+          }
+          // App.showError(msg);
+
+          console.log(msg, 11111111);
+          success && success(res.data);
+
+          wx.showToast({
+            title: msg,
+            icon: "none",
+            duration: 2000,
+          });
+          return false;
+        }
+      },
+      fail: function (res) {
+        wx.showNavigationBarLoading();
+        App.showError(res.errMsg, function () {
+          fail && fail(res);
+        });
+      },
+      complete: function (res) {
+        complete && complete(res);
+
+        wx.hideNavigationBarLoading();
+      },
+    });
+  },
+
+  /**
+   * 对象转URL
+   */
+  urlEncode: function urlencode(data) {
+    var _result = [];
+    for (var key in data) {
+      var value = data[key];
+      if (value.constructor == Array) {
+        value.forEach(function (_value) {
+          _result.push(key + "=" + _value);
+        });
+      } else {
+        _result.push(key + "=" + value);
+      }
+    }
+    return _result.join("&");
+  },
+  city: function () {
+    return cityCode;
+  },
+
+  /**
+   * 设置当前页面标题
+   */
+  /*
+    setTitle: function() {
+      let App = this,
+        wxapp;
+      if (wxapp = wx.getStorageSync('wxapp')) {
+        wx.setNavigationBarTitle({
+          title: wxapp.navbar.wxapp_title
+        });
+      } else {
+        App.getWxappBase(function() {
+          App.setTitle();
+        });
+      }
+    },
+  */
+});

+ 172 - 0
app.json

@@ -0,0 +1,172 @@
+{
+  "pages": [
+    "pages/home/index/index",
+    "pages/my/index/index",
+    "pages/myMember/myMember",
+    "pages/home/location/index",
+    "pages/login",
+    "pages/register/register",
+    "pages/home/linkGzh",
+    "pages/home/index/growth/index/growth",
+    "pages/home/index/search/search",
+    "pages/home/index/partDetail/partDetail",
+    "pages/home/index/memberArea/memberArea",
+    "pages/home/index/searchTwo/searchTwo",
+    "pages/home/index/courseDetail/courseDetail",
+    "pages/home/index/activityDetail/activityDetail",
+    "pages/home/index/growth/growthMore/growthMore",
+    "pages/experience/index/index",
+    "pages/experience/activity/activity",
+    "pages/experience/activityinfo/activityinfo",
+    "pages/my/myData/myData",
+    "pages/my/myCustomer/myCustomer",
+    "pages/my/myCourse/myCourse",
+    "pages/my/myTravel/myTravel",
+    "pages/my/myCollection/myCollection",
+    "pages/my/myAsses/myAsses",
+    "pages/my/myProblem/myProblem",
+    "pages/my/myProblemDetail/myProblemDetail",
+    "pages/my/myPlay/myPlay",
+    "pages/my/myTimejob/myTimejob",
+    "pages/my/myMoney/myMoney",
+    "pages/my/myDetailed/myDetailed",
+    "pages/practicalExperience/practicalExperience",
+    "pages/my/set/set",
+    "pages/dashen/index",
+    "pages/my/myStudy/myStudy",
+    "pages/my/myInvite/myInvite",
+    "pages/my/integral/integral",
+    "pages/privacy/privacy",
+    "pages/home/index/gz/gz",
+    "pages/search/index"
+  ],
+  "subPackages": [
+    {
+      "root": "partTimeJobEvaluate",
+      "pages": ["index"]
+    },
+    {
+      "root": "invitationCode",
+      "pages": ["index"]
+    },
+    {
+      "root": "expert",
+      "pages": [
+        "detail/detail",
+        "consult/consult",
+        "success/success",
+        "schoolagent/schoolagent",
+        "agentdetail/agentdetail",
+        "popupdetail/popupdetail",
+        "storedetail/storedetail"
+      ]
+    },
+    {
+      "root": "meet",
+      "pages": [
+        "meet/meet",
+        "meet/addmeet",
+        "meet/detail",
+        "experience/experience"
+      ]
+    },
+    {
+      "root": "activity",
+      "pages": [
+        "activity/activity",
+        "activity/release",
+        "activityInfo/activityInfo",
+        "map/map",
+        "detail/detail"
+      ]
+    },
+    {
+      "root": "job",
+      "pages": ["postJob/postJob", "postJob/detail", "postJob/index"]
+    },
+    {
+      "root": "workbench",
+      "pages": [
+        "work/work",
+        "service/service",
+        "myService/myService",
+        "gambit/gambit",
+        "work/topic"
+      ]
+    },
+    {
+      "root": "pointExchange",
+      "pages": [
+        "index",
+        "pages/task/task",
+        "pages/center/center",
+        "pages/detail/detail",
+        "pages/my/my"
+      ]
+    },
+    {
+      "root": "membershipAgreement",
+      "pages": ["index"]
+    },
+    {
+      "root": "orderRecord",
+      "pages": ["index"]
+    }
+  ],
+  "permission": {
+    "scope.userLocation": {
+      "desc": "您的位置信息将用于获取定位"
+    }
+  },
+  "functionalPages": {
+    "independent": true
+  },
+  "requiredPrivateInfos": ["getLocation", "chooseLocation"],
+  "window": {
+    "backgroundTextStyle": "light",
+    "navigationBarBackgroundColor": "#FFFFFF",
+    "navigationBarTitleText": "无界校园",
+    "navigationBarTextStyle": "black",
+    "enablePullDownRefreshBar": true
+  },
+  "lazyCodeLoading": "requiredComponents",
+  "tabBar": {
+    "color": "#999999",
+    "backgroundColor": "#FFFFFF",
+    "selectedColor": "#1A1A1A",
+    "borderStyle": "black",
+    "list": [
+      {
+        "pagePath": "pages/home/index/index",
+        "text": "首页",
+        "iconPath": "assets/images/tabbar/tab1.png",
+        "selectedIconPath": "assets/images/tabbar/tab11.png"
+      },
+      {
+        "pagePath": "pages/practicalExperience/practicalExperience",
+        "text": "潮兼职",
+        "iconPath": "assets/images/tabbar/tab2.png",
+        "selectedIconPath": "assets/images/tabbar/tab22.png"
+      },
+      {
+        "pagePath": "pages/experience/index/index",
+        "text": "最会玩",
+        "iconPath": "assets/images/tabbar/tab3.png",
+        "selectedIconPath": "assets/images/tabbar/tab33.png"
+      },
+      {
+        "pagePath": "pages/dashen/index",
+        "text": "大神帮",
+        "iconPath": "assets/images/tabbar/tab4.png",
+        "selectedIconPath": "assets/images/tabbar/tab44.png"
+      },
+      {
+        "pagePath": "pages/my/index/index",
+        "text": "我的",
+        "iconPath": "assets/images/tabbar/tab5.png",
+        "selectedIconPath": "assets/images/tabbar/tab55.png"
+      }
+    ]
+  },
+  "sitemapLocation": "sitemap.json"
+}

+ 75 - 0
app.wxss

@@ -0,0 +1,75 @@
+/**app.wxss**/
+@import "/pages/common.wxss";
+/* <!-- 导入文件 --> */
+@import "wxParse/wxParse.wxss";
+
+@import "static/style.wxss";
+.container {
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: space-between;
+	/* padding: 200rpx 0; */
+	box-sizing: border-box;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+}
+
+/*隐藏滚动条*/
+::-webkit-scrollbar {
+	width: 0;
+	height: 0;
+	color: transparent;
+}
+
+page {
+	padding-bottom: 1rpx;
+}
+
+.icon-dizhi {
+	color: #FFDC2F;
+}
+
+/* 客服按钮 */
+.custCare{
+	position: fixed;
+	bottom: 0;
+	right: 0;
+	width: 160rpx;
+	height: 160rpx;
+	background-color: transparent;
+  z-index: 10000;
+}
+
+.custCare image{
+	height: 100%;
+	width: 100%;
+}
+
+
+/* 富文本组件样式 */
+rich-text{
+	word-break: break-all;
+}
+  .price {
+  	display: flex;
+  	flex-direction: row;
+	margin-top: 15rpx;
+	align-items: baseline;
+  }
+  
+  .price .p2 {
+  	font-size: 36rpx;
+  	font-family: FZZhunYuan-M02S;
+  	font-weight: 400;
+  	color: #EC2E26;
+  	line-height: 45rpx;
+  }
+  
+  .price .p1 {
+  	font-size: 22rpx;
+  	color: #EC2E26;
+  	line-height: 52rpx;
+  }

BIN
assets/images/login.png


BIN
assets/images/member.png


BIN
assets/images/menu.png


BIN
assets/images/tabbar/tab1.png


BIN
assets/images/tabbar/tab11.png


BIN
assets/images/tabbar/tab2.png


BIN
assets/images/tabbar/tab22.png


BIN
assets/images/tabbar/tab3.png


BIN
assets/images/tabbar/tab33.png


BIN
assets/images/tabbar/tab4.png


BIN
assets/images/tabbar/tab44.png


BIN
assets/images/tabbar/tab5.png


BIN
assets/images/tabbar/tab55.png


+ 6 - 0
components/location/config.wxs

@@ -0,0 +1,6 @@
+// component/wx-index-list/config.wxs
+module.exports = {
+  horizontal: true, // 第一个选项是否横排显示(一般第一个数据选项为 热门城市,常用城市之类 ,开启看需求)
+  animation:true ,// 过渡动画是否开启
+  search:true ,// 是否开启搜索
+};

+ 132 - 0
components/location/index.js

@@ -0,0 +1,132 @@
+// component/wx-index-list/wx-index-list.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+        data: {
+            type: Object,
+            value: {},
+        },
+        myCity: {
+            type: String,
+            value: "",
+        },
+        // 用于外部组件搜索使用
+        search: {
+            type: String,
+            value: "",
+            observer: function (newVal, oldVal) {
+                console.log(newVal)
+                this.value = newVal;
+                this.searchMt();
+            }
+        }
+    },
+  
+    data: {
+        list: [],
+        rightArr: [],// 右侧字母展示
+        jumpNum: '',//跳转到那个字母
+        myCityName: '请选择' // 默认我的城市
+
+    },
+    ready() {
+        let data = this.data.data;
+        this.resetRight(data);
+        console.log('--------------',this.myCity)
+        // if (this.data.myCity) {
+        //     this.getCity()
+        // }
+    },
+    methods: {
+        // 数据重新渲染
+        resetRight(data) {
+            let rightArr = []
+            for (let i in data) {
+                rightArr.push(data[i].title.substr(0, 1));
+            }
+            this.setData({
+                list: data,
+                rightArr
+            })
+        },
+        getCity() {
+            wx.getLocation({
+                type: 'wgs84',
+                success: function (res) {
+                    this.latitude = res.latitude;
+                    this.longitude = res.longitude;
+                    // console.log(res)
+                }
+            })
+        },
+        // 右侧字母点击事件
+        jumpMt(e) {
+            let jumpNum = e.currentTarget.dataset.id;
+            this.setData({ jumpNum });
+        },
+        // 列表点击事件
+        detailMt(e) {
+            let detail = e.currentTarget.dataset.detail;
+
+            let myEventOption = {
+                bubbles: false,//事件是否冒泡
+                composed: false,//事件是否可以穿越组件边界
+                capturePhase: false //事件是否拥有捕获阶段
+            } // 触发事件的选项
+            this.triggerEvent('detail', detail, myEventOption)
+
+        },
+        // 获取搜索输入内容
+        input(e) {
+            this.value = e.detail.value;
+        },
+        // 基础搜索功能
+        searchMt(e) {
+            this.value = e.detail.value;
+            this._search();
+        },
+        _search() {
+            let data = this.data.data;
+            let newData = [];
+            for (let i = 0; i < data.length; i++) {
+                let itemArr = [];
+                for (let j = 0; j < data[i].item.length; j++) {
+                    if (data[i].item[j].name.indexOf(this.value) > -1) {
+                        let itemJson = {};
+                        for (let k in data[i].item[j]) {
+                            itemJson[k] = data[i].item[j][k];
+                        }
+                        itemArr.push(itemJson);
+                    }
+                }
+                if (itemArr.length === 0) {
+                    continue;
+                }
+                newData.push({
+                    title: data[i].title,
+                    type: data[i].type ? data[i].type : "",
+                    item: itemArr
+                })
+            }
+            this.resetRight(newData);
+        },
+        // 城市定位
+        locationMt() {
+            // TODO 暂时没有实现 定位自己的城市,需要引入第三方api
+        },
+        // 重新定位
+        locationRe() {
+
+            let myEventOption = {
+                bubbles: false,//事件是否冒泡
+                composed: false,//事件是否可以穿越组件边界
+                capturePhase: false //事件是否拥有捕获阶段
+            } 
+            // 触发事件的选项
+            this.triggerEvent('relocation', myEventOption)
+        }
+
+    }
+})

+ 3 - 0
components/location/index.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "选择城市"
+}

+ 45 - 0
components/location/index.wxml

@@ -0,0 +1,45 @@
+<wxs src="config.wxs" module="config" />
+
+<view class='list-warpper'>
+    <view wx:if="{{config.search}}" class='list-search'>
+        <view class='list-search-box'>
+            <icon type="search" size="15" />
+            <input placeholder="输入您要搜索的城市" bindinput='searchMt' />
+        </view>
+        <!-- <button class='search-button' catchtap='searchMt'>搜索</button> -->
+    </view>
+
+    <block wx:if="{{list.length != 0 }}">
+        <scroll-view class="list-scroll {{config.search?'top':''}}" scroll-y="true" scroll-into-view="{{jumpNum}}" scroll-with-animation="{{config.animation}}">
+            <!-- 我的位置  -->
+            <view wx:if="{{myCity}}">
+                <view class='list-title'>我的位置</view>
+                <view class='list-horizontal my-city'>
+                    <view class='list-name' data-detail="{{city}}" catchtap='locationMt'>
+                        {{myCity}}
+                    </view>
+                    <view class='list-name' catchtap='locationRe'>
+                        重新定位
+                    </view>
+                </view>
+            </view>
+            <view id="{{'index'+index}}" wx:for="{{list}}" wx:key="key">
+                <view class='list-title'>{{item.title}}</view>
+                <view class='{{index===0&&config.horizontal&&item.type==="hot"?"list-horizontal":""}}'>
+                    <view class='list-name' wx:for="{{item.item}}" wx:for-item="city" wx:for-index="idx" wx:key="city" data-detail="{{city}}" catchtap='detailMt'>
+                        {{city.name}}
+                    </view>
+                </view>
+
+            </view>
+        </scroll-view>
+        <view class='list-right-wrapper'>
+            <view class='right-item' wx:for="{{rightArr}}" wx:key="rightArr" data-id="{{'index'+index}}" catchtap='jumpMt'>
+                {{rightArr[index]}}
+            </view>
+        </view>
+    </block>
+    <block wx:else>
+        <view class='nodata'>没有搜索到相关的数据哦</view>
+    </block>
+</view>

+ 157 - 0
components/location/index.wxss

@@ -0,0 +1,157 @@
+.list-warpper {
+    position: relative;
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
+    background: #fff;
+}
+
+.list-scroll {
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
+}
+
+.list-scroll.top {
+    padding-top: 90rpx;
+}
+
+/* 样式控制  */
+
+.list-title {
+    background: #f5f5f5;
+    color: #999;
+    font-size: 24rpx;
+    padding: 8rpx;
+    padding-left: 30rpx;
+}
+
+.list-name {
+    position: relative;
+    font-size: 26rpx;
+    padding: 15rpx;
+    padding-left: 30rpx;
+    color: #222;
+    transition: all 0.3s;
+}
+
+.list-name:active {
+    background: rgba(245,245,245,.2);
+}
+
+.list-name.border::after {
+    display: none;
+    content: "";
+    position: absolute;
+    left: 30rpx;
+    right: 0;
+    top: 0;
+    height: 1px;
+    background: #f5f5f5;
+}
+
+.list-right-wrapper {
+    position: absolute;
+    top: 100rpx;
+    right: 20rpx;
+    padding: 10rpx 0;
+    border-radius: 20rpx;
+    z-index: 2;
+}
+
+.right-item {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    padding: 2rpx 10rpx;
+    font-size: 26rpx;
+    color: #FFCA00;
+}
+
+.list-search {
+    position: absolute;
+    top: 0;
+    left: 0;
+    display: flex;
+    align-items: center;
+    width: 100%;
+    height: 90rpx;
+    padding: 10rpx 30rpx;
+    box-sizing: border-box;
+    z-index: 20;
+    background: #fff;
+}
+
+.search-title {
+    flex-shrink: 0;
+    font-size: 28rpx;
+    padding-right: 10rpx;
+}
+
+.list-search-box {
+    display: flex;
+    align-items: center;
+    padding: 0 30rpx;
+    width: 100%;
+    height: 62rpx;
+    background: #f5f5f5;
+    border-radius: 90rpx;
+    font-size: 24rpx;
+    box-sizing: border-box;
+}
+
+.list-search-box input {
+    width: 100%;
+    padding-left: 10rpx;
+}
+
+.search-button {
+    /* width: 100rpx; */
+    flex-shrink: 0;
+    height: 60rpx;
+    line-height: 60rpx;
+    font-size: 28rpx;
+    margin-left: 10rpx;
+}
+
+/* 热门城市横排显示样式  */
+
+.list-horizontal {
+    display: flex;
+    flex-wrap: wrap;
+    padding: 10rpx;
+    padding-right: 50rpx;
+}
+
+.list-horizontal .list-name {
+    box-sizing: border-box;
+    width: 200rpx;
+    height: 60rpx;
+    padding: 5rpx 20rpx;
+    border: 1px #ccc solid;
+    border-radius: 10rpx;
+    margin: 10rpx;
+    font-size: 28rpx;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.list-horizontal .list-name:nth-child(3n+1) {
+    margin-left: 20rpx;
+}
+
+.list-horizontal.my-city .list-name, .list-horizontal .list-name:active {
+    background: #FFCA00;
+    color: #fff;
+    border-color: #FFCA00;
+}
+
+/* 无数据  */
+
+.nodata {
+    padding-top: 200rpx;
+    text-align: center;
+    font-size: 32rpx;
+    color: #ddd;
+}

+ 66 - 0
components/popup/popup.js

@@ -0,0 +1,66 @@
+Component({
+  options: {
+    multipleSlots: true // 在组件定义时的选项中启用多slot支持
+  },
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    title: {            // 属性名
+      type: String,     // 类型(必填),目前接受的类型包括:String, Number, Boolean, Object, Array, null(表示任意类型)
+      value: '标题'     // 属性初始值(可选),如果未指定则会根据类型选择一个
+    },
+    // 弹窗内容
+    content: {
+      type: String,
+      value: '内容'
+    },
+    // 弹窗取消按钮文字
+    btn_no: {
+      type: String,
+      value: '取消'
+    },
+    // 弹窗确认按钮文字
+    btn_ok: {
+      type: String,
+      value: '确定'
+    }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    flag: true,
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    //隐藏弹框
+    hidePopup: function () {
+      this.setData({
+        flag: !this.data.flag
+      })
+    },
+    //展示弹框
+    showPopup() {
+      this.setData({
+        flag: !this.data.flag
+      })
+    },
+    /*
+    * 内部私有方法建议以下划线开头
+    * triggerEvent 用于触发事件
+    */
+    _error() {
+      //触发取消回调
+      this.triggerEvent("error")
+    },
+    _success() {
+      //触发成功回调
+      this.triggerEvent("success");
+    }
+  }
+})

+ 3 - 0
components/popup/popup.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 13 - 0
components/popup/popup.wxml

@@ -0,0 +1,13 @@
+<view class="wx-popup" hidden="{{flag}}">
+  <view class='popup-container'>
+    <view class="wx-popup-title">{{title}}</view>
+    <view class="wx-popup-conone">
+       <image class="img" src="../../assets/images/txf.png" mode="widthFix"> </image>
+    </view>
+    <view class="wx-popup-con">{{content}}</view>
+    <view class="wx-popup-btn">   
+      <text class="btn-no" bindtap='_error'>{{btn_no}}</text>
+      <text class="btn-ok" bindtap='_success'>{{btn_ok}}</text>
+    </view>
+  </view>
+</view>

+ 83 - 0
components/popup/popup.wxss

@@ -0,0 +1,83 @@
+/* component/popup.wxss */
+
+.wx-popup {
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  background: rgba(0, 0, 0, 0.5);
+}
+
+.popup-container {
+  position: absolute;
+  left: 52%;
+  /* top: 80%; */
+  bottom: 232rpx;
+  width: 163%;
+  max-width: 600rpx;
+  border: 2rpx solid #ccc;
+  border-radius: 10rpx;
+  box-sizing: bordre-box;
+  transform: translate(-50%, -50%);
+  overflow: hidden;
+  background: #fff;
+}
+
+.wx-popup-title {
+  width: 100%;
+  font-size: 33rpx;
+  padding-top: 10rpx;
+  padding-bottom: 10rpx;
+  padding-left: 19rpx;
+  background: #f5f5f5;
+  color: #272727;
+}
+
+.wx-popup-con {
+text-align: center;
+font-size: 27rpx;
+width: 80%;
+margin: auto auto 40rpx auto;
+}
+
+.wx-popup-conone {
+  /* margin: 27rpx 10rpx; */
+  text-align: center;
+  margin-top: 33rpx;
+}
+
+.wx-popup-btn {
+  display: flex;
+  justify-content: space-around;
+  margin-bottom: 40rpx;
+}
+
+.wx-popup-btn text:first-child {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 30%;
+  height: 55rpx;
+  border-radius: 48rpx;
+  background: #F0F0F0;
+  color: #323232;
+    font-size: 28rpx;
+}
+
+.wx-popup-btn text:last-child {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 30%;
+  height: 55rpx;
+  border-radius: 48rpx;
+  background: #33BCB2;
+  color: white;
+  font-size: 28rpx;
+}
+
+.img {
+  width: 150rpx;
+  height: 120rpx;
+}

+ 83 - 0
components/popup2/popup.js

@@ -0,0 +1,83 @@
+var app = getApp();
+Component({
+  options: {
+    multipleSlots: true // 在组件定义时的选项中启用多slot支持
+  },
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    title: {            // 属性名
+      type: String,     // 类型(必填),目前接受的类型包括:String, Number, Boolean, Object, Array, null(表示任意类型)
+      value: '标题'     // 属性初始值(可选),如果未指定则会根据类型选择一个
+    },
+    // 弹窗内容
+    content: {
+      type: Array,
+      value: ['内容']
+    },
+    // 弹窗取消按钮文字
+    btn_no: {
+      type: String,
+      value: '取消'
+    },
+    // 弹窗确认按钮文字
+    btn_ok: {
+      type: String,
+      value: '确定'
+    },
+	// 默认两个按钮
+	btn2: {
+	  type: Boolean,
+	  value: true
+	},
+	// 自定义按钮
+	self: {
+	  type: Boolean,
+	  value: false
+	},
+	isCancel: false
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    flag: true,
+	appAssetsUrl2: app.appAssetsUrl2,
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    //隐藏弹框
+    hidePopup: function () {
+      this.setData({
+        flag: !this.data.flag
+      })
+    },
+    //展示弹框
+    showPopup() {
+      this.setData({
+        flag: !this.data.flag
+      })
+    },
+    /*
+    * 内部私有方法建议以下划线开头
+    * triggerEvent 用于触发事件
+    */
+    _error() {
+      //触发取消回调
+      this.triggerEvent("error")
+    },
+	_error2() {
+		//触发取消回调
+		this.triggerEvent("error2")
+	},
+    _success() {
+      //触发成功回调
+      this.triggerEvent("success");
+    }
+  }
+})

+ 3 - 0
components/popup2/popup.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 24 - 0
components/popup2/popup.wxml

@@ -0,0 +1,24 @@
+<view class="wx-popup" hidden="{{flag}}">
+	<view class="popup-wap">
+		<image wx:if="{{!isCancel}}" src="{{appAssetsUrl2}}wjxy/close.png" class='popup-close' bindtap="_error"></image>
+		<image wx:else src="{{appAssetsUrl2}}wjxy/close.png" class='popup-close' bindtap="_error2"></image>
+	  <view class='popup-container'>
+		<view class="wx-popup-title">{{title}}</view>
+		<view class="wx-popup-conone">
+		  <slot name="content">
+					<view wx:for="{{content}}">{{item}}</view>
+				</slot>
+		</view>
+		<view wx:if="{{!self}}" class="{{ btn2 ? 'wx-popup-btn' : 'wx-popup-center-btn'}}">   
+		  <text class="btn-no" wx:if="{{btn2}}" bindtap='_error'>{{btn_no}}</text>
+		  <text class="btn-ok" bindtap='_success'>{{btn_ok}}</text>
+		</view>
+		<view wx:else class="">
+			<slot name="btn">
+				<!-- <view wx:for="{{content}}">{{item}}</view> -->
+			</slot>
+		</view>
+	  </view>
+  
+  </view>
+</view>

+ 129 - 0
components/popup2/popup.wxss

@@ -0,0 +1,129 @@
+/* component/popup.wxss */
+
+.wx-popup {
+  position: fixed;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 100vh;
+  background: rgba(0, 0, 0, 0.5);
+	z-index: 100000;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	/* margin-top: 50%;
+	transform: translateY(-30%); */
+}
+.popup-wap {
+	width: 163%;
+	max-width: 600rpx;
+	/* margin-top: 50%;
+	margin-left: 50%;
+	transform: translateX(-50%); */
+	display: flex;
+	flex-direction: column;
+	align-items: flex-end;
+}
+.popup-container {
+ /* position: absolute;
+  left: 50%;
+  top: 50%; */
+  width: 163%;
+  max-width: 600rpx;
+  border: 2rpx solid #ccc;
+  border-radius: 20rpx;
+  box-sizing: bordre-box;
+  /* transform: translate(-50%, -50%); */
+  overflow: hidden;
+  background: #fff;
+  margin-top: 50rpx;
+}
+
+.wx-popup-title {
+	background: #e6e6e6;
+	border-radius: 20rpx 20rpx 0px 0px;
+  height: 91rpx;
+  font-size: 34rpx;
+  font-weight: 700;
+  text-align: center;
+  color: #1a1a1a;
+  line-height: 91rpx;
+}
+
+.wx-popup-con {
+text-align: center;
+font-size: 27rpx;
+width: 80%;
+margin: auto auto 40rpx auto;
+}
+
+.wx-popup-conone {
+	display: flex;
+	flex-flow: column-reverse;
+	justify-content: center;
+	align-items: center;
+  font-size: 32rpx;
+  font-weight: 400;
+  text-align: center;
+  color: #3f454e;
+}
+
+.wx-popup-btn {
+  display: flex;
+  justify-content: space-around;
+	align-items: center;
+	height: 155rpx;
+	border-top: 1px solid #e6e6e6;
+}
+.wx-popup-center-btn {
+  display: flex;
+  justify-content: center;
+	align-items: center;
+	height: 155rpx;
+	border-top: 1px solid #e6e6e6;
+}
+.wx-popup-center-btn text {
+	width: 200rpx;
+	height: 72rpx;
+	background-color: #ffdc2f;
+	line-height: 72rpx;
+	border-radius: 35rpx;
+	text-align: center;
+	font-size: 32rpx;
+	font-weight: 400;
+	color: #333333;
+}
+.wx-popup-btn text:first-child {
+	width: 185rpx;
+  height: 72rpx;
+	line-height: 72rpx;
+  background-color: #ffdc2f;
+  border-radius: 35rpx;
+	text-align: center;
+	font-size: 32rpx;
+	font-weight: 400;
+	color: #333333;
+}
+
+.wx-popup-btn text:last-child {
+  width: 200rpx;
+  height: 72rpx;
+	line-height: 72rpx;
+  border: 1px solid #ffa836;
+  border-radius: 37rpx;
+  text-align: center;
+  font-size: 32rpx;
+  font-weight: 400;
+  background: #fffae1;
+color: #ffa836;
+}
+
+.img {
+  width: 150rpx;
+  height: 120rpx;
+}
+.popup-close {
+	width: 54rpx;
+	height: 54rpx;
+	
+}

+ 79 - 0
components/popup3/popup.js

@@ -0,0 +1,79 @@
+// components/popup3/popup.js
+var app = getApp();
+Component({
+  options: {
+    multipleSlots: true // 在组件定义时的选项中启用多slot支持
+  },
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    title: { // 属性名
+      type: String, // 类型(必填),目前接受的类型包括:String, Number, Boolean, Object, Array, null(表示任意类型)
+      value: '标题' // 属性初始值(可选),如果未指定则会根据类型选择一个
+    },
+    // 弹窗内容
+    content: {
+      type: Array,
+      value: ['内容']
+    },
+    // 弹窗取消按钮文字
+    btn_no: {
+      type: String,
+      value: '取消'
+    },
+    // 弹窗确认按钮文字
+    btn_ok: {
+      type: String,
+      value: '确定'
+    },
+    // 默认两个按钮
+    btn2: {
+      type: Boolean,
+      value: true
+    },
+    // 自定义按钮
+    self: {
+      type: Boolean,
+      value: false
+    }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    flag: true,
+	appAssetsUrl2: app.appAssetsUrl2
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    //隐藏弹框
+    hidePopup: function () {
+      this.setData({
+        flag: !this.data.flag
+      })
+    },
+    //展示弹框
+    showPopup() {
+      this.setData({
+        flag: !this.data.flag
+      })
+    },
+    /*
+     * 内部私有方法建议以下划线开头
+     * triggerEvent 用于触发事件
+     */
+    _error() {
+      //触发取消回调
+      this.triggerEvent("error")
+    },
+    _success() {
+      //触发成功回调
+      this.triggerEvent("success");
+    }
+  }
+})

+ 4 - 0
components/popup3/popup.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 17 - 0
components/popup3/popup.wxml

@@ -0,0 +1,17 @@
+<view class="data-popup" hidden="{{flag}}">
+  <view class="data-popup-container">
+    <image src="{{appAssetsUrl2}}wjxy/close.png" class='popup-close' bindtap="_error"></image>
+    <view class="popup-main">
+      <view class="popup-title">{{title}}</view>
+      <view class="popup-content">
+        <slot name="content"></slot>
+      </view>
+      <view class="popup-footer">
+        <button wx:if="{{!self}}" bindtap='_success' class="btn">{{btn_ok}}</button>
+        <block wx:else>
+          <slot name="footer"></slot>
+        </block>
+      </view>
+    </view>
+  </view>
+</view>

+ 71 - 0
components/popup3/popup.wxss

@@ -0,0 +1,71 @@
+.data-popup {
+  position: fixed;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 100vh;
+  background: rgba(0, 0, 0, 0.5);
+  z-index: 1000;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  z-index: 99999;
+}
+
+.data-popup-container {
+  width: 70%;
+  max-width: 600rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: flex-end;
+}
+
+.data-popup-container .popup-close {
+  width: 54rpx;
+  height: 54rpx;
+}
+
+.popup-main {
+  width: 100%;
+  margin-top: 50rpx;
+  padding-top: 60rpx;
+  padding-bottom: 70rpx;
+  background: #ffffff;
+  border-radius: 12rpx;
+}
+
+.popup-title {
+  font-size: 32rpx;
+  font-family: 'PingFang SC, PingFang SC-Bold';
+  font-weight: 700;
+  text-align: center;
+  color: #1a1a1a;
+  margin-bottom: 40rpx;
+}
+
+.popup-content {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  font-size: 32rpx;
+  font-weight: 400;
+  text-align: center;
+  color: #3f454e;
+  margin-bottom: 52rpx;
+}
+
+.popup-footer {}
+
+.popup-footer .btn {
+  width: 320rpx;
+  height: 80rpx;
+  text-align: center;
+  line-height: 80rpx;
+  background: #ffdc2f;
+  border-radius: 40rpx;
+  font-size: 32rpx;
+  font-family: 'PingFang SC, PingFang SC-Regular';
+  font-weight: 400;
+  color: #333333;
+}

+ 53 - 0
components/uploadImage/index.js

@@ -0,0 +1,53 @@
+const app = getApp();
+
+Component({
+  // 组件对外属性
+  properties: {
+    // 图片总数量
+    count: {
+      type: Number,
+      value: 3,
+      observers: function (newVal, oldVal) {}
+    },
+    // 图片临时访问路径集合
+    images: {
+      type: Array,
+      value: []
+    },
+    // 已经添加的图片数量
+    addedCount: {
+      type: Number,
+      value: 0,
+      observers: function (newVal, oldVal) {
+        console.log('--new--'.newVal, '--old--', oldVal)
+      }
+    },
+    // 当前图片的位置下标
+    currentIndex: {
+      type: Number,
+      value: 0,
+    }
+  },
+  // 组件内部属性
+  data: {
+		appAssetsUrl:app.appAssetsUrl,
+  },
+  // 方法
+  methods: {
+    // 选择图片
+    chooseImage() {
+      this.triggerEvent('chooseImage')
+    },
+    // 预览图片
+    previewImage(e) {
+      wx.previewImage({
+        urls: this.data.images,
+        current: this.data.images[e.currentTarget.dataset.index]
+      })
+    },
+    // 删除图片
+    deleteImage(e){
+      this.triggerEvent('deleteImage',e.currentTarget.dataset.index)
+    }
+  }
+})

+ 3 - 0
components/uploadImage/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 14 - 0
components/uploadImage/index.wxml

@@ -0,0 +1,14 @@
+<view class="images-box">
+  <!-- <view class="imageCount">
+    <text>上传图片:</text>
+    <text style="color:#909399">{{addedCount}}/{{count}}</text>
+  </view> -->
+  <view class="images">
+    <block wx:for="{{images}}" wx:key="index">
+      <image class="image" mode="aspectFill" src="{{item}}" bindtap="previewImage" data-index="{{index}}" bindlongpress="deleteImage"></image>
+    </block>
+    <view wx:if="{{addedCount<count}}" class="image addImageIcon" hover-class="addImageIconHover" hover-stay-time="200" bindtap="chooseImage">
+      <image mode="widthFix" src="{{appAssetsUrl}}/images/plus.png"></image>
+    </view>
+  </view>
+</view>

+ 35 - 0
components/uploadImage/index.wxss

@@ -0,0 +1,35 @@
+.images-box {
+  border-radius: 10rpx;
+  width: 100%;
+}
+
+.imageCount {
+  height: 80rpx;
+  line-height: 80rpx;
+}
+
+.images {
+  height: 240rpx;
+}
+.addImageIcon{
+  text-align: center;
+  line-height: 200rpx;
+  background-color: #f7f7f7;
+}
+.addImageIconHover{
+  background-color: #C0C4CC;
+}
+.image {
+  width: 30%;
+  border-radius: 10rpx;
+  height: 200rpx;
+	color: #999999;
+	margin-right: 20rpx;
+	margin-bottom: 20rpx;
+	float: left;
+}
+
+.image image{
+	width: 100rpx;
+  vertical-align: middle;
+}

+ 47 - 0
dist/action-sheet/index.js

@@ -0,0 +1,47 @@
+Component({
+    externalClasses: ['i-class', 'i-class-mask', 'i-class-header'],
+
+    options: {
+        multipleSlots: true
+    },
+
+    properties: {
+        visible: {
+            type: Boolean,
+            value: false
+        },
+        maskClosable: {
+            type: Boolean,
+            value: true
+        },
+        showCancel: {
+            type: Boolean,
+            value: false
+        },
+        cancelText: {
+            type: String,
+            value: '取消'
+        },
+        actions: {
+            type: Array,
+            value: []
+        }
+    },
+
+    methods: {
+        handleClickMask () {
+            if (!this.data.maskClosable) return;
+            this.handleClickCancel();
+        },
+
+        handleClickItem ({ currentTarget = {} }) {
+            const dataset = currentTarget.dataset || {};
+            const { index } = dataset;
+            this.triggerEvent('click', { index });
+        },
+
+        handleClickCancel () {
+            this.triggerEvent('cancel');
+        }
+    }
+});

+ 8 - 0
dist/action-sheet/index.json

@@ -0,0 +1,8 @@
+{
+  "component": true,
+  "usingComponents":
+  {
+    "i-button": "../button/index",
+    "i-icon": "../icon/index"
+  }
+}

+ 23 - 0
dist/action-sheet/index.wxml

@@ -0,0 +1,23 @@
+<view class="i-as-mask i-class-mask {{ visible ? 'i-as-mask-show' : '' }}" bindtap="handleClickMask"></view>
+<view class="i-class i-as {{ visible ? 'i-as-show' : '' }}">
+    <view class="i-as-header i-class-header"><slot name="header"></slot></view>
+    <view class="i-as-actions">
+        <view class="i-as-action-item" wx:for="{{ actions }}" wx:key="{{ item.name }}">
+            <i-button
+                bind:click="handleClickItem"
+                data-index="{{ index }}"
+                open-type="{{ item.openType }}"
+                type="ghost"
+                size="large"
+                long
+            >
+                <view class="i-as-btn-loading" wx:if="{{ item.loading }}"></view>
+                <i-icon wx:if="{{ item.icon }}" type="{{ item.icon }}" i-class="i-as-btn-icon"></i-icon>
+                <view class="i-as-btn-text" style="{{ item.color ? 'color: ' + item.color : '' }}">{{ item.name }}</view>
+            </i-button>
+        </view>
+    </view>
+    <view class="i-as-cancel" wx:if="{{ showCancel }}">
+        <i-button i-class="i-as-cancel-btn" type="ghost" size="large" long="true" bind:click="handleClickCancel">{{ cancelText }}</i-button>
+    </view>
+</view>

File diff suppressed because it is too large
+ 1 - 0
dist/action-sheet/index.wxss


+ 37 - 0
dist/alert/index.js

@@ -0,0 +1,37 @@
+Component({
+    externalClasses: ['i-class'],
+    options: {
+        multipleSlots: true
+    },
+    properties: {
+        //info, success, warning, error
+        type: {
+            type: String,
+            value: 'info'
+        },
+        closable: {
+            type: Boolean,
+            value: false
+        },
+        showIcon: {
+            type: Boolean,
+            default: false
+        },
+        desc: {
+            type: Boolean,
+            default: false
+        },
+    },
+    data: {
+        closed: false
+    },
+    methods: {
+        handleTap() {
+            this.setData({
+                closed: !this.data.closed,
+            });
+            this.triggerEvent('close');
+        },
+
+    }
+});

+ 7 - 0
dist/alert/index.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents":
+    {
+        "i-icon": "../icon/index"
+    }
+}

+ 15 - 0
dist/alert/index.wxml

@@ -0,0 +1,15 @@
+<view class="i-class i-alert {{'i-alert-'+type}} {{showIcon?'i-alert-with-icon':''}} {{desc?'i-alert-with-desc':''}}" wx:if="{{!closed}}">
+    <view wx:if="{{ showIcon }}" class="i-alert-icon">
+        <i-icon type="prompt" wx:if="{{ type === 'info' }}" size="{{desc?24:16}}"></i-icon>
+        <i-icon type="success" wx:if="{{ type === 'success' }}" size="{{desc?24:16}}"></i-icon>
+        <i-icon type="warning" wx:if="{{ type === 'warning' }}" size="{{desc?24:16}}"></i-icon>
+        <i-icon type="delete" wx:if="{{ type === 'error' }}" size="{{desc?24:16}}"></i-icon>
+    </view>
+    <slot></slot>
+    <view class="i-alert-desc">
+        <slot name="desc"></slot>
+    </view>
+    <view class="i-alert-close" wx:if="{{ closable }}" bindtap="handleTap">
+        <i-icon type="close"></i-icon>
+    </view>
+</view>

File diff suppressed because it is too large
+ 1 - 0
dist/alert/index.wxss


+ 29 - 0
dist/badge/index.js

@@ -0,0 +1,29 @@
+Component({
+    externalClasses: ['i-class', 'i-class-alone'],
+
+    properties: {
+        count: {
+            type: Number,
+            value: 0,
+            observer: 'finalCount'
+        },
+        overflowCount: {
+            type: Number,
+            value: 99
+        },
+        dot: {
+            type: Boolean,
+            value: false
+        },
+    },
+    data: {
+        finalCount: 0
+    },
+    methods: {
+        finalCount() {
+            this.setData({
+                finalCount: parseInt(this.data.count) >= parseInt(this.data.overflowCount) ? `${this.data.overflowCount}+` : this.data.count
+            });
+        },
+    }
+});

+ 3 - 0
dist/badge/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 5 - 0
dist/badge/index.wxml

@@ -0,0 +1,5 @@
+<view class="i-class i-badge">
+    <slot></slot>
+    <view class="i-badge-dot" wx:if="{{ dot }}"></view>
+    <view class="i-badge-count i-class-alone" wx:elif="{{ count !== 0 }}">{{ finalCount }}</view>
+</view>

File diff suppressed because it is too large
+ 1 - 0
dist/badge/index.wxss


+ 37 - 0
dist/base/index.js

@@ -0,0 +1,37 @@
+function getCtx (selector) {
+    const pages = getCurrentPages();
+    const ctx = pages[pages.length - 1];
+
+    const componentCtx = ctx.selectComponent(selector);
+
+    if (!componentCtx) {
+        console.error('无法找到对应的组件,请按文档说明使用组件');
+        return null;
+    }
+    return componentCtx;
+}
+
+function Toast(options) {
+    const { selector = '#toast' } = options;
+    const ctx = getCtx(selector);
+
+    ctx.handleShow(options);
+}
+
+Toast.hide = function (selector = '#toast') {
+    const ctx = getCtx(selector);
+
+    ctx.handleHide();
+};
+
+function Message(options) {
+    const { selector = '#message' } = options;
+    const ctx = getCtx(selector);
+
+    ctx.handleShow(options);
+}
+
+module.exports = {
+    $Toast: Toast,
+    $Message: Message
+};

+ 80 - 0
dist/button/index.js

@@ -0,0 +1,80 @@
+Component({
+    externalClasses: ['i-class'],
+
+    properties: {
+        // default, primary, ghost, info, success, warning, error
+        type: {
+            type: String,
+            value: '',
+        },
+        inline: {
+            type: Boolean,
+            value: false
+        },
+        // default, large, small
+        size: {
+            type: String,
+            value: '',
+        },
+        // circle, square
+        shape: {
+            type: String,
+            value: 'square'
+        },
+        disabled: {
+            type: Boolean,
+            value: false,
+        },
+        loading: {
+            type: Boolean,
+            value: false,
+        },
+        long: {
+            type: Boolean,
+            value: false
+        },
+        openType: String,
+        appParameter: String,
+        hoverStopPropagation: Boolean,
+        hoverStartTime: {
+            type: Number,
+            value: 20
+        },
+        hoverStayTime: {
+            type: Number,
+            value: 70
+        },
+        lang: {
+            type: String,
+            value: 'en'
+        },
+        sessionFrom: {
+            type: String,
+            value: ''
+        },
+        sendMessageTitle: String,
+        sendMessagePath: String,
+        sendMessageImg: String,
+        showMessageCard: Boolean
+    },
+
+    methods: {
+        handleTap () {
+            if (this.data.disabled) return false;
+
+            this.triggerEvent('click');
+        },
+        bindgetuserinfo({ detail = {} } = {}) {
+            this.triggerEvent('getuserinfo', detail);
+        },
+        bindcontact({ detail = {} } = {}) {
+            this.triggerEvent('contact', detail);
+        },
+        bindgetphonenumber({ detail = {} } = {}) {
+            this.triggerEvent('getphonenumber', detail);
+        },
+        binderror({ detail = {} } = {}) {
+            this.triggerEvent('error', detail);
+        }
+    }
+});

+ 3 - 0
dist/button/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 20 - 0
dist/button/index.wxml

@@ -0,0 +1,20 @@
+<button
+    class="i-class i-btn {{ long ? 'i-btn-long' : '' }} {{ 'i-btn-' + size }} {{ 'i-btn-' + type }} {{ 'i-btn-' + shape }} {{ loading ? 'i-btn-loading' : '' }} {{ disabled ? 'i-btn-disabled' : ''}} {{ inline ? 'i-btn-inline' : '' }}"
+    hover-class="i-btn-hover"
+    bindtap="handleTap"
+    open-type="{{ openType }}"
+    app-parameter="{{ appParameter }}"
+    hover-stop-propagation="{{ hoverStopPropagation }}"
+    hover-start-time="{{ hoverStartTime }}"
+    hover-stay-time="{{ hoverStayTime }}"
+    session-from="{{ sessionFrom }}"
+    send-message-title="{{ sendMessageTitle }}"
+    send-message-path="{{ sendMessagePath }}"
+    send-message-img="{{ sendMessageImg }}"
+    show-message-card="{{ showMessageCard }}"
+    bindcontact="bindcontact"
+    bindgetuserinfo="bindgetuserinfo"
+    bindgetphonenumber="bindgetphonenumber"
+    binderror="binderror"
+    plain="true"
+><view class="i-btn-loading-inner" wx:if="{{loading}}"></view><slot></slot></button>

File diff suppressed because it is too large
+ 1 - 0
dist/button/index.wxss


+ 26 - 0
dist/card/index.js

@@ -0,0 +1,26 @@
+Component({
+    externalClasses: ['i-class'],
+
+    options: {
+        multipleSlots: true
+    },
+
+    properties: {
+        full: {
+            type: Boolean,
+            value: false
+        },
+        thumb: {
+            type: String,
+            value: ''
+        },
+        title: {
+            type: String,
+            value: ''
+        },
+        extra: {
+            type: String,
+            value: ''
+        }
+    }
+});

+ 3 - 0
dist/card/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 11 - 0
dist/card/index.wxml

@@ -0,0 +1,11 @@
+<view class="i-class i-card {{ full ? 'i-card-full' : '' }}">
+    <view class="i-class i-card-header">
+        <view class="i-card-header-content">
+            <image class="i-card-header-thumb" src="{{ thumb }}" mode="aspectFill" wx:if="{{ thumb }}" />
+            {{ title }}
+        </view>
+        <view class="i-card-header-extra" wx:if="{{ extra }}">{{ extra }}</view>
+    </view>
+    <view class="i-class i-card-body"><slot name="content"></slot></view>
+    <view class="i-class i-card-footer"><slot name="footer"></slot></view>
+</view>

File diff suppressed because it is too large
+ 1 - 0
dist/card/index.wxss


+ 33 - 0
dist/cell-group/index.js

@@ -0,0 +1,33 @@
+Component({
+    externalClasses: ['i-class'],
+
+    relations: {
+        '../cell/index': {
+            type: 'child',
+            linked () {
+                this._updateIsLastCell();
+            },
+            linkChanged () {
+                this._updateIsLastCell();
+            },
+            unlinked () {
+                this._updateIsLastCell();
+            }
+        }
+    },
+
+    methods: {
+        _updateIsLastCell() {
+            let cells = this.getRelationNodes('../cell/index');
+            const len = cells.length;
+
+            if (len > 0) {
+                let lastIndex = len - 1;
+
+                cells.forEach((cell, index) => {
+                    cell.updateIsLastCell(index === lastIndex);
+                });
+            }
+        }
+    }
+});

+ 3 - 0
dist/cell-group/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 3 - 0
dist/cell-group/index.wxml

@@ -0,0 +1,3 @@
+<view class="i-class i-cell-group">
+    <slot></slot>
+</view>

+ 86 - 0
dist/cell/index.js

@@ -0,0 +1,86 @@
+const warn = (msg, getValue) => {
+    console.warn(msg);
+    console.log('接受到的值为:', getValue);
+};
+
+Component({
+    externalClasses: ['i-class'],
+
+    options: {
+        multipleSlots: true
+    },
+
+    relations: {
+        '../cell-group/index': {
+            type: 'parent'
+        }
+    },
+
+    properties: {
+        // 左侧标题
+        title: {
+            type: String
+        },
+        // 标题下方的描述信息
+        label: {
+            type: String
+        },
+        // 右侧内容
+        value: {
+            type: String
+        },
+        // 只有点击 footer 区域才触发 tab 事件
+        onlyTapFooter: {
+            type: Boolean
+        },
+        // 是否展示右侧箭头并开启尝试以 url 跳转
+        isLink: {
+            type: null,
+            value: ''
+        },
+        // 链接类型,可选值为 navigateTo,redirectTo,switchTab,reLaunch
+        linkType: {
+            type: String,
+            value: 'navigateTo'
+        },
+        url: {
+            type: String,
+            value: ''
+        }
+    },
+
+    data: {
+        isLastCell: true
+    },
+
+    methods: {
+        navigateTo () {
+            const { url } = this.data;
+            const type = typeof this.data.isLink;
+
+            this.triggerEvent('click', {});
+
+            if (!this.data.isLink || !url || url === 'true' || url === 'false') return;
+
+            if (type !== 'boolean' && type !== 'string') {
+                warn('isLink 属性值必须是一个字符串或布尔值', this.data.isLink);
+                return;
+            }
+
+            if (['navigateTo', 'redirectTo', 'switchTab', 'reLaunch'].indexOf(this.data.linkType) === -1) {
+                warn('linkType 属性可选值为 navigateTo,redirectTo,switchTab,reLaunch', this.data.linkType);
+                return;
+            }
+            wx[this.data.linkType].call(wx, {url});
+        },
+        handleTap () {
+            if (!this.data.onlyTapFooter) {
+                this.navigateTo();
+            }
+        },
+
+        updateIsLastCell (isLastCell) {
+            this.setData({ isLastCell });
+        }
+    }
+});

+ 3 - 0
dist/cell/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 16 - 0
dist/cell/index.wxml

@@ -0,0 +1,16 @@
+<view bindtap="handleTap" class="i-class i-cell {{ isLastCell ? 'i-cell-last' : '' }} {{ isLink ? 'i-cell-access' : '' }}">
+    <view class="i-cell-icon">
+        <slot name="icon"></slot>
+    </view>
+    <view class="i-cell-bd">
+        <view wx:if="{{ title }}" class="i-cell-text">{{ title }}</view>
+        <view wx:if="{{ label }}" class="i-cell-desc">{{ label }}</view>
+        <slot></slot>
+    </view>
+    <view catchtap="navigateTo" class="i-cell-ft">
+        <block wx:if="{{value}}">{{ value }}</block>
+        <block wx:else>
+            <slot name="footer"></slot>
+        </block>
+    </view>
+</view>

File diff suppressed because it is too large
+ 1 - 0
dist/cell/index.wxss


+ 38 - 0
dist/checkbox-group/index.js

@@ -0,0 +1,38 @@
+Component({
+    externalClasses: ['i-class'],
+    relations: {
+        '../checkbox/index': {
+            type: 'child',
+            linked() {
+                this.changeCurrent();
+            },
+            linkChanged() {
+                this.changeCurrent();
+            },
+            unlinked() {
+                this.changeCurrent();
+            }
+        }
+    },
+    properties: {
+        current: {
+            type: Array,
+            value: [],
+            observer: 'changeCurrent'
+        },
+    },
+    methods: {
+        changeCurrent(val = this.data.current) {
+            let items = this.getRelationNodes('../checkbox/index');
+            const len = items.length;
+            if (len > 0) {
+                items.forEach(item => {
+                    item.changeCurrent(val.indexOf(item.data.value) !== -1);
+                });
+            }
+        },
+        emitEvent(current) {
+            this.triggerEvent('change', current);
+        }
+    }
+});

+ 7 - 0
dist/checkbox-group/index.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents":
+    {
+        "i-cell-group": "../cell-group/index"
+    }
+}

+ 3 - 0
dist/checkbox-group/index.wxml

@@ -0,0 +1,3 @@
+<i-cell-group class="i-class">
+    <slot></slot>
+</i-cell-group>

+ 0 - 0
dist/checkbox-group/index.wxss


+ 56 - 0
dist/checkbox/index.js

@@ -0,0 +1,56 @@
+const prefixCls = 'i-checkbox';
+
+Component({
+    externalClasses: ['i-class'],
+    relations: {
+        '../checkbox-group/index': {
+            type: 'parent'
+        }
+    },
+    properties: {
+        value: {
+            type: String,
+            value: ''
+        },
+        checked: {
+            type: Boolean,
+            value: false
+        },
+        disabled: {
+            type: Boolean,
+            value: false
+        },
+        color: {
+            type: String,
+            value: '#2d8cf0'
+        },
+        position: {
+            type: String,
+            value: 'left', //left right
+            observer: 'setPosition'
+        }
+    },
+    data: {
+        checked: true,
+        positionCls: `${prefixCls}-checkbox-left`,
+    },
+    attached() {
+        this.setPosition();
+    },
+    methods: {
+        changeCurrent(current) {
+            this.setData({ checked: current });
+        },
+        checkboxChange() {
+            if (this.data.disabled) return;
+            const item = { current: !this.data.checked, value: this.data.value };
+            const parent = this.getRelationNodes('../checkbox-group/index')[0];
+            parent ? parent.emitEvent(item) : this.triggerEvent('change', item);
+        },
+        setPosition() {
+            this.setData({
+                positionCls: this.data.position.indexOf('left') !== -1 ? `${prefixCls}-checkbox-left` : `${prefixCls}-checkbox-right`,
+            });
+        }
+    }
+});

+ 7 - 0
dist/checkbox/index.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents":
+    {
+        "i-cell": "../cell/index"
+    }
+}

+ 8 - 0
dist/checkbox/index.wxml

@@ -0,0 +1,8 @@
+<view class="i-class i-checkbox" catchtap="checkboxChange">
+    <i-cell i-class="i-checkbox-cell">
+        <label>
+            <radio value="{{value}}" checked="{{checked}}" color="{{checked?color:''}}" disabled="{{disabled}}" class="i-checkbox-radio {{positionCls}}" />
+            <view class="i-checkbox-title">{{value}}</view>
+        </label>
+    </i-cell>
+</view>

+ 1 - 0
dist/checkbox/index.wxss

@@ -0,0 +1 @@
+.i-checkbox-cell::after{display:block}.i-checkbox-checkbox-left{float:left}.i-checkbox-checkbox-right{float:right}.i-checkbox-radio{vertical-align:middle}.i-checkbox-title{display:inline-block;vertical-align:middle}

+ 20 - 0
dist/col/index.js

@@ -0,0 +1,20 @@
+Component({
+    externalClasses: ['i-class'],
+
+    relations: {
+        '../row/index': {
+            type: 'parent'
+        }
+    },
+
+    properties: {
+        span: {
+            value: 0,
+            type: Number
+        },
+        offset: {
+            value: 0,
+            type: Number
+        }
+    }
+});

+ 3 - 0
dist/col/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 1 - 0
dist/col/index.wxml

@@ -0,0 +1 @@
+<view class="i-class i-col {{ span ? 'i-col-span-' + span : '' }} {{ offset ? 'i-col-offset-' + offset : '' }}"><slot></slot></view>

File diff suppressed because it is too large
+ 1 - 0
dist/col/index.wxss


+ 0 - 0
dist/collapse-item/index.js


Some files were not shown because too many files changed in this diff