From 0615277bff607890813c3fef9b06cea43da16a4d Mon Sep 17 00:00:00 2001 From: Cxpller Date: Wed, 25 Oct 2023 11:22:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B9=B3=E5=8F=B0=E8=B5=84=E8=B4=A8?= =?UTF-8?q?=E4=B8=8E=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/login/agree-link/index.js | 70 ++++++++++++++++++++++++ pages/login/agree-link/index.json | 5 ++ pages/login/agree-link/index.wxml | 3 + pages/login/agree-link/index.wxss | 0 pages/login/login.js | 24 ++++++-- pages/login/login.wxml | 5 +- services/login/getPlatformSpecDetails.js | 21 +++++++ services/login/getPlatformSpecList.js | 20 +++++++ 8 files changed, 141 insertions(+), 7 deletions(-) create mode 100644 pages/login/agree-link/index.js create mode 100644 pages/login/agree-link/index.json create mode 100644 pages/login/agree-link/index.wxml create mode 100644 pages/login/agree-link/index.wxss create mode 100644 services/login/getPlatformSpecDetails.js create mode 100644 services/login/getPlatformSpecList.js diff --git a/pages/login/agree-link/index.js b/pages/login/agree-link/index.js new file mode 100644 index 0000000..fef71d1 --- /dev/null +++ b/pages/login/agree-link/index.js @@ -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() { + + }, +}) \ No newline at end of file diff --git a/pages/login/agree-link/index.json b/pages/login/agree-link/index.json new file mode 100644 index 0000000..81a4e80 --- /dev/null +++ b/pages/login/agree-link/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + }, + "navigationBarTitleText": "" +} \ No newline at end of file diff --git a/pages/login/agree-link/index.wxml b/pages/login/agree-link/index.wxml new file mode 100644 index 0000000..bbd37ed --- /dev/null +++ b/pages/login/agree-link/index.wxml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/pages/login/agree-link/index.wxss b/pages/login/agree-link/index.wxss new file mode 100644 index 0000000..e69de29 diff --git a/pages/login/login.js b/pages/login/login.js index 6a5f882..7cee814 100644 --- a/pages/login/login.js +++ b/pages/login/login.js @@ -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 + }) + }) }, /** diff --git a/pages/login/login.wxml b/pages/login/login.wxml index 604820a..418aa66 100644 --- a/pages/login/login.wxml +++ b/pages/login/login.wxml @@ -20,8 +20,9 @@ 我已阅读并同意 - 《阿尔文电商用户协议》 - 《阿尔文电商隐私政策》 + 《{{item.platformSpecTitle}}》 + diff --git a/services/login/getPlatformSpecDetails.js b/services/login/getPlatformSpecDetails.js new file mode 100644 index 0000000..8dbcbfb --- /dev/null +++ b/services/login/getPlatformSpecDetails.js @@ -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); + } + }); + }); +} \ No newline at end of file diff --git a/services/login/getPlatformSpecList.js b/services/login/getPlatformSpecList.js new file mode 100644 index 0000000..cf8884f --- /dev/null +++ b/services/login/getPlatformSpecList.js @@ -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); + } + }); + }); +}