|
|
@ -5,20 +5,18 @@ |
|
|
|
|
|
|
|
|
<view class="head"> |
|
|
<view class="head"> |
|
|
<view class="headImage"> |
|
|
<view class="headImage"> |
|
|
<!-- todo: 换回接口提供的 --> |
|
|
|
|
|
<image src="https://thumbnail0.baidupcs.com/thumbnail/a4166d65fm1072cc3d763d59df8feb8a?fid=3983569511-250528-247083465710867&time=1742544000&rt=sh&sign=FDTAER-DCb740ccc5511e5e8fedcff06b081203-8%2Bjq3Cl0GcBe8y3JIzmmJnNofiY%3D&expires=8h&chkv=0&chkbd=0&chkpc=&dp-logid=8765802821729992500&dp-callid=0&file_type=0&size=c850_u580&quality=100&vuk=-&ft=video" mode=""></image> |
|
|
|
|
|
|
|
|
<image :src="userInfo.headImage" mode=""></image> |
|
|
</view> |
|
|
</view> |
|
|
<view class="info"> |
|
|
<view class="info"> |
|
|
<view class="name"> |
|
|
<view class="name"> |
|
|
<!-- todo: 换回接口提供的 --> |
|
|
|
|
|
裂变星1号 |
|
|
|
|
|
|
|
|
{{ userInfo.nickName }} |
|
|
</view> |
|
|
</view> |
|
|
<view class="tags"> |
|
|
<view class="tags"> |
|
|
<!-- todo: 换回接口提供的 --> |
|
|
|
|
|
<view class="tag"> |
|
|
<view class="tag"> |
|
|
<text class="tag-label">ID:</text> |
|
|
<text class="tag-label">ID:</text> |
|
|
<text>12345678</text> |
|
|
|
|
|
|
|
|
<text>{{ userInfo.id }}</text> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<!-- todo --> |
|
|
<view v-if="isAgent" style="display: inline-block; width: 172rpx; height: 63rpx; vertical-align: top; margin-top: -6rpx;"> |
|
|
<view v-if="isAgent" style="display: inline-block; width: 172rpx; height: 63rpx; vertical-align: top; margin-top: -6rpx;"> |
|
|
<image src="@/pages_order/static/center/agent-icon.png"></image> |
|
|
<image src="@/pages_order/static/center/agent-icon.png"></image> |
|
|
</view> |
|
|
</view> |
|
|
@ -56,24 +54,28 @@ |
|
|
</template> |
|
|
</template> |
|
|
</view> |
|
|
</view> |
|
|
<view class="tools flex"> |
|
|
<view class="tools flex"> |
|
|
|
|
|
<!-- todo --> |
|
|
<view class="tool" @click="$utils.navigateTo('/pages_order/mine/sharing')"> |
|
|
<view class="tool" @click="$utils.navigateTo('/pages_order/mine/sharing')"> |
|
|
<view class="tool-icon"> |
|
|
<view class="tool-icon"> |
|
|
<image src="@/pages_order/static/center/tool-share.png"></image> |
|
|
<image src="@/pages_order/static/center/tool-share.png"></image> |
|
|
</view> |
|
|
</view> |
|
|
<text>分享好友</text> |
|
|
<text>分享好友</text> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<!-- todo --> |
|
|
<view class="tool" @click="onActivate"> |
|
|
<view class="tool" @click="onActivate"> |
|
|
<view class="tool-icon"> |
|
|
<view class="tool-icon"> |
|
|
<image src="@/pages_order/static/center/tool-activate.png"></image> |
|
|
<image src="@/pages_order/static/center/tool-activate.png"></image> |
|
|
</view> |
|
|
</view> |
|
|
<text>激活码</text> |
|
|
<text>激活码</text> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<!-- todo --> |
|
|
<view class="tool" @click="$utils.navigateTo('/pages_order/mine/wallet')"> |
|
|
<view class="tool" @click="$utils.navigateTo('/pages_order/mine/wallet')"> |
|
|
<view class="tool-icon"> |
|
|
<view class="tool-icon"> |
|
|
<image src="@/pages_order/static/center/tool-wallet.png"></image> |
|
|
<image src="@/pages_order/static/center/tool-wallet.png"></image> |
|
|
</view> |
|
|
</view> |
|
|
<text>我的钱包</text> |
|
|
<text>我的钱包</text> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<!-- todo --> |
|
|
<view class="tool" @click="$utils.navigateTo('/pages_order/mine/team')"> |
|
|
<view class="tool" @click="$utils.navigateTo('/pages_order/mine/team')"> |
|
|
<view class="tool-icon"> |
|
|
<view class="tool-icon"> |
|
|
<image src="@/pages_order/static/center/tool-team.png"></image> |
|
|
<image src="@/pages_order/static/center/tool-team.png"></image> |
|
|
@ -84,7 +86,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="content"> |
|
|
<view class="content"> |
|
|
<view class="card notice"> |
|
|
|
|
|
|
|
|
<view class="card notice" v-if="notice"> |
|
|
<view class="notice-icon"> |
|
|
<view class="notice-icon"> |
|
|
<image src="@/pages_order/static/center/notice.png"></image> |
|
|
<image src="@/pages_order/static/center/notice.png"></image> |
|
|
</view> |
|
|
</view> |
|
|
@ -111,16 +113,16 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="updates-content"> |
|
|
<view class="updates-content"> |
|
|
<view class="card updates-item" |
|
|
<view class="card updates-item" |
|
|
v-for="item in updateList" |
|
|
|
|
|
|
|
|
v-for="(item, index) in list" |
|
|
:key="item.id" |
|
|
:key="item.id" |
|
|
@click="goToSharingDetail(item.id, item.state)" |
|
|
|
|
|
|
|
|
@click="goToNewsDetail(item.id, index)" |
|
|
> |
|
|
> |
|
|
<view class="updates-item-img"> |
|
|
<view class="updates-item-img"> |
|
|
<image :src="item.imageUrl"></image> |
|
|
|
|
|
|
|
|
<image :src="item.image"></image> |
|
|
</view> |
|
|
</view> |
|
|
<view class="updates-item-info"> |
|
|
<view class="updates-item-info"> |
|
|
<view class="updates-item-title">{{ item.title }}</view> |
|
|
|
|
|
<view class="updates-item-desc">{{ item.description }}</view> |
|
|
|
|
|
|
|
|
<view class="updates-item-title">{{ item.title || '' }}</view> |
|
|
|
|
|
<view class="updates-item-desc text-ellipsis">{{ getDesc(item.details) }}</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -139,93 +141,62 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import tabber from '@/components/base/tabbar.vue' |
|
|
|
|
|
import { |
|
|
|
|
|
mapGetters |
|
|
|
|
|
} from 'vuex' |
|
|
|
|
|
|
|
|
import { mapState } from 'vuex' |
|
|
|
|
|
import mixinsList from '@/mixins/list.js' |
|
|
|
|
|
|
|
|
import popupActivate from '@/components/center/popupActivate.vue' |
|
|
import popupActivate from '@/components/center/popupActivate.vue' |
|
|
|
|
|
|
|
|
const URL_MAPPING = { // state -> url |
|
|
|
|
|
'-1': '/pages_order/sharing/personal', |
|
|
|
|
|
'0': '/pages_order/sharing/video', |
|
|
|
|
|
'1': '/pages_order/sharing/group', |
|
|
|
|
|
'2': '/pages_order/sharing/article', |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
import tabber from '@/components/base/tabbar.vue' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
|
|
|
mixins : [mixinsList], |
|
|
components: { |
|
|
components: { |
|
|
tabber, |
|
|
tabber, |
|
|
popupActivate, |
|
|
popupActivate, |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
...mapGetters(['userShop']), |
|
|
|
|
|
|
|
|
...mapState(['userInfo']), |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
// todo: agent => role |
|
|
isAgent: false, |
|
|
isAgent: false, |
|
|
agentDeadline: '2025年12月31日', |
|
|
agentDeadline: '2025年12月31日', |
|
|
notice: '如果您在使用中有任何问题或建议,请联系客服', |
|
|
|
|
|
updateList: [ |
|
|
|
|
|
{ |
|
|
|
|
|
id: '001', |
|
|
|
|
|
imageUrl: '../../pages_order/static/center/temp.png', |
|
|
|
|
|
times: 10, |
|
|
|
|
|
qrCode: null, |
|
|
|
|
|
title: '裂变星轻松获客', |
|
|
|
|
|
description: '如此好用的赚钱项目,赶快加入吧!', |
|
|
|
|
|
auditStatus: 2, |
|
|
|
|
|
createTime: '2025年2月1日', |
|
|
|
|
|
state: -1, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: '002', |
|
|
|
|
|
imageUrl: '../../pages_order/static/center/temp.png', |
|
|
|
|
|
times: 10, |
|
|
|
|
|
qrCode: null, |
|
|
|
|
|
title: '裂变星轻松获客', |
|
|
|
|
|
description: '如此好用的赚钱项目,赶快加入吧!', |
|
|
|
|
|
auditStatus: 2, |
|
|
|
|
|
createTime: '2025年2月1日', |
|
|
|
|
|
state: 0, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: '003', |
|
|
|
|
|
imageUrl: '../../pages_order/static/center/temp.png', |
|
|
|
|
|
times: 10, |
|
|
|
|
|
qrCode: null, |
|
|
|
|
|
title: '裂变星轻松获客', |
|
|
|
|
|
description: '如此好用的赚钱项目,赶快加入吧!', |
|
|
|
|
|
auditStatus: 2, |
|
|
|
|
|
createTime: '2025年2月1日', |
|
|
|
|
|
state: 1, |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
id: '004', |
|
|
|
|
|
imageUrl: '../../pages_order/static/center/temp.png', |
|
|
|
|
|
times: 10, |
|
|
|
|
|
qrCode: null, |
|
|
|
|
|
title: '裂变星轻松获客', |
|
|
|
|
|
description: '如此好用的赚钱项目,赶快加入吧!', |
|
|
|
|
|
auditStatus: 2, |
|
|
|
|
|
createTime: '2025年2月1日', |
|
|
|
|
|
state: 2, |
|
|
|
|
|
}, |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
notice: '', |
|
|
|
|
|
mixinsListApi : 'getNews', |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
// todo: 获取信息(用户信息、最新动态) |
|
|
|
|
|
|
|
|
this.fetchNotice() |
|
|
|
|
|
this.getData() |
|
|
}, |
|
|
}, |
|
|
onReachBottom() { |
|
|
|
|
|
// todo: 获取更多动态? |
|
|
|
|
|
|
|
|
onLoad() { |
|
|
|
|
|
if (uni.getStorageSync('token') && !this.userInfo?.id) { |
|
|
|
|
|
this.$store.commit('getUserInfo') |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
async fetchNotice() { |
|
|
|
|
|
try { |
|
|
|
|
|
this.notice = await this.$fetch('getNotice', { id }) |
|
|
|
|
|
} catch (err) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
onActivate() { |
|
|
onActivate() { |
|
|
this.$refs.popupActivate.open(this.isAgent) |
|
|
this.$refs.popupActivate.open(this.isAgent) |
|
|
}, |
|
|
}, |
|
|
goToSharingDetail(id, state) { |
|
|
|
|
|
|
|
|
getDesc(str) { |
|
|
|
|
|
if (!str) { |
|
|
|
|
|
return '' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return str.replace(/<.*?>/g, '') |
|
|
|
|
|
}, |
|
|
|
|
|
goToNewsDetail(id, index) { |
|
|
|
|
|
// todo: check |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: `${URL_MAPPING[state]}?id=${id}` |
|
|
|
|
|
|
|
|
url: `/pages_order/mine/news?id=${id}&index=${index}` |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
|