add.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <block>{{options}}</block>
  3. </template>
  4. <script module="parse" lang="wxs">
  5. module.exports = {
  6. filterTime: function(value) {
  7. var nowDate = getDate(value * 1000); //过期时间
  8. var year = nowDate.getFullYear(); //当前年份
  9. var month = nowDate.getMonth() + 1; //当前月份
  10. var date = nowDate.getDate(); //当前几号
  11. var hours = nowDate.getHours(); //当前几小时
  12. return year + '-' + month + '-' + date
  13. }
  14. }
  15. </script>
  16. <script>
  17. var app = getApp();
  18. export default {
  19. data() {
  20. return {
  21. options: {}
  22. };
  23. },
  24. onLoad: function(options) {
  25. this.options = options;
  26. this.addTerm(1);
  27. },
  28. onPullDownRefresh: function() {},
  29. onReachBottom: function() {
  30. this.loaded || this.getlist();
  31. },
  32. onShareAppMessage: function() {},
  33. methods: {
  34. changeStatus(e) {
  35. },
  36. async addTerm(uid){
  37. console.log(uid);
  38. let data = await this.$api.request('/team/add', 'POST', {puid: uid});
  39. uni.switchTab({
  40. url:'../index/index'
  41. })
  42. }
  43. }
  44. };
  45. </script>
  46. <style>
  47. </style>