作者 lihongjuan

1

要显示太多修改。

为保证性能只显示 30 of 30+ 个文件。

.DS_Store
node_modules/
unpackage/
dist/
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.project
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
... ...
# school
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
... ...
const plugins = []
if (process.env.UNI_OPT_TREESHAKINGNG) {
plugins.push(require('@dcloudio/vue-cli-plugin-uni-optimize/packages/babel-plugin-uni-api/index.js'))
}
if (
(
process.env.UNI_PLATFORM === 'app-plus' &&
process.env.UNI_USING_V8
) ||
(
process.env.UNI_PLATFORM === 'h5' &&
process.env.UNI_H5_BROWSER === 'builtin'
)
) {
const path = require('path')
const isWin = /^win/.test(process.platform)
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path)
const input = normalizePath(process.env.UNI_INPUT_DIR)
try {
plugins.push([
require('@dcloudio/vue-cli-plugin-hbuilderx/packages/babel-plugin-console'),
{
file (file) {
file = normalizePath(file)
if (file.indexOf(input) === 0) {
return path.relative(input, file)
}
return false
}
}
])
} catch (e) {}
}
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui']
process.UNI_LIBRARIES.forEach(libraryName => {
plugins.push([
'import',
{
'libraryName': libraryName,
'customName': (name) => {
return `${libraryName}/lib/${name}/${name}`
}
}
])
})
module.exports = {
presets: [
[
'@vue/app',
{
modules: 'commonjs',
useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry'
}
]
],
plugins
}
... ...
此 diff 太大无法显示。
{
"name": "school",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "npm run dev:h5",
"build": "npm run build:h5",
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
"build:mp-qq": "cross-env NODE_ENV=production UNI_PLATFORM=mp-qq vue-cli-service uni-build",
"build:mp-toutiao": "cross-env NODE_ENV=production UNI_PLATFORM=mp-toutiao vue-cli-service uni-build",
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
"build:quickapp": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp vue-cli-service uni-build",
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
"dev:mp-alipay": "cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch",
"dev:mp-baidu": "cross-env NODE_ENV=development UNI_PLATFORM=mp-baidu vue-cli-service uni-build --watch",
"dev:mp-qq": "cross-env NODE_ENV=development UNI_PLATFORM=mp-qq vue-cli-service uni-build --watch",
"dev:mp-toutiao": "cross-env NODE_ENV=development UNI_PLATFORM=mp-toutiao vue-cli-service uni-build --watch",
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch",
"dev:quickapp": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp vue-cli-service uni-build --watch",
"info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js",
"serve:quickapp": "node node_modules/@dcloudio/uni-quickapp/bin/serve.js"
},
"dependencies": {
"@dcloudio/uni-app-plus": "^2.0.0-26920200403001",
"@dcloudio/uni-h5": "^2.0.0-26920200403001",
"@dcloudio/uni-helper-json": "*",
"@dcloudio/uni-mp-alipay": "^2.0.0-26920200403001",
"@dcloudio/uni-mp-baidu": "^2.0.0-26920200403001",
"@dcloudio/uni-mp-qq": "^2.0.0-26920200403001",
"@dcloudio/uni-mp-toutiao": "^2.0.0-26920200403001",
"@dcloudio/uni-mp-weixin": "^2.0.0-26920200403001",
"@dcloudio/uni-stat": "^2.0.0-26920200403001",
"core-js": "^3.6.4",
"flyio": "^0.6.2",
"less": "^3.11.1",
"less-loader": "^5.0.0",
"regenerator-runtime": "^0.12.1",
"vue": "^2.6.11",
"vuex": "^3.0.1"
},
"devDependencies": {
"@dcloudio/uni-cli-shared": "^2.0.0-26920200403001",
"@dcloudio/uni-migration": "^2.0.0-26920200403001",
"@dcloudio/uni-template-compiler": "^2.0.0-26920200403001",
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.0-26920200403001",
"@dcloudio/vue-cli-plugin-uni": "^2.0.0-26920200403001",
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.0-26920200403001",
"@dcloudio/webpack-uni-mp-loader": "^2.0.0-26920200403001",
"@dcloudio/webpack-uni-pages-loader": "^2.0.0-26920200403001",
"@types/html5plus": "*",
"@types/uni-app": "*",
"@vue/cli-plugin-babel": "^4.3.0",
"@vue/cli-service": "^4.3.0",
"babel-plugin-import": "^1.11.0",
"cross-env": "^7.0.2",
"mini-types": "*",
"miniprogram-api-typings": "^2.8.0-2",
"postcss-comment": "^2.0.0",
"vue-template-compiler": "^2.6.11"
},
"browserslist": [
"Android >= 4",
"ios >= 8"
],
"uni-app": {
"scripts": {}
}
}
... ...
const path = require('path')
module.exports = {
parser: require('postcss-comment'),
plugins: [
require('postcss-import')({
resolve (id, basedir, importOptions) {
if (id.startsWith('~@/')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(3))
} else if (id.startsWith('@/')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(2))
} else if (id.startsWith('/') && !id.startsWith('//')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(1))
}
return id
}
}),
require('autoprefixer')({
remove: process.env.UNI_PLATFORM !== 'h5'
}),
require('@dcloudio/vue-cli-plugin-uni/packages/postcss')
]
}
... ...
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
})
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
</head>
<body>
<noscript>
<strong>Please enable JavaScript to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
\ No newline at end of file
... ...
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
post: function(url, data,method) {
var promise = new Promise((resolve, reject) => {
//init
let that = this,
token = uni.getStorageSync('token'),
header = {
'token': token || ''
},
postData;
//网络请求
uni.request({
url: this.globalData.baseUrl + url,
data: data,
method: method,
header: header,
success: function(res) {
console.log(res)
//返回取得的数据
if (res.data.code == '1') {
resolve(res.data.data);
}else {
// uni.showToast({
// title: res.data.msg,
// icon: 'none'
// });
reject(res.data);
}
},
fail: function(e) {
reject('网络出错');
uni.hideNavigationBarLoading();
}
});
});
return promise;
},
upload(filetype, file) {
var promise = new Promise((resolve, reject) => {
wx.showNavigationBarLoading()
wx.showLoading({
title: '上传中',
})
let url = 'https://school.t.brotop.cn/api/common/upload';
let head = {
'token':uni.getStorageSync('token'),
'XX-Device-Type': ''
}
console.log(head)
let typename = {
filetype: filetype
}
wx.uploadFile({
url: url, //仅为示例,非真实的接口地址
filePath: file,
name: 'file',
header: head,
formData: typename,
success: function (res) {
console.log(res)
console.log('上传文件后', res)
let temdata = JSON.parse(res.data);
console.log(temdata)
let urlobj = {
url: temdata.data.url,
kurl: temdata.data.save_path
}
resolve(urlobj);
},
fail: function (res) {
reject('网络出错');
wx.hideNavigationBarLoading()
wx.hideLoading()
},
complete: () => {
wx.hideNavigationBarLoading()
wx.hideLoading()
},
})
});
return promise;
},
globalData: {
userInfo: null,
baseUrl: 'https://school.t.brotop.cn/api/',
imageBaseUrl: 'http://school.t.brotop.cn'
},
}
</script>
<style lang="less">
/*每个页面公共css */
button::after{
border:none;
outline:none;
}
.teacherfooter {
width: 750rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 18rpx 82rpx;
box-sizing: border-box;
position: fixed;
bottom: 0;
left: 0;
background: #fff;
font-size: 22rpx;
.teacherfootitem {
display: felx;
flex-direction: column;
align-items: center;
justify-content: center;
.teacherfootitemtop {
margin: 0 auto;
display: flex;
justify-content: center;
image {
width: 48rpx;
height: 48rpx;
margin: 0 auto;
}
}
}
}
.collegefooter{
width: 750rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 18rpx 82rpx;
box-sizing: border-box;
position: fixed;
bottom: 0;
left: 0;
background: #fff;
font-size: 22rpx;
.teacherfootitem {
display: felx;
flex-direction: column;
align-items: center;
justify-content: center;
width: 50%;
text-align: center;
.teacherfootitemtop {
margin: 0 auto;
display: flex;
justify-content: center;
image {
width: 48rpx;
height: 48rpx;
margin: 0 auto;
}
}
}
}
.shou {
width: 37rpx;
height: 37rpx;
font-size: 0;
}
.selactive{
color:#2D5575
}
</style>
... ...
import Vue from 'vue'
import App from './App'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
... ...
{
"name" : "school",
"appid" : "",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"app-plus" : {
/* 5+App特有相关 */
"usingComponents" : true,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
"modules" : {},
/* 模块配置 */
"distribute" : {
/* 应用发布信息 */
"android" : {
/* android打包配置 */
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"ios" : {},
/* ios打包配置 */
"sdkConfigs" : {}
}
},
/* SDK配置 */
"quickapp" : {},
/* 快应用特有相关 */
"mp-weixin" : {
"appid" : "wxf06ef1898e5e6d55",
"setting" : {
"urlCheck" : true,
"minified" : true
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"mp-qq" : {
"usingComponents" : true
}
}
... ...
{
"pages": [
{
"path": "pages/school/school",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarBackgroundColor": "#2D5575",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/register/register",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarBackgroundColor": "#2D5575",
"navigationBarTextStyle": "white"
}
},{
"path": "pages/register/highRegister",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarBackgroundColor": "#2D5575",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/register/selectSchool",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarTextStyle": "black"
}
},{
"path": "pages/register/addSchool",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarTextStyle": "black"
}
},{
"path": "pages/register/college",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarBackgroundColor": "#2D5575",
"navigationBarTextStyle": "white"
}
},{
"path": "pages/register/selectCollege",
"style": {
"navigationBarTitleText": "学长说"
}
},{
"path": "pages/register/selectAcademy",
"style": {
"navigationBarTitleText": "学长说"
}
},{
"path": "pages/register/selectMajor",
"style": {
"navigationBarTitleText": "学长说"
}
},{
"path": "pages/schoolmate/schoolmate",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarBackgroundColor": "#2D5575",
"navigationBarTextStyle": "white"
}
}
,{
"path": "pages/homePage/homePage",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarBackgroundColor": "#2D5575",
"navigationBarTextStyle": "white"
}
},{
"path": "pages/homePage/collegeHome",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarBackgroundColor": "#2D5575",
"navigationBarTextStyle": "white"
}
},{
"path": "pages/school/schoolDetails",
"style": {
"navigationBarTitleText": "学长说",
"app-plus":{
"titleNView":false
}
}
},{
"path": "pages/school/schoolMsg",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarBackgroundColor": "#2D5575",
"navigationBarTextStyle": "white"
}
},{
"path": "pages/school/highSchoolmate",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarBackgroundColor": "#2D5575",
"navigationBarTextStyle": "white"
}
},{
"path": "pages/school/schoolmateMsg",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarBackgroundColor": "#2D5575",
"navigationBarTextStyle": "white"
}
}
,{
"path": "pages/homePage/buyCard",
"style": {
"navigationBarTitleText": "畅读卡",
"navigationBarBackgroundColor": "#2D5575",
"navigationBarTextStyle": "white"
}
},{
"path": "pages/school/academy",
"style": {
"navigationBarTitleText": "学长说"
}
}
,{
"path": "pages/school/academyDetails",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarBackgroundColor": "#2D5575",
"navigationBarTextStyle": "white"
}
}
,{
"path": "pages/school/article",
"style": {
"navigationBarTitleText": "学长说"
}
}
,{
"path": "pages/school/searchSchool",
"style": {
"navigationBarTitleText": "学长说"
}
}
,{
"path": "pages/homePage/gerencenter",
"style": {
"navigationBarTitleText": "个人中心"
}
}
,{
"path": "pages/homePage/collegegerencenter",
"style": {
"navigationBarTitleText": "个人中心"
}
}
,{
"path": "pages/homePage/cellect",
"style": {
"navigationBarTitleText": "收藏文章"
}
},{
"path": "pages/homePage/collegeCellect",
"style": {
"navigationBarTitleText": "我的文章"
}
},
{
"path": "pages/homePage/consumePage",
"style": {
"navigationBarTitleText": "消费记录"
}
},{
"path": "pages/homePage/mywallet",
"style": {
"navigationBarTitleText": "我的钱包"
}
},
{
"path": "pages/homePage/followPeople",
"style": {
"navigationBarTitleText": "关注的人"
}
},
{
"path": "pages/homePage/mycomment",
"style": {
"navigationBarTitleText": "我的留言"
}
},
{
"path": "pages/homePage/commentContent",
"style": {
"navigationBarTitleText": "留言详情"
}
},
{
"path": "pages/homePage/pubArticle",
"style": {
"navigationBarTitleText": "发表文章"
}
},{
"path": "pages/homePage/yuE",
"style": {
"navigationBarTitleText": "余额明细"
}
},
{
"path": "pages/homePage/tixianPage",
"style": {
"navigationBarTitleText": "立即提现",
"navigationBarBackgroundColor": "#2D5575",
"navigationBarTextStyle": "white"
}
},{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#ffffff",
"backgroundColor": "white"
}
}
... ...
<template>
<view class="content">
<image class="bg" src="../../static/bg_img@2x(2).png"></image>
<image class="card" src="../../static/card_img@2x.png"></image>
<view class="cardText">
<swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" :indicator-color="indicatorColor" :indicator-active-color="indicatorActiveColor" @change="swiperChange" :circle="true" circular="true">
<view v-for="(item,index) in cardlist" :key="index">
<swiper-item>
<view class="title">城市畅读卡</view>
<view class="money">{{item.money}}/月</view>
<view class="time" v-if="item.vip_endtime">到期日期:{{item.vip_endtime}}</view>
<view class="btn" v-if="item.vip_endtime==''" @click="buycard" :data-id="item.vip_level">立即购买<image class="icon" src="../../static/dizhi_btn@2x2.png"></image></view>
<!-- <image class="big" src="../../static/juxing.png"></image>
<image class="small" src="../../static/tuoyuan.png"></image> -->
</swiper-item>
</view>
</swiper>
<view class="dots">
<block v-for="(item,index) in cardlist" :key="index">
<view class="dot" :class="index == currentSwiper ? 'active' : ''"></view>
</block>
</view>
</view>
<view class="textBox">
YHA青年旅舍会员卡(一年)是国际青年旅舍联盟会员身份证明,全球通用,也是旅行者入住青年旅舍的凭证。拥有会员卡,可以享受国内外国际青年旅舍住宿价格的优惠,同时部分海外青年旅舍只允许会员入住。
成为YHA青年旅舍会员的好处:
<view>1)入住青年旅舍享受房价上的优惠;</view>
<view>2)在世界各地享有食、住、行、游、购、娱等逾3,000项优惠,如:在全球多个国际机场和车船站,凭会员卡兑换外币可免收手续费;观光、租车、购物、参团、购买车船票等均可能有折扣,折扣率高达50%。单是在澳大利亚,优惠项目便接近800种;</view>
<view>3)以优惠价格参与多项由青年旅舍举办的各类文化、旅游等方面的交流活动;</view>
<view>4)优先参与青年旅舍组织的国际交流活动。</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
name:'',
province_id:'',
city_id:'',
cardlist:[],
background: ['color1', 'color2', 'color3'],
indicatorDots: false,
autoplay: true,
interval: 3000,
duration: 500,
indicatorColor:'rgba(255,255,255,1)',
indicatorActiveColor:'#ffffff',
currentSwiper: 0,
imgUrls:[1,2],
vip_id:''
}
},
methods:{
getcardmsg(){
var that = this
var url = "vip/getVipConf"
var params = {
name:that.name,
province_id:that.name,
city_id:that.name
}
app.post(url,params,"post").then((res)=>{
console.log(res)
that.cardlist=res
}).catch((err)=>{
console.log(err)
})
},
swiperChange: function(e) {
this.currentSwiper= e.detail.current
},
buycard(e){
var that = this
let vip_id=e.currentTarget.dataset.id;
console.log(vip_id)
var url = "vip/buyVip"
var header = {
// token:uni.getStorageSync('token'),
}
var params = {
token:uni.getStorageSync('token'),
vip_id:vip_id
}
console.log(params)
app.post(url,params,"post").then((res)=>{
console.log(res)
that.payment(res)
}).catch((err)=>{
console.log(err)
})
},
payment(res) {
let that = this;
var timeStamp = res.timeStamp.toString();
// console.log(timeStamp);
wx.requestPayment({
timeStamp: timeStamp,
nonceStr: res.nonceStr,
package: res.package,
signType: res.signType,
paySign: res.paySign,
success: function(res) {
console.log(res)
wx.navigateTo({
url: '/pages/orderbox/orderbox?index=' + 0
})
},
fail: function(res) {
console.log(123);
console.log(res);
}
})
},
},
onLoad(){
this.getcardmsg()
}
}
</script>
<style lang="less">
.content{
.bg{
width: 750rpx;
height: 292rpx;
}
.card{
width: 636rpx;
height: 360rpx;
position: absolute;
top: 26rpx;
left: 50%;
transform: translate(-50%);
}
.cardText{
width: 636rpx;
height: 360rpx;
position: absolute;
top: 26rpx;
left: 50%;
transform: translate(-50%);
padding: 62rpx 40rpx;
box-sizing: border-box;
z-index: 777;
.title{
color:rgba(130,75,59,1);
font-size: 50rpx;
}
.money{
color:rgba(130,75,59,1);
font-size: 36rpx;
}
.time{
color:rgba(130,75,59,1);
font-size: 24rpx;
margin-top: 70rpx;
}
.btn{
width:206rpx;
height:60rpx;
background:rgba(130,75,59,1);
opacity:1;
border-radius:42rpx;
color:rgba(255,255,255,1);
font-size:32rpx;
text-align: center;
line-height: 60rpx;
position: absolute;
right: 26rpx;
bottom: 52rpx;
.icon{
width: 15rpx;
height: 27rpx;
margin-left: 10rpx;
}
}
.dots{
position: absolute;
bottom: 10rpx;
left: 50%;
transform: translate(-50%);
width: 50rpx;
height: 10rpx;
z-index: 999;
display: flex;
justify-content: space-between;
.dot{
width: 10rpx;
height: 10rpx;
background-color: #fff;
border-radius:12rpx;
}
.active{
width: 30rpx;
height: 10rpx;
}
}
.big{
width: 24rpx;
height: 8rpx;
position: absolute;
bottom: 10rpx;
left: 298rpx;
}
.small{
width: 8rpx;
height: 8rpx;
position: absolute;
bottom: 10rpx;
left: 330rpx;
}
}
.textBox{
font-size: 24rpx;
width: 640rpx;
margin: 0 auto;
margin-top: 138rpx;
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<view class="title">
<view class="history" :class="{active:active1}" @click="historyShow">浏览历史</view>
<view class="cellect" :class="{active:active2}" @click="cellectShow">我的收藏</view>
</view>
<view class="historyBox" v-if="isHistoryShow">
<view class="liulan">
<view class="liulantitle">浏览历史</view>
<view class="del">清空</view>
<!-- <view class="del">完成</view> -->
</view>
<view class="mateitem" v-for="(item,index) in historylist" :key="index">
<view class="contentBox">
<image class="photo" src="../../static/logo_img@2x.png"></image>
<view class="cont">
<view class="title">红色的战旗</view>
<view class="fen">就读体验</view>
</view>
<view class="right">
<view class="text">已关注</view>
</view>
<view class="txt">班主任用“心”战“疫” 全力做好学生防疫工作</view>
</view>
</view>
<view class="nodata" v-if="historylist.length==0">暂无数据</view>
</view>
<!-- 我的收藏 -->
<view class="cellectBox" v-else>
<view class="liulan">
<view class="liulantitle">我的收藏</view>
<view class="del" @click="change2" v-if="isdel">完成</view>
<view class="del" @click="change" v-else>编辑</view>
</view>
<view class="mateitem" v-for="(item,index) in cellectlist" :key="index">
<image class="delBtn" src="../../static/shanchu_icon@2x.png" v-if="isdel"></image>
<view class="contentBox" :style="{width:width}">
<image class="photo" src="../../static/logo_img@2x.png"></image>
<view class="cont">
<view class="title">红色的战旗</view>
<view class="fen">就读体验</view>
</view>
<view class="right">
<view class="text">已关注</view>
</view>
<view class="txt">班主任用“心”战“疫” 全力做好学生防疫工作</view>
</view>
</view>
<view class="nodata" v-if="cellectlist.length==0">暂无数据</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
active1:true,
active2:false,
isHistoryShow:true,
isdel:false,
width:"660rpx",
page:1,
size:10,
cellectlist:[],
historylist:[]
}
},
methods:{
historyShow(){
this.active1=true,
this.active2=false,
this.isHistoryShow=true
},
cellectShow(){
this.isHistoryShow=false,
this.active2=true,
this.active1=false
},
change(){
this.isdel=true
this.width="620rpx"
},
change2(){
this.isdel=false
this.width="660rpx"
},
getMyCellect(){
var that = this
var url = "article/getMyLikeArticle"
var token = uni.getStorageSync('token')
var params = {
token:token,
page:that.page,
size:that.size
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.cellectlist=res
}).catch((err)=>{
console.log(err)
})
},
gethistory(){
var that = this
var url = "article/getLookArticleList"
var token = uni.getStorageSync('token')
var params = {
token:token,
page:that.page,
size:that.size
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.historylist=res
}).catch((err)=>{
console.log(err)
})
}
},
onLoad(){
this.getMyCellect()
}
}
</script>
<style lang="less">
.content{
background-color: #F9F9F9;
.nodata{
font-size: 28rpx;
text-align: center;
}
.title{
background-color: #fff;
display: flex;
.history,.cellect{
width: 50%;
text-align: center;
font-size:28rpx;
padding: 24rpx 0;
}
.active{
background: url("../../static/xuanzhong_icon@2x.png") no-repeat;
background-size: 60rpx 12rpx;
background-position: 156rpx 70rpx;
color: rgba(5,132,157,1);
}
}
.liulan{
display: flex;
font-size:32rpx;
width: 686rpx;
margin: 0 auto;
justify-content: space-between;
padding: 30rpx 0;
.liulantitle{
color:rgba(45,85,117,1);
}
.del{
font-size:24rpx;
}
}
.mateitem{
display: flex;
align-items: center;
width:686rpx;
// height:172rpx;
background:rgba(255,255,255,1);
opacity:1;
border-radius:20rpx;
margin: 0 auto;
background-color: #fff;
padding: 24rpx 0;
// box-sizing: border-box;
margin-bottom: 24rpx;
.delBtn{
width: 28rpx;
height: 28rpx;
// position: absolute;
// top: 50%;
// transform: translateY(-50%);
// left: 28rpx;
margin-left: 26rpx;
}
.contentBox{
display: flex;
// align-items: center;
position: relative;
flex-wrap: wrap;
margin-left: 26rpx;
width: 660rpx;
.photo{
width: 68rpx;
height: 68rpx;
margin-right: 26rpx;
margin-top: 6rpx;
}
.cont{
.title{
color:rgba(61,68,77,1);
font-size: 24rpx;
}
.fen{
font-size: 24rpx;
color:rgba(140,145,152,1);
margin-top: 4rpx;
}
}
.right{
width:118rpx;
height:44rpx;
border:2rpx solid rgba(189,196,206,1);
opacity:1;
border-radius:40rpx;
position: absolute;
right: 26rpx;
top: 32rpx;
.text{
color:rgba(189,196,206,1);
text-align: center;
line-height: 44rpx;
font-size:24rpx;
}
}
.txt{
// width: 600rpx;
font-size:28rpx;
margin-top: 24rpx;
}
}
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<view class="title">
<view class="mine" :class="{active:active3}" @click="mineShow">我的发布</view>
<view class="history" :class="{active:active1}" @click="historyShow">浏览历史</view>
<view class="cellect" :class="{active:active2}" @click="cellectShow">我的收藏</view>
</view>
<view class="mineBox" v-if="isMineShow==true&&isHistoryShow==false">
<view class="minetop">
<view class="mineTitle">我的发布</view>
<view class="del" @click="edit" v-if="isedit==false">编辑</view>
<view class="del" @click="editok" v-if="isedit==true">完成</view>
<!-- <view class="del">完成</view> -->
</view>
<view class="item" v-for="(item,index) in articlelist" :key="index">
<image class="icon" src="../../static/shanchu_icon@2x.png" v-if="isedit" @click="delarcial(item,index)"></image>
<view class="cont" :style="{width:width}" @click="toarticl" :data-id="item.id">
<view class="rowOne">{{item.article_type_name}}</view>
<view class="rowTwo">{{item.title}}</view>
<view class="rowThree">{{item.des_content}}</view>
</view>
</view>
<view class="nodata" v-if="articlelist.length==0">暂无数据</view>
</view>
<view class="historyBox" v-if="isHistoryShow==true&&isMineShow==false">
<view class="liulan">
<view class="liulantitle">浏览历史</view>
<view class="del" @click="delhistory">清空</view>
<!-- <view class="del">完成</view> -->
</view>
<view class="mateitem" v-for="(item,index) in historylist" :key="index">
<view class="contentBox">
<image class="photo" src="../../static/logo_img@2x.png"></image>
<view class="cont">
<view class="title">红色的战旗</view>
<view class="fen">就读体验</view>
</view>
<view class="right">
<view class="text">已关注</view>
</view>
<view class="txt">班主任用“心”战“疫” 全力做好学生防疫工作</view>
</view>
</view>
<view class="nodata" v-if="historylist.length==0">暂无消息</view>
</view>
<view class="cellcetBox" v-if="isHistoryShow==false&&isMineShow==false">
<view class="liulan">
<view class="liulantitle">我的收藏</view>
<view class="del" @click="change2" v-if="isdel">完成</view>
<view class="del" @click="change" v-else>编辑</view>
</view>
<view class="mateitem" v-for="(item,index) in cellectlist" :key="index">
<image class="delBtn" src="../../static/shanchu_icon@2x.png" v-if="isdel"></image>
<view class="contentBox" :style="{width:width2}">
<image class="photo" src="../../static/logo_img@2x.png"></image>
<view class="cont">
<view class="title">{{item.nickname}}</view>
<view class="fen">{{item.title}}</view>
</view>
<view class="right">
<view class="text">已关注</view>
</view>
<view class="txt">{{item.des_content}}</view>
</view>
</view>
<view class="nodata" v-if="cellectlist.length==0">暂无数据</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
active3:true,
active1:false,
active2:false,
isHistoryShow:false,
isMineShow:true,
isdel:false,
isedit:false,
width:'686rpx',
width2:'660rpx',
page:1,
size:10,
articlelist:[],
historylist:[],
cellectlist:[]
}
},
methods:{
historyShow(){
this.active1=true,
this.active2=false,
this.isHistoryShow=true
this.isMineShow=false,
this.active3=false
},
cellectShow(){
this.isHistoryShow=false,
this.active2=true,
this.active1=false,
this.isMineShow=false,
this.active3=false
},
mineShow(){
this.active3=true,
this.active1=false,
this.active2=false,
this.isMineShow=true,
this.isHistoryShow=false
},
edit(){
this.isedit=true,
this.width="580rpx"
},
editok(){
this.isedit=false,
this.width="686rpx"
},
change(){
this.isdel=true
this.width="620rpx"
},
change2(){
this.isdel=false
this.width="660rpx"
},
getMyArticle(){
var that = this
var url = "article/getMyArticle"
var token = uni.getStorageSync('token')
var params = {
token:token,
page:that.page,
size:that.size
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.articlelist=res
}).catch((err)=>{
console.log(err)
})
},
gethistory(){
var that = this
var url = "article/getLookArticleList"
var token = uni.getStorageSync('token')
var params = {
token:token
}
app.post(url,params,"get").then((res)=>{
that.historylist=res
console.log(res)
}).catch((err)=>{
console.log(err)
})
},
delhistory(){
var that = this
var url = "article/delLookArticle"
var token = uni.getStorageSync('token')
var params = {
token:token
}
app.post(url,params,"post").then((res)=>{
that.historylist=res
console.log(res)
uni.showToast({
title:'浏览记录已清空'
})
}).catch((err)=>{
console.log(err)
})
},
getMyCellect(){
var that = this
var url = "article/getMyLikeArticle"
var token = uni.getStorageSync('token')
var params = {
token:token,
page:that.page,
size:that.size
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.cellectlist=res
}).catch((err)=>{
console.log(err)
})
},
toarticl(e){
var id = e.currentTarget.dataset.id
uni.navigateTo({
url:'../school/article?article_id='+id
})
},
delarcial(item,index){
var that = this
var url = "article/delArticle"
var params = {
token:uni.getStorageSync('token'),
article_id:item.id
}
app.post(url,params,"post").then((res)=>{
console.log(res)
that.articlelist.splice(index, 1) 
uni.showToast({
title:'删除成功',
icon:'none'
})
}).catch((err)=>{
console.log(err)
})
}
},
onLoad(){
this.getMyArticle()
this.gethistory()
this.getMyCellect()
}
}
</script>
<style lang="less">
.content{
background:rgba(249,249,249,1);
height: 100vh;
// padding: 32rpx;
.nodata{
text-align: center;
font-size: 28rpx;
}
.title{
background-color: #fff;
display: flex;
.history,.cellect,.mine{
width: 33%;
text-align: center;
font-size:28rpx;
padding: 24rpx 0;
}
.active{
background: url("../../static/xuanzhong_icon@2x.png") no-repeat;
background-size: 60rpx 12rpx;
background-position: 95rpx 70rpx;
color: rgba(5,132,157,1);
}
}
.minetop{
display: flex;
font-size:32rpx;
width: 686rpx;
margin: 0 auto;
justify-content: space-between;
padding: 30rpx 0;
.mineTitle{
color:rgba(45,85,117,1);
}
.del{
font-size:24rpx;
}
}
.item{
width: 686rpx;
background-color: #fff;
margin: 0 auto;
border-radius:20rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
margin-bottom: 14rpx;
display: flex;
align-items: center;
.cont{
.rowOne{
font-size:24rpx;
color:rgba(140,145,152,1);
}
.rowTwo{
font-size:28rpx;
color:rgba(61,68,77,1);
margin-top: 16rpx;
}
.rowThree{
font-size:24rpx;
color:rgba(140,145,152,1);
margin-top: 4rpx;
height: 74rpx;
overflow: hidden;
}
}
.icon{
width: 28rpx;
height: 28rpx;
margin-right: 26rpx;
}
}
.liulan{
display: flex;
font-size:32rpx;
width: 686rpx;
margin: 0 auto;
justify-content: space-between;
padding: 30rpx 0;
.liulantitle{
color:rgba(45,85,117,1);
}
.del{
font-size:24rpx;
}
}
.mateitem{
display: flex;
align-items: center;
width:686rpx;
// height:172rpx;
background:rgba(255,255,255,1);
opacity:1;
border-radius:20rpx;
margin: 0 auto;
background-color: #fff;
padding: 24rpx 0;
// box-sizing: border-box;
margin-bottom: 24rpx;
.delBtn{
width: 28rpx;
height: 28rpx;
// position: absolute;
// top: 50%;
// transform: translateY(-50%);
// left: 28rpx;
margin-left: 26rpx;
}
.contentBox{
display: flex;
// align-items: center;
position: relative;
flex-wrap: wrap;
margin-left: 26rpx;
width: 660rpx;
.photo{
width: 68rpx;
height: 68rpx;
margin-right: 26rpx;
margin-top: 6rpx;
}
.cont{
.title{
color:rgba(61,68,77,1);
font-size: 24rpx;
}
.fen{
font-size: 24rpx;
color:rgba(140,145,152,1);
margin-top: 4rpx;
}
}
.right{
width:118rpx;
height:44rpx;
border:2rpx solid rgba(189,196,206,1);
opacity:1;
border-radius:40rpx;
position: absolute;
right: 26rpx;
top: 32rpx;
.text{
color:rgba(189,196,206,1);
text-align: center;
line-height: 44rpx;
font-size:24rpx;
}
}
.txt{
// width: 600rpx;
font-size:28rpx;
margin-top: 24rpx;
}
}
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<image class="bg" src="../../static/bg_img2.png"></image>
<image class="photo" :src="token=='' ? '../../static/touxiang_img@2x.png' : userinfolist.head_image"></image>
<view class="title">{{userinfolist.nickname}}</view>
<view class="bannerBox" @click="toPubArticle">
<image class="banner" src="../../static/fabuwenzhang_img@2x.png"></image>
<view class="textBtn">发布文章<image class="rBtn" src="../../static/dizhi_btn@2x2.png"></image></view>
</view>
<view class="item" @click="togeren">
<view class="name"><image class="icon" src="../../static/8_icon@2x.png"></image>个人信息</view>
<image class="right" src="../../static/dizhi_btn@2x.png"></image>
</view>
<view class="item" @click="tocollegeCellect">
<view class="name"><image class="icon" src="../../static/7_icon@2x.png"></image>我的文章</view>
<image class="right" src="../../static/dizhi_btn@2x.png"></image>
</view>
<view class="item" @click="tofollowPeople">
<view class="name"><image class="icon" src="../../static/6_icon@2x.png"></image>关注的人</view>
<image class="right" src="../../static/dizhi_btn@2x.png"></image>
</view>
<view class="item" @click="tomywallet">
<view class="name"><image class="icon" src="../../static/5_icon@2x.png"></image>我的钱包</view>
<image class="right" src="../../static/dizhi_btn@2x.png"></image>
</view>
<view class="item" @click="tomycomment">
<view class="name"><image class="icon" src="../../static/4_icon@2x.png"></image>我的留言</view>
<image class="right" src="../../static/dizhi_btn@2x.png"></image>
</view>
<!-- <tab></tab> -->
<view class="collegefooter" v-if="type == 2">
<view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+2">
<view class="teacherfootitemtop">
<image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view>
</view>
<view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/homePage?type='+2">
<view class="teacherfootitemtop">
<image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==3?'selactive':''">我的主页</view>
</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
currentTabIndex: 2,
footersel:3,
type:"",
userinfolist:{},
token:''
}
},
methods:{
toPubArticle(){
wx.navigateTo({
url:"./pubArticle"
})
},
getuserinfo(){
var that = this
var url = "student/getMyInfo"
var token = uni.getStorageSync('token')
var params = {
token:token
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.userinfolist=res
}).catch((err)=>{
console.log(err)
})
},
// 底部导航跳转
footerselChange(e){
let url=e.currentTarget.dataset.url;
console.log(url)
uni.redirectTo({
url:url
})
},
togeren(){
if(uni.getStorageSync('token')==''){
uni.showToast({
title:"请登陆后操作",
icon:"none"
})
setTimeout(() => {
uni.navigateTo({
url:'../register/register?istoken='+1
})
}, 1500);
}else{
wx.navigateTo({
url:'./collegegerencenter'
})
}
},
tocollegeCellect(){
if(uni.getStorageSync('token')==''){
uni.showToast({
title:"请登陆后操作",
icon:"none"
})
setTimeout(() => {
uni.navigateTo({
url:'../register/register?istoken='+1
})
}, 1500);
}else{
wx.navigateTo({
url:'./collegeCellect'
})
}
},
tofollowPeople(){
if(uni.getStorageSync('token')==''){
uni.showToast({
title:"请登陆后操作",
icon:"none"
})
setTimeout(() => {
uni.navigateTo({
url:'../register/register?istoken='+1
})
}, 1500);
}else{
wx.navigateTo({
url:'./followPeople'
})
}
},
tomywallet(){
if(uni.getStorageSync('token')==''){
uni.showToast({
title:"请登陆后操作",
icon:"none"
})
setTimeout(() => {
uni.navigateTo({
url:'../register/register?istoken='+1
})
}, 1500);
}else{
wx.navigateTo({
url:'./mywallet'
})
}
},
tomycomment(){
if(uni.getStorageSync('token')==''){
uni.showToast({
title:"请登陆后操作",
icon:"none"
})
setTimeout(() => {
uni.navigateTo({
url:'../register/register?istoken='+1
})
}, 1500);
}else{
wx.navigateTo({
url:'./mycomment'
})
}
}
},
onLoad(options){
console.log(options.type)
var type=options.type
this.type=type
this.token=uni.getStorageSync('token')
},
onShow(){
this.getuserinfo()
}
}
</script>
<style lang="less">
.content{
text-align: center;
color:rgba(6,18,30,1);
.bg{
width: 750rpx;
height: 154rpx;
}
.photo{
width: 136rpx;
height: 136rpx;
position: absolute;
top: 52rpx;
left: 50%;
transform: translate(-50%);
}
.title{
margin-top: 66rpx;
}
.bannerBox{
position: relative;
margin: 0 auto;
margin-top: 78rpx;
margin-bottom: 30rpx;
width: 686rpx;
height: 140rpx;
.banner{
width: 686rpx;
height: 140rpx;
}
.textBtn{
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 72rpx;
color: #fff;
.rBtn{
width: 11rpx;
height: 20rpx;
margin-left: 18rpx;
}
}
}
.item{
display: flex;
align-items: center;
justify-content: space-between;
width: 686rpx;
margin: 0 auto;
padding: 32rpx 0;
border-bottom: 1rpx solid rgba(238,238,238,1);
.icon{
width: 36rpx;
height: 36rpx;
margin-right: 12rpx;
}
.name{
font-size: 28rpx;
display: flex;
align-items: center;
}
.right{
width: 10rpx;
height: 19rpx;
}
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<view class="card">
<view class="item">
<view class="name">姓名</view>
<input v-model="username" type="text" class="cont" :placeholder="userinfolist.nickname=='undefinde'? '' : userinfolist.nickname" placeholder-style="text-align: right;font-size:28rpx;" style="width:146rpx;text-align: right">
<!-- <view class="cont">爱学习的王笑笑</view> -->
</view>
<!-- <view class="item">
<view class="name">邮箱</view>
<input v-model="email" type="text" class="cont" placeholder="{{userinfolist.email}}" placeholder-style="text-align: right;font-size:28rpx;" style="width:220rpx;text-align: right">
</view> -->
<view class="item" style="border:none">
<view class="name">头像</view>
<image class="photo" @click="upload" :src="isUpload ? image : userinfolist.head_image"></image>
</view>
</view>
<view class="title">高中信息</view>
<view class="card">
<view class="item">
<view class="name">高中</view>
<!-- <input type="text" class="cont" placeholder="爱学习的王笑笑" placeholder-style="text-align: right;font-size:28rpx;color:#BDC4CE" style="width:200rpx"> -->
<view class="cont">
{{userinfolist.school_info.name}}
<image class="icon" src="../../static/dizhi_btn@2x2.png"></image>
</view>
</view>
<view class="item">
<view class="name">毕业年份</view>
<!-- <input type="text" class="cont" placeholder="爱学习的王笑笑" placeholder-style="text-align: right;font-size:28rpx;color:#BDC4CE" style="width:200rpx"> -->
<view class="cont">
{{userinfolist.endtime}}
<image class="icon" src="../../static/dizhi_btn@2x2.png"></image>
</view>
</view>
<view class="item">
<view class="name">高考学科</view>
<!-- <input type="text" class="cont" placeholder="爱学习的王笑笑" placeholder-style="text-align: right;font-size:28rpx;color:#BDC4CE" style="width:200rpx"> -->
<view class="cont">
语数外
<image class="icon" src="../../static/dizhi_btn@2x2.png"></image>
</view>
</view>
<view class="item">
<view class="name">选考科目</view>
<!-- <input type="text" class="cont" placeholder="爱学习的王笑笑" placeholder-style="text-align: right;font-size:28rpx;color:#BDC4CE" style="width:200rpx"> -->
<view class="cont">
{{userinfolist.subject_list[0].name}}
<image class="icon" src="../../static/dizhi_btn@2x2.png"></image>
</view>
</view>
<view class="item">
<view class="name">升学方式</view>
<!-- <input type="text" class="cont" placeholder="爱学习的王笑笑" placeholder-style="text-align: right;font-size:28rpx;color:#BDC4CE" style="width:200rpx"> -->
<view class="cont">
{{userinfolist.up_info.name}}
<image class="icon" src="../../static/dizhi_btn@2x2.png"></image>
</view>
</view>
</view>
<view class="title">大学信息</view>
<view class="card">
<view class="item">
<view class="name">就读大学</view>
<!-- <input type="text" class="cont" placeholder="爱学习的王笑笑" placeholder-style="text-align: right;font-size:28rpx;color:#BDC4CE" style="width:200rpx"> -->
<view class="cont">
{{userinfolist.university_info.name}}
<image class="icon" src="../../static/dizhi_btn@2x2.png"></image>
</view>
</view>
<view class="item">
<view class="name">所属学院</view>
<!-- <input type="text" class="cont" placeholder="爱学习的王笑笑" placeholder-style="text-align: right;font-size:28rpx;color:#BDC4CE" style="width:200rpx"> -->
<view class="cont">
{{userinfolist.college_info.name}}
<image class="icon" src="../../static/dizhi_btn@2x2.png"></image>
</view>
</view>
<view class="item">
<view class="name">就读专业</view>
<!-- <input type="text" class="cont" placeholder="爱学习的王笑笑" placeholder-style="text-align: right;font-size:28rpx;color:#BDC4CE" style="width:200rpx"> -->
<view class="cont">
{{userinfolist.graduated_info.name}}
<image class="icon" src="../../static/dizhi_btn@2x2.png"></image>
</view>
</view>
</view>
<view class="btn" @click="update">保存</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
username:'',
image:'',
image2:'',
isUpload:false,
userinfolist:[],
school_id:'',
name:'',
email:'',
date: '2020',
isDateShow:false
}
},
methods:{
getuserinfo(){
var that = this
var url = "student/getMyInfo"
var token = uni.getStorageSync('token')
var params = {
token:token
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.userinfolist=res
}).catch((err)=>{
console.log(err)
})
},
upload(){
var that = this;
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function (res) {
const tempFilePaths = res.tempFilePaths;
that.image = tempFilePaths[0];
app.upload('image',res.tempFilePaths[0],"post").then((res)=>{
// let newimage=that.image
that.image=app.globalData.imageBaseUrl+res.url
that.image2=res.url
console.log(res)
console.log(that.image)
console.log(res.url)
// newimage.push(res.url)
that.isUpload=true
}).catch((err)=>{
console.log(err)
})
// console.log("tempFilePaths[0]",tempFilePaths[0]) //能够打印出选中的图片
// console.log(res)
// that.head_image=tempFilePaths[0]
// that.iconcheck = 1;//点击后图片更改状态由0变成1
},
error : function(e){
console.log(e);
}
});
},
bindTimeChange(e){
this.date = e.target.value
},
update(){
var that = this
var url = "student/updateStudentInfo"
var token = uni.getStorageSync('token')
var params= {
token:token,
nickname:that.username=='' ? that.userinfolist.nickname : that.username,
head_image:that.image2=='' ? that.userinfolist.head_image : that.image2
}
app.post(url,params,"post").then((res)=>{
console.log(res)
res.head_image=that.image
res.nickname=that.username
uni.showToast({
title:'个人信息保存成功',
icon:'none'
})
setTimeout(() => {
uni.navigateBack()
},1500);
}).catch((err)=>{
console.log(err)
if(err.code==0){
uni.showToast({
title:err.msg,
icon:'none'
})
}
})
}
},
onLoad(){
this.getuserinfo()
}
}
</script>
<style lang="less">
.content{
background-color: rgba(249,249,249,1);
padding: 32rpx 32rpx 40rpx;
// height: 100vh;
.card{
width:686rpx;
// height:428rpx;
background:rgba(255,255,255,1);
opacity:1;
border-radius:20rpx;
margin: 0 auto;
.item{
width: 622rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 32rpx 0;
box-sizing: border-box;
font-size: 28rpx;
margin: 0 auto;
border-bottom: 1rpx solid rgba(238,238,238,1);
.cont{
display: flex;
align-items: center;
}
.photo{
width: 64rpx;
height: 64rpx;
border-radius: 50%;
}
.icon{
width: 11rpx;
height: 22rpx;
margin-left: 12rpx;
}
}
}
.title{
color:rgba(45,85,117,1);
font-size: 32rpx;
margin-top: 44rpx;
margin-bottom: 12rpx;
}
.btn{
width:684rpx;
height:80rpx;
background:rgba(45,85,117,1);
opacity:1;
border-radius:8rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
margin: 0 auto;
margin-top: 66rpx;
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<view class="title">
<image class="photo" :src="image"></image>
<view class="name">{{nickname}}</view>
</view>
<view class="contentBox">
<view class="comment" :style="{'margin-left:246rpx;': user_id==item.usera_id}" v-for="(item,index) in meslist" :key="index">
<span>{{item.des_content}}</span>
<view class="time">{{item.createtime}}</view>
</view>
</view>
<view class="inputBox">
<input type="text" class="input" v-model="des_content">
<view class="btn" @click="sendmsg">发送</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
des_content:'',
userb_id:'',
page:1,
size:10,
meslist:[],
image:'',
nickname:'',
user_id:''
}
},
methods:{
sendmsg(){
var that = this
var url = "mes/sendMes"
var params = {
token:uni.getStorageSync('token'),
userb_id:that.userb_id,
des_content:that.des_content
}
app.post(url,params,"post").then((res)=>{
console.log(res)
that.des_content=''
}).catch((err)=>{
console.log(err)
})
},
getmeslist(){
var that = this
var url = "mes/getMesDetail"
var params = {
token:uni.getStorageSync('token'),
page:that.page,
size:that.size,
userb_id:that.userb_id
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.meslist=res
}).catch((err)=>{
console.log(err)
})
}
},
onLoad(options){
console.log(options)
this.userb_id=options.userb_id
this.user_id=options.user_id
this.nickname=options.nickname
this.image=options.head_image
this.getmeslist()
}
}
</script>
<style lang="less">
.content{
background-color: #F9F9F9;
.title{
display: flex;
align-items: center;
background-color: #fff;
padding: 16rpx 32rpx;
.photo{
width: 68rpx;
height: 68rpx;
}
.name{
font-size: 28rpx;
margin-left: 18rpx;
}
}
.contentBox{
// height: 100vh;
background-color: #F9F9F9;
.right{
margin-left:246rpx;
}
.comment{
color:rgba(6,18,30,1);
font-size: 24rpx;
width:472rpx;
background:rgba(255,255,255,1);
padding: 22rpx 18rpx;
box-sizing: border-box;
margin: 56rpx 32rpx;
.time{
text-align: right;
color: #8C9198;
font-size: 22rpx;
}
}
}
.inputBox{
display: flex;
background-color: #fff;
padding: 16rpx 32rpx;
position: fixed;
bottom: 0;
.input{
width:506rpx;
height:68rpx;
background:rgba(238,238,238,1);
opacity:1;
border-radius:8rpx;
}
.btn{
width:150rpx;
height:68rpx;
background:rgba(129,195,191,1);
opacity:1;
border-radius:8rpx;
color: #fff;
text-align: center;
line-height: 68rpx;
font-size: 24rpx;
margin-left: 30rpx;
}
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<view class="item" v-for="(item,index) in mingxilist" :key="index">
<view class="left">
<view class="title">xx收益</view>
<view class="time">2020-2-19</view>
</view>
<view class="right">¥800.00</view>
</view>
<!-- <view class="item">
<view class="left">
<view class="title">提现</view>
<view class="time">2020-2-19</view>
</view>
<view class="right" style="color:#81C3BF">-¥800.00</view>
</view> -->
<view class="nodata" v-if="mingxilist.length==0">暂无数据</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
page:1,
size:10,
mingxilist:[]
}
},
methods:{
getyuE(){
var that = this
var url = "money/listMoneyLog"
var token = uni.getStorageSync('token')
var params = {
token:token,
page:that.page,
size:that.size
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.mingxilist=res
}).catch((err)=>{
console.log(err)
})
}
},
onLoad(){
this.getyuE()
}
}
</script>
<style lang="less">
.content{
.nodata{
text-align: center;
font-size: 28rpx;
}
.item{
width: 686rpx;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
padding: 24rpx 0;
border-bottom: 1rpx solid rgba(238,238,238,1);
.left{
.title{
font-size: 28rpx;
}
.time{
font-size: 24rpx;
color:rgba(140,145,152,1);
}
}
.right{
font-size: 28rpx;
color:rgba(239,76,70,1);
}
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<view class="item" @click="toschoolmate" v-for="(item,index) in likepeoplelist" :key="index" :data-id="item.user_id">
<image class="photo" src="../../static/logo_img@2x.png"></image>
<view class="cont">
<view class="title">{{}}</view>
<view class="academy">
<image class="icon" src="../../static/xuexiao_icon@2x2.png"></image>河北工业大学 软件学院 软件工程
</view>
<view class="fen">裸分</view>
</view>
<view class="right">
<image src="../../static/yiguanzhu_img@2x.png"></image>
<view class="text">已关注</view>
</view>
</view>
<view class="nodata" v-if="likepeoplelist.length==0">暂无数据</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
page:1,
size:10,
likepeoplelist:[],
}
},
methods:{
getlikepeople(){
var that = this
var url = 'student/getMyLikeStudent'
var token = uni.getStorageSync('token')
var params = {
token:token,
page:that.page,
size:that.size
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.likepeoplelist=res
}).catch((err)=>{
console.log(err)
})
},
toschoolmate(e){
var id = e.currentTarget.dataset.id
console.log(id)
uni.navigateTo({
url:"../school/schoolmateMsg?user_id="+id
})
}
},
onLoad(){
this.getlikepeople()
}
}
</script>
<style lang="less">
.content{
background:rgba(249,249,249,1);
height: 100vh;
padding: 24rpx 0;
.nodata{
font-size: 28rpx;
text-align: center;
padding: 20rpx 0;
}
.item{
width:686rpx;
height:172rpx;
background:rgba(255,255,255,1);
opacity:1;
border-radius:8px;
margin: 0 auto;
background-color: #fff;
display: flex;
padding: 24rpx 32rpx;
box-sizing: border-box;
position: relative;
margin-bottom: 24rpx;
.photo{
width: 112rpx;
height: 112rpx;
margin-right: 26rpx;
margin-top: 6rpx;
}
.cont{
.title{
color:rgba(61,68,77,1);
font-size: 28rpx;
}
.academy{
color:rgba(61,68,77,1);
font-size: 22rpx;
margin-top: 4rpx;
display: flex;
align-items: center;
// line-height: 24rpx;
.icon{
width: 24rpx;
height: 24rpx;
margin-right: 6rpx;
}
}
.fen{
font-size: 22rpx;
color:rgba(140,145,152,1);
margin-top: 10rpx;
}
}
.right{
width: 132rpx;
height: 54rpx;
position: absolute;
right: 0;
top: 16rpx;
image{
width: 132rpx;
height: 54rpx;
}
.text{
color: #fff;
font-size: 24rpx;
width: 80rpx;
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
}
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<view class="card">
<view class="item">
<view class="name">姓名</view>
<!-- <view class="cont">爱学习的王笑笑</view> -->
<input type="text" v-model="username" class="cont" :placeholder="userinfolist.nickname=='undefide' ? '' : userinfolist.nickname" placeholder-style="text-align: right" style="text-align: right">
</view>
<view class="item">
<view class="name">头像</view>
<image class="photo" @click="upload" :src="isUpload ? image : userinfolist.head_image"></image>
</view>
<view class="item">
<view class="name">高中</view>
<view class="cont">青岛市 青岛第一中学
<image class="icon" src="../../static/dizhi_btn@2x.png"></image>
</view>
</view>
<view class="item" style="border-bottom:none">
<view class="name">入学年份</view>
<view class="cont">2020年
<image class="icon" src="../../static/dizhi_btn@2x.png"></image>
</view>
</view>
</view>
<view class="btn" @click="update">保存</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
username:'',
image:'',
image2:'',
isUpload:false,
userinfolist:{}
}
},
methods:{
upload(){
var that = this;
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function (res) {
const tempFilePaths = res.tempFilePaths;
that.image = tempFilePaths[0];
that.image2 = tempFilePaths[0];
app.upload('image',res.tempFilePaths[0],"post").then((res)=>{
// let newimage=that.image
that.image=app.globalData.imageBaseUrl+res.url
that.image2 = res.url
console.log(res)
console.log(that.image)
console.log(res.url)
// newimage.push(res.url)
that.isUpload=true
}).catch((err)=>{
console.log(err)
})
// console.log("tempFilePaths[0]",tempFilePaths[0]) //能够打印出选中的图片
// console.log(res)
// that.head_image=tempFilePaths[0]
// that.iconcheck = 1;//点击后图片更改状态由0变成1
},
error : function(e){
console.log(e);
}
});
},
getuserinfo(){
var that = this
var url = "student/getMyInfo"
var token = uni.getStorageSync('token')
var params = {
token:token
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.userinfolist=res
}).catch((err)=>{
console.log(err)
})
},
update(){
var that = this
var url = "student/updateStudentInfo"
var token = uni.getStorageSync('token')
var params= {
token:token,
nickname:that.username,
head_image:that.image2=='' ? that.userinfolist.head_image : that.image2
}
app.post(url,params,"post").then((res)=>{
console.log(res)
uni.showToast({
title:'个人信息保存成功',
icon:'none'
})
setTimeout(() => {
uni.navigateBack()
},1500);
}).catch((err)=>{
console.log(err)
if(err.code==0){
uni.showToast({
title:err.msg,
icon:'none'
})
}
})
}
},
onLoad(){
this.getuserinfo()
}
}
</script>
<style lang="less">
.content{
background-color: rgba(249,249,249,1);
padding: 32rpx 0;
height: 100vh;
.card{
width:686rpx;
// height:428rpx;
background:rgba(255,255,255,1);
opacity:1;
border-radius:20rpx;
margin: 0 auto;
.item{
width: 622rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 32rpx 0;
box-sizing: border-box;
font-size: 28rpx;
margin: 0 auto;
border-bottom: 1rpx solid rgba(238,238,238,1);
.photo{
width: 64rpx;
height: 64rpx;
border-radius: 50%;
}
.icon{
width: 11rpx;
height: 22rpx;
margin-left: 10rpx;
}
}
}
.btn{
width:684rpx;
height:80rpx;
background:rgba(45,85,117,1);
opacity:1;
border-radius:8rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
margin: 0 auto;
margin-top: 620rpx;
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<image class="bg" src="../../static/bg_img2.png"></image>
<image class="photo" :src="token=='' ? '../../static/touxiang_img@2x.png' :head_image"></image>
<view class="title">{{userinfolist.nickname}}</view>
<image class="banner" src="../../static/banner_img@2x.png" @click="toBuyCard"></image>
<view class="item" @click="togeren">
<view class="name">
<image class="icon" src="../../static/8_icon@2x.png"></image>个人信息
</view>
<image class="right" src="../../static/dizhi_btn@2x.png"></image>
</view>
<view class="item" @click="tocellect">
<view class="name">
<image class="icon" src="../../static/7_icon@2x.png"></image>我的文章
</view>
<image class="right" src="../../static/dizhi_btn@2x.png"></image>
</view>
<view class="item" @click="tofollew">
<view class="name">
<image class="icon" src="../../static/6_icon@2x.png"></image>关注的人
</view>
<image class="right" src="../../static/dizhi_btn@2x.png"></image>
</view>
<view class="item" @click="tocustom">
<view class="name">
<image class="icon" src="../../static/5_icon@2x.png"></image>消费记录
</view>
<image class="right" src="../../static/dizhi_btn@2x.png"></image>
</view>
<view class="item" @click="tocomment">
<view class="name">
<image class="icon" src="../../static/4_icon@2x.png"></image>我的留言
</view>
<image class="right" src="../../static/dizhi_btn@2x.png"></image>
</view>
<!-- <tab></tab> -->
<!-- <tab :current="currentTabIndex" @getData="tabClick"></tab> -->
<view class="teacherfooter">
<view class="teacherfootitem" v-if="type==1">
<view class="teacherfootitemtop" @click="footerselChange" :data-id="1" :data-url="'/pages/school/school?type='+1">
<image :src="footersel==1?'/static/xuexiao_icon@2x.png':'/static/xuexiao_icon@2x3.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==1?'selactive':''">学校</view>
</view>
<view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+1">
<view class="teacherfootitemtop">
<image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view>
</view>
<view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/homePage?type='+1">
<view class="teacherfootitemtop">
<image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==3?'selactive':''">我的主页</view>
</view>
</view>
<view class="collegefooter" v-if="type == 2">
<view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+2">
<view class="teacherfootitemtop">
<image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view>
</view>
<view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/collegeHome?type='+2">
<view class="teacherfootitemtop">
<image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==3?'selactive':''">我的主页</view>
</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data() {
return {
currentTabIndex: 2,
footersel:3,
type:"",
userinfolist:{},
token:'',
head_image:''
}
},
methods: {
toBuyCard() {
if(uni.getStorageSync('token')==''){
uni.navigateTo({
url:'../register/register?istoken='+1
})
}else{
wx.navigateTo({
url:'./buyCard'
})
}
},
// 底部导航跳转
footerselChange(e){
let url=e.currentTarget.dataset.url;
console.log(url)
uni.redirectTo({
url:url
})
},
getuserinfo(){
var that = this
var url = "student/getMyInfo"
var token = uni.getStorageSync('token')
var params = {
token:token
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.userinfolist=res;
console.log(res.head_image)
that.head_image=res.head_image
}).catch((err)=>{
console.log(err)
})
},
// tocomment(){
// uni.navigateTo({
// url:'./mycomment?user_id='+this.userinfolist.user_id
// })
// },
togeren(){
if(uni.getStorageSync('token')==''){
uni.showToast({
title:"请登陆后操作",
icon:"none"
})
setTimeout(() => {
uni.navigateTo({
url:'../register/register?istoken='+1
})
},1500);
}else{
wx.navigateTo({
url:'./gerencenter'
})
}
},
tocellect(){
if(uni.getStorageSync('token')==''){
uni.showToast({
title:"请登陆后操作",
icon:"none"
})
setTimeout(() => {
uni.navigateTo({
url:'../register/register?istoken='+1
})
},1500);
}else{
wx.navigateTo({
url:'./cellect'
})
}
},
tofollew(){
if(uni.getStorageSync('token')==''){
uni.showToast({
title:"请登陆后操作",
icon:"none"
})
setTimeout(() => {
uni.navigateTo({
url:'../register/register?istoken='+1
})
},1500);
}else{
wx.navigateTo({
url:'./followPeople'
})
}
},
tocustom(){
if(uni.getStorageSync('token')==''){
uni.showToast({
title:"请登陆后操作",
icon:"none"
})
setTimeout(() => {
uni.navigateTo({
url:'../register/register?istoken='+1
})
},1500);
}else{
wx.navigateTo({
url:'./consumePage'
})
}
},
tocomment(){
if(uni.getStorageSync('token')==''){
uni.showToast({
title:"请登陆后操作",
icon:"none"
})
setTimeout(() => {
uni.navigateTo({
url:'../register/register?istoken='+1
})
},1500);
}else{
uni.navigateTo({
url:'./mycomment?user_id='+this.userinfolist.user_id
})
}
}
},
onLoad(options){
this.token=uni.getStorageSync('token')
console.log(options.type)
var type=options.type
this.type=type
this.getuserinfo()
},
}
</script>
<style lang="less">
.content {
text-align: center;
color: rgba(6, 18, 30, 1);
padding-bottom: 120rpx;
.bg {
width: 750rpx;
height: 154rpx;
}
.photo {
width: 136rpx;
height: 136rpx;
position: absolute;
top: 52rpx;
left: 50%;
transform: translate(-50%);
}
.title {
margin-top: 66rpx;
}
.banner {
margin-top: 78rpx;
width: 686rpx;
height: 216rpx;
margin-bottom: 30rpx;
}
.item {
display: flex;
align-items: center;
justify-content: space-between;
width: 686rpx;
margin: 0 auto;
padding: 32rpx 0;
border-bottom: 1rpx solid rgba(238, 238, 238, 1);
.icon {
width: 36rpx;
height: 36rpx;
margin-right: 12rpx;
}
.name {
font-size: 28rpx;
display: flex;
align-items: center;
}
.right {
width: 10rpx;
height: 19rpx;
}
}
}
</style>
... ...
<template>
<view class="content">
<view class="item" @click="tocommentlist(item)" v-for="(item,index) in commentlist" :key="index">
<view class="toprow">
<image class="photo" src="../../static/logo_img@2x.png"></image>
<view class="msg">
<view class="name">{{item.nickname}}</view>
<view class="time">{{item.createtime}}</view>
</view>
<view class="right" v-if="item.readtime==null">未读</view>
<view class="right" style="color:#BDC4CE" v-else>已读</view>
</view>
<view class="bottomrow">
{{item.des_content}}
</view>
</view>
<view class="nodata" v-if="commentlist.length==0">暂无数据</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
page:1,
size:10,
commentlist:[],
user_id:''
}
},
methods:{
getcommentlist(){
var that = this
var url = "mes/getMyMes"
var token = uni.getStorageSync('token')
var params = {
token:token,
page:that.page,
size:that.size,
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.commentlist=res
}).catch((err)=>{
console.log(err)
})
},
tocommentlist(item){
uni.navigateTo({
url:'./commentContent?userb_id='+item.userb_id+"&nickname="+item.nickname+"&head_image="+item.head_image+"&user_id="+this.user_id
})
var that = this
var url = "mes/isReadMes"
var token = uni.getStorageSync('token')
var params = {
token:token,
usera_id:item.userb_id
}
app.post(url,params,"post").then((res)=>{
console.log(res)
}).catch((err)=>{
console.log(err)
})
}
},
onLoad(options){
this.user_id=options.user_id
this.getcommentlist()
}
}
</script>
<style lang="less">
.content{
background:rgba(249,249,249,1);
padding: 28rpx 0;
.nodata{
font-size: 28rpx;
text-align: center;
padding: 20rpx 0;
}
.item{
width: 686rpx;
margin: 0 auto;
background-color: #fff;
padding: 32rpx;
box-sizing: border-box;
margin-bottom: 28rpx;
}
.toprow{
display: flex;
// justify-content: space-between;
.photo{
width: 68rpx;
height: 68rpx;
}
.msg{
// width: 200rpx;
margin-left: 20rpx;
.name{
font-size: 24rpx;
}
.time{
color:rgba(140,145,152,1);
font-size:22rpx;
}
}
.right{
color:rgba(235,128,121,1);
font-size: 24rpx;
margin-left: 324rpx;
// float: right;
width: 60rpx;
}
.readed{
color:rgba(189,196,206,1);
font-size: 24rpx;
margin-left: 364rpx;
}
}
.bottomrow{
font-size:24rpx;
margin-top: 24rpx;
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<navigator class="mingxi" hover-class="none" url="./yuE">余额明细</navigator>
<view class="title">钱包余额(元)</view>
<view class="money">{{monery}}</view>
<view class="btn" @click="totixian">立即提现</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
monery:''
}
},
methods:{
getyuE(){
var that = this
var url = "money/getStudentMoney"
var token = uni.getStorageSync('token')
var params = {
token:token
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.monery=res
}).catch((err)=>{
console.log(err)
})
},
totixian(){
uni.navigateTo({
url:'./tixianPage?money='+this.monery
})
}
},
onLoad(){
this.getyuE()
}
}
</script>
<style lang="less">
.content{
padding: 24rpx 32rpx;
.mingxi{
text-align: right;
text-decoration:underline;
font-size:24rpx;
}
.title{
text-align: center;
margin-top: 186rpx;
}
.money{
text-align: center;
font-size:88rpx;
margin-top: 12rpx;
}
.btn{
width:592rpx;
height:80rpx;
background:rgba(45,85,117,1);
opacity:1;
border-radius:8rpx;
color: #fff;
font-size: 28rpx;
text-align: center;
line-height: 80rpx;
margin: 0 auto;
margin-top: 376rpx;
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<view class="box">
<view class="item">
<input type="text" v-model="title" placeholder="请添加文章标题" placeholder-style="font-size:32rpx;color:rgba(189,196,206,1);" style="">
</view>
<view class="item">
<view class="left">文章类型</view>
<view class="right" @click="seltype">
<!-- <input type="text" class="input" placeholder="请选择文章类型" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx"> -->
<picker mode="selector" :value="type" @change="bindTypeChange" :range="typearray" range-key='name' :data-id="typearray[type].id">
<view class="text" style="color:rgba(189,196,206,1);font-size:28rpx">{{istypeshow? typearray[type].name : '请选择文章类型'}}</view>
</picker>
<image class="icon" src="../../static/dizhi_btn@2x2.png"></image>
</view>
</view>
<view class="item">
<view class="left">开放范围</view>
<view class="right">
<view class="selected" @click="selectrange" data-id='1'>
<image class="icon" :src="show_type==1 ? '../../static/xuanzhong_img@2x.png' : '../../static/weixuanzhong_img@2x.png'"></image>
仅校友
</view>
<view class="selected" @click="selectrange" data-id='2'>
<image class="icon" :src="show_type==2 ? '../../static/xuanzhong_img@2x.png' : '../../static/weixuanzhong_img@2x.png'"></image>
全部
</view>
</view>
</view>
<view class="item2">
<textarea v-model="articlecontent" name="" id="" cols="30" rows="10" class="textarea" placeholder="请输入文章内容" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx"></textarea>
<view class="tips">可输入1000字</view>
</view>
<view class="picBox">
<!-- <view class="boxitem">
<image class="pic" src="../../static/bg_img@2x.png"></image>
<image class="icon" src="../../static/shanchu_icon@2x.png"></image>
</view>
<view class="boxitem">
<image class="pic" src="../../static/bg_img@2x.png"></image>
<image class="icon" src="../../static/shanchu_icon@2x.png"></image>
</view>
<view class="boxitem">
<image class="pic" src="../../static/bg_img@2x.png"></image>
<image class="icon" src="../../static/shanchu_icon@2x.png"></image>
</view>
<view class="boxitem">
<image class="pic" src="../../static/bg_img@2x.png"></image>
<image class="icon" src="../../static/shanchu_icon@2x.png"></image>
</view> -->
<view class="boxitem">
<view class="imagebox" v-for="(item,index) in image" :key="index">
<image :src="item" style="width:128rpx;height:128rpx;margin-right: 24rpx;margin-bottom: 24rpx;"></image>
<image class="icon" src="../../static/shanchu_icon@2x.png" @click="delimage(index)"></image>
</view>
<image class="pic" src="../../static/shangchuan_img@2x.png" @click="upload"></image>
</view>
</view>
</view>
<view class="btn" @click="pubarticle">确认发布</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
title:'',
// range:'1',
type:0,
istypeshow:false,
typearray:["经验","感受"],
articlecontent:'',
image:[],
image2:[],
isUpload:false,
article_type_id:'',
show_type:1,
}
},
methods:{
selectrange(e){
this.show_type=e.currentTarget.dataset.id
},
seltype(){
this.istypeshow=true
},
bindTypeChange(e){
console.log(e.target)
this.type = e.target.value
console.log(e.currentTarget)
this.article_type_id=e.currentTarget.dataset.id
},
upload(){
var that = this;
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function (res) {
const tempFilePaths = res.tempFilePaths;
// that.image = that.image.push(tempFilePaths[0]) ;
app.upload('image',res.tempFilePaths[0],"post").then((res)=>{
// let newimage=that.image
var url= app.globalData.imageBaseUrl+res.url
// that.image=app.globalData.imageBaseUrl+res.url
console.log(res)
console.log(res.url)
console.log(that.image)
that.image.push(url)
that.image2.push(res.url)
console.log(that.image)
// that.image=that.image
that.isUpload=true
}).catch((err)=>{
console.log(err)
})
// console.log("tempFilePaths[0]",tempFilePaths[0]) //能够打印出选中的图片
// console.log(res)
// that.head_image=tempFilePaths[0]
// that.iconcheck = 1;//点击后图片更改状态由0变成1
},
error : function(e){
console.log(e);
}
});
},
pubarticle(){
var that= this
if(that.title==''){
uni.showToast({
title:"请输入文章标题",
icon:"none"
})
return false
}
if(that.type==''){
uni.showToast({
title:"请选择文章类型",
icon:"none"
})
return false
}
if(that.articlecontent==''){
uni.showToast({
title:"请输入文章内容",
icon:"none"
})
return false
}else if (that.articlecontent.length>1000){
uni.showToast({
title:"已超过最大字数",
icon:"none"
})
}
// if(that.image.length==0){
// uni.showToast({
// title:"请添加文章图片",
// icon:"none"
// })
// return false
// }
var url = "article/addArticle"
var token = uni.getStorageSync('token')
console.log(token)
var params={
token:token,
title:that.title,
article_type_id:that.article_type_id,
show_type:that.show_type,
des_content:that.articlecontent,
des_images:that.image2.join(",")
}
app.post(url,params,"post").then((res)=>{
console.log(res)
uni.showToast({
title:"文章已发布,审核中",
icon:"none"
})
setTimeout(() => {
uni.navigateBack()
},1500);
// uni.navigateTo({
// url:"./homePage"
// })
}).catch((err)=>{
console.log(err)
})
},
getAllType(){
var that = this
var url = "article/getArticleType"
var params = {}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.typearray=res
}).catch((err)=>{
console.log(err)
})
},
delimage(index){
this.image.splice(index,1)
}
},
onLoad(){
this.getAllType()
}
}
</script>
<style lang="less">
.content{
background-color: #F9F9F9;
padding: 32rpx;
.box{
background-color: #fff;
width:686rpx;
// height:976rpx;
background:rgba(255,255,255,1);
opacity:1;
border-radius:20rpx;
margin: 0 auto;
.item{
width:622rpx;
margin:0 auto;
padding: 32rpx 0;
border-bottom: 1rpx solid rgba(238,238,238,1);
display: flex;
justify-content: space-between;
.left{
font-size: 28rpx;
}
.right{
display: flex;
align-items: center;
font-size: 28rpx;
.input{
width: 200rpx;
}
.icon{
width: 13rpx;
height: 25rpx;
margin-left: 8rpx;
}
.selected{
.icon{
width: 20rpx;
height: 20rpx;
margin-left: 40rpx;
margin-right: 10rpx;
}
}
}
}
.item2{
padding: 32rpx;
width: 686rpx;
.textarea{
width: 622rpx;
font-size: 28rpx;
}
.tips{
font-size: 24rpx;
text-align: right;
width: 622rpx;
}
}
.picBox{
padding: 32rpx;
width: 460rpx;
display: flex;
flex-wrap: wrap;
.boxitem{
width: 460rpx;
// margin-right: 24rpx;
// margin-bottom: 24rpx;
display: flex;
flex-wrap: wrap;
justify-content: start;
.imagebox{
width: 128rpx;
height: 128rpx;
position: relative;
display: inline-block;
margin-right: 24rpx;margin-bottom: 24rpx;
}
.pic{
width: 128rpx;
height: 128rpx;
margin-right: 24rpx;margin-bottom: 24rpx;
}
.icon{
width: 36rpx;
height: 36rpx;
position: absolute;
right: -18rpx;
top: -18rpx;
}
}
}
}
.btn{
width:684rpx;
height:80rpx;
background:rgba(45,85,117,1);
opacity:1;
border-radius:8rpx;
color: #fff;
text-align: center;
line-height: 80rpx;
font-size: 28rpx;
margin-top: 54rpx;
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<image class="bg" src="../../static/bg_img@2x(2).png"></image>
<view class="card">
<view class="title">提现到微信余额(元)</view>
<!-- <view class="money">100.00</view> -->
<input type="text" v-model="money" class="money" placeholder="100.00" placeholder-style="padding-bottom: 10rpx;color:rgba(189,196,206,1);font-size: 80rpx;margin-top: 16rpx;border-bottom: 1rpx solid rgba(112,112,112,1);">
<view class="text">最多可提100.00元,<text>全部提现</text></view>
<view class="btn" @click="tixian">提现</view>
</view>
<view class="textBox">
YHA青年旅舍会员卡(一年)是国际青年旅舍联盟会员身份证明,全球通用,也是旅行者入住青年旅舍的凭证。拥有会员卡,可以享受国内外国际青年旅舍住宿价格的优惠,同时部分海外青年旅舍只允许会员入住。
成为YHA青年旅舍会员的好处:
<view>1)入住青年旅舍享受房价上的优惠;</view>
<view>2)在世界各地享有食、住、行、游、购、娱等逾3,000项优惠,如:在全球多个国际机场和车船站,凭会员卡兑换外币可免收手续费;观光、租车、购物、参团、购买车船票等均可能有折扣,折扣率高达50%。单是在澳大利亚,优惠项目便接近800种;</view>
<view>3)以优惠价格参与多项由青年旅舍举办的各类文化、旅游等方面的交流活动;</view>
<view>4)优先参与青年旅舍组织的国际交流活动。</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
money:'',
yue:''
}
},
methods:{
tixian(){
var that = this
if(that.money==''){
uni.showToast({
title:"提现金额不能为空",
icon:"none"
})
return false
}
if(that.money>that.yue){
uni.showToast({
title:"提现金额不足",
icon:"none"
})
return false
}
var url = "money/gotMoney"
var token = uni.getStorageSync('token')
var params = {
token:token,
money:that.money
}
app.post(url,params,"post").then((res)=>{
console.log(res)
}).catch((err)=>{
console.log(err)
})
}
},
onLoad(options){
this.yue=options.money
}
}
</script>
<style lang="less">
.content{
background-color: #F9F9F9;
.bg{
width: 750rpx;
height: 292rpx;
}
.card{
width:686rpx;
height:514rpx;
background:rgba(255,255,255,1);
box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1);
opacity:1;
border-radius:20rpx;
position: absolute;
top: 26rpx;
left: 32rpx;
padding: 68rpx 46rpx 40rpx;
box-sizing: border-box;
color:rgba(6,18,30,1);
.title{
font-size: 28rpx;
}
.money{
color:rgba(189,196,206,1);
font-size: 80rpx;
margin-top: 16rpx;
border-bottom: 1rpx solid rgba(112,112,112,1);
height: 90rpx;
}
.text{
font-size:24rpx;
margin-top: 22rpx;
text{
color: #81C3BF;
}
}
.btn{
width:596rpx;
height:76rpx;
background:rgba(45,85,117,1);
opacity:1;
border-radius:8rpx;
text-align: center;
line-height: 76rpx;
color: #fff;
font-size: 28rpx;
margin-top: 90rpx;
}
}
.textBox{
width:636rpx;
height:586rpx;
font-size:24rpx;
font-family:PingFang SC;
font-weight:400;
line-height:40rpx;
color:rgba(6,18,30,1);
opacity:1;
margin: 0 auto;
margin-top: 274rpx;
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<view class="item" v-for="(item,index) in mingxilist" :key="index">
<view class="left">
<view class="title">xx收益</view>
<view class="time">2020-2-19</view>
</view>
<view class="right">¥800.00</view>
</view>
<view class="nodata" v-if="mingxilist.length==0">暂无数据</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
page:1,
size:10,
mingxilist:[]
}
},
methods:{
getyuE(){
var that = this
var url = "money/listMoneyLog"
var token = uni.getStorageSync('token')
var params = {
token:token,
page:that.page,
size:that.size
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.mingxilist=res
}).catch((err)=>{
console.log(err)
})
}
},
onLoad(){
this.getyuE()
}
}
</script>
<style lang="less">
.content{
.nodata{
font-size: 28rpx;
text-align: center;
padding: 20rpx 0;
}
.item{
width: 686rpx;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
padding: 24rpx 0;
border-bottom: 1rpx solid rgba(238,238,238,1);
.left{
.title{
font-size: 28rpx;
}
.time{
font-size: 24rpx;
color:rgba(140,145,152,1);
}
}
.right{
font-size: 28rpx;
color:rgba(239,76,70,1);
}
}
}
</style>
\ No newline at end of file
... ...
<template>
</template>
<script>
export default {
}
</script>
<style>
</style>
... ...
<template>
<view class="content">
<view class="selectCard">
<view class="item">
<view class="title">所在地区</view>
<view class="selectBtn" @click="seldiqu">{{provname}}-{{cityname}}<image class="icon" src="../../static/zhuandao_icon@2x.png"></image></view>
</view>
<view class="item" style="border-bottom:none">
<view class="title">高中名称</view>
<input type="text" v-model="schoolname" class="inpt" placeholder="请输入高中名称" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;">
</view>
</view>
<view class="diquPopup" v-if="isDiquShow">
<view class="cont">
<view class="colum" style="overflow: auto;height: 540rpx;">
<!-- <view class="title" @click="selectprovince" :data-id="''">全部省</view> -->
<view class="item" @click="selectprovince" v-for="(item,index) in provinceList" :key="index" :data-id="item.code" :data-prov="item.name">{{item.name}}</view>
</view>
<view class="colum" style="overflow: auto;height: 540rpx;">
<view class="title" @click="selectcity" :data-id="''">全部市</view>
<view class="item" @click="selectcity" v-for="(item,index) in cityList" :key="index" :data-id="item.code" :data-city="item.name">{{item.name}}</view>
</view>
<!-- <view class="colum" style="overflow: auto;height: 224rpx;">
<view class="title" @click="selectschool" :data-id="null">全部学校</view>
<view class="item" @click="selectschool" v-for="(item,index) in schoolList" :key="index" :data-id="item.id">{{item.name}}</view>
</view> -->
</view>
</view>
<view class="btn" @click="popupShow">提交</view>
<view class="popup" v-if="isPopupShow">
<view class="card">
<view class="title">提交成功</view>
<view class="tips">学校将在72小时内审核添加</view>
<view class="okBtn" @click="popupHide">确定</view>
</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
isPopupShow:false,
isDiquShow:false,
province_id:'',
city_id:'',
school_id:'',
cityList:[],
provinceList:[],
provname:'XX省',
cityname:'XX市',
schoolname:''
}
},
methods:{
popupShow(){
var that = this
var url = "school/addOneSchool"
var params = {
name:that.schoolname,
province_id:that.province_id,
city_id:that.city_id
}
app.post(url,params,"post").then((res)=>{
console.log(res)
this.isPopupShow=true
}).catch((err)=>{
console.log(err)
})
},
popupHide(){
this.isPopupShow=false
uni.navigateBack()
},
seldiqu(){
this.isDiquShow=true
},
//点击选中的省
selectprovince(e){
this.province_id=e.currentTarget.dataset.id
this.getAllCity()
this.provname=e.currentTarget.dataset.prov
},
//点击选中的市
selectcity(e){
this.city_id=e.currentTarget.dataset.id
// this.getAllSchool()
this.isDiquShow=false
this.cityname=e.currentTarget.dataset.city
},
//获取全部地区(省)
getAllProvince(){
var url ="city/getAllProvince"
var params ={}
app.post(url,params,"get").then((res)=>{
var nullData = {
code:'',
name:"全部省"
}
res.unshift(nullData)
console.log(res)
this.provinceList=res
}).catch((err)=>{
console.log(err)
})
},
//市
getAllCity(){
var url = "city/getCity"
var params = {
province_id:this.province_id
}
app.post(url,params,"get").then((res)=>{
console.log(res)
this.cityList=res
}).catch((err)=>{
console.log(err)
})
},
},
onLoad(){
this.getAllProvince()
}
}
</script>
<style lang="less">
.diquPopup{
font-size: 28rpx;
width: 686rpx;
height: 600rpx;
position: absolute;
top: 124rpx;
left: 50%;
transform: translate(-50%);
background-color: #fff;
padding: 22rpx 32rpx;
box-sizing: border-box;
z-index: 999;
box-shadow:0px 4px 4px rgba(0,0,0,0.06);
border-top: 1rpx solid rgba(249,249,249,1);
.item{
margin-bottom: 22rpx;
// height: 74rpx;
width: 170rpx;
}
.title{
margin-bottom: 20rpx;
}
.cont{
.colum{
width: 30%;
height: 500rpx;
}
display: flex;
height: 600rpx;
flex-direction: column;
flex-wrap: wrap;
justify-content: start;
}
}
.content{
background:rgba(249,249,249,1);
padding: 32rpx;
height: 100vh;
box-sizing: border-box;
.selectCard{
background-color: #fff;
border-radius:20rpx;
.item{
display: flex;
justify-content: space-between;
padding: 30rpx 32rpx;
// background-color: #fff;
border-bottom: 1rpx solid rgba(238,238,238,1);
font-size: 28rpx;
.selectBtn{
color:rgba(189,196,206,1);
.icon{
width: 13rpx;
height: 24rpx;
margin-left: 8rpx;
}
}
.inpt{
// height: 30rpx;
text-align: right;
// width: 250rpx;
}
}
}
.btn{
width:686rpx;
height:80rpx;
background:rgba(45,85,117,1);
opacity:1;
border-radius:8rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
font-size: 28rpx;
position: absolute;
bottom: 32rpx;
}
.popup{
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
.card{
width: 628rpx;
height: 294rpx;
background-color: #fff;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
display: flex;
flex-direction: column;
justify-content: space-between;
text-align: center;
padding: 40rpx 0;
box-sizing: border-box;
.title{
font-size: 32rpx;
}
.tips{
font-size: 24rpx;
}
.okBtn{
width:220rpx;
height:60rpx;
background:rgba(45,85,117,1);
opacity:1;
border-radius:8rpx;
text-align: center;
line-height: 60rpx;
color: #fff;
font-size: 28rpx;
margin: 0 auto;
}
}
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<view class="studentMsg">
<view class="item">
<view class="title">姓名</view>
<input type="text" v-model="username" class="inpt" placeholder="请输入姓名" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;">
</view>
<view class="item">
<view class="title">邮箱</view>
<input type="text" v-model="email" class="inpt" placeholder="请输入邮箱" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;">
</view>
<view class="item" style="border-bottom:none">
<view class="title">头像</view>
<image @click="upload" class="photo" :src="isUpload ? image : '../../static/touxiang_img@2x.png'"></image>
</view>
</view>
<view class="schoolTitle">高中信息</view>
<view class="studentMsg">
<view class="item" @click="selhigh">
<view class="title">高中</view>
<view class="selectBtn">{{isHighShow? name : '请选择就读高中'}}<image class="icon" src="../../static/zhuandao_icon@2x.png"></image></view>
</view>
<view class="item">
<view class="title">毕业年份</view>
<!-- <view class="selectBtn">请选择毕业年份<image class="icon" src="../../static/zhuandao_icon@2x.png"></image></view> -->
<view @click="selDate" style="display: flex;justify-content: space-between;align-items: center;">
<picker mode="date" :value="date" start="2000-01-01" @change="bindTimeChange">
<view class="selectBtn">{{isDateShow? date : '请选择毕业年份'}}</view>
</picker>
<image class="icon" src="../../static/zhuandao_icon@2x.png"></image>
</view>
</view>
<view class="item" @click="subPopupShow">
<view class="title">选考科目</view>
<view class="selectBtn">{{subid.toString()!='' ? subname.toString() : "请选择选考科目"}}<image class="icon" src="../../static/zhuandao_icon@2x.png"></image></view>
</view>
<view class="item" style="border-bottom:none" @click="stylePopupShow">
<view class="title">升学方式</view>
<view class="selectBtn">{{isupnameshow? upname : "请选择升学方式"}}<image class="icon" src="../../static/zhuandao_icon@2x.png"></image></view>
</view>
</view>
<view class="schoolTitle">大学信息</view>
<view class="studentMsg">
<view class="item" @click="selcollege">
<view class="title">就读大学</view>
<view class="selectBtn">{{isNameShow? collegename : '请选择就读大学'}}<image class="icon" src="../../static/zhuandao_icon@2x.png"></image></view>
</view>
<view class="item">
<view class="title">所属学院</view>
<view class="selectBtn" @click="tocollege">{{iscollgegshow? academyname : '请选择所属学院' }}<image class="icon" src="../../static/zhuandao_icon@2x.png"></image></view>
</view>
<view class="item" style="border-bottom:none" @click="tomajor">
<view class="title">就读专业</view>
<view class="selectBtn">{{ismajorshow? academyname : '请选择所属专业' }}<image class="icon" src="../../static/zhuandao_icon@2x.png"></image></view>
</view>
</view>
<view class="okBtn" @click="collegeregister">注册</view>
<view class="subPopup" v-if="isSubPopupShow">
<view class="selectCard">
<view class="buttonBox">
<view class="closeBtn" @click="subPopupHide">取消</view>
<view class="confimBtn" @click="subPopupHide">确定</view>
</view>
<view class="subBox">
<view class="subject" @click="selsub" :class="{active:subid.indexOf(item.id)!=-1}" v-for="(item,index) in sublist" :key="index" :data-id="item.id" :data-name="item.name">{{item.name}}</view>
</view>
</view>
</view>
<view class="stylePopup" v-if="isStylePopupShow">
<view class="styleCard">
<view class="buttonBox">
<view class="closeBtn" @click="stylePopupHide">取消</view>
<view class="confimBtn" @click="stylePopupHide">确定</view>
</view>
<view class="subBox">
<view class="subject" :class="{active:upid==item.id}" @click="selup" v-for="(item,index) in uplist" :key="index" :data-id="item.id" :data-name="item.name">{{item.name}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue"
export default {
data(){
return{
isSubPopupShow:false,
isStylePopupShow:false,
username:'',
image:'',
isUpload:false,
date: '请选择毕业年份',
isDateShow: false,
uplist:[],
upid:'1',
subid:[],
sublist:[],
collegename:'请选择就读大学',
isNameShow:false,
isHighShow:false,
name:'请选择就读高中',
subname:[],
issubnameshow:false,
upname:'请选择升学方式',
isupnameshow:false,
school_id:'',
uni_id:'',
academyname:'请选择所属学院',
iscollgegshow:false,
majorname:'请选择所属专业',
ismajorshow:false,
email:'',
majorid:'',
academyid:'',
chuanimg:''
}
},
methods:{
selDate(){
this.isDateShow=true
},
subPopupShow(){
this.isSubPopupShow=true
},
subPopupHide(){
this.isSubPopupShow=false
},
stylePopupShow(){
this.isStylePopupShow=true
},
stylePopupHide(){
this.isStylePopupShow=false
},
// toSchoolmate(){
// wx.navigateTo({
// url: "/pages/schoolmate/schoolmate?type="+2
// })
// },
upload(){
var that = this;
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function (res) {
const tempFilePaths = res.tempFilePaths;
that.image = tempFilePaths[0];
app.upload('image',res.tempFilePaths[0],"post").then((res)=>{
// let newimage=that.image
that.image=res.url;
that.chuanimg=res.kurl
console.log(res)
console.log(that.image)
console.log(res.url)
// newimage.push(res.url)
that.isUpload=true
}).catch((err)=>{
console.log(err)
})
// console.log("tempFilePaths[0]",tempFilePaths[0]) //能够打印出选中的图片
// console.log(res)
// that.head_image=tempFilePaths[0]
// that.iconcheck = 1;//点击后图片更改状态由0变成1
},
error : function(e){
console.log(e);
}
});
},
bindTimeChange: function(e) {
this.date = e.target.value
},
getUpType(){
var that = this
var url = "university/getAllUp"
var params = {}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.uplist=res
}).catch((err)=>{
console.log(err)
})
},
getAllSub(){
var that=this
var url = "university/listSubject"
var params ={}
app.post(url,params,"get").then((res)=>{
that.sublist=res
console.log(res)
}).catch((err)=>{
console.log(err)
})
},
selup(e){
this.isupnameshow=true
console.log(e.currentTarget.dataset)
this.upid=e.currentTarget.dataset.id
this.upname=e.currentTarget.dataset.name
},
selsub(e){
Array.prototype.remove = function(val) {
var index = this.indexOf(val);
if (index > -1) {
this.splice(index, 1);
}
};
this.issubnameshow=true
if(this.subid.indexOf(e.currentTarget.dataset.id)!=-1){
this.subid.remove(e.currentTarget.dataset.id)
this.subname.remove(e.currentTarget.dataset.name)
}else{
this.subid.push(e.currentTarget.dataset.id)
this.subname.push(e.currentTarget.dataset.name)
}
console.log(this.subid)
},
selcollege(){
this.isNameShow=true
uni.navigateTo({
url:'./selectCollege'
})
},
selhigh(){
this.isHighShow=true
uni.navigateTo({
url:'./selectSchool'
})
},
tocollege(){
this.iscollgegshow=true
var school_id = this.uni_id
console.log(school_id)
uni.navigateTo({
url:'./selectAcademy?uni_id='+school_id
})
},
tomajor(){
this.ismajorshow=true
uni.navigateTo({
url:'./selectMajor'
})
},
collegeregister(){
var that = this
if(that.username==''){
uni.showToast({
title:"姓名不能为空",
icon:"none"
})
return false
}
var reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/ ;
if(!reg.test(that.email)){
uni.showToast({
title:"请输入正确邮箱",
icon:"none"
})
return false
}
if(that.image==''){
uni.showToast({
title:"请选择头像",
icon:"none"
})
return false
}
if(that.name=='请选择就读高中'){
uni.showToast({
title:"请选择高中",
icon:"none"
})
return false
}
if(that.date=='请选择毕业年份'){
uni.showToast({
title:"请选择毕业年份",
icon:"none"
})
return false
}
if(that.subname=='请选择选考科目'){
uni.showToast({
title:"请选择选考科目",
icon:"none"
})
return false
}
if(that.upname=='请选择升学方式'){
uni.showToast({
title:"请选择升学方式",
icon:"none"
})
return false
}
if(that.collegename=='请选择就读大学'){
uni.showToast({
title:"请选择就读大学",
icon:"none"
})
return false
}
if(that.academyname=='请选择所属学院'){
uni.showToast({
title:"请选择所属学院",
icon:"none"
})
return false
}
if(that.majorname=='请选择所属专业'){
uni.showToast({
title:"请选择所属专业",
icon:"none"
})
return false
}
var url = "register/register"
var token = uni.getStorageSync('token')
var params = {
token:token,
level:2,
nickname:that.username,
head_image:that.chuanimg,
school_id:that.school_id,
email:that.email,
endtime:that.date,
subject_ids:that.subid.toString(),
up_id:that.upid,
university_id:that.uni_id,
graduated_id:that.majorid,
college_id:that.academyid
}
app.post(url,params,"post").then((res)=>{
console.log(res)
// console.log(res)
uni.showToast({
title:"注册成功",
icon:"none"
})
setTimeout(() => {
uni.navigateTo({
url: "/pages/schoolmate/schoolmate?type="+2
})
}, 1500);
}).catch((err)=>{
console.log(err)
if(err.code==0){
uni.showToast({
title:err.msg,
icon:'none'
})
}
})
}
},
onLoad(){
this.getUpType()
this.getAllSub()
}
}
</script>
<style lang="less">
.content{
padding: 32rpx;
background:rgba(249,249,249,1);
font-size: 28rpx;
.studentMsg{
background-color: #fff;
padding: 0rpx 32rpx;
border-radius:20rpx;
.item{
height: 114rpx;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1rpx solid rgba(238,238,238,1);
font-size: 28rpx;
.title{
// line-height: 114px;
padding: 30rpx 0;
// box-sizing: border-box;
}
.selectBtn{
color:rgba(189,196,206,1);
line-height: 114rpx;
}
.icon{
width: 13rpx;
height: 24rpx;
margin-left: 8rpx;
}
.inpt{
height: 114rpx;
text-align: right;
// width: 250rpx;
}
.photo{
width: 64rpx;
height: 64rpx;
margin-top: 20rpx;
border-radius: 50%;
}
}
}
.schoolTitle{
font-size:32rpx;
color:rgba(45,85,117,1);
margin-top: 44rpx;
margin-bottom: 12rpx;
}
.okBtn{
width:686rpx;
height:80rpx;
background:rgba(45,85,117,1);
opacity:1;
border-radius:8rpx;
font-size: 28rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
margin-top: 56rpx;
}
.subPopup{
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
.selectCard{
width: 750rpx;
height: 426rpx;
background:rgba(255,255,255,1);
// opacity:1;
border-radius:20px 20px 0px 0px;
position: absolute;
bottom: 0;
.buttonBox{
display: flex;
justify-content: space-between;
padding: 28rpx 30rpx;
font-size: 28rpx;
.closeBtn{
color:rgba(140,145,152,1);
}
.confimBtn{
color:rgba(45,85,117,1);
}
}
.subBox{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 16rpx 32rpx;
.active{
background:rgba(129,195,191,1);
border:2rpx solid rgba(129,195,191,1);
color: #fff;
}
}
.subject{
width:28%;
height:56rpx;
background: #fff;
border:1rpx solid rgba(6,18,30,1);
opacity:1;
border-radius:40rpx;
text-align: center;
line-height: 56rpx;
color:rgba(6,18,30,1);
font-size: 28rpx;
margin-bottom: 36rpx;
}
}
}
.stylePopup{
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
.styleCard{
width: 750rpx;
height: 228rpx;
background:rgba(255,255,255,1);
// opacity:1;
border-radius:20px 20px 0px 0px;
position: absolute;
bottom: 0;
.buttonBox{
display: flex;
justify-content: space-between;
padding: 28rpx 30rpx;
font-size: 28rpx;
.closeBtn{
color:rgba(140,145,152,1);
}
.confimBtn{
color:rgba(45,85,117,1);
}
}
.subBox{
display: flex;
flex-wrap: wrap;
justify-content: space-around;
padding: 16rpx 32rpx;
.active{
background:rgba(129,195,191,1);
border:2rpx solid rgba(129,195,191,1);
color: #fff;
}
}
.subject{
width:28%;
height:56rpx;
background: #fff;
border:1rpx solid rgba(6,18,30,1);
opacity:1;
border-radius:40rpx;
text-align: center;
line-height: 56rpx;
color:rgba(6,18,30,1);
font-size: 28rpx;
margin-bottom: 36rpx;
}
}
}
}
</style>
\ No newline at end of file
... ...
<template>
<view class="content">
<view class="regMsg">
<view class="msgItem">
<view class="title">姓名</view>
<input type="text" class="inpt" v-model="nickname" placeholder="请填写姓名" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx">
</view>
<view class="msgItem">
<view class="title">邮箱</view>
<input type="text" class="inpt" v-model="email" placeholder="请填写邮箱" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx">
</view>
<view class="msgItem">
<view class="title">头像</view>
<view @click="upload">
<image class="photo" :src="isUpload ? image : '../../static/touxiang_img@2x.png'"></image>
</view>
</view>
<view class="msgItem" @click="selSchool">
<view class="title">高中</view>
<view class="select">{{isNameShow? name : '请选择高中'}}<image class="icon" src="../../static/zhuandao_icon@2x.png"></image></view>
</view>
<view class="msgItem" style="border-bottom: none;">
<view class="title">入学年份</view>
<view class="select" @click="selDate">
<picker mode="date" :value="date" start="2000-01-01" @change="bindTimeChange">
<view class="uni-input">{{isDateShow? date : '请选择入学年份'}}</view>
</picker>
<image class="icon" src="../../static/zhuandao_icon@2x.png"></image>
</view>
</view>
<!-- <view class="uni-title uni-common-pl">时间选择器</view> -->
</view>
<view class="regBtn" @click="toSchool">注册</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
level:'1',
nickname:'',
name:'请选择高中',
image:'',
school_id:'',
email:'',
isUpload:false,
date: '请选择入学年份',
isDateShow: false,
isNameShow:false,
chuanimg:''
}
},
onLoad(options) {
console.log(options)
// this.school_id=options.school_id
},
methods:{
selDate(){
this.isDateShow=true
},
selSchool(){
this.isNameShow=true
uni.navigateTo({
url:'./selectSchool'
})
},
bindTimeChange: function(e) {
this.date = e.target.value
},
toSchool(){
var that=this
if(that.nickname==''){
uni.showToast({
title:"姓名不能为空",
icon:"none"
})
return false
}
var reg = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/ ;
if(!reg.test(that.email)){
uni.showToast({
title:"请输入正确邮箱",
icon:"none"
})
return false
}
if(that.image==''){
uni.showToast({
title:"请选择头像",
icon:"none"
})
return false
}
if(that.name=='请选择高中'){
uni.showToast({
title:"请选择高中",
icon:"none"
})
return false
}
if(that.date=='请选择入学年份'){
uni.showToast({
title:"请选择入学年份",
icon:"none"
})
return false
}
var url="register/register"
var params={
level:that.level,
nickname:that.nickname,
head_image:that.chuanimg,
school_id:that.school_id,
email:that.email,
starttime:this.date
}
app.post(url,params,"post").then((res)=>{
console.log(res)
uni.showToast({
title:"注册成功",
icon:"none"
})
setTimeout(() => {
uni.navigateTo({
url: "/pages/school/school?type="+1
})
}, 1500);
}).catch((err)=>{
console.log(err)
if(err.code==0){
uni.showToast({
title:err.msg,
icon:'none'
})
}
})
// wx.navigateTo({
// url:"../school/school"
// })
},
upload(){
var that = this;
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function (res) {
const tempFilePaths = res.tempFilePaths;
that.image = tempFilePaths[0];
app.upload('image',res.tempFilePaths[0],"post").then((res)=>{
// let newimage=that.image
that.image=res.url;
that.chuanimg=res.kurl
console.log(res)
console.log(that.image)
console.log(res.url)
// newimage.push(res.url)
that.isUpload=true
}).catch((err)=>{
console.log(err)
})
// console.log("tempFilePaths[0]",tempFilePaths[0]) //能够打印出选中的图片
// console.log(res)
// that.head_image=tempFilePaths[0]
// that.iconcheck = 1;//点击后图片更改状态由0变成1
},
error : function(e){
console.log(e);
}
});
},
}
}
</script>
<style lang="less">
page{
overflow-y:hidden;
}
.content{
background:rgba(249,249,249,1);
height: 100vh;
.regMsg{
margin: 32rpx auto;
width:686rpx;
height:528rpx;
background:rgba(255,255,255,1);
opacity:1;
border-radius:20rpx;
padding: 0 32rpx;
box-sizing: border-box;
.msgItem{
border-bottom: 1rpx solid rgba(238,238,238,1);
display: flex;
justify-content: space-between;
// text-align: center;
.title{
color:rgba(6,18,30,1);
font-size: 28rpx;
line-height: 105rpx;
}
.inpt{
text-align: right;
height: 105rpx;
font-size: 28rpx;
}
.photo{
width: 64rpx;
height: 64rpx;
margin-top: 20rpx;
border-radius: 50%;
}
.select{
font-size: 28rpx;
color:rgba(189,196,206,1);
height: 105rpx;
display: flex;
line-height: 105rpx;
align-items: center;
}
.icon{
width: 13rpx;
height: 24rpx;
margin-left: 8rpx;
}
}
}
.regBtn{
width:684rpx;
height:80rpx;
background:rgba(45,85,117,1);
opacity:1;
border-radius:8rpx;
color: #fff;
font-size: 28rpx;
line-height: 80rpx;
text-align: center;
// margin: 0 auto;
// margin-top: 600rpx;
position: absolute;
bottom: 84rpx;
left: 50%;
transform: translate(-50%);
}
}
</style>
\ No newline at end of file
... ...