From 0bd15917637362c104eb157d5163f65bf9503780 Mon Sep 17 00:00:00 2001 From: wk Date: 星期六, 14 九月 2024 16:53:14 +0800 Subject: [PATCH] feat:通行证 --- pages/doorkeeper-page/my-page/my-page.vue | 72 +++++++++++++++++++++++++++++++++++ 1 files changed, 71 insertions(+), 1 deletions(-) diff --git a/pages/doorkeeper-page/my-page/my-page.vue b/pages/doorkeeper-page/my-page/my-page.vue index 7862926..9f52d37 100644 --- a/pages/doorkeeper-page/my-page/my-page.vue +++ b/pages/doorkeeper-page/my-page/my-page.vue @@ -88,6 +88,13 @@ shape="circle" plain></u-button></view> </view> + <view class="loginout-we"> + <view class="loginout-main"><u-button text="鑱旂郴鎴戜滑" + type="primary" + shape="circle" + plain + @click="contactUs()"></u-button></view> + </view> <view class="logoutModel"> <u-modal :show="logoutShow" :title="logoutTitle" @@ -133,7 +140,8 @@ logoutShow: false, logoutTitle: '鎻愮ず', logoutContent: '鏄惁纭閫�鍑�', - BaseUrl + BaseUrl, + phoneList:[] }; }, methods: { @@ -150,6 +158,44 @@ }, init() { this.getUserEntity(); + uni.request({ + url: `${BaseUrl}/admin/dict/page`, + method: 'GET', + data: { + dictType:'Setings' + }, + header: { + Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'), + clientToc: 'Y', + 'CLIENT_TOC': 'Y', + }, + success: res => { + let dictId=res.data.data?.records[0].id + uni.request({ + url: `${BaseUrl}/admin/dict/item/page`, + method: 'GET', + data: { + dictId:dictId + }, + header: { + Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'), + clientToc: 'Y', + 'CLIENT_TOC': 'Y', + }, + success: res => { + res.data.data.records.forEach(item=>{ + if(item.description.includes('鑱旂郴')){ + this.phoneList=item.value.split(',') + } + }) + }, + fail: err => { + } + }) + }, + fail: err => { + } + }) }, getUserEntity() { uni.showLoading({ @@ -178,6 +224,19 @@ }, logoutCancel() { this.logoutShow = false; + }, + contactUs(){ + uni.showActionSheet({ + itemList: this.phoneList, + success: (res) => { + uni.makePhoneCall({ + phoneNumber:this.phoneList[res.tapIndex].split(":")[1] + }) + }, + fail: (err) => { + console.log('寮圭獥鍙栨秷'); + } + }); }, } }; @@ -382,5 +441,16 @@ width: 84%; } } + .loginout-we{ + width: 100%; + height: 74rpx; + @include flex; + justify-content: center; + position: relative; + bottom: vww(-500); + .loginout-main { + width: 84%; + } + } } </style> \ No newline at end of file -- Gitblit v1.9.1