feat: 平台资质与规范
This commit is contained in:
parent
adeac5fbbb
commit
0615277bff
70
pages/login/agree-link/index.js
Normal file
70
pages/login/agree-link/index.js
Normal file
@ -0,0 +1,70 @@
|
||||
import {
|
||||
getPlatformSpecDetails
|
||||
} from '~/services/login/getPlatformSpecDetails';
|
||||
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
detailsData: {}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
getPlatformSpecDetails({
|
||||
PlatformSpecGuid: options.guid
|
||||
}).then(res => {
|
||||
this.setData({
|
||||
detailsData: res.data
|
||||
})
|
||||
wx.setNavigationBarTitle({
|
||||
title: this.data.detailsData.platformSpecTitle
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
})
|
5
pages/login/agree-link/index.json
Normal file
5
pages/login/agree-link/index.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
},
|
||||
"navigationBarTitleText": ""
|
||||
}
|
3
pages/login/agree-link/index.wxml
Normal file
3
pages/login/agree-link/index.wxml
Normal file
@ -0,0 +1,3 @@
|
||||
<view style="width: 90%; margin: 40rpx auto; padding-bottom: 200rpx;">
|
||||
<rich-text nodes="{{detailsData.platformSpecContent}}"></rich-text>
|
||||
</view>
|
0
pages/login/agree-link/index.wxss
Normal file
0
pages/login/agree-link/index.wxss
Normal file
@ -6,6 +6,9 @@ import {
|
||||
import {
|
||||
getOpenId
|
||||
} from '~/services/login/getOpenId';
|
||||
import {
|
||||
getPlatformSpecList
|
||||
} from '~/services/login/getPlatformSpecList';
|
||||
|
||||
Page({
|
||||
/**
|
||||
@ -15,16 +18,14 @@ Page({
|
||||
back: true,
|
||||
bg_image: "",
|
||||
checked: true,
|
||||
code: ""
|
||||
code: "",
|
||||
agree_Link: {}
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 获取手机号
|
||||
getPhoneNumber(e) {
|
||||
let that = this
|
||||
console.log(that.data.checked,'asdasdas');
|
||||
if(that.data.checked == false){
|
||||
if (that.data.checked == false) {
|
||||
Toast({
|
||||
context: this,
|
||||
selector: '#t-toast',
|
||||
@ -69,6 +70,13 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//协议点击
|
||||
agreeLink(data) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/login/agree-link/index?guid=' + data.currentTarget.dataset.guid
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
@ -87,6 +95,12 @@ Page({
|
||||
})
|
||||
},
|
||||
});
|
||||
// 获取平台资质与规范列表
|
||||
getPlatformSpecList().then(res => {
|
||||
this.setData({
|
||||
agree_Link: res.data
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -20,8 +20,9 @@
|
||||
<van-checkbox icon-size="35rpx" value="{{ checked }}" checked-color="#fc2e2a" bind:change="onChangeChecked"></van-checkbox>
|
||||
<view class="agree-text">
|
||||
我已阅读并同意
|
||||
<span class="agree-link">《阿尔文电商用户协议》</span>
|
||||
<span class="agree-link">《阿尔文电商隐私政策》</span>
|
||||
<span class="agree-link" wx:for="{{agree_Link}}" bindtap='agreeLink' data-Guid='{{item.platformSpecGuid}}'>《{{item.platformSpecTitle}}》</span>
|
||||
<!-- <span class="agree-link">《阿尔文电商用户协议》</span>
|
||||
<span class="agree-link">《阿尔文电商隐私政策》</span> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
21
services/login/getPlatformSpecDetails.js
Normal file
21
services/login/getPlatformSpecDetails.js
Normal file
@ -0,0 +1,21 @@
|
||||
import {
|
||||
request
|
||||
} from '../_utils/request';
|
||||
|
||||
|
||||
/* 获取平台资质与规范列表 */
|
||||
export async function getPlatformSpecDetails(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: `PlatformSpecApi/getPlatformSpecDetails`,
|
||||
method: 'Get',
|
||||
data: data,
|
||||
success: function (res) {
|
||||
resolve(res);
|
||||
},
|
||||
fail: function (error) {
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
20
services/login/getPlatformSpecList.js
Normal file
20
services/login/getPlatformSpecList.js
Normal file
@ -0,0 +1,20 @@
|
||||
import {
|
||||
request
|
||||
} from '../_utils/request';
|
||||
|
||||
|
||||
/* 获取平台资质与规范列表 */
|
||||
export async 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