hebing
This commit is contained in:
@@ -7,20 +7,24 @@ Page({
|
|||||||
|
|
||||||
dynamic_id: '', //活动id
|
dynamic_id: '', //活动id
|
||||||
info: '', //详情信息
|
info: '', //详情信息
|
||||||
loaded: false,
|
loaded: false
|
||||||
company_id: wx.getStorageSync('company_id'),
|
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
dynamic_id: e.id
|
dynamic_id: e.id
|
||||||
})
|
})
|
||||||
this.dynamicsDetail();
|
wx.getStorage({
|
||||||
|
key: 'company_id',
|
||||||
|
success: res=>{
|
||||||
|
this.dynamicsDetail(res.data);
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 获取详情
|
* 获取详情
|
||||||
*/
|
*/
|
||||||
dynamicsDetail() {
|
dynamicsDetail(companyId) {
|
||||||
wx.$api.companyModule.dynamicsDetail(this.data.company_id, this.data.dynamic_id).then(res => {
|
wx.$api.companyModule.dynamicsDetail(companyId, this.data.dynamic_id).then(res => {
|
||||||
if (res.content) {
|
if (res.content) {
|
||||||
var nodes = res.content.replace('<img', '<img style="max-width:100%;height:auto""');
|
var nodes = res.content.replace('<img', '<img style="max-width:100%;height:auto""');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,17 +5,26 @@ Page({
|
|||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
info:''
|
info: '',
|
||||||
|
isLogin:false
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
wx.getStorage({
|
||||||
|
key: 'token',
|
||||||
|
success: () => {
|
||||||
|
this.setData({
|
||||||
|
isLogin:true
|
||||||
|
})
|
||||||
this.userInfo();
|
this.userInfo();
|
||||||
|
},fail:()=>{ }
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
userInfo() {
|
userInfo() {
|
||||||
wx.$api.user.userInfo().then(res => {
|
wx.$api.user.userInfo().then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.setData({
|
this.setData({
|
||||||
info:res
|
info: res
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -24,5 +33,10 @@ Page({
|
|||||||
title: '正在完善,看看其他的吧',
|
title: '正在完善,看看其他的吧',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
goLogin(){
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/login/login',
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
<!-- 个人中心 -->
|
<block wx:if='{{isLogin}}'>
|
||||||
<view class="userTop">
|
<!-- 个人中心 -->
|
||||||
|
<view class="userTop">
|
||||||
<view class="userTop-head">
|
<view class="userTop-head">
|
||||||
<view class="userTop-name"> {{info.user.nickname}}<text>{{info.vip.is_vip?'会员':'游客'}}</text> </view>
|
<view class="userTop-name"> {{info.user.nickname}}<text>{{info.vip.is_vip?'会员':'游客'}}</text> </view>
|
||||||
<image class="userTop-img" src="{{info.user.avatar}}"></image>
|
<image class="userTop-img" src="{{info.user.avatar}}"></image>
|
||||||
@@ -8,7 +9,8 @@
|
|||||||
<!-- <view class="userTop-label"> <text>89</text> 钱包 </view> -->
|
<!-- <view class="userTop-label"> <text>89</text> 钱包 </view> -->
|
||||||
<navigator hover-class="none" class="userTop-label" url="/pages/user/companyMine/myTeam/myTeam">
|
<navigator hover-class="none" class="userTop-label" url="/pages/user/companyMine/myTeam/myTeam">
|
||||||
<text>{{info.counter.teams || 10}}</text> 团队 </navigator>
|
<text>{{info.counter.teams || 10}}</text> 团队 </navigator>
|
||||||
<navigator hover-class="none" class="userTop-label" url="/pages/user/companyMine/focusedCompany/focusedCompany">
|
<navigator hover-class="none" class="userTop-label"
|
||||||
|
url="/pages/user/companyMine/focusedCompany/focusedCompany">
|
||||||
<text>{{info.counter.subscriptions}}</text> 关注企业 </navigator>
|
<text>{{info.counter.subscriptions}}</text> 关注企业 </navigator>
|
||||||
</view>
|
</view>
|
||||||
<view class="userTop-vip" catchtap="showtoast">
|
<view class="userTop-vip" catchtap="showtoast">
|
||||||
@@ -19,9 +21,9 @@
|
|||||||
<image src="/static/user_iocn/user_vip.png"></image>立即开通
|
<image src="/static/user_iocn/user_vip.png"></image>立即开通
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="userNav">
|
<view class="userNav">
|
||||||
<navigator hover-class="none" url="/pages/user/user_coupon/user_coupon" class="userNav-label">
|
<navigator hover-class="none" url="/pages/user/user_coupon/user_coupon" class="userNav-label">
|
||||||
<view class="userNav-label-img">
|
<view class="userNav-label-img">
|
||||||
<image src="/static/user_iocn/userNav_00.png"></image>
|
<image src="/static/user_iocn/userNav_00.png"></image>
|
||||||
@@ -40,9 +42,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<text>分享海报</text>
|
<text>分享海报</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="userTool">
|
<view class="userTool">
|
||||||
<view class="userTool-title">
|
<view class="userTool-title">
|
||||||
更多服务
|
更多服务
|
||||||
</view>
|
</view>
|
||||||
@@ -62,7 +64,7 @@
|
|||||||
<navigator hover-class="none" url="/pages/mall/mall_cart/mall_cart" class="userTool-label">
|
<navigator hover-class="none" url="/pages/mall/mall_cart/mall_cart" class="userTool-label">
|
||||||
<view class="userTool-label-img">
|
<view class="userTool-label-img">
|
||||||
<image src="/static/user_iocn/userTool_02.png"></image>
|
<image src="/static/user_iocn/userTool_02.png"></image>
|
||||||
<view class="userTool-label-tips">2</view>
|
<view wx:if='{{info.cart_counts}}' class="userTool-label-tips">{{info.cart_counts}}</view>
|
||||||
</view>
|
</view>
|
||||||
<text>我的购物车</text>
|
<text>我的购物车</text>
|
||||||
</navigator>
|
</navigator>
|
||||||
@@ -86,7 +88,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<text>项目关注</text>
|
<text>项目关注</text>
|
||||||
</navigator>
|
</navigator>
|
||||||
<navigator hover-class="none" url="/pages/user/companyMine/myBlockchain/myBlockchain" class="userTool-label">
|
<navigator hover-class="none" url="/pages/user/companyMine/myBlockchain/myBlockchain"
|
||||||
|
class="userTool-label">
|
||||||
<view class="userTool-label-img">
|
<view class="userTool-label-img">
|
||||||
<image src="/static/user_iocn/userTool_06.png"></image>
|
<image src="/static/user_iocn/userTool_06.png"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -105,5 +108,9 @@
|
|||||||
<text>设置</text>
|
<text>设置</text>
|
||||||
</navigator>
|
</navigator>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<storeTabBar pages-url="pages/user/index"></storeTabBar>
|
<storeTabBar pages-url="pages/user/index"></storeTabBar>
|
||||||
|
</block>
|
||||||
|
<block wx:else catchtap="goLogin">
|
||||||
|
去登陸
|
||||||
|
</block>
|
||||||
@@ -90,12 +90,6 @@
|
|||||||
"query": "orderid=20201229132338964625",
|
"query": "orderid=20201229132338964625",
|
||||||
"scene": null
|
"scene": null
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "pages/user/companyMine/companyOrder",
|
|
||||||
"pathName": "pages/user/companyMine/companyOrder",
|
|
||||||
"query": "orderid=20201229132338964625",
|
|
||||||
"scene": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "pages/user/companyMine/projectDetail/projectDetail",
|
"name": "pages/user/companyMine/projectDetail/projectDetail",
|
||||||
"pathName": "pages/user/companyMine/projectDetail/projectDetail",
|
"pathName": "pages/user/companyMine/projectDetail/projectDetail",
|
||||||
@@ -141,6 +135,7 @@
|
|||||||
{
|
{
|
||||||
"name": "pages/home/index",
|
"name": "pages/home/index",
|
||||||
"pathName": "pages/home/index",
|
"pathName": "pages/home/index",
|
||||||
|
"query": "",
|
||||||
"scene": null
|
"scene": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user