feat 添加设置页面的平台资质与规范

This commit is contained in:
AERWEN\26795 2023-10-25 16:07:39 +08:00
parent 2541c54d4b
commit c353a9d2ce
4 changed files with 55 additions and 4 deletions

View File

@ -1,5 +1,6 @@
// pages/usercenter/set/index.js
import { logout } from '~/services/usercenter/set/logout';
import { getPlatformSpecList } from '~/services/usercenter/set/getPlatformSpecList';
Page({
@ -7,9 +8,15 @@ Page({
* 页面的初始数据
*/
data: {
platformSpecList: []
},
//协议点击
onClickCell(data){
wx.navigateTo({
url: '/pages/login/agree-link/index?guid=' + data.currentTarget.dataset.guid
});
},
/** 登出 */
@ -22,7 +29,14 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
getPlatformSpecList().then((res) => {
if(res.code === 200){
console.log(res,'平台数据');
this.setData({
platformSpecList: res.data
})
}
})
},
/**

View File

@ -1,6 +1,7 @@
{
"usingComponents": {
"van-button": "@vant/weapp/button/index"
"van-button": "@vant/weapp/button/index",
"t-cell": "tdesign-miniprogram/cell/cell"
},
"navigationBarTitleText": "设置"
}

View File

@ -2,7 +2,24 @@
<view class="set-pos-box">
<t-cell-group>
<t-cell
wx:for="{{platformSpecList}}"
wx:for-item="xitem"
wx:for-index="xindex"
wx:key="xindex"
title="{{xitem.platformSpecTitle}}"
arrow="true"
bordered="{{false}}"
data-guid="{{xitem.platformSpecGuid}}"
bind:click="onClickCell"
t-class="t-cell-padding"
t-class-note="order-group-note"
t-class-left="order-group__left"
>
<!-- <t-icon name="{{xitem.icon}}" size="48rpx" slot="note" /> -->
</t-cell>
</t-cell-group>
<!-- 退出登录按钮 -->
<view class="log-out-btn-box">

View File

@ -0,0 +1,19 @@
import {
request
} from '../../_utils/request';
/** 获取平台资质与规范列表 */
export function getPlatformSpecList() {
return new Promise((resolve, reject) => {
request({
url: `PlatformSpecApi/getPlatformSpecList`,
method: 'GET',
success: function (res) {
resolve(res);
},
fail: function (error) {
reject(error);
}
});
});
}