更新
This commit is contained in:
parent
7aa290609f
commit
67f67d189a
@ -4,6 +4,9 @@ const install = (Vue, vm) => {
|
|||||||
vm.$api.wxLogin = async (params = {}) => await vm.$u.get('/wxUser/wxPhoneLogin', params);// 手机号一键登录
|
vm.$api.wxLogin = async (params = {}) => await vm.$u.get('/wxUser/wxPhoneLogin', params);// 手机号一键登录
|
||||||
// vm.$api.wxLogin = async (params = {}) => await vm.$u.get('/wxUser/wxPhoneLogin', params);// 手机号一键登录
|
// vm.$api.wxLogin = async (params = {}) => await vm.$u.get('/wxUser/wxPhoneLogin', params);// 手机号一键登录
|
||||||
|
|
||||||
|
// 留言板
|
||||||
|
vm.$api.addMessage = async (params = {}) => await vm.$u.post('/cpMessage', params);// 添加留言
|
||||||
|
|
||||||
// 百度ai调用
|
// 百度ai调用
|
||||||
vm.$api.colouRize = async (params = {}) => await vm.$u.post('/AiPicture/Colourize', params);// 旧照修复
|
vm.$api.colouRize = async (params = {}) => await vm.$u.post('/AiPicture/Colourize', params);// 旧照修复
|
||||||
vm.$api.selfieAnime = async (params = {}) => await vm.$u.post('/AiPicture/selfie_anime', params);// 人像动漫化
|
vm.$api.selfieAnime = async (params = {}) => await vm.$u.post('/AiPicture/selfie_anime', params);// 人像动漫化
|
||||||
|
@ -5,7 +5,8 @@ let needLogin = [
|
|||||||
// 多端通用路由
|
// 多端通用路由
|
||||||
let filterRoute = [
|
let filterRoute = [
|
||||||
"/uview-ui/components/u-avatar-cropper/u-avatar-cropper",
|
"/uview-ui/components/u-avatar-cropper/u-avatar-cropper",
|
||||||
"/pages/index/rich-detail"
|
"/pages/index/rich-detail",
|
||||||
|
"/pages/index/webview",
|
||||||
];
|
];
|
||||||
// 拦截类型
|
// 拦截类型
|
||||||
let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
|
let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name" : "pixel.ai制图",
|
"name" : "pixel.ai制图",
|
||||||
"appid" : "__UNI__0B08B09",
|
"appid" : "__UNI__0B08B09",
|
||||||
"description" : "",
|
"description" : "给您带来有趣的制图体验!",
|
||||||
"versionName" : "1.5.0",
|
"versionName" : "1.5.0",
|
||||||
"versionCode" : "100",
|
"versionCode" : "100",
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
@ -59,6 +59,9 @@
|
|||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs" : {
|
"sdkConfigs" : {
|
||||||
"ad" : {}
|
"ad" : {}
|
||||||
|
},
|
||||||
|
"splashscreen" : {
|
||||||
|
"androidStyle" : "common"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -113,5 +116,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"locale" : "zh-Hans"
|
||||||
}
|
}
|
||||||
|
23
pages.json
23
pages.json
@ -36,6 +36,12 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "协议内容"
|
"navigationBarTitleText": "协议内容"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "webview"
|
||||||
|
// "style": {
|
||||||
|
// "navigationBarTitleText": ""
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -64,8 +70,25 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "工作室"
|
"navigationBarTitleText": "工作室"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "my/child_pages/login",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "登录"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root": "pages/mobile_web/my/child_pages",
|
||||||
|
"pages": [
|
||||||
|
{
|
||||||
|
"path": "contact",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "联系客服"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
<view class="rdt-top">
|
<view class="rdt-top">
|
||||||
<view class="mobile-logo" :style="{backgroundColor: `rgba(255, 255, 255,${topLevel})`}">
|
<view class="mobile-logo" :style="{backgroundColor: `rgba(255, 255, 255,${topLevel})`}">
|
||||||
<!-- #ifndef MP-WEIXIN -->
|
<!-- #ifndef MP-WEIXIN -->
|
||||||
<u-icon name="arrow-left" size="40" color="#c2ea04" class="back" @click="back"></u-icon>
|
<u-icon name="arrow-left" size="40" class="back" @click="back"
|
||||||
|
:color="topLevel===0? '#f9f9f9' : `rgba(194, 234, 4,${topLevel})`"></u-icon>
|
||||||
<image :src="myFileUrl+logo"></image>
|
<image :src="myFileUrl+logo"></image>
|
||||||
<view style="width: 75rpx;"></view>
|
<view style="width: 75rpx;"></view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
@ -64,6 +65,10 @@
|
|||||||
else that.topLevel = 1;
|
else that.topLevel = 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onHide() {
|
||||||
|
window.onscroll = null;
|
||||||
|
},
|
||||||
// #endif
|
// #endif
|
||||||
methods:{
|
methods:{
|
||||||
// 返回
|
// 返回
|
||||||
@ -102,9 +107,10 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
// #ifndef MP-WEIXIN
|
// #ifndef MP-WEIXIN
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: baseline;
|
align-items: center;
|
||||||
.back{
|
.back{
|
||||||
margin-left: 35rpx;
|
margin-left: 35rpx;
|
||||||
|
margin-top: 5rpx
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
31
pages/index/webview.vue
Normal file
31
pages/index/webview.vue
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<template>
|
||||||
|
<view v-if="src">
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<!-- <iframe style="width: 100%;min-height: 100vh;" :src="src" :title="title" /> -->
|
||||||
|
<web-view :src="src" />
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifndef H5 -->
|
||||||
|
<web-view :webview-styles="wbStyles" :src="src" :fullscreen="false" />
|
||||||
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
src: '',
|
||||||
|
wbStyles: {
|
||||||
|
width: '100%',
|
||||||
|
height: '100vh',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.title = option?.title
|
||||||
|
this.src = option.src ? decodeURI(option.src) : '';
|
||||||
|
console.log(this.src);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
@ -11,7 +11,7 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<image :src="fileUrl+logo"></image>
|
<image :src="fileUrl+logo"></image>
|
||||||
</view>
|
</view>
|
||||||
<u-swiper height="420" :list="swiperList" name="picture" circular></u-swiper>
|
<u-swiper @click="linkTo" height="420" :list="swiperList" name="picture" circular></u-swiper>
|
||||||
<view class="mobile-content">
|
<view class="mobile-content">
|
||||||
<view class="content-inner">
|
<view class="content-inner">
|
||||||
<!-- 功能栏 -->
|
<!-- 功能栏 -->
|
||||||
@ -160,11 +160,11 @@ export default {
|
|||||||
swiperList:[
|
swiperList:[
|
||||||
{
|
{
|
||||||
picture: configService.fileUrl + 'pixel/home/banner.png',
|
picture: configService.fileUrl + 'pixel/home/banner.png',
|
||||||
path: ''
|
path: 'https://docs.qq.com/doc/DSXpVWGlJb01BS0VO'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
picture: configService.fileUrl + 'pixel/home/banner.png',
|
picture: configService.fileUrl + 'pixel/home/banner.png',
|
||||||
path: ''
|
path: 'https://baidu.com/'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 推荐作品图标
|
// 推荐作品图标
|
||||||
@ -266,6 +266,14 @@ export default {
|
|||||||
toDeal({name, model}){
|
toDeal({name, model}){
|
||||||
if(name && model)
|
if(name && model)
|
||||||
uni.navigateTo({url: `/pages/mobile_web/workshops/index?name=${name}&model=${model}`});
|
uni.navigateTo({url: `/pages/mobile_web/workshops/index?name=${name}&model=${model}`});
|
||||||
|
},
|
||||||
|
// 轮播图跳转
|
||||||
|
linkTo(e){
|
||||||
|
if(this.swiperList[e].path){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/index/webview?src=${encodeURI(this.swiperList[e].path)}`
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
mounted(){
|
onShow(){
|
||||||
let that = this;
|
let that = this;
|
||||||
window.onscroll = function () {
|
window.onscroll = function () {
|
||||||
//为了保证兼容性,这里取三个值,哪个有值取哪一个
|
//为了保证兼容性,这里取三个值,哪个有值取哪一个
|
||||||
@ -78,6 +78,10 @@ export default {
|
|||||||
else that.topLevel = 1;
|
else that.topLevel = 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onHide() {
|
||||||
|
window.onscroll = null;
|
||||||
|
},
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
@ -1,11 +1,349 @@
|
|||||||
|
<!-- 联系客服 -->
|
||||||
<template>
|
<template>
|
||||||
<view class="">
|
<!-- #ifdef APP -->
|
||||||
123
|
<view class="contact" :style="{ background: `linear-gradient(rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.1)), url(${myFileUrl+background}) no-repeat 0% 20%/ cover`,paddingTop: CustomBar+'rpx' }">
|
||||||
|
<view class="app-top" :style="{ height: CustomBar+'rpx',
|
||||||
|
background: topLevel===0? '#ffffff00' : `rgba(255, 255, 255,${topLevel})` }"></view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifndef APP -->
|
||||||
|
<view class="contact" :style="{ background: `linear-gradient(rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.1)), url(${myFileUrl+background}) no-repeat 0% 20%/ cover` }">
|
||||||
|
<!-- #endif -->
|
||||||
|
<view class="ct-top">
|
||||||
|
<view class="mobile-logo" :style="{backgroundColor: `rgba(255, 255, 255,${topLevel})`}">
|
||||||
|
<!-- #ifndef MP-WEIXIN -->
|
||||||
|
<u-icon name="arrow-left" size="40" class="back" @click="back"
|
||||||
|
:color="topLevel===0? '#60547d' : `rgba(9, 9, 9,${topLevel})`"></u-icon>
|
||||||
|
<image :src="homeFileUrl+logo"></image>
|
||||||
|
<view style="width: 75rpx;"></view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<image :src="myFileUrl+logo"></image>
|
||||||
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
|
<view class="detail-content">
|
||||||
|
<form @submit="submit">
|
||||||
|
<u-divider bgColor="#ffffff00" fontSize="35" color="#424242" borderColor="#f8f9f9">问题反馈</u-divider>
|
||||||
|
<view class="blocks">
|
||||||
|
<view class="block_input">
|
||||||
|
<view><text>*</text>姓名:</view>
|
||||||
|
<input type="text" name="name" v-model="form.name" placeholder="请输入您的姓名"/>
|
||||||
|
<view class="tip" v-show="tip.name">请输入您的姓名</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="block_input">
|
||||||
|
<view><text>*</text>联系方式:</view>
|
||||||
|
<input type="tel" name="phone" v-model="form.phone" placeholder="请输入您的联系方式"/>
|
||||||
|
<view class="tip" v-show="tip.phone">请输入正确的联系方式</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="block_input">
|
||||||
|
<view><text>*</text>类型:</view>
|
||||||
|
<picker @change="bindTypeChange" :value="messageType" :range="typeList">
|
||||||
|
<view>
|
||||||
|
<input disabled type="text" name="type" :value="typeList[messageType]" placeholder="请选择类型"/>
|
||||||
|
<u-icon class="type-icon" name="arrow-down" color="#CCCCCC" size="40"></u-icon>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="block_input">
|
||||||
|
<view><text>*</text>留言:</view>
|
||||||
|
<view class="message-textarea">
|
||||||
|
<textarea name="message" v-model="form.message" placeholder="请输入留言内容" :maxlength="messageMaxlength"></textarea>
|
||||||
|
<view class="mt-tip">
|
||||||
|
{{ form.message.length }} / {{ messageMaxlength }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="tip" v-show="tip.message">请输入留言内容</view>
|
||||||
|
</view>
|
||||||
|
<u-button ripple :hairLine="false" class="messageSubmit" form-type="submit">提交</u-button>
|
||||||
|
</view>
|
||||||
|
</form>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-toast ref="uToast"></u-toast>
|
||||||
|
<Loading :show="loading" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import configService from '@/common/config.service.js';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: true, // 加载
|
||||||
|
// 基础路径
|
||||||
|
homeFileUrl: configService.fileUrl + 'pixel/home/',
|
||||||
|
myFileUrl: configService.fileUrl + 'pixel/my/',
|
||||||
|
// 页面背景
|
||||||
|
background: 'silver-background.png',
|
||||||
|
// logo图标
|
||||||
|
logo: 'logo.png',
|
||||||
|
// 顶部距离等级
|
||||||
|
topLevel: 0,
|
||||||
|
form:{
|
||||||
|
name: '',// 姓名
|
||||||
|
phone: '',// 联系方式
|
||||||
|
type: '',// 类别
|
||||||
|
message: ''// 留言
|
||||||
|
},
|
||||||
|
tip: {
|
||||||
|
name: false,
|
||||||
|
phone: false,
|
||||||
|
message: false
|
||||||
|
},
|
||||||
|
messageType: 0, //类型
|
||||||
|
typeList: [
|
||||||
|
"场地咨询",
|
||||||
|
"政策咨询",
|
||||||
|
"人才服务",
|
||||||
|
"赛事咨询",
|
||||||
|
"其他"
|
||||||
|
],
|
||||||
|
messageMaxlength: 300// 留言最长字数
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// #ifndef H5
|
||||||
|
onPageScroll(e) {
|
||||||
|
const level = e.scrollTop / 60;
|
||||||
|
if (level <= 1) this.topLevel = level;
|
||||||
|
else this.topLevel = 1;
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// #ifdef H5
|
||||||
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
window.onscroll = function() {
|
||||||
|
//为了保证兼容性,这里取三个值,哪个有值取哪一个
|
||||||
|
//scrollTop就是触发滚轮事件时滚轮的高度
|
||||||
|
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
|
||||||
|
const level = scrollTop / 60;
|
||||||
|
if (level <= 1) that.topLevel = level;
|
||||||
|
else that.topLevel = 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onHide() {
|
||||||
|
window.onscroll = null;
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
// 返回
|
||||||
|
back() {
|
||||||
|
uni.navigateBack();
|
||||||
|
},
|
||||||
|
// 提交申请
|
||||||
|
async submit(e){
|
||||||
|
try{
|
||||||
|
this.loading = true;
|
||||||
|
const { name, phone, type, message } = this.form;
|
||||||
|
this.tip = {
|
||||||
|
name: name==='',
|
||||||
|
phone: (phone==='') || (!(/^1[345789]\d{9}$/.test(phone))),
|
||||||
|
message:message===''
|
||||||
|
}
|
||||||
|
|
||||||
|
if(name===''){
|
||||||
|
this.$refs.uToast.show({type:'warning',title: "请输入姓名!"});
|
||||||
|
return;
|
||||||
|
}else if(!(/^1[345789]\d{9}$/.test(phone))){
|
||||||
|
this.$refs.uToast.show({type:'warning',title: "联系方式不正确!"});
|
||||||
|
return;
|
||||||
|
}else if(message===''){
|
||||||
|
this.$refs.uToast.show({type:'warning',title: "请输入留言内容!"});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let res = await this.$api.addMessage(e.detail.value);
|
||||||
|
if(res.success){
|
||||||
|
this.$refs.uToast.show({type:'success',title: "提交成功!"});
|
||||||
|
this.clear();
|
||||||
|
}else{
|
||||||
|
this.$refs.uToast.show({type:'error',title: "提交失败!"});
|
||||||
|
}
|
||||||
|
}catch(e){
|
||||||
|
this.$refs.uToast.show({type:'error',title: "处理失败!"});
|
||||||
|
}finally{
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 清空
|
||||||
|
clear(){
|
||||||
|
this.form= {
|
||||||
|
name: '',// 姓名
|
||||||
|
phone: '',// 联系方式
|
||||||
|
type: '',// 类别
|
||||||
|
message: ''// 留言
|
||||||
|
};
|
||||||
|
this.messageType = 0;
|
||||||
|
this.tip={
|
||||||
|
name: false,
|
||||||
|
phone: false,
|
||||||
|
message: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
// 选择类型
|
||||||
|
bindTypeChange(e) {
|
||||||
|
this.messageType = e.detail.value
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.loading = false;
|
||||||
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped lang="scss">
|
||||||
|
.contact {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 100vh;
|
||||||
|
background-size: cover;
|
||||||
|
opacity: 0.9;
|
||||||
|
|
||||||
|
.ct-top {
|
||||||
|
// #ifdef APP
|
||||||
|
.app-top {
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 81;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// #endif
|
||||||
|
.mobile-logo {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
// #ifndef MP-WEIXIN
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.back{
|
||||||
|
margin-left: 35rpx;
|
||||||
|
margin-top: 5rpx
|
||||||
|
}
|
||||||
|
|
||||||
|
// #endif
|
||||||
|
position: fixed;
|
||||||
|
z-index: 81;
|
||||||
|
padding: 15rpx 0;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 45rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.detail-content{
|
||||||
|
margin: 80rpx 30rpx 32rpx;
|
||||||
|
// min-height: 90vh;
|
||||||
|
background: linear-gradient(rgba(160, 160, 160, 0.4), rgba(0, 0, 0, 0.1));
|
||||||
|
border-radius: 40rpx;
|
||||||
|
padding: 40rpx 25rpx 0rpx;
|
||||||
|
color: #f9f9f9;
|
||||||
|
.blocks{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.block_title{
|
||||||
|
font-family: PingFang SC, PingFang SC;
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
.block_input{
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
.tip{
|
||||||
|
color: #FE020E;
|
||||||
|
margin-top: 4rpx;
|
||||||
|
font-size: small;
|
||||||
|
margin-bottom: 0rpx !important;
|
||||||
|
}
|
||||||
|
view{
|
||||||
|
font-family: PingFang SC, PingFang SC;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 40rpx;
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
text{
|
||||||
|
vertical-align: middle;
|
||||||
|
color: #FE020E;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input{
|
||||||
|
height: 92rpx;
|
||||||
|
background: #F8F9FB;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
color: rgba(0,0,0,0.8);
|
||||||
|
padding:0 32rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
border-radius: 15rpx;
|
||||||
|
}
|
||||||
|
.message-textarea{
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
textarea{
|
||||||
|
padding: 32rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 400rpx;
|
||||||
|
background: #F8F9FB;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
color: rgba(0,0,0,0.8);
|
||||||
|
font-size: 32rpx;
|
||||||
|
border-radius: 15rpx;
|
||||||
|
}
|
||||||
|
.mt-tip{
|
||||||
|
position: absolute;
|
||||||
|
font-size: 28rpx;
|
||||||
|
right: 32rpx;
|
||||||
|
bottom: 10rpx;
|
||||||
|
z-index: 2;
|
||||||
|
background-color: #f8f9fb;
|
||||||
|
padding: 5rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.messageSubmit{
|
||||||
|
width: 100%;
|
||||||
|
background-size: 200% auto;
|
||||||
|
transition: 0.5s;
|
||||||
|
animation-duration: 1s;
|
||||||
|
animation-fill-mode: both;
|
||||||
|
border: none;
|
||||||
|
background-image: -webkit-linear-gradient( to right, #36D1DC 0%, #5B86E5 51%, #36D1DC 100%);
|
||||||
|
background-image: linear-gradient(to right, #36D1DC 0%, #5B86E5 51%, #36D1DC 100%);
|
||||||
|
height: 100rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 56rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 35rpx;
|
||||||
|
&::after{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
background-position: right center;
|
||||||
|
color: #f8f9fb;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.type-icon{
|
||||||
|
z-index:90;
|
||||||
|
position: absolute;
|
||||||
|
right: 50rpx;
|
||||||
|
margin-top: -60rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
123
pages/mobile_web/my/child_pages/login.vue
Normal file
123
pages/mobile_web/my/child_pages/login.vue
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
<!-- 纯富文本展示页 -->
|
||||||
|
<template>
|
||||||
|
<!-- #ifdef APP -->
|
||||||
|
<view class="login" :style="{ backgroundImage: `url(${myFileUrl+background})`,paddingTop: CustomBar+'rpx' }">
|
||||||
|
<view class="app-top" :style="{ height: CustomBar+'rpx',
|
||||||
|
background: topLevel===0? '#ffffff00' : `rgba(255, 255, 255,${topLevel})` }"></view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifndef APP -->
|
||||||
|
<view class="login" :style="{ backgroundImage: `url(${myFileUrl+background})` }">
|
||||||
|
<!-- #endif -->
|
||||||
|
<view class="lg-top">
|
||||||
|
<view class="mobile-logo" :style="{backgroundColor: `rgba(255, 255, 255,${topLevel})`}">
|
||||||
|
<!-- #ifndef MP-WEIXIN -->
|
||||||
|
<u-icon name="arrow-left" size="40" class="back" @click="back"
|
||||||
|
:color="topLevel===0? '#f9f9f9' : `rgba(194, 234, 4,${topLevel})`"></u-icon>
|
||||||
|
<image :src="myFileUrl+logo"></image>
|
||||||
|
<view style="width: 75rpx;"></view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<image :src="myFileUrl+logo"></image>
|
||||||
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
|
<view class="lg-content">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<Loading :show="loading" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import configService from '@/common/config.service.js';
|
||||||
|
export default {
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
content: '',
|
||||||
|
loading: true,// 加载
|
||||||
|
// 基础路径
|
||||||
|
myFileUrl: configService.fileUrl + 'pixel/my/',
|
||||||
|
// 我的页面背景
|
||||||
|
background: 'bluetext-background.png',
|
||||||
|
// logo图标
|
||||||
|
logo: 'logo.png',
|
||||||
|
// 顶部距离等级
|
||||||
|
topLevel: 0,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// #ifndef H5
|
||||||
|
onPageScroll(e) {
|
||||||
|
const level = e.scrollTop/60;
|
||||||
|
if(level<=1) this.topLevel = level;
|
||||||
|
else this.topLevel = 1;
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// #ifdef H5
|
||||||
|
mounted(){
|
||||||
|
let that = this;
|
||||||
|
window.onscroll = function () {
|
||||||
|
//为了保证兼容性,这里取三个值,哪个有值取哪一个
|
||||||
|
//scrollTop就是触发滚轮事件时滚轮的高度
|
||||||
|
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
|
||||||
|
const level = scrollTop/60;
|
||||||
|
if(level<=1) that.topLevel = level;
|
||||||
|
else that.topLevel = 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onHide() {
|
||||||
|
window.onscroll = null;
|
||||||
|
},
|
||||||
|
// #endif
|
||||||
|
methods:{
|
||||||
|
// 返回
|
||||||
|
back(){
|
||||||
|
uni.navigateBack();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.loading = false;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.login{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 100vh;
|
||||||
|
background-size: cover;
|
||||||
|
.lg-top{
|
||||||
|
// #ifdef APP
|
||||||
|
.app-top{
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 81;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
.mobile-logo{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
// #ifndef MP-WEIXIN
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.back{
|
||||||
|
margin-left: 35rpx;
|
||||||
|
margin-top: 5rpx
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
position: fixed;
|
||||||
|
z-index: 81;
|
||||||
|
padding: 15rpx 0;
|
||||||
|
image{
|
||||||
|
width: 200rpx;
|
||||||
|
height: 45rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
@ -11,7 +11,7 @@
|
|||||||
<image :src="fileUrl+logo"></image>
|
<image :src="fileUrl+logo"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="mm-identity">
|
<view class="mm-identity">
|
||||||
<u-icon :name="fileUrl+avatar" label="你好, SSDFH!" size="107"
|
<u-icon @click="handleClickAvatar" :name="fileUrl+getAvatar" :label="getTopTip" size="107"
|
||||||
labelSize="45" labelColor="#bd8dfa" marginLeft="30"></u-icon>
|
labelSize="45" labelColor="#bd8dfa" marginLeft="30"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="mm-member">
|
<view class="mm-member">
|
||||||
@ -73,6 +73,8 @@ export default {
|
|||||||
background: 'background.png',
|
background: 'background.png',
|
||||||
// 头像
|
// 头像
|
||||||
avatar: 'avatar.png',
|
avatar: 'avatar.png',
|
||||||
|
// 默认登录头像
|
||||||
|
defaultLoginAvatar: 'login-avatar.png',
|
||||||
// 次数背景
|
// 次数背景
|
||||||
timeBox: 'time-box.png',
|
timeBox: 'time-box.png',
|
||||||
// 次数列表
|
// 次数列表
|
||||||
@ -119,7 +121,7 @@ export default {
|
|||||||
{
|
{
|
||||||
icon: 'customer.png',
|
icon: 'customer.png',
|
||||||
name: '联系客服',
|
name: '联系客服',
|
||||||
path: '',
|
path: '/pages/mobile_web/my/child_pages/contact',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'agreement.png',
|
icon: 'agreement.png',
|
||||||
@ -141,13 +143,34 @@ export default {
|
|||||||
// name: '激活码',
|
// name: '激活码',
|
||||||
// path: '',
|
// path: '',
|
||||||
// }
|
// }
|
||||||
]
|
],
|
||||||
|
// 是否登录
|
||||||
|
isLogin: this.$store.state.vuex_token,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// mounted() {
|
||||||
|
// console.log('isLogin',this.isLogin);
|
||||||
|
// },
|
||||||
|
computed:{
|
||||||
|
// 获取登录头像
|
||||||
|
getAvatar(){
|
||||||
|
return this.isLogin ? this.defaultLoginAvatar : this.avatar;
|
||||||
|
},
|
||||||
|
// 获取头像旁tip
|
||||||
|
getTopTip(){
|
||||||
|
return this.isLogin ? '你好, SSDFH!' : '请登录pixel.ai!';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
// 操作栏
|
// 操作栏
|
||||||
toControl(item){
|
toControl(item){
|
||||||
if(item.path) uni.navigateTo({ url: item.path });
|
if(item.path) uni.navigateTo({ url: item.path });
|
||||||
|
},
|
||||||
|
// 点击头像
|
||||||
|
handleClickAvatar(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/mobile_web/my/child_pages/login'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -185,6 +208,9 @@ export default {
|
|||||||
margin: 125rpx 70rpx 45rpx;
|
margin: 125rpx 70rpx 45rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
word-spacing: 3px;
|
word-spacing: 3px;
|
||||||
|
/deep/.u-icon__img{
|
||||||
|
border-radius: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.mm-member{
|
.mm-member{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -32,9 +32,16 @@ const commonUpload = (vm,path,params,success) =>{
|
|||||||
name: 'image',
|
name: 'image',
|
||||||
header:{'token':vm.$store.state.vuex_token},
|
header:{'token':vm.$store.state.vuex_token},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
success(encodeURI(JSON.parse(res.data).data));
|
if(res.data){
|
||||||
|
success(encodeURI(JSON.parse(res.data).data));
|
||||||
|
} else {
|
||||||
|
vm.$refs.uToast.show({type: 'error',title: "余额不足,请充值!"});
|
||||||
|
vm.dotLoading = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
fail: function (res) {
|
fail: function (res) {
|
||||||
|
vm.$refs.uToast.show({type: 'error',title: "处理失败!"});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -176,6 +176,10 @@ export default {
|
|||||||
else that.topLevel = 1;
|
else that.topLevel = 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onHide() {
|
||||||
|
window.onscroll = null;
|
||||||
|
},
|
||||||
// #endif
|
// #endif
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.form.title = options.name;
|
this.form.title = options.name;
|
||||||
|
@ -31,6 +31,7 @@ const store = new Vuex.Store({
|
|||||||
state: {
|
state: {
|
||||||
// 如果上面从本地获取的lifeData对象下有对应的属性,就赋值给state中对应的变量
|
// 如果上面从本地获取的lifeData对象下有对应的属性,就赋值给state中对应的变量
|
||||||
// 加上vuex_前缀,是防止变量名冲突,也让人一目了然
|
// 加上vuex_前缀,是防止变量名冲突,也让人一目了然
|
||||||
|
// fbc545a91cc94fe89296828a25a7e08e@9085553879028596738
|
||||||
vuex_token: lifeData.vuex_token ? lifeData.vuex_token : 'fbc545a91cc94fe89296828a25a7e08e@9085553879028596738',
|
vuex_token: lifeData.vuex_token ? lifeData.vuex_token : 'fbc545a91cc94fe89296828a25a7e08e@9085553879028596738',
|
||||||
user_message:lifeData.user_message ? lifeData.user_message : {},
|
user_message:lifeData.user_message ? lifeData.user_message : {},
|
||||||
current_platform: lifeData.current_platform ? lifeData.current_platform : ''
|
current_platform: lifeData.current_platform ? lifeData.current_platform : ''
|
||||||
|
Loading…
Reference in New Issue
Block a user