no message
This commit is contained in:
parent
eedce9ecb6
commit
6e8e590ec5
2
app.js
2
app.js
@ -201,9 +201,7 @@ App({
|
|||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.globalData.iswechatmessagepushState = false
|
this.globalData.iswechatmessagepushState = false
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: function (method) {
|
watch: function (method) {
|
||||||
|
7
app.json
7
app.json
@ -19,6 +19,13 @@
|
|||||||
"navigationBarBackgroundColor": "#ffffff",
|
"navigationBarBackgroundColor": "#ffffff",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
},
|
},
|
||||||
|
"subpackages": [{
|
||||||
|
"root": "pagesSquare",
|
||||||
|
"name": "pagesSquare",
|
||||||
|
"pages": [
|
||||||
|
"pages/PCAuthorization/PCAuthorization"
|
||||||
|
]
|
||||||
|
}],
|
||||||
"style": "v2",
|
"style": "v2",
|
||||||
"componentFramework": "glass-easel",
|
"componentFramework": "glass-easel",
|
||||||
"sitemapLocation": "sitemap.json",
|
"sitemapLocation": "sitemap.json",
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="offer_list">
|
<template name="offer_list">
|
||||||
<navigator class='item' url='../../index/offer_details/index?id={{ item.id }}'>
|
<navigator class='item' url='../../index/offer_details/index?id={{ item.id }}'>
|
||||||
<view class='school'>{{ item.schoolname }}</view>
|
<view class='school'>{{ item.schoolname }}</view>
|
||||||
|
@ -48,22 +48,22 @@ Component({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newVal && newVal['uid'] > 0 && iswechatmessagepush == null) {
|
// if (newVal && newVal['uid'] > 0 && iswechatmessagepush == null) {
|
||||||
if (app.globalData.iswechatmessagepushState >= 0) return
|
// if (app.globalData.iswechatmessagepushState >= 0) return
|
||||||
app.globalData.iswechatmessagepushState = 0
|
// app.globalData.iswechatmessagepushState = 0
|
||||||
app.judgeWechatAlertsPop().then(res => {
|
// app.judgeWechatAlertsPop().then(res => {
|
||||||
let iswechatmessagepush = res.iswechatmessagepush
|
// let iswechatmessagepush = res.iswechatmessagepush
|
||||||
let capsulePopState = false
|
// let capsulePopState = false
|
||||||
if (iswechatmessagepush == 0 && app.globalData['ishongkonganswer'] === 0) {
|
// if (iswechatmessagepush == 0 && app.globalData['ishongkonganswer'] === 0) {
|
||||||
capsulePopState = true
|
// capsulePopState = true
|
||||||
} else {
|
// } else {
|
||||||
capsulePopState = false
|
// capsulePopState = false
|
||||||
}
|
// }
|
||||||
this.setData({
|
// this.setData({
|
||||||
capsulePopState
|
// capsulePopState
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (iswechatmessagepush == 0 && app.globalData['ishongkonganswer'] === 0) {
|
if (iswechatmessagepush == 0 && app.globalData['ishongkonganswer'] === 0) {
|
||||||
this.setData({
|
this.setData({
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"component": true,
|
"component": true,
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"wechat-alerts-pop": "/component/wechatAlertsPop/wechatAlertsPop",
|
|
||||||
"rent-pop": "/component/rent-pop/rent-pop",
|
"rent-pop": "/component/rent-pop/rent-pop",
|
||||||
"open-ad": "/component/open-ad/open-ad"
|
"open-ad": "/component/open-ad/open-ad"
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<wechat-alerts-pop capsulePopState="{{ capsulePopState }}"></wechat-alerts-pop>
|
|
||||||
<rent-pop popup="{{ popup }}"></rent-pop>
|
<rent-pop popup="{{ popup }}"></rent-pop>
|
||||||
<open-ad openDate="{{ openDate }}"></open-ad>
|
<open-ad openDate="{{ openDate }}"></open-ad>
|
||||||
</view>
|
</view>
|
@ -50,7 +50,10 @@
|
|||||||
<view class="box" catch:tap="return">
|
<view class="box" catch:tap="return">
|
||||||
<image class="sun" src="https://app.gter.net/image/miniApp/offer/sun-icon.png"></image>
|
<image class="sun" src="https://app.gter.net/image/miniApp/offer/sun-icon.png"></image>
|
||||||
<view class="title">意见反馈</view>
|
<view class="title">意见反馈</view>
|
||||||
<view class="hint">项目库正在火热公测中!发现有错误的地方\n告诉我呀!有建议也欢迎来聊聊~</view>
|
<view class="hint">
|
||||||
|
<view>项目库正在火热公测中!发现有错误的地方</view>
|
||||||
|
<view>告诉我呀!有建议也欢迎来聊聊~</view>
|
||||||
|
</view>
|
||||||
<view class="case flexcenter">
|
<view class="case flexcenter">
|
||||||
<view class="QRcode flexcenter">
|
<view class="QRcode flexcenter">
|
||||||
<image class="img" src="https://app.gter.net/image/miniApp/offer/brother-onion.png" mode="widthFix" show-menu-by-longpress></image>
|
<image class="img" src="https://app.gter.net/image/miniApp/offer/brother-onion.png" mode="widthFix" show-menu-by-longpress></image>
|
||||||
|
@ -9,7 +9,7 @@ Component({
|
|||||||
list: {
|
list: {
|
||||||
type: Object,
|
type: Object,
|
||||||
observer(res) {
|
observer(res) {
|
||||||
console.log("res", res);
|
// console.log("res", res);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
value: String,
|
value: String,
|
||||||
|
@ -115,7 +115,6 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
rankingsObj: data.rankings,
|
rankingsObj: data.rankings,
|
||||||
})
|
})
|
||||||
|
|
||||||
this.getData()
|
this.getData()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -133,7 +132,6 @@ Page({
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
const data = res.data
|
const data = res.data
|
||||||
common.decodeKey(data.info).then(res => {
|
common.decodeKey(data.info).then(res => {
|
||||||
console.log("res", res);
|
|
||||||
data.info = res
|
data.info = res
|
||||||
|
|
||||||
let course = {
|
let course = {
|
||||||
@ -201,7 +199,6 @@ Page({
|
|||||||
if (month > semester.month && year + 1 <= semester.year) info['semesterState'] = true
|
if (month > semester.month && year + 1 <= semester.year) info['semesterState'] = true
|
||||||
|
|
||||||
let scores = info.language_proficiency_scores || []
|
let scores = info.language_proficiency_scores || []
|
||||||
console.log(scores);
|
|
||||||
const scoresList = scores
|
const scoresList = scores
|
||||||
.map(element => {
|
.map(element => {
|
||||||
let text = ""
|
let text = ""
|
||||||
|
@ -994,11 +994,13 @@ navigator {
|
|||||||
color: #000000;
|
color: #000000;
|
||||||
line-height: 51rpx;
|
line-height: 51rpx;
|
||||||
margin-bottom: 15rpx;
|
margin-bottom: 15rpx;
|
||||||
|
padding: 0 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.english {
|
.english {
|
||||||
font-size: 21rpx;
|
font-size: 21rpx;
|
||||||
color: #7F7F7F;
|
color: #7F7F7F;
|
||||||
|
padding: 0 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -436,8 +436,7 @@
|
|||||||
<view class="title">申请页项目详情</view>
|
<view class="title">申请页项目详情</view>
|
||||||
<view class="text">{{ info.catalog_url }}</view>
|
<view class="text">{{ info.catalog_url }}</view>
|
||||||
<view class="btn flexcenter" bind:tap="copy" data-text="{{ info.catalog_url }}">
|
<view class="btn flexcenter" bind:tap="copy" data-text="{{ info.catalog_url }}">
|
||||||
<image class="icon" src="https://app.gter.net/image/miniApp/offer/copy-icon.png" mode="widthFix">
|
<image class="icon" src="https://app.gter.net/image/miniApp/offer/copy-icon.png" mode="widthFix"></image>
|
||||||
</image>
|
|
||||||
复制链接
|
复制链接
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -476,7 +475,6 @@
|
|||||||
<view class="block" wx:if="{{ info.positions }}">
|
<view class="block" wx:if="{{ info.positions }}">
|
||||||
<project-show-text titleName="职业岗位" className="positions" text="{{ info.positions || '- 暂无 -' }}"></project-show-text>
|
<project-show-text titleName="职业岗位" className="positions" text="{{ info.positions || '- 暂无 -' }}"></project-show-text>
|
||||||
</view>
|
</view>
|
||||||
<!-- </block> -->
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view wx:if="{{ offerList.length != 0 }}" class="side-item" data-type="consult">
|
<view wx:if="{{ offerList.length != 0 }}" class="side-item" data-type="consult">
|
||||||
|
@ -822,10 +822,12 @@ navigator {
|
|||||||
color: #000000;
|
color: #000000;
|
||||||
line-height: 51rpx;
|
line-height: 51rpx;
|
||||||
margin-bottom: 15rpx;
|
margin-bottom: 15rpx;
|
||||||
|
padding: 0 10rpx;
|
||||||
}
|
}
|
||||||
.details-box .degree .english {
|
.details-box .degree .english {
|
||||||
font-size: 21rpx;
|
font-size: 21rpx;
|
||||||
color: #7F7F7F;
|
color: #7F7F7F;
|
||||||
|
padding: 0 10rpx;
|
||||||
}
|
}
|
||||||
.details-box .issue-bj {
|
.details-box .issue-bj {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
@ -371,8 +371,8 @@ Page({
|
|||||||
// 点击跳转 招生官频道
|
// 点击跳转 招生官频道
|
||||||
goAdmission() {
|
goAdmission() {
|
||||||
wx.navigateToMiniProgram({
|
wx.navigateToMiniProgram({
|
||||||
appId:"wxa9296b07391c2bc7",
|
appId: "wxa9296b07391c2bc7",
|
||||||
path:"/pages/admissionList/admissionList"
|
path: "/pages/admissionList/admissionList"
|
||||||
})
|
})
|
||||||
// common.goPage("/pages/admissionList/admissionList")
|
// common.goPage("/pages/admissionList/admissionList")
|
||||||
},
|
},
|
||||||
@ -688,7 +688,7 @@ Page({
|
|||||||
title: "聚焦港校项目,助你迈向国际名校之路!",
|
title: "聚焦港校项目,助你迈向国际名校之路!",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onShareTimeline() {
|
onShareTimeline() {
|
||||||
util.statistics({
|
util.statistics({
|
||||||
name: "share-timeline"
|
name: "share-timeline"
|
||||||
|
@ -48,20 +48,7 @@ view {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.header-brief {
|
.header-brief {
|
||||||
// font-size: 25.5rpx;
|
|
||||||
// letter-spacing: 1.65rpx;
|
|
||||||
// color: #333333;
|
|
||||||
// width: 100%;
|
|
||||||
border-bottom: 1rpx solid rgb(121, 121, 121);
|
border-bottom: 1rpx solid rgb(121, 121, 121);
|
||||||
// padding-top: 5rpx;
|
|
||||||
// padding-bottom: 6rpx;
|
|
||||||
// text-align: center;
|
|
||||||
// justify-content: space-between;
|
|
||||||
|
|
||||||
// .brief-icon {
|
|
||||||
// width: 36rpx;
|
|
||||||
// height: 36rpx;
|
|
||||||
// }
|
|
||||||
height: 43.5rpx;
|
height: 43.5rpx;
|
||||||
line-height: 43.5rpx;
|
line-height: 43.5rpx;
|
||||||
letter-spacing: normal;
|
letter-spacing: normal;
|
||||||
|
@ -7,10 +7,7 @@
|
|||||||
<view class="header-title">
|
<view class="header-title">
|
||||||
<image class="header-title-icon" mode="widthFix" src="https://app.gter.net/image/miniApp/offer/xg-icon.png"></image>
|
<image class="header-title-icon" mode="widthFix" src="https://app.gter.net/image/miniApp/offer/xg-icon.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="header-brief flexacenter">
|
<view class="header-brief flexacenter">700+项目轻松查 快速比</view>
|
||||||
700+项目轻松查 快速比
|
|
||||||
<!-- 港校项目<image class="brief-icon" mode="widthFix" src="https://app.gter.net/image/miniApp/offer/vs-header-icon.png"></image>港校项目 -->
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="header-right">
|
<view class="header-right">
|
||||||
<image class="header-right-icon" mode="widthFix" src="https://app.gter.net/image/miniApp/offer/xg-project-list-icon.svg"></image>
|
<image class="header-right-icon" mode="widthFix" src="https://app.gter.net/image/miniApp/offer/xg-project-list-icon.svg"></image>
|
||||||
@ -79,7 +76,6 @@
|
|||||||
</view>
|
</view>
|
||||||
加入对比单
|
加入对比单
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -111,7 +111,6 @@ Page({
|
|||||||
for (let i = 0; i < hotList.length; i += 2) {
|
for (let i = 0; i < hotList.length; i += 2) {
|
||||||
twoDimensionalArray.push(hotList.slice(i, i + 2));
|
twoDimensionalArray.push(hotList.slice(i, i + 2));
|
||||||
}
|
}
|
||||||
console.log("data", data);
|
|
||||||
this.setData({
|
this.setData({
|
||||||
info: data.info,
|
info: data.info,
|
||||||
hotList: twoDimensionalArray,
|
hotList: twoDimensionalArray,
|
||||||
@ -154,23 +153,18 @@ Page({
|
|||||||
|
|
||||||
list.forEach(element => {
|
list.forEach(element => {
|
||||||
const semester = element.semester || {}
|
const semester = element.semester || {}
|
||||||
|
|
||||||
if (month > semester.month && year + 1 <= semester.year) element['semesterState'] = true
|
if (month > semester.month && year + 1 <= semester.year) element['semesterState'] = true
|
||||||
|
|
||||||
element['tuition_fee_text'] = common.formatNumberWithSpaces(element.tuition_fee)
|
element['tuition_fee_text'] = common.formatNumberWithSpaces(element.tuition_fee)
|
||||||
element['random'] = app.randomString(6)
|
element['random'] = app.randomString(6)
|
||||||
element['rankk'] = this.convertRankToRankText(element.rank)
|
element['rankk'] = this.convertRankToRankText(element.rank)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
this.listAll = list
|
this.listAll = list
|
||||||
this.screenList = list
|
this.screenList = list
|
||||||
this.setData({
|
this.setData({
|
||||||
count: data.count,
|
count: data.count,
|
||||||
})
|
})
|
||||||
|
|
||||||
this.screenData()
|
this.screenData()
|
||||||
|
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
@ -190,14 +184,10 @@ Page({
|
|||||||
calculateShowList() {
|
calculateShowList() {
|
||||||
const limit = 20
|
const limit = 20
|
||||||
let screenList = this.screenList
|
let screenList = this.screenList
|
||||||
|
|
||||||
let page = this.data.page
|
let page = this.data.page
|
||||||
|
|
||||||
if (page == 0) return
|
if (page == 0) return
|
||||||
|
|
||||||
const startIndex = (page - 1) * limit;
|
const startIndex = (page - 1) * limit;
|
||||||
const endIndex = startIndex + limit;
|
const endIndex = startIndex + limit;
|
||||||
|
|
||||||
let list = screenList.slice(startIndex, endIndex);
|
let list = screenList.slice(startIndex, endIndex);
|
||||||
|
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -219,14 +209,10 @@ Page({
|
|||||||
let screenList = this.screenList
|
let screenList = this.screenList
|
||||||
|
|
||||||
let list = []
|
let list = []
|
||||||
if (disciplineid > 0) {
|
if (disciplineid > 0) screenList = listAll.filter(item => item.disciplineid === disciplineid);
|
||||||
screenList = listAll.filter(item => item.disciplineid === disciplineid);
|
else if (university) screenList = listAll.filter(item => item.department === university);
|
||||||
} else if (university) {
|
else screenList = this.listAll
|
||||||
screenList = listAll.filter(item => item.department === university);
|
|
||||||
} else {
|
|
||||||
screenList = this.listAll
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sort == 0) {
|
if (sort == 0) {
|
||||||
screenList.sort((a, b) => {
|
screenList.sort((a, b) => {
|
||||||
// a 排在后面
|
// a 排在后面
|
||||||
@ -635,7 +621,6 @@ Page({
|
|||||||
|
|
||||||
this.getinit()
|
this.getinit()
|
||||||
this.getProjectData()
|
this.getProjectData()
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
531
pagesSquare/pages/PCAuthorization/PCAuthorization.js
Normal file
531
pagesSquare/pages/PCAuthorization/PCAuthorization.js
Normal file
@ -0,0 +1,531 @@
|
|||||||
|
// pagesSquare/pages/PCAuthorization/PCAuthorization.js
|
||||||
|
import {
|
||||||
|
closePage
|
||||||
|
} from "../../../utils/miucms"
|
||||||
|
import http from "./http/http"
|
||||||
|
var miucms = require('../../../utils/miucms')
|
||||||
|
let app = getApp()
|
||||||
|
Page({
|
||||||
|
/**
|
||||||
|
* 1:触发授权手机号页面, authorizedLog
|
||||||
|
* 2:询问用户是否已有寄托账号, account 选择是创建新账号还是绑定就账号
|
||||||
|
* 3:直接登录成功 直接首页 |
|
||||||
|
* 4:跳转设置头像名称页面 4:询问用户是否已有寄托账号(废弃),并拉起用户资料授权, account 区别是授权 (已经删除了)
|
||||||
|
* 5:请在PC完善资料 nowAccount 弹出提示电脑完成信息
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
screen_data: {},
|
||||||
|
top: 0,
|
||||||
|
title: "欢迎来到寄托天下",
|
||||||
|
tab: "", // oldAccount nowAccount authorizedLog account
|
||||||
|
bjurl: "https://app.gter.net/image/miniApp/offer/u34.png", // u34 u55
|
||||||
|
info: {},
|
||||||
|
query: '', // 扫码获取到的 参数
|
||||||
|
oldAccountUsername: "", // 绑定寄托账号的数据
|
||||||
|
oldAccountPassword: "", // 绑定寄托账号的数据
|
||||||
|
|
||||||
|
isaccredit: false,
|
||||||
|
canIUseGetUserProfile: false,
|
||||||
|
phoneNumber: {},
|
||||||
|
getUserInfoData: {},
|
||||||
|
getUserInfoState: false,
|
||||||
|
synchronizeState: false,
|
||||||
|
token: "",
|
||||||
|
isbing: 0, // 是否是offer榜小程序的绑定账号
|
||||||
|
isScanQR: false, // 是否是扫码进来
|
||||||
|
hintTickState: false, // 下面条款的确定按钮状态
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
|
||||||
|
onLoad: function (query) {
|
||||||
|
|
||||||
|
let screen_data = app.globalData.screen_data
|
||||||
|
let top = 300 / 750 * screen_data.windowWidth + screen_data.totalTopHeight
|
||||||
|
this.setData({
|
||||||
|
screen_data,
|
||||||
|
top,
|
||||||
|
query,
|
||||||
|
token: query.token,
|
||||||
|
status: query.status,
|
||||||
|
isbing: query.isbing,
|
||||||
|
// getUserInfoState: app.globalData.getUserInfoData ? true : false
|
||||||
|
})
|
||||||
|
|
||||||
|
let that = this
|
||||||
|
miucms.pageStart(app).then(res => {
|
||||||
|
that.init()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
init() {
|
||||||
|
// if (JSON.stringify(this.data.query) == "{}") return
|
||||||
|
if (this.data.token) {
|
||||||
|
let tab = ""
|
||||||
|
let status = this.data.status
|
||||||
|
if (status == 1) tab = "authorizedLog"
|
||||||
|
else if (status == 2) tab = "account"
|
||||||
|
else tab = "authorizedLog"
|
||||||
|
this.setData({
|
||||||
|
tab
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let code = ""
|
||||||
|
let that = this
|
||||||
|
wx.login({
|
||||||
|
success: function (res) {
|
||||||
|
code = res.code
|
||||||
|
http.wxpost('/api/applets/init', {
|
||||||
|
code,
|
||||||
|
options: app.globalData.options,
|
||||||
|
query: that.data.query
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
that.setData({
|
||||||
|
info: res.data,
|
||||||
|
tab: res.data.status == 1 ? 'authorizedLog' : res.data.status == 2 ? 'account' : res.data.status == 4 ? 'account' : '',
|
||||||
|
islogin: app.globalData.user.uid > 0 ? true : false,
|
||||||
|
canIUseGetUserProfile: app.globalData.canIUseGetUserProfile,
|
||||||
|
isScanQR: true,
|
||||||
|
token: res.data.token
|
||||||
|
})
|
||||||
|
|
||||||
|
if (res.data.status == 3) {
|
||||||
|
wx.showToast({ // 登录成功
|
||||||
|
title: '登录成功',
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000,
|
||||||
|
success: () => {
|
||||||
|
console.log('成功');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
setTimeout(function () {
|
||||||
|
that.backHome() // 跳转首页
|
||||||
|
}, 2000)
|
||||||
|
} else if (res.data.status == 2) {
|
||||||
|
that.setData({
|
||||||
|
getUserInfoState: true,
|
||||||
|
tab: 'account'
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 4) {
|
||||||
|
that.status = 4
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '/pages/setAvatarNickname/setAvatarNickname?token=' + (that.data.token || that.data.info.token),
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 1) {
|
||||||
|
that.setData({
|
||||||
|
tab: 'authorizedLog'
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 5) {
|
||||||
|
that.setData({
|
||||||
|
tab: 'nowAccount'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail: function () {
|
||||||
|
that.init()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
status: null, // 专门第4步的
|
||||||
|
getPhoneNumber(e) {
|
||||||
|
let that = this
|
||||||
|
let code = ""
|
||||||
|
|
||||||
|
if (e.detail.errMsg == 'getPhoneNumber:ok') {
|
||||||
|
this.setData({
|
||||||
|
phoneNumber: e.detail
|
||||||
|
})
|
||||||
|
wx.login({
|
||||||
|
success: function (res) {
|
||||||
|
code = res.code
|
||||||
|
http.wxpost('/api/applets/obtainMobile', {
|
||||||
|
token: that.data.info.token || that.data.token,
|
||||||
|
encryptedData: e.detail.encryptedData,
|
||||||
|
iv: e.detail.iv,
|
||||||
|
cloudID: e.detail.cloudID,
|
||||||
|
code
|
||||||
|
}).then(res => {
|
||||||
|
|
||||||
|
if (res.data.status == 3) {
|
||||||
|
wx.showToast({ // 登录成功
|
||||||
|
title: '登录成功',
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
app.globalData.setSate = true
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
app.globalData.setSate = true
|
||||||
|
wx.navigateBack({
|
||||||
|
delta: 1,
|
||||||
|
fail: function () {
|
||||||
|
that.backHome()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// that.backHome() // 跳转首页
|
||||||
|
}, 2000)
|
||||||
|
} else if (res.data.status == 2) {
|
||||||
|
that.setData({
|
||||||
|
getUserInfoState: true,
|
||||||
|
tab: 'account'
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 4) {
|
||||||
|
that.status = 4
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '/pages/setAvatarNickname/setAvatarNickname?token=' + (that.data.token || that.data.info.token),
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 1) {
|
||||||
|
that.setData({
|
||||||
|
tab: 'authorizedLog'
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 5) {
|
||||||
|
if (!that.data.isScanQR) {
|
||||||
|
wx.showToast({ // 登录成功
|
||||||
|
title: '登录成功',
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
setTimeout(function () {
|
||||||
|
app.globalData.setSate = true
|
||||||
|
wx.navigateBack({
|
||||||
|
delta: 1,
|
||||||
|
fail: function () {
|
||||||
|
that.backHome()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 2000)
|
||||||
|
} else {
|
||||||
|
that.setData({
|
||||||
|
tab: 'nowAccount'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
app.globalData.user = res.data.user
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onShow: function () {
|
||||||
|
if (this.status == 4) {
|
||||||
|
this.setData({
|
||||||
|
tab: "account"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
account(e) {
|
||||||
|
let tab = e
|
||||||
|
let title = tab == 'nowAccount' ? '账号创建成功' : '绑定已有寄托账号'
|
||||||
|
this.setData({
|
||||||
|
tab,
|
||||||
|
title,
|
||||||
|
bjurl: 'https://app.gter.net/image/miniApp/offer/u55.png'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
backPreviousStep() {
|
||||||
|
this.setData({
|
||||||
|
tab: 'account',
|
||||||
|
title: '是否已有寄托账号?',
|
||||||
|
bjurl: 'https://app.gter.net/image/miniApp/offer/u34.png'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 一键创建新账号
|
||||||
|
createAccount() {
|
||||||
|
let that = this
|
||||||
|
http.wxpost('/api/applets/create', {
|
||||||
|
token: this.data.info.token || this.data.token
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (res.data.status == 3) {
|
||||||
|
if (!that.data.isScanQR) {
|
||||||
|
wx.showToast({ // 登录成功
|
||||||
|
title: that.data.isbing == 1 ? '绑定成功' : '登录成功',
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
app.globalData.setSate = true
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
that.backHome() // 跳转首页
|
||||||
|
}, 2000)
|
||||||
|
} else that.account('nowAccount')
|
||||||
|
} else if (res.data.status == 1) {
|
||||||
|
that.setData({
|
||||||
|
tab: 'authorizedLog'
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 2) {
|
||||||
|
that.setData({
|
||||||
|
getUserInfoState: true,
|
||||||
|
tab: 'account'
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 4) {
|
||||||
|
that.status = 4
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '/pages/setAvatarNickname/setAvatarNickname?token=' + that.data.token,
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 5) {
|
||||||
|
if (!that.data.isScanQR) {
|
||||||
|
wx.showToast({ // 登录成功
|
||||||
|
title: '登录成功',
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
setTimeout(function () {
|
||||||
|
app.globalData.setSate = true
|
||||||
|
wx.navigateBack({
|
||||||
|
delta: 1,
|
||||||
|
fail: function () {
|
||||||
|
that.backHome()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// that.backHome() // 跳转首页
|
||||||
|
}, 2000)
|
||||||
|
} else {
|
||||||
|
that.setData({
|
||||||
|
tab: 'nowAccount'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (res.data.user) app.globalData.user = res.data.user
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 绑定已有账号跳转
|
||||||
|
bindingAccount() {
|
||||||
|
this.account('oldAccount')
|
||||||
|
},
|
||||||
|
|
||||||
|
// 绑定已有账号 提交按钮
|
||||||
|
bindingAccountSubmitBtn() {
|
||||||
|
if (!this.data.hintTickState) {
|
||||||
|
wx.showToast({
|
||||||
|
title: '请阅读并勾选同意',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let that = this
|
||||||
|
http.wxpost('/api/applets/bind', {
|
||||||
|
account: this.data.oldAccountUsername,
|
||||||
|
password: this.data.oldAccountPassword,
|
||||||
|
token: this.data.info.token || this.data.token
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data.status == 3) {
|
||||||
|
wx.showToast({ // 登录成功
|
||||||
|
title: that.data.isbing == 1 ? '绑定成功' : '登录成功',
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000,
|
||||||
|
success: () => {
|
||||||
|
console.log('成功');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
app.globalData.setSate = true
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
// 跳转首页
|
||||||
|
that.backHome()
|
||||||
|
}, 2000)
|
||||||
|
} else if (res.data.status == 2) {
|
||||||
|
that.setData({
|
||||||
|
getUserInfoState: true,
|
||||||
|
tab: 'account'
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 4) {
|
||||||
|
that.status = 4
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '/pages/setAvatarNickname/setAvatarNickname?token=' + that.data.token,
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 1) {
|
||||||
|
that.setData({
|
||||||
|
tab: 'authorizedLog'
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 5) {
|
||||||
|
if (!that.data.isScanQR) {
|
||||||
|
wx.showToast({ // 登录成功
|
||||||
|
title: '登录成功',
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
setTimeout(function () {
|
||||||
|
app.globalData.setSate = true
|
||||||
|
wx.navigateBack({
|
||||||
|
delta: 1,
|
||||||
|
fail: function () {
|
||||||
|
that.backHome()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// that.backHome() // 跳转首页
|
||||||
|
}, 2000)
|
||||||
|
} else {
|
||||||
|
that.setData({
|
||||||
|
tab: 'nowAccount'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (res.data.user) app.globalData.user = res.data.user
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 跳转首页
|
||||||
|
backHome() {
|
||||||
|
app.globalData.setSate = true
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '/pages/newIndex/index'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 跳转详细页面
|
||||||
|
godetail(e) {
|
||||||
|
let {
|
||||||
|
link
|
||||||
|
} = e.currentTarget.dataset
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pagesSquare/pages/webview/webview?urll=' + link,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
bindgetuserinfo(e) {
|
||||||
|
let value = e.currentTarget.dataset.value
|
||||||
|
let that = this;
|
||||||
|
wx.getUserProfile({
|
||||||
|
lang: "en",
|
||||||
|
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
|
||||||
|
success: (res1) => {
|
||||||
|
app.globalData.getUserInfoData = res1
|
||||||
|
that.setData({
|
||||||
|
getUserInfoState: true
|
||||||
|
})
|
||||||
|
|
||||||
|
let code = ""
|
||||||
|
wx.login({
|
||||||
|
success: function (res) {
|
||||||
|
code = res.code
|
||||||
|
http.wxpost('/api/applets/synchronize', {
|
||||||
|
encryptedData: res1.encryptedData,
|
||||||
|
iv: res1.iv,
|
||||||
|
userInfo: res1.userInfo,
|
||||||
|
signature: res1.signature,
|
||||||
|
code: code
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data.status == 2) {
|
||||||
|
if (value == "binding") that.account('oldAccount')
|
||||||
|
else that.createAccount()
|
||||||
|
|
||||||
|
that.setData({
|
||||||
|
synchronizeState: true
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 1) {
|
||||||
|
that.setData({
|
||||||
|
tab: 'authorizedLog'
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 4) {
|
||||||
|
that.status = 4
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '/pages/setAvatarNickname/setAvatarNickname?token=' + that.data.token,
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 5) {
|
||||||
|
that.setData({
|
||||||
|
tab: 'nowAccount'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
userinf() {
|
||||||
|
this.setData({
|
||||||
|
isaccredit: true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
login() {
|
||||||
|
return new Promise((resolve, reject) => wx.login({
|
||||||
|
success: resolve,
|
||||||
|
fail: reject
|
||||||
|
}))
|
||||||
|
},
|
||||||
|
|
||||||
|
ifjudge() {
|
||||||
|
let that = this
|
||||||
|
if (res.data.status == 3) {
|
||||||
|
wx.showToast({ // 登录成功
|
||||||
|
title: '登录成功',
|
||||||
|
icon: "success",
|
||||||
|
duration: 2000,
|
||||||
|
success: () => {
|
||||||
|
console.log('成功');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
setTimeout(function () {
|
||||||
|
that.backHome() // 跳转首页
|
||||||
|
}, 2000)
|
||||||
|
app.globalData.setSate = true
|
||||||
|
|
||||||
|
} else if (res.data.status == 2) {
|
||||||
|
that.setData({
|
||||||
|
getUserInfoState: true,
|
||||||
|
tab: 'account'
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 4) {
|
||||||
|
that.setData({
|
||||||
|
getUserInfoState: false,
|
||||||
|
tab: 'account'
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 1) {
|
||||||
|
that.setData({
|
||||||
|
tab: 'authorizedLog'
|
||||||
|
})
|
||||||
|
} else if (res.data.status == 5) {
|
||||||
|
that.setData({
|
||||||
|
tab: 'nowAccount'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 切换下面 条款的状态
|
||||||
|
cutHintTickState() {
|
||||||
|
this.data.hintTickState = !this.data.hintTickState
|
||||||
|
this.setData({
|
||||||
|
hintTickState: this.data.hintTickState
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 弹出 需要 选中条款
|
||||||
|
popupClause() {
|
||||||
|
wx.showToast({
|
||||||
|
title: '请阅读并勾选同意',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 没有点击同意同款时 点击账号操作
|
||||||
|
bindTickMask() {
|
||||||
|
wx.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: '请同意协议和条款',
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
4
pagesSquare/pages/PCAuthorization/PCAuthorization.json
Normal file
4
pagesSquare/pages/PCAuthorization/PCAuthorization.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
53
pagesSquare/pages/PCAuthorization/PCAuthorization.wxml
Normal file
53
pagesSquare/pages/PCAuthorization/PCAuthorization.wxml
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<view class="container">
|
||||||
|
<view class="bj" style="padding-top: {{ screen_data.totalTopHeight }}px;">
|
||||||
|
<image class="{{bjurl == 'https://app.gter.net/image/miniApp/offer/u55.png' ? 'bj-img-offer' : 'bj-img'}}" mode="widthFix" src="{{bjurl}}"></image>
|
||||||
|
</view>
|
||||||
|
<view class="main" style="top: {{top}}px;height: calc(100vh - {{top}}px - 230rpx - 85rpx);">
|
||||||
|
<view class="main-top">
|
||||||
|
<view class="title">{{ title }}</view>
|
||||||
|
|
||||||
|
<view wx:if="{{ tab == 'account'}}" class="hint">您的微信号尚未注册寄托,如你已有寄托账号,请绑定</view>
|
||||||
|
<view wx:if="{{ tab == 'nowAccount'}}" class="succeedHint hint">
|
||||||
|
<view>在请电脑页面上完善你的个人信息</view>
|
||||||
|
<view>以便为你提供更好的服务</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view wx:if="{{ tab == 'account'}}" class="account" style="position: relative;">
|
||||||
|
<!-- 不授权-->
|
||||||
|
<!-- <block wx:if="{{getUserInfoState}}"> -->
|
||||||
|
<view class="tick-mask" wx:if="{{ !hintTickState }}" bindtap="bindTickMask"></view>
|
||||||
|
<view class="nowAccount greenBtn" bindtap="createAccount" data-value="create">一键创建新账号</view>
|
||||||
|
<view class="oldAccount greenBtn" bindtap="bindingAccount" data-value="binding">绑定已有账号</view>
|
||||||
|
<!-- </block> -->
|
||||||
|
<!-- 授权-->
|
||||||
|
<!-- <block wx:else>
|
||||||
|
<view class="nowAccount greenBtn" open-type="getUserInfo" catchtap="bindgetuserinfo" data-value="create">一键创建新账号</view>
|
||||||
|
<view class="oldAccount greenBtn" open-type="getUserInfo" catchtap="bindgetuserinfo" data-value="binding">绑定已有账号</view>
|
||||||
|
</block> -->
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view wx:if="{{ tab == 'oldAccount'}}" class="account-input">
|
||||||
|
<input model:value="{{oldAccountUsername}}" type="text" placeholder="用户名/邮箱" />
|
||||||
|
<input model:value="{{oldAccountPassword}}" type="password" placeholder="密码" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view wx:if="{{ tab == 'oldAccount'}}" class="greenBtn" bindtap="bindingAccountSubmitBtn">确定</view>
|
||||||
|
|
||||||
|
<!-- <view wx:if="{{ tab == 'account' || tab == 'oldAccount' }}" class="hint">注册即代表同意 <text class="a" bindtap="godetail" data-link="https://app.gter.net/alonepage/userprotocol">使用协议</text> 和 <text class="a" bindtap="godetail" data-link="https://app.gter.net/alonepage/userprivacyclause">隐私条款</text></view> -->
|
||||||
|
<view class="hint" wx:if="{{ tab == 'account' || tab == 'oldAccount' }}" style="display: flex;justify-content: center;align-items: center;">
|
||||||
|
<image wx:if="{{ hintTickState }}" class="hint-tick" src="https://app.gter.net/image/miniApp/project/u2506-u.png" bindtap="cutHintTickState"></image>
|
||||||
|
<image wx:else class="hint-tick" src="https://app.gter.net/image/miniApp/project/u2506.svg" bindtap="cutHintTickState"></image>
|
||||||
|
注册即代表同意 <text class="a" bindtap="godetail" data-link="https://app.gter.net/alonepage/userprotocol">使用协议</text> 和 <text class="a" bindtap="godetail" data-link="https://app.gter.net/alonepage/userprivacyclause">隐私条款</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<button wx:if="{{ tab == 'authorizedLog'}}" open-type="getPhoneNumber" class="authorizedLogBtn greenBtn" bindgetphonenumber="getPhoneNumber">授权登录</button>
|
||||||
|
<!-- <button wx:if="{{ tab == 'authorizedLog'}}" class="authorizedLogBtn greenBtn" bindgetphonenumber="getPhoneNumber">授权登录</button> -->
|
||||||
|
|
||||||
|
<!-- 创建成功按钮 -->
|
||||||
|
<view wx:if="{{ tab =='nowAccount'}}" class="greenBtn" bindtap="backHome">OK</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 返回上一步 -->
|
||||||
|
<view wx:if="{{tab == 'oldAccount'}}" class="backPreviousStep" bindtap="backPreviousStep">返回上一步</view>
|
||||||
|
</view>
|
191
pagesSquare/pages/PCAuthorization/PCAuthorization.wxss
Normal file
191
pagesSquare/pages/PCAuthorization/PCAuthorization.wxss
Normal file
@ -0,0 +1,191 @@
|
|||||||
|
/* pagesSquare/pages/PCAuthorization/PCAuthorization.wxss */
|
||||||
|
|
||||||
|
.container {
|
||||||
|
padding: 0 20rpx;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bj {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bj-img {
|
||||||
|
width: 300rpx;
|
||||||
|
/* width: 430rpx;
|
||||||
|
margin-left: 140rpx; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.bj-img-offer {
|
||||||
|
width: 430rpx;
|
||||||
|
transform: translateX(30px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.main {
|
||||||
|
background-color: #fff;
|
||||||
|
width: 610rpx;
|
||||||
|
position: absolute;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
/* display: flex; */
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
/* align-items: center; */
|
||||||
|
justify-content: space-between;
|
||||||
|
/* padding-top: 155rpx; */
|
||||||
|
/* padding-bottom: 30rpx; */
|
||||||
|
padding: 155rpx 50rpx 50rpx;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #20201f;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.greenBtn {
|
||||||
|
background-color: #26d79f;
|
||||||
|
color: #fff;
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.account {
|
||||||
|
/* padding-top: 150rpx; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.account .oldAccount {
|
||||||
|
margin-top: 44rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint {
|
||||||
|
font-size: 25rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 70rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.authorizedLogBtn {
|
||||||
|
width: 600rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.account-input input {
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.account-input input:last-child {
|
||||||
|
margin-top: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backPreviousStep {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
text-align: center;
|
||||||
|
width: 690rpx;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 30rpx 0;
|
||||||
|
color: #7F7F7F;
|
||||||
|
font-size: 25rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint .a {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* components/nowUserAccredit/nowUserAccredit.wxss */
|
||||||
|
.nowUserAccredit {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
min-height: 100vh;
|
||||||
|
width: 100vw;
|
||||||
|
/* background-color: black; */
|
||||||
|
/* : 0.4; */
|
||||||
|
z-index: 5000;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.nowUserAccredit .bg {
|
||||||
|
flex: 1;
|
||||||
|
background-color: #000000;
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nowUserAccredit .protocol {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding: 10rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nowUserAccredit .protocol image {
|
||||||
|
width: 25rpx;
|
||||||
|
height: 25rpx;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nowUserAccredit .protocol text {
|
||||||
|
margin: 0 7rpx 0 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nowUserAccredit .protocol .navigator {
|
||||||
|
color: #3cdda9;
|
||||||
|
padding: 0 5rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nowUserAccredit .btnbtn {
|
||||||
|
width: 100%;
|
||||||
|
background-color: #323232;
|
||||||
|
height: 105rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 105rpx;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
margin-top: 45rpx;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nowUserAccredit .bottom {
|
||||||
|
width: 652rpx;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 80rpx 50rpx 68rpx;
|
||||||
|
border-radius: 50rpx 50rpx 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nowUserAccredit .bottom .title {
|
||||||
|
margin-bottom: 80rpx;
|
||||||
|
font-size: 34rpx;
|
||||||
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint-tick {
|
||||||
|
width: 25rpx;
|
||||||
|
height: 25rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tick-mask {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
108
pagesSquare/pages/PCAuthorization/http/http.js
Normal file
108
pagesSquare/pages/PCAuthorization/http/http.js
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
let app = getApp()
|
||||||
|
const websiteUrl = 'https://passport.gter.net';
|
||||||
|
|
||||||
|
const wxpost = function (url, data = {}) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
var authorization = wx.getStorageSync('Authorization');
|
||||||
|
wx.request({
|
||||||
|
url: websiteUrl + url,
|
||||||
|
method: 'POST',
|
||||||
|
data: data,
|
||||||
|
header: {
|
||||||
|
'content-type': 'application/json;charset=utf-8',
|
||||||
|
Authorization: authorization,
|
||||||
|
envVersion: getApp().globalData['envVersion'],
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
|
||||||
|
if (res.data.code == 200) {
|
||||||
|
resolve(res.data)
|
||||||
|
} else if (res.data.code == 401) {
|
||||||
|
// 需要授权
|
||||||
|
// console.log(app)
|
||||||
|
app.globalData.user.uid = 0;
|
||||||
|
wx.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: res.data.message,
|
||||||
|
})
|
||||||
|
reject(res.data)
|
||||||
|
} else {
|
||||||
|
|
||||||
|
|
||||||
|
wx.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: res.data.message,
|
||||||
|
complete: function (res) {
|
||||||
|
if (url == '/peer/topical/subjectDetails') {
|
||||||
|
wx.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
reject(res.data)
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
fail(res) {
|
||||||
|
reject(res)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const wxget = function (url, data = {}) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
var authorization = wx.getStorageSync('authorization');
|
||||||
|
wx.request({
|
||||||
|
url: websiteUrl + url,
|
||||||
|
method: 'GET',
|
||||||
|
data: data,
|
||||||
|
header: {
|
||||||
|
authorization: authorization,
|
||||||
|
envVersion: getApp().globalData['envVersion'],
|
||||||
|
},
|
||||||
|
success: (res) => {
|
||||||
|
if (res.data.code == 200) {
|
||||||
|
resolve(res.data)
|
||||||
|
} else if (res.data.code == 401) {
|
||||||
|
// 需要授权
|
||||||
|
// console.log(app)
|
||||||
|
app.globalData.user.uid = 0;
|
||||||
|
wx.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: res.data.message
|
||||||
|
})
|
||||||
|
|
||||||
|
// authorize().then(res => {
|
||||||
|
|
||||||
|
// })
|
||||||
|
reject(res)
|
||||||
|
} else {
|
||||||
|
wx.hideLoading()
|
||||||
|
wx.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: res.data.message,
|
||||||
|
})
|
||||||
|
reject(res.data)
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
fail(res) {
|
||||||
|
wx.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: res,
|
||||||
|
})
|
||||||
|
reject(res)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
wxpost,
|
||||||
|
wxget
|
||||||
|
}
|
@ -4,5 +4,6 @@
|
|||||||
"setting": {
|
"setting": {
|
||||||
"compileHotReLoad": true,
|
"compileHotReLoad": true,
|
||||||
"urlCheck": false
|
"urlCheck": false
|
||||||
}
|
},
|
||||||
|
"condition": {}
|
||||||
}
|
}
|
@ -63,7 +63,6 @@ function getUserInfo(e) {
|
|||||||
reject(data)
|
reject(data)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
console.log(res)
|
console.log(res)
|
||||||
@ -74,7 +73,6 @@ function getUserInfo(e) {
|
|||||||
//用户登录
|
//用户登录
|
||||||
function login() {
|
function login() {
|
||||||
return new Promise((resolve, reject) => wx.login({
|
return new Promise((resolve, reject) => wx.login({
|
||||||
// return new Promise((resolve, reject) => wx.weixinAppLogin({
|
|
||||||
success: resolve,
|
success: resolve,
|
||||||
fail: reject
|
fail: reject
|
||||||
}))
|
}))
|
||||||
@ -168,19 +166,12 @@ function sendData(code) {
|
|||||||
|
|
||||||
app.globalData.initializeLoginState = data.user.uid > 0 ? true : false;
|
app.globalData.initializeLoginState = data.user.uid > 0 ? true : false;
|
||||||
|
|
||||||
|
// 开屏广告
|
||||||
// const openAd = data.offerkaipingadvertisement || {}
|
// if (app.globalData['envVersion'] != "develop") {
|
||||||
// if (Date.now() < openAd.deadline * 1000) {
|
// app.globalData.offerkaipingadvertisement = data.offerkaipingadvertisement || {}
|
||||||
// wx.navigateTo({
|
// const openAdTimer = wx.getStorageSync('openAdTimer');
|
||||||
// url: '/pages/open-ad/open-ad',
|
// if (openAdTimer && isToday(openAdTimer)) app.globalData.offerkaipingadvertisementState = true
|
||||||
// })
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (app.globalData['envVersion'] != "develop") {
|
|
||||||
app.globalData.offerkaipingadvertisement = data.offerkaipingadvertisement || {}
|
|
||||||
const openAdTimer = wx.getStorageSync('openAdTimer');
|
|
||||||
if (openAdTimer && isToday(openAdTimer)) app.globalData.offerkaipingadvertisementState = true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
fail: function () {
|
fail: function () {
|
||||||
// fail
|
// fail
|
||||||
@ -195,10 +186,7 @@ function sendData(code) {
|
|||||||
function isToday(timestamp) {
|
function isToday(timestamp) {
|
||||||
const date = new Date(timestamp);
|
const date = new Date(timestamp);
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
|
return date.getFullYear() === today.getFullYear() && date.getMonth() === today.getMonth() && date.getDate() === today.getDate();
|
||||||
return date.getFullYear() === today.getFullYear() &&
|
|
||||||
date.getMonth() === today.getMonth() &&
|
|
||||||
date.getDate() === today.getDate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 当前页开始
|
// 当前页开始
|
||||||
|
@ -395,16 +395,6 @@ function statistical(data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 公共的请求广告
|
|
||||||
function get_Advertising(id) {
|
|
||||||
// adspos 广告位数据. adspos.option === 3 弹窗 adspos.option === 2 列表广告 adspos.option == 1 为幻灯轮播广告 == 0为普通随时广告
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
wxpost("/miniprogramApi/offer/ads", {
|
|
||||||
id
|
|
||||||
}).then((res) => resolve(res));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// rpx转px
|
// rpx转px
|
||||||
function rpxTopx(value) {
|
function rpxTopx(value) {
|
||||||
let deviceWidth = wx.getWindowInfo().windowWidth
|
let deviceWidth = wx.getWindowInfo().windowWidth
|
||||||
@ -519,8 +509,6 @@ function statistics(obj) {
|
|||||||
// else options = currentPage.options
|
// else options = currentPage.options
|
||||||
// const options = currentPage.options; // 当前页面url的参数
|
// const options = currentPage.options; // 当前页面url的参数
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const launchOptions = wx.getLaunchOptionsSync() || {};
|
const launchOptions = wx.getLaunchOptionsSync() || {};
|
||||||
|
|
||||||
// 构建带参数的URL
|
// 构建带参数的URL
|
||||||
@ -621,7 +609,6 @@ module.exports = {
|
|||||||
rollback,
|
rollback,
|
||||||
timeago,
|
timeago,
|
||||||
statistical,
|
statistical,
|
||||||
get_Advertising,
|
|
||||||
strtimeago,
|
strtimeago,
|
||||||
rpxTopx,
|
rpxTopx,
|
||||||
changeTime,
|
changeTime,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user