This commit is contained in:
weipengfei 2023-08-31 15:49:26 +08:00
parent 2e98664b24
commit 2ba47e2248
7 changed files with 774 additions and 607 deletions

View File

@ -55,3 +55,8 @@ export const userInitiateContract = (data) => oahttp.post('/user/initiate_contra
* 发送短信 * 发送短信
*/ */
export const userPostsms = (data) => oahttp.post('/user/postsms', data) export const userPostsms = (data) => oahttp.post('/user/postsms', data)
/**
* 注销账号
*/
export const destroyAccount = (data) => oahttp.post('/user/destroy_account', data)

1203
pages.json

File diff suppressed because it is too large Load Diff

View File

@ -111,7 +111,7 @@
} }
}, },
click(item) { click(item) {
// Toast('') // Toast('')
return return
this.myEventList = [] this.myEventList = []
this.params.page = '1' this.params.page = '1'

View File

@ -0,0 +1,141 @@
<template>
<view style="padding: 28rpx 0;">
<view class="other_guide">
<block v-for="(item,i) in myOaData" :key="i">
<view class="other_item flex_a_c_j_sb" @click="clickItem(item)">
<view class="flex_a_c left">
<!-- <view class="iconfont2" :class="item.icon"></view> -->
<image v-if="item.icon" :src="item.icon"></image>
<view class="text">{{ item.name }}</view>
</view>
<view style="display: flex;align-items: center;">
<view v-if="i==0">{{version}}</view>
<uni-icons type="forward"></uni-icons>
</view>
</view>
</block>
</view>
<view class="us" @click="copyPhone">
<view>联系我们</view>
<view>0830-2669767</view>
</view>
</view>
</template>
<script>
import { Toast } from '../../libs/uniApi';
import { destroyAccount } from '@/api/oaUser.js';
export default {
data() {
return {
myOaData: [
{
name: '版本更新'
},
{
name: '注销账户'
},
{
name: '联系我们'
},
],
version: '',
us: "0830-2669767",
};
},
onLoad() {
let os = uni.getSystemInfoSync();
this.version = 'v' + os.appVersion;
},
methods:{
clickItem(e){
switch(e.name){
case '版本更新': this.updateVersion();break;
case '注销账户': this.unsubscribe();break;
case '联系我们': this.connectUs();break;
}
},
updateVersion(){
this.$store.dispatch('initConfig', true);
},
async unsubscribe(){
uni.showModal({
content: '注销账号后不可恢复,确认要注销吗?',
success: async (e)=> {
if(e.confirm){
let res = await destroyAccount();
uni.reLaunch({
url: '/pages/oaLogin/oaLogin'
})
}
}
})
},
connectUs(){
//
uni.makePhoneCall({
phoneNumber: this.us + "",
success: (e) => {
console.log(e);
},
fail: (e) => {
Toast('页面跳转失败,请检查是否开启权限');
this.copyPhone();
}
});
},
copyPhone(){
//
uni.setClipboardData({
data: this.us + "",
showToast: false,
success: (e) => {
Toast('号码已复制')
},
fail: (e) => {
Toast('复制失败')
}
})
}
}
}
</script>
<style lang="scss">
.other_guide {
width: 694.74rpx;
margin: 0 auto;
padding: 28.07rpx;
background-color: #fff;
border-radius: 12px;
.other_item {
height: 87.72rpx;
border-bottom: 1px solid #F0F5F7;
.text {
font-size: 28.07rpx;
margin-left: 20.56rpx;
}
.left {
align-items: center;
}
image {
width: 42rpx;
height: 42rpx;
}
.iconfont2 {
font-size: 42.11rpx;
}
}
}
.us{
margin: 60rpx 0;
text-align: center;
color: #aaa;
}
</style>

View File

@ -43,27 +43,39 @@ const mutations = {
}; };
const actions = { const actions = {
async initConfig({ state, commit }) { async initConfig({ state, commit }, data = false) {
let res = await getConfig(); let res = await getConfig();
commit('SET_CONFIG', res.data); commit('SET_CONFIG', res.data);
let os = uni.getSystemInfoSync(); let os = uni.getSystemInfoSync();
// #ifdef APP-PLUS
if(data) uni.showLoading({
title: '检查更新中'
})
// 版本更新 // 版本更新
if(compareVersions(res.data.version, os.appVersion)==1){ if(compareVersions(res.data.version, os.appVersion)==1){
try{ try{
let info = res.data.versionInfo||{}; let info = res.data.version_info||{};
info = { info = {
title: info.title||'发现新版本', title: info.title||'发现新版本',
content: info.content||'修复了部分BUG', content: info.content||'修复了部分BUG',
versionName: info.versionName||'1.0.1', versionName: info.version||'1.0.1',
downUrl: info.downUrl||'https://lihai001.oss-cn-chengdu.aliyuncs.com/__UNI__B5B1EDD__20230816174515.apk', downUrl: info.dow_url||'',
force: info.force||false, // 是否强制更新 force: info.force==1?true:false, // 是否强制更新
quiet: info.quiet||false // 是否静默更新 quiet: info.quiet==1?true:false // 是否静默更新
} }
Updater.update(info); Updater.update(info);
}catch(e){ }catch(e){
console.log(e); console.log(e);
} }
if(data) uni.hideLoading();
}else if(data){
uni.hideLoading();
uni.showToast({
title: '已经是最新版本了',
icon: 'none'
})
} }
// #endif
} }
}; };

View File

@ -267,7 +267,7 @@
// //
async addArchives() { async addArchives() {
try { try {
// Toast('') // Toast('')
// let refsDatas = this.loadRefsDatas(); // let refsDatas = this.loadRefsDatas();
// let flag1 = await this.$refs.districtSelectorRef.validate(); // let flag1 = await this.$refs.districtSelectorRef.validate();
await this.$refs.residentsRef.validate(); await this.$refs.residentsRef.validate();

View File

@ -153,11 +153,11 @@
// }) // })
}, },
retreat() { retreat() {
Toast('开发中') Toast('暂无内容')
}, },
hand() { hand() {
if(!this.shareholder.is_amount_turned) return Toast('暂时无法上交'); if(!this.shareholder.is_amount_turned) return Toast('暂时无法上交');
Toast('开发中') Toast('暂无内容')
} }
} }
} }