Commit f8049575 authored by 程新智's avatar 程新智 👽

油画

parent d2352ab7
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
export default { export default {
onLaunch: function () { onLaunch: function () {
uni.hideTabBar() uni.hideTabBar()
},
} onShow: function () {
uni.hideHomeButton()
},
} }
</script> </script>
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
export default { export default {
data() { data() {
return { return {
checked: false, checked: true,
code: "", code: "",
isCanUse: false, //默认为true isCanUse: false, //默认为true
isCanUse2: false, //默认为true isCanUse2: false, //默认为true
...@@ -312,7 +312,11 @@ button::after { ...@@ -312,7 +312,11 @@ button::after {
font-weight: 500; font-weight: 500;
color: #666666; color: #666666;
line-height: 36rpx; line-height: 36rpx;
position: fixed;
bottom: 100rpx;
left: 0;
right: 0;
margin: 0 auto;
span { span {
color: rgb(0, 81, 255); color: rgb(0, 81, 255);
} }
......
<template> <template>
<view class="appCotent"> <view class="appCotent" v-if="show">
<view class="index-content"> <view class="index-content">
<u-swiper :radius="0" :height="210" :list="list5" circular :autoplay="false"> <u-swiper :radius="0" :height="210" :list="list5" circular @change="e => current = e.current" :autoplay="false">
<view slot="indicator" class="indicator"> <view slot="indicator" class="indicator">
<view class="indicator__dot" v-for="(item, index) in list5" :key="index" :class="[index === current && 'indicator__dot--active']"> <view class="indicator__dot" v-for="(item, index) in list5" :key="index" :class="[index === current && 'indicator__dot--active']">
</view> </view>
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
export default { export default {
data() { data() {
return { return {
show: false,
current: 0, current: 0,
balance: "0.00", balance: "0.00",
list5: [], list5: [],
...@@ -111,6 +112,11 @@ export default { ...@@ -111,6 +112,11 @@ export default {
this.getMoveCode() this.getMoveCode()
this.getRotationList() this.getRotationList()
}, },
mounted() {
setTimeout(() => {
this.show = true
}, 100);
},
onReady: function () { onReady: function () {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '首页' title: '首页'
......
<template> <template>
<view class="main_content"> <view class="main_content">
<index v-if="tab=='index'"></index> <index v-if="tab=='index'"></index>
<moveCar v-if="tab=='moveCar'"></moveCar> <moveCar v-if="tab=='moveCar'"></moveCar>
<shop v-if="tab=='shop'"></shop> <shop v-if="tab=='shop'"></shop>
<personal v-if="tab=='personal'"></personal> <personal v-if="tab=='personal'"></personal>
<u-gap bgColor="transparent" height="055"></u-gap> <u-gap bgColor="transparent" height="055"></u-gap>
<view class="tabbar"> <view class="tabbar">
<v-tabbar :list="tabbar" style="position:fixed;bottom:0;width:100%;left:0;right:0;" @tabChange="tabChange"></v-tabbar> <v-tabbar :list="tabbar" style="position:fixed;bottom:0;width:100%;left:0;right:0;" @tabChange="tabChange"></v-tabbar>
</view>
</view> </view>
</view>
</template> </template>
<script> <script>
...@@ -31,6 +31,7 @@ export default { ...@@ -31,6 +31,7 @@ export default {
}, },
data() { data() {
return { return {
tab: "index", tab: "index",
} }
}, },
...@@ -41,8 +42,11 @@ export default { ...@@ -41,8 +42,11 @@ export default {
tabbar: "tabbar" tabbar: "tabbar"
}) })
}, },
onShow: function () {}, onShow: function () {
uni.hideHomeButton()
},
methods: { methods: {
tabChange(index) { tabChange(index) {
let that = this let that = this
switch (index) { switch (index) {
...@@ -54,38 +58,43 @@ export default { ...@@ -54,38 +58,43 @@ export default {
break; break;
case 2: case 2:
uni.scanCode({ uni.scanCode({
success: function (res) { success: function (res) {
let path = res.path let path = res.path
if(path) { if (path) {
let xcxIndexPath = uni.getStorageSync('xcxIndexPath') let xcxIndexPath = uni.getStorageSync('xcxIndexPath')
console.info(xcxIndexPath); console.info(xcxIndexPath);
if(xcxIndexPath) { if (xcxIndexPath) {
xcxIndexPath = path.replace(xcxIndexPath, '').replace("?", '') xcxIndexPath = path.replace(xcxIndexPath, '').replace("?", '')
if(xcxIndexPath.indexOf('scene') >= 0 ) { if (xcxIndexPath.indexOf('scene') >= 0) {
let scene = xcxIndexPath.replace('scene=', '') let scene = xcxIndexPath.replace('scene=', '')
let param = {code : scene} let param = {
let opts = { url: '/app/index/check/move/code', method: 'post' } code: scene
console.log(param); }
that.http.httpTokenRequest(opts, param).then(res => { let opts = {
console.info(res) url: '/app/index/check/move/code',
if (res.data.code == 200) { method: 'post'
if(res.data.data.bindFlag) { }
that.gotoMoveCar(scene) console.log(param);
} else { that.http.httpTokenRequest(opts, param).then(res => {
that.gotoBindMoveCar(scene) console.info(res)
} if (res.data.code == 200) {
} if (res.data.data.bindFlag) {
}) that.gotoMoveCar(scene)
} else {
that.gotoBindMoveCar(scene)
}
}
})
}
} }
} else {
uni.showToast({
title: '扫码失败',
icon: 'none',
})
} }
} else {
uni.showToast({
title:'扫码失败',
icon:'none',
})
} }
} });
});
break; break;
case 3: case 3:
this.tab = 'shop' this.tab = 'shop'
...@@ -94,22 +103,22 @@ export default { ...@@ -94,22 +103,22 @@ export default {
this.tab = 'personal' this.tab = 'personal'
break; break;
} }
this.$forceUpdate(); that.$forceUpdate();
}, },
//跳转到挪车页面 //跳转到挪车页面
gotoMoveCar(s) { gotoMoveCar(s) {
let that = this; let that = this;
uni.navigateTo({ uni.navigateTo({
url: '/pagesB/pages/move-car/oneMoveCar?scene=' + s url: '/pagesB/pages/move-car/oneMoveCar?scene=' + s
}); });
}, },
//跳转到绑定页面 //跳转到绑定页面
gotoBindMoveCar(s) { gotoBindMoveCar(s) {
let that = this; let that = this;
uni.navigateTo({ uni.navigateTo({
url: '/pagesB/pages/move-car/scan?moveCode=' + s url: '/pagesB/pages/move-car/scan?moveCode=' + s
}); });
}, },
}, },
onLoad() {} onLoad() {}
} }
......
<template> <template>
<view class="appCotent"> <view class="appCotent" v-if="show">
<view class="moveCar"> <view class="moveCar">
<div class="move_car__content"> <div class="move_car__content">
<div class="menu__top" @click="goUrl({ <div class="menu__top" @click="goUrl({
...@@ -34,6 +34,7 @@ url: '/pagesB/pages/move-car/loveCar', ...@@ -34,6 +34,7 @@ url: '/pagesB/pages/move-car/loveCar',
export default { export default {
data() { data() {
return { return {
show: false,
items: [{ items: [{
icon: require("@/static/move-car/move-car6.png"), icon: require("@/static/move-car/move-car6.png"),
url: "/pagesB/pages/move-car/oneMoveCar", url: "/pagesB/pages/move-car/oneMoveCar",
...@@ -126,7 +127,12 @@ export default { ...@@ -126,7 +127,12 @@ export default {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '我要挪车' title: '我要挪车'
}); });
} },
mounted() {
setTimeout(() => {
this.show = true
}, 100);
},
}; };
</script> </script>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Description: 个人中心 * @Description: 个人中心
--> -->
<template> <template>
<view class="appCotent"> <view class="appCotent" v-if="show">
<view class="content"> <view class="content">
<view class="personal"> <view class="personal">
<div class="ps__bg"> <div class="ps__bg">
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
export default { export default {
data() { data() {
return { return {
show:false,
menu: [{ menu: [{
icon: require("@/static/my/my12.png"), icon: require("@/static/my/my12.png"),
title: "我的地址", title: "我的地址",
...@@ -252,6 +253,9 @@ export default { ...@@ -252,6 +253,9 @@ export default {
}, },
mounted() { mounted() {
setTimeout(() => {
this.show=true
}, 100);
this.getUserInfo() this.getUserInfo()
}, },
onReady: function () { onReady: function () {
......
<template> <template>
<view class="appCotent"> <scroll-view scroll-y="true" :scroll-top="scrollTop" @scroll="scroll">
<view> <view class="appCotent" v-if="isShow">
<view class="shop"> <view>
<div class="my__search" @click='goSearch'> <view class="shop">
<u-search placeholder="搜搜你最想知道的" :showAction='false' bgColor='#ffffff' v-model="keyword"></u-search> <div class="my__search" @click='goSearch'>
</div> <u-search placeholder="搜搜你最想知道的" :showAction='false' bgColor='#ffffff' v-model="keyword"></u-search>
<div class="shop__swiper">
<view class="u-demo-block">
<u-swiper :list="list3" previousMargin="30" nextMargin="30" circular :autoplay="false" height='150' radius="5" bgColor="#ffffff"></u-swiper>
</view>
</div>
<div class="view__content">
<div class="view__title">超低价养车好物</div>
<div class="shop__list2">
<div class="shop__item2" v-for="(vo,inx) in mallList" :key="inx" @click="goDetail(vo.id)">
<div class="item2__img">
<image :src="getImage(vo.mainImgUrl)" />
</div>
<div class="item2__title">{{vo.title}}</div>
<div class="item2__price">{{vo.currentPrice/100}}</div>
</div>
</div> </div>
</div> <div class="shop__swiper">
<div class="shop__list__one"> <view class="u-demo-block">
<div class="view__title">车主精选 养车必备</div> <u-swiper :list="list3" previousMargin="30" nextMargin="30" circular :autoplay="false" height='150' radius="5" bgColor="#ffffff"></u-swiper>
<scroll-list ref="list" :option="option" @load="load"> </view>
<div class="list__one__items"> </div>
<div class="view__content">
<div class="one__item" v-for="(vo,inx) in boutiqueMallList" :key="inx" @click="goDetail(vo.id)"> <div class="view__title">超低价养车好物</div>
<div class="one__item__img"> <div class="shop__list2">
<div class="shop__item2" v-for="(vo,inx) in mallList" :key="inx" @click="goDetail(vo.id)">
<div class="item2__img">
<image :src="getImage(vo.mainImgUrl)" /> <image :src="getImage(vo.mainImgUrl)" />
</div> </div>
<div class="one__item__title"> <div class="item2__title">{{vo.title}}</div>
{{vo.title}} <div class="item2__price">{{vo.currentPrice/100}}</div>
</div>
<div class="one__item__price">
{{vo.currentPrice/100}}<span class="num__two">{{vo.originalPrice/100}}</span>
</div>
</div> </div>
</div> </div>
</scroll-list> </div>
<div class="shop__list__one">
</div> <div class="view__title">车主精选 养车必备</div>
<scroll-list ref="list" :option="option" @load="load">
<div class="list__one__items" v-if="boutiqueMallList.length>0">
<div class="one__item" v-for="(vo,inx) in boutiqueMallList" :key="inx" @click="goDetail(vo.id)">
<div class="one__item__img">
<image :src="getImage(vo.mainImgUrl)" />
</div>
<div class="one__item__title">
{{vo.title}}
</div>
<div class="one__item__price">
{{vo.currentPrice/100}}<span class="num__two">{{vo.originalPrice/100}}</span>
</div>
</div>
</div>
</scroll-list>
</div>
</view>
<u-gap bgColor="transparent" height="60"></u-gap>
</view> </view>
<u-gap bgColor="transparent" height="60"></u-gap>
</view> </view>
</view> </scroll-view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
isShow:false,
scrollTop: 0,
old: {
scrollTop: 0
},
option: { option: {
size: 10, size: 10,
auto: true auto: true
...@@ -70,6 +74,16 @@ export default { ...@@ -70,6 +74,16 @@ export default {
} }
}, },
methods: { methods: {
scroll: function (e) {
this.old.scrollTop = e.detail.scrollTop
console.log(this.old.scrollTop);
},
goTop() {
this.scrollTop = this.old.scrollTop
this.$nextTick(function () {
this.scrollTop = 0
});
},
// 加载数据 // 加载数据
load(paging) { load(paging) {
setTimeout(() => { setTimeout(() => {
...@@ -158,7 +172,13 @@ export default { ...@@ -158,7 +172,13 @@ export default {
title: '精选商城' title: '精选商城'
}); });
}, },
created() {
this.goTop()
},
mounted() { mounted() {
setTimeout(() => {
this.isShow = true
}, 100);
this.getMallList() this.getMallList()
this.getRotationList() this.getRotationList()
//this.getBoutiqueMallList() //this.getBoutiqueMallList()
...@@ -274,9 +294,11 @@ export default { ...@@ -274,9 +294,11 @@ export default {
justify-content: space-between; justify-content: space-between;
overflow: hidden; overflow: hidden;
overflow-x: scroll; overflow-x: scroll;
.shop__item2 { .shop__item2 {
width: 24%; width: 24%;
margin-right: 1%; margin-right: 1%;
.item2__img { .item2__img {
margin-bottom: 20rpx; margin-bottom: 20rpx;
text-align: center; text-align: center;
......
...@@ -6,26 +6,7 @@ ...@@ -6,26 +6,7 @@
<view class="appCotent"> <view class="appCotent">
<div class="getCarCode"> <div class="getCarCode">
<div class="get__content"> <div class="get__content">
<div class="address" v-if="addressShow" @click="goAddress">
<div class="address__left">
<div class="right__title">
{{addressInfo.address}}&emsp;{{addressInfo.detailInfo}}
</div>
<div class="right__phone">
<span>{{addressInfo.userName}}</span>
<span>{{addressInfo.telNumber}}</span>
<span v-if="addressInfo.defaultFlag">默认</span>
</div>
</div>
<div class="address__right">
<image src="@/static/index/right.png" />
</div>
<u-gap bgColor="transparent" height="15"></u-gap>
</div>
<div v-else class="add__address" @click="addAddress">
<image src="@/static/index/get-car-code5.png"> 添加收货地址
</div>
<u-gap bgColor="transparent" height="15"></u-gap>
<div class="content__code"> <div class="content__code">
<div class="code__img"> <div class="code__img">
<image :src="freeCode.mainImgUrl" class="code__img"></image> <image :src="freeCode.mainImgUrl" class="code__img"></image>
...@@ -88,6 +69,26 @@ ...@@ -88,6 +69,26 @@
</div> --> </div> -->
</div> </div>
</div> </div>
<u-gap bgColor="transparent" height="100"></u-gap>
<div class="address" v-if="addressShow" @click="goAddress">
<div class="address__left">
<div class="right__title">
{{addressInfo.address}}&emsp;{{addressInfo.detailInfo}}
</div>
<div class="right__phone">
<span v-if="addressInfo.defaultFlag">默认</span>
<span>{{addressInfo.userName}}</span>
<span>{{addressInfo.telNumber}}</span>
</div>
</div>
<div class="address__right">
<image src="@/static/index/right.png" />
</div>
<u-gap bgColor="transparent" height="15"></u-gap>
</div>
<div v-else class="add__address" @click="addAddress">
<image src="@/static/index/get-car-code5.png"> 添加收货地址
</div>
</div> </div>
</div> </div>
<u-modal :show="show" :content='content' @confirm='show = false'></u-modal> <u-modal :show="show" :content='content' @confirm='show = false'></u-modal>
...@@ -440,6 +441,11 @@ export default { ...@@ -440,6 +441,11 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 30rpx 40rpx; padding: 30rpx 40rpx;
position: fixed;
bottom: 200rpx;
left: 0;
right: 0;
margin: 0 auto;
.address__left { .address__left {
width: 600rpx; width: 600rpx;
...@@ -456,13 +462,17 @@ export default { ...@@ -456,13 +462,17 @@ export default {
.right__phone { .right__phone {
display: flex; display: flex;
align-items: center; align-items: center;
span{
padding-left: 20rpx;
}
span:nth-of-type(1) { span:nth-of-type(1) {
font-size: 28rpx;
font-size: 24rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: bold;
color: #666666; color: #F88D28;
padding: 0 14rpx; padding: 2rpx 4rpx;
border: 1rpx solid #F88D28;
} }
span:nth-of-type(2) { span:nth-of-type(2) {
...@@ -473,13 +483,10 @@ export default { ...@@ -473,13 +483,10 @@ export default {
} }
span:nth-of-type(3) { span:nth-of-type(3) {
font-size: 24rpx; font-size: 28rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: 500;
color: #F88D28; color: #666666;
margin-left: 20rpx;
padding: 2rpx 4rpx;
border: 1rpx solid #F88D28;
} }
} }
} }
...@@ -493,6 +500,11 @@ export default { ...@@ -493,6 +500,11 @@ export default {
} }
.add__address { .add__address {
position: fixed;
left: 0;
right: 0;
margin: 0 auto;
bottom: 200rpx;
width: 670rpx; width: 670rpx;
height: 90rpx; height: 90rpx;
background: #ffffff; background: #ffffff;
...@@ -683,13 +695,10 @@ export default { ...@@ -683,13 +695,10 @@ export default {
.minus { .minus {
width: 22px; width: 22px;
height: 22px; height: 22px;
border-width: 1px; background: #e6e6e6;
border-color: #E6E6E6; border-radius: 50%;
border-top-left-radius: 100px; display: flex;
border-top-right-radius: 100px; color: #fff;
border-bottom-left-radius: 100px;
border-bottom-right-radius: 100px;
@include flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
......
...@@ -4,27 +4,27 @@ ...@@ -4,27 +4,27 @@
--> -->
<template> <template>
<view class="appCotent"> <view class="appCotent">
<div class="pull"> <div class="pull">
<div class="view__content"> <div class="view__content">
<div class="view__title"> <div class="view__title">
问题/意见描述 问题/意见描述
</div>
<div class="why">
<u--textarea maxlength='500' count v-model="feedback.fbContent" placeholder="请填写10字以上的问题描述,以便我们更好地帮 您解决问题"></u--textarea>
</div>
</div> </div>
<div class="why"> <div class="view__content">
<u--textarea maxlength='500' count v-model="feedback.fbContent" placeholder="请填写10字以上的问题描述,以便我们更好地帮 您解决问题"></u--textarea> <div class="view__title">
联系方式
</div>
<div class="why">
<u--textarea height='20' v-model="feedback.contact" placeholder="请填写您的手机号或邮箱,便于我们联系 您解决问题"></u--textarea>
</div>
</div> </div>
</div> <div class="view__btn view__no__bind" @click="addFeedback()">
<div class="view__content"> 提交
<div class="view__title">
联系方式
</div>
<div class="why">
<u--textarea height='20' v-model="feedback.contact" placeholder="请填写您的手机号或邮箱,便于我们联系 您解决问题"></u--textarea>
</div> </div>
</div> </div>
<div class="view__btn view__no__bind" @click="addFeedback()">
提交
</div>
</div>
</view> </view>
</template> </template>
...@@ -32,31 +32,43 @@ ...@@ -32,31 +32,43 @@
export default { export default {
data() { data() {
return { return {
feedback: { feedback: {
//反馈内容 //反馈内容
fbContent: '', fbContent: '',
//联系方式 //联系方式
contact: '', contact: '',
}, },
}; };
}, },
methods: { methods: {
addFeedback(){ addFeedback() {
let opts = { url: '/app/user/feedback', method: 'post' }; let regChinese = /^[^\u4e00-\u9fa5]{0,}$/;
this.http.httpTokenRequest(opts, this.feedback).then(res => { let checkChinese = regChinese.test(this.feedback.contact);
if (res.data.code == 200) { if(!checkChinese){
uni.showToast({ uni.showToast({
title: '提交成功', title: '请填写正确的联系方式',
icon: 'success', icon: 'none',
}) })
}else{ return;
uni.showToast({ }
title: '提交失败', let opts = {
icon: 'error', url: '/app/user/feedback',
}) method: 'post'
} };
}) this.http.httpTokenRequest(opts, this.feedback).then(res => {
} if (res.data.code == 200) {
uni.showToast({
title: '提交成功',
icon: 'success',
})
} else {
uni.showToast({
title: '提交失败',
icon: 'error',
})
}
})
}
}, },
} }
</script> </script>
...@@ -80,6 +92,7 @@ export default { ...@@ -80,6 +92,7 @@ export default {
border-radius: 20rpx; border-radius: 20rpx;
padding: 30rpx; padding: 30rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
.view__title { .view__title {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC; font-family: PingFang SC;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment