123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364 |
- <template>
- <view class="page">
- <view class="topBody">
- <view class="header">
- <view class="topBg"></view>
- <view class="infoBg">
- <view class="top_row">
- <view class="left" @click="goPage('/pages/my/editInfo')">
- <image class="img" mode="aspectFill" :src="myinfo.avator"></image>
- </view>
- <view class="right" @click="goPage('/pages/my/editInfo')">
- <view class="nickname">
- <text>{{myinfo.nickname}}</text>
- <image src="../../static/icon/man.png" mode="widthFix" />
- <view class="level">Lv99</view>
- </view>
- <view class="tags_list">
- <uni-tag class="tag" type="primary" :inverted="false" text="标签1" size="mini" />
- <uni-tag class="tag" type="primary" :inverted="false" text="标签2" size="mini" />
- <uni-tag class="tag" type="primary" :inverted="false" text="标签3" size="mini" />
- </view>
- </view>
- </view>
- <view class="bottom_row">
- <view class="intro_row">
- <text class="intro_text">添加简介</text>
- <image src="../../static/icon/add.png" mode="widthFix" class="add_icon" />
- </view>
- <view class="follow_info">
- <text class="num">378</text>
- <text class="label">关注</text>
- <text class="separator"></text>
- <text class="num">29</text>
- <text class="label">粉丝</text>
- <text class="separator"></text>
- <text class="num">528</text>
- <text class="label">获赞</text>
- </view>
- </view>
- </view>
- </view>
- <view class="whiteItem">
- <view class="btn">开启专属会员权益</view>
- </view>
- <view class="myinfo">
- <view class="line"></view>
- <view class="tablist">
- <view class="item" :class="{ active: activeTab === 0 }" @click="switchTab(0)">
- <view class="name">我的作品</view>
- </view>
- <view class="item" :class="{ active: activeTab === 1 }" @click="switchTab(1)">
- <view class="name">生成中</view>
- </view>
- </view>
- <view class="numlist2" style="margin-top: 60rpx;">
- <view class="item" v-for="(item,index) in data_list">
- <view class="num">
- <image class="icon" :src="item.url" mode="widthFix" />
- <view class="name">作品1号</view>
- </view>
- </view>
- </view>
- </view>
- <view class="blankHeight"></view>
- <view class="blankHeight"></view>
- </view>
- <!-- 提示框 -->
- <DialogBox ref="DialogBox"></DialogBox>
- <tabbar-view :tabbars="tabbars" :currentIndex="4" ref="tabbar"></tabbar-view>
- </view>
- </template>
- <script>
- import tabbarView from "@/components/tabbar/tabbar.vue";
- import tabbar from "@/mixins/tabbar";
- export default {
- components: {
- tabbarView,
- },
- mixins: [tabbar],
- data() {
- return {
- title: '',
- sel: 1,
- myinfo: {
- avator: '../../static/logo.png',
- nickname: '王思思',
- join_name: '注册日期:2024年5月',
- num_1: 0,
- num_2: 0,
- num_3: 0,
- num_4: 0,
- is_login: 'no',
- num_history: 0,
- num_collection: 0,
- },
- menu_list: [],
- data_list: [{
- url: 'https://e.zhichao.art/AI_images/a_1112_10.png',
- },
- {
- url: 'https://e.zhichao.art/AI_images/a_1112_108.png',
- },
- {
- url: 'https://e.zhichao.art/AI_images/a_1112_113.png',
- },
- {
- url: 'https://e.zhichao.art/AI_images/a_1112_13.png',
- },
- {
- url: 'https://e.zhichao.art/AI_images/a_1112_137.png',
- },
- {
- url: 'https://e.zhichao.art/AI_images/a_1112_141.png',
- },
- {
- url: 'https://e.zhichao.art/AI_images/a_1114__562.png',
- },
- {
- url: 'https://e.zhichao.art/AI_images/a_1114__568.png',
- },
- {
- url: 'https://e.zhichao.art/AI_images/a_1114__569.png',
- },
- {
- url: 'https://e.zhichao.art/AI_images/a_1114__570.png',
- },
- {
- url: 'https://e.zhichao.art/AI_images/a_1114__571.png',
- },
- {
- url: 'https://e.zhichao.art/AI_images/a_1114__575.png',
- },
- ],
- activeTab: 0
- }
- },
- onLoad() {
- // setTimeout(function() {
- // uni.setNavigationBarColor({
- // frontColor: '#ffffff',
- // backgroundColor: '#00000000',
- // animation: {
- // duration: 400,
- // timingFunc: 'easeIn'
- // }
- // })
- // }, 200);
- },
- onShow() {
- // this.loadAge();
- // this.loadData();
- // this.loadMenu();
- },
- methods: {
- onBack() {},
- chkSel() {
- if (this.sel == 1) {
- this.sel = 0;
- } else {
- this.sel = 1;
- }
- },
- goPage(page) {
- if (page == 'kefu') {
- let that = this;
- // #ifdef APP-PLUS
- plus.share.getServices(res => {
- const wechat = res.find(i => i.id === 'weixin')
- if (wechat) {
- wechat.openCustomerServiceChat({
- corpid: 'wwbc06aa8311b6ac08',
- // url: 'https://work.weixin.qq.com/kfid/kfc4b0bcb4038d00a50'
- url: that.myinfo.wxkf
- }, src => {
- console.log("success:")
- }, err => {
- console.log("error:")
- })
- } else {
- uni.showToast({
- title: '没有检测到微信,请先安装',
- icon: "error"
- });
- }
- });
- // #endif
- } else if (page != '') {
- uni.navigateTo({
- url: page,
- })
- }
- },
- loadData() {
- console.log({
- uuid: getApp().globalData.uuid,
- skey: getApp().globalData.skey
- });
- uni.request({
- url: this.$apiHost + '/Web/getinfo',
- data: {
- uuid: getApp().globalData.uuid,
- skey: getApp().globalData.skey
- },
- header: {
- "content-type": "application/json",
- 'sign': getApp().globalData.headerSign
- },
- success: (res) => {
- console.log("----:", res.data);
- if (res.data.need_login == "yes") {
- // getApp().globalData.skey = "";
- // getApp().globalData.uuid = "";
- uni.removeStorageSync("wapptoken");
- uni.redirectTo({
- url: '/pages/login/login'
- });
- return;
- }
- if (res.data.need_edit == "yes") {
- uni.navigateTo({
- url: '/pages/my/step'
- });
- return;
- }
- if (res.data.avator != "") {
- uni.setStorageSync("my_avator", res.data.avator);
- } else {
- uni.setStorageSync("my_avator", "/static/logo.png");
- }
- this.myinfo = res.data;
- },
- complete: (com) => {
- // uni.hideLoading();
- },
- fail: (e) => {
- console.log("----e:", e);
- }
- });
- },
- loadMenu() {
- console.log({
- uuid: getApp().globalData.uuid,
- skey: getApp().globalData.skey
- });
- uni.request({
- url: this.$apiHost + '/User/getinfo',
- data: {
- uuid: getApp().globalData.uuid,
- skey: getApp().globalData.skey
- },
- header: {
- "content-type": "application/json",
- 'sign': getApp().globalData.headerSign
- },
- success: (res) => {
- console.log("----:", res.data);
- if (res.data.need_login == "yes") {
- // getApp().globalData.skey = "";
- // getApp().globalData.uuid = "";
- uni.removeStorageSync("wapptoken");
- uni.redirectTo({
- url: '/pages/login/login'
- });
- return;
- }
- this.menu_list = res.data.list01;
- },
- complete: (com) => {
- // uni.hideLoading();
- },
- fail: (e) => {
- console.log("----e:", e);
- }
- });
- },
- onLogout() {
- let that = this;
- this.$refs['DialogBox'].confirm({
- title: '提示',
- content: '确定退出吗?',
- DialogType: 'inquiry',
- btn1: '取消',
- btn2: '退出',
- animation: 0
- }).then((res) => {
- uni.request({
- url: that.$apiHost + '/My/logout',
- data: {
- uuid: getApp().globalData.uuid,
- skey: getApp().globalData.skey
- },
- header: {
- "content-type": "application/json",
- 'sign': getApp().globalData.headerSign
- },
- success: (res) => {
- console.log("----:", res.data);
- // getApp().globalData.skey = "";
- // getApp().globalData.uuid = "";
- uni.removeStorageSync("wapptoken");
- uni.redirectTo({
- url: '/pages/login/login'
- })
- },
- complete: (com) => {
- // uni.hideLoading();
- },
- fail: (e) => {
- console.log("----e:", e);
- }
- });
- })
- },
- loadAge() {
- let that = this;
- uni.request({
- url: this.$apiHost + '/Member/checkAge',
- data: {
- uuid: getApp().globalData.uuid
- },
- header: {
- "content-type": "application/json",
- 'sign': getApp().globalData.headerSign
- },
- success: (res) => {
- console.log("----:", res.data);
- if (res.data.need_xiuxi == "yes") {
- uni.redirectTo({
- url: '/pages/AboutUs/xiuxi'
- });
- return;
- }
- if (res.data.need_show_yong == 'yes') {
- that.showYong = true;
- }
- },
- complete: (com) => {
- // uni.hideLoading();
- },
- fail: (e) => {
- console.log("----e:", e);
- }
- });
- },
- switchTab(index) {
- this.activeTab = index;
- },
- }
- }
- </script>
- <style scoped lang="scss">
- @import 'my.scss';
- </style>
|