feat 添加设置页面的平台资质与规范
This commit is contained in:
parent
2541c54d4b
commit
c353a9d2ce
@ -1,5 +1,6 @@
|
|||||||
// pages/usercenter/set/index.js
|
// pages/usercenter/set/index.js
|
||||||
import { logout } from '~/services/usercenter/set/logout';
|
import { logout } from '~/services/usercenter/set/logout';
|
||||||
|
import { getPlatformSpecList } from '~/services/usercenter/set/getPlatformSpecList';
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
@ -7,9 +8,15 @@ Page({
|
|||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
|
platformSpecList: []
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//协议点击
|
||||||
|
onClickCell(data){
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/login/agree-link/index?guid=' + data.currentTarget.dataset.guid
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
/** 登出 */
|
/** 登出 */
|
||||||
@ -22,7 +29,14 @@ Page({
|
|||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
getPlatformSpecList().then((res) => {
|
||||||
|
if(res.code === 200){
|
||||||
|
console.log(res,'平台数据');
|
||||||
|
this.setData({
|
||||||
|
platformSpecList: res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"van-button": "@vant/weapp/button/index"
|
"van-button": "@vant/weapp/button/index",
|
||||||
|
"t-cell": "tdesign-miniprogram/cell/cell"
|
||||||
},
|
},
|
||||||
"navigationBarTitleText": "设置"
|
"navigationBarTitleText": "设置"
|
||||||
}
|
}
|
@ -2,7 +2,24 @@
|
|||||||
|
|
||||||
<view class="set-pos-box">
|
<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 class="log-out-btn-box">
|
||||||
|
19
services/usercenter/set/getPlatformSpecList.js
Normal file
19
services/usercenter/set/getPlatformSpecList.js
Normal 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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user