This commit is contained in:
王创世 2024-04-24 18:03:24 +08:00
parent 6d8162e181
commit e91c93896b
9 changed files with 81 additions and 19 deletions

View File

@ -14,21 +14,21 @@
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="padding:10px 30rpx;">
<view v-for="(item,index) in 3" class="tn-flex tn-flex-row-between"
<view v-for="(item,index) in list" class="tn-flex tn-flex-row-between"
@click="openUrl('/pages/index/event_info')"
style="background-color: #ffffff;padding: 20rpx;border-radius: 10rpx;margin-bottom: 30rpx;box-shadow: rgba(12, 0, 5, 0.1) 0px 0px 5px 0px;">
<view style="position:relative;">
<view style="font-size: 28rpx;">青年企业家能力提升 计划培训班(第20期)</view>
<view style="font-size: 28rpx;">{{item.activity_name}}</view>
<view class="tn-flex tn-flex-row-between"
style="position: absolute;bottom: 0rpx;width: 100%;color: #808080;">
<view>2023-12-25</view>
<view>
<tn-button v-if="index%2==0&&index!=2" padding="0px" width="100rpx" height="40rpx"
size="sm" backgroundColor="#6BC7F0 " fontColor="tn-color-white">报名中</tn-button>
<tn-button v-if="index%2==1&&index!=2" padding="0px" width="100rpx" height="40rpx"
size="sm" backgroundColor="#EE9556 " fontColor="tn-color-white">预告</tn-button>
<tn-button v-if="index==2" padding="0px" width="100rpx" height="40rpx" size="sm"
backgroundColor="#E12B33 " fontColor="tn-color-white">进行中</tn-button>
style="position: absolute;bottom: 0rpx;width:420rpx;color: #808080;">
<view>{{item.activity_start_time}}</view>
<view style="margin-left: 10rpx">
<tn-button v-if="item.type=='未开始'" padding="0px" width="100rpx" height="40rpx"
size="sm" backgroundColor="#6BC7F0 " fontColor="tn-color-white">未开始</tn-button>
<tn-button v-if="item.type=='进行中'" padding="0px" width="100rpx" height="40rpx"
size="sm" backgroundColor="#EE9556 " fontColor="tn-color-white">进行中</tn-button>
<tn-button v-if="item.type=='已结束'" padding="0px" width="100rpx" height="40rpx" size="sm"
backgroundColor="#E12B33 " fontColor="tn-color-white">已结束</tn-button>
</view>
</view>
</view>
@ -43,13 +43,37 @@
</template>
<script>
import {UserApplication} from "@/util/api";
import store from "@/store";
export default {
data() {
return {
topCurrent: 0
topCurrent: 0,
list:[]
}
},
onLoad() {
var uid = uni.getStorageSync('uid');
this.uid=uid;
this.getUserApplication();
},
methods: {
getUserApplication(){
UserApplication({member_id: 2})
.then(res => {
console.log(res);
if(res.code==1){
this.list = res.data;
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
openUrl(e) {
uni.navigateTo({
url: e

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -26000,7 +26000,7 @@ var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/inte
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.positionList = exports.newsList = exports.newsInfo = exports.newsGoryList = exports.newIndustryIndex = exports.loginDo = exports.loginAdd = exports.getUserIndex = exports.eventInfo = exports.associationInfo = exports.associationIndex = exports.architectureList = exports.addressList = exports.activityList = exports.activityIndex = exports.IndustryList = void 0;
exports.positionList = exports.newsList = exports.newsInfo = exports.newsGoryList = exports.newIndustryIndex = exports.loginDo = exports.loginAdd = exports.getUserIndex = exports.eventInfo = exports.associationInfo = exports.associationIndex = exports.architectureList = exports.addressList = exports.activityList = exports.activityIndex = exports.UserApplication = exports.IndustryList = void 0;
var _request = _interopRequireDefault(__webpack_require__(/*! @/util/request */ 82));
var newsGoryList = function newsGoryList(data) {
return _request.default.post('/move/news/gory', data, false);
@ -26066,6 +26066,10 @@ var getUserIndex = function getUserIndex(data) {
return _request.default.post('/move/member/find', data, false);
};
exports.getUserIndex = getUserIndex;
var UserApplication = function UserApplication(data) {
return _request.default.post('/move/application', data, false);
};
exports.UserApplication = UserApplication;
/***/ }),

View File

@ -164,10 +164,13 @@ __webpack_require__.r(__webpack_exports__);
"use strict";
/* WEBPACK VAR INJECTION */(function(uni) {
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _api = __webpack_require__(/*! @/util/api */ 81);
var _store = _interopRequireDefault(__webpack_require__(/*! @/store */ 30));
//
//
//
@ -215,10 +218,33 @@ exports.default = void 0;
var _default = {
data: function data() {
return {
topCurrent: 0
topCurrent: 0,
list: []
};
},
onLoad: function onLoad() {
var uid = uni.getStorageSync('uid');
this.uid = uid;
this.getUserApplication();
},
methods: {
getUserApplication: function getUserApplication() {
var _this = this;
(0, _api.UserApplication)({
member_id: 2
}).then(function (res) {
console.log(res);
if (res.code == 1) {
_this.list = res.data;
}
}).catch(function (error) {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
});
},
openUrl: function openUrl(e) {
uni.navigateTo({
url: e

View File

@ -1 +1 @@
<view style="letter-spacing:1rpx;"><tn-nav-bar vue-id="93907a4c-1" isBack="{{false}}" backTitle bottomShadow="{{true}}" backgroundColor="#FFFFFF" bind:__l="__l" vue-slots="{{['default']}}"><view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left"><view data-event-opts="{{[['tap',[['goBack']]]]}}" style="padding-left:15rpx;" bindtap="__e"><text class="tn-icon-left" style="font-size:40rpx;"></text></view><view class="tn-margin-top" style="text-shadow:1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;"><tn-tabs vue-id="{{('93907a4c-2')+','+('93907a4c-1')}}" list="{{[{name:'参与活动'}]}}" current="{{topCurrent}}" activeColor="#000" bold="{{false}}" fontSize="{{36}}" bind:__l="__l"></tn-tabs></view></view></tn-nav-bar><view style="{{'padding-top:'+(vuex_custom_bar_height+'px')+';'}}"><view style="padding:10px 30rpx;"><block wx:for="{{3}}" wx:for-item="item" wx:for-index="index"><view data-event-opts="{{[['tap',[['openUrl',['/pages/index/event_info']]]]]}}" class="tn-flex tn-flex-row-between" style="background-color:#ffffff;padding:20rpx;border-radius:10rpx;margin-bottom:30rpx;box-shadow:rgba(12, 0, 5, 0.1) 0px 0px 5px 0px;" bindtap="__e"><view style="position:relative;"><view style="font-size:28rpx;">青年企业家能力提升 计划培训班(第20期)</view><view class="tn-flex tn-flex-row-between" style="position:absolute;bottom:0rpx;width:100%;color:#808080;"><view>2023-12-25</view><view><block wx:if="{{index%2==0&&index!=2}}"><tn-button vue-id="{{'93907a4c-3-'+index}}" padding="0px" width="100rpx" height="40rpx" size="sm" backgroundColor="#6BC7F0 " fontColor="tn-color-white" bind:__l="__l" vue-slots="{{['default']}}">报名中</tn-button></block><block wx:if="{{index%2==1&&index!=2}}"><tn-button vue-id="{{'93907a4c-4-'+index}}" padding="0px" width="100rpx" height="40rpx" size="sm" backgroundColor="#EE9556 " fontColor="tn-color-white" bind:__l="__l" vue-slots="{{['default']}}">预告</tn-button></block><block wx:if="{{index==2}}"><tn-button vue-id="{{'93907a4c-5-'+index}}" padding="0px" width="100rpx" height="40rpx" size="sm" backgroundColor="#E12B33 " fontColor="tn-color-white" bind:__l="__l" vue-slots="{{['default']}}">进行中</tn-button></block></view></view></view><view style="margin-left:20rpx;"><image style="width:200rpx;height:135rpx;border-radius:10rpx;" src="/static/hd1.jpg"></image></view></view></block></view></view></view>
<view style="letter-spacing:1rpx;"><tn-nav-bar vue-id="93907a4c-1" isBack="{{false}}" backTitle bottomShadow="{{true}}" backgroundColor="#FFFFFF" bind:__l="__l" vue-slots="{{['default']}}"><view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left"><view data-event-opts="{{[['tap',[['goBack']]]]}}" style="padding-left:15rpx;" bindtap="__e"><text class="tn-icon-left" style="font-size:40rpx;"></text></view><view class="tn-margin-top" style="text-shadow:1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;"><tn-tabs vue-id="{{('93907a4c-2')+','+('93907a4c-1')}}" list="{{[{name:'参与活动'}]}}" current="{{topCurrent}}" activeColor="#000" bold="{{false}}" fontSize="{{36}}" bind:__l="__l"></tn-tabs></view></view></tn-nav-bar><view style="{{'padding-top:'+(vuex_custom_bar_height+'px')+';'}}"><view style="padding:10px 30rpx;"><block wx:for="{{list}}" wx:for-item="item" wx:for-index="index"><view data-event-opts="{{[['tap',[['openUrl',['/pages/index/event_info']]]]]}}" class="tn-flex tn-flex-row-between" style="background-color:#ffffff;padding:20rpx;border-radius:10rpx;margin-bottom:30rpx;box-shadow:rgba(12, 0, 5, 0.1) 0px 0px 5px 0px;" bindtap="__e"><view style="position:relative;"><view style="font-size:28rpx;">{{item.activity_name}}</view><view class="tn-flex tn-flex-row-between" style="position:absolute;bottom:0rpx;width:420rpx;color:#808080;"><view>{{item.activity_start_time}}</view><view style="margin-left:10rpx;"><block wx:if="{{item.type=='未开始'}}"><tn-button vue-id="{{'93907a4c-3-'+index}}" padding="0px" width="100rpx" height="40rpx" size="sm" backgroundColor="#6BC7F0 " fontColor="tn-color-white" bind:__l="__l" vue-slots="{{['default']}}">未开始</tn-button></block><block wx:if="{{item.type=='进行中'}}"><tn-button vue-id="{{'93907a4c-4-'+index}}" padding="0px" width="100rpx" height="40rpx" size="sm" backgroundColor="#EE9556 " fontColor="tn-color-white" bind:__l="__l" vue-slots="{{['default']}}">进行中</tn-button></block><block wx:if="{{item.type=='已结束'}}"><tn-button vue-id="{{'93907a4c-5-'+index}}" padding="0px" width="100rpx" height="40rpx" size="sm" backgroundColor="#E12B33 " fontColor="tn-color-white" bind:__l="__l" vue-slots="{{['default']}}">已结束</tn-button></block></view></view></view><view style="margin-left:20rpx;"><image style="width:200rpx;height:135rpx;border-radius:10rpx;" src="/static/hd1.jpg"></image></view></view></block></view></view></view>

View File

@ -3,6 +3,13 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/index/events_my",
"pathName": "pages/index/events_my",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/index/my_card",
"pathName": "pages/index/my_card",

View File

@ -20,3 +20,4 @@ export const addressList = data => request.post('/move/address', data, false);
export const newIndustryIndex = data => request.post('/move/industry/index', data, false);
export const getUserIndex = data => request.post('/move/member/find', data, false);
export const UserApplication = data => request.post('/move/application', data, false);