首页接口对接

This commit is contained in:
仲么了
2023-04-07 08:50:21 +08:00
parent 06d06df88b
commit 99c1f1c0bc
4 changed files with 36 additions and 12 deletions

View File

@@ -1,12 +1,12 @@
import request from '../js/request';
import config from '../js/config';
export function queryDictData(dictType) {
export function queryDictData(dictTypeName) {
return request({
url: '/dict/queryDictData',
method: 'post',
url: '/dictData/getDicDataByTypeName',
method: 'get',
data: {
dictType,
dictTypeName,
},
});
}

20
common/api/mine.js Normal file
View File

@@ -0,0 +1,20 @@
import request from '../js/request';
import config from '../js/config';
export function queryPersonSet() {
return request({
url: '/appinfo/queryPersonSet',
method: 'post',
data: {},
});
}
export function queryAppInfo(id) {
return request({
url: '/appinfo/queryAppInfo',
method: 'post',
data: {
id,
},
});
}

View File

@@ -178,7 +178,7 @@ export default {
console.log(this.store);
}
this.getProjectList()
this.queryDictData()
// this.queryDictData()
},
getProjectList() {
getProjectList({
@@ -198,7 +198,7 @@ export default {
})
},
queryDictData() {
queryDictData('projectType').then(res => {
queryDictData('项目类型').then(res => {
this.projectType = [{
text: '全部类型',
value: ''

View File

@@ -33,7 +33,7 @@
<view class="mine-nav-label">公司介绍</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
<view class="mine-nav" @click="jump('feedback')" >
<view class="mine-nav" @click="jump('feedback')">
<view class="mine-nav-label">意见反馈</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
@@ -49,16 +49,19 @@
</template>
<script>
import { queryPersonSet } from '@/common/api/mine.js'
export default {
data () {
data() {
return {
loading: false
}
},
methods: {
init () {
async init() {
const res = await queryPersonSet()
console.log(res);
},
jump (type) {
jump(type) {
switch (type) {
case 'changePwd':
uni.navigateTo({
@@ -83,7 +86,7 @@ export default {
}
}
},
onLoad () {
onLoad() {
this.init()
},
}
@@ -92,6 +95,7 @@ export default {
<style lang="scss">
.mine {
padding-top: 20rpx;
.mine-header {
padding: 200rpx 34rpx 34rpx;
display: flex;
@@ -118,7 +122,7 @@ export default {
}
.mine-nav {
padding: 34rpx;
padding: 34rpx;
display: flex;
align-items: center;
background: $uni-theme-white;