Commit b508c001 authored by fwz's avatar fwz

Merge remote-tracking branch 'origin/dev_cd' into dev_cd

# Conflicts:
#	pagesA/pages/index/getCarCode.vue
parents 33ac9a73 c418433f
...@@ -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
...@@ -302,6 +302,7 @@ button::after { ...@@ -302,6 +302,7 @@ button::after {
opacity: 0.96; opacity: 0.96;
letter-spacing: .5em; letter-spacing: .5em;
margin-bottom: 32rpx; margin-bottom: 32rpx;
margin-top: 200rpx;
} }
.login__read { .login__read {
...@@ -312,7 +313,11 @@ button::after { ...@@ -312,7 +313,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>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<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) {
...@@ -56,20 +60,25 @@ export default { ...@@ -56,20 +60,25 @@ export default {
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
}
let opts = {
url: '/app/index/check/move/code',
method: 'post'
}
console.log(param); console.log(param);
that.http.httpTokenRequest(opts, param).then(res => { that.http.httpTokenRequest(opts, param).then(res => {
console.info(res) console.info(res)
if (res.data.code == 200) { if (res.data.code == 200) {
if(res.data.data.bindFlag) { if (res.data.data.bindFlag) {
that.gotoMoveCar(scene) that.gotoMoveCar(scene)
} else { } else {
that.gotoBindMoveCar(scene) that.gotoBindMoveCar(scene)
...@@ -80,8 +89,8 @@ export default { ...@@ -80,8 +89,8 @@ export default {
} }
} else { } else {
uni.showToast({ uni.showToast({
title:'扫码失败', title: '扫码失败',
icon:'none', icon: 'none',
}) })
} }
} }
...@@ -94,7 +103,7 @@ export default { ...@@ -94,7 +103,7 @@ export default {
this.tab = 'personal' this.tab = 'personal'
break; break;
} }
this.$forceUpdate(); that.$forceUpdate();
}, },
//跳转到挪车页面 //跳转到挪车页面
gotoMoveCar(s) { gotoMoveCar(s) {
......
<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 class="appCotent" v-if="isShow">
<view> <view>
<view class="shop"> <view class="shop">
<div class="my__search" @click='goSearch'> <div class="my__search" @click='goSearch'>
...@@ -25,8 +26,7 @@ ...@@ -25,8 +26,7 @@
<div class="shop__list__one"> <div class="shop__list__one">
<div class="view__title">车主精选 养车必备</div> <div class="view__title">车主精选 养车必备</div>
<scroll-list ref="list" :option="option" @load="load"> <scroll-list ref="list" :option="option" @load="load">
<div class="list__one__items"> <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" v-for="(vo,inx) in boutiqueMallList" :key="inx" @click="goDetail(vo.id)">
<div class="one__item__img"> <div class="one__item__img">
<image :src="getImage(vo.mainImgUrl)" /> <image :src="getImage(vo.mainImgUrl)" />
...@@ -40,19 +40,23 @@ ...@@ -40,19 +40,23 @@
</div> </div>
</div> </div>
</scroll-list> </scroll-list>
</div> </div>
</view> </view>
<u-gap bgColor="transparent" height="60"></u-gap> <u-gap bgColor="transparent" height="60"></u-gap>
</view> </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()
...@@ -272,9 +292,12 @@ export default { ...@@ -272,9 +292,12 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
overflow: hidden;
overflow-x: scroll;
.shop__item2 { .shop__item2 {
width: 25%; width: 24%;
margin-right:30rpx;
.item2__img { .item2__img {
margin-bottom: 20rpx; margin-bottom: 20rpx;
......
...@@ -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>
...@@ -47,7 +28,7 @@ ...@@ -47,7 +28,7 @@
<div class="list__title"> <div class="list__title">
超低价养车好物 超低价养车好物
</div> </div>
<u-gap bgColor="transparent" height="40"></u-gap> <u-gap bgColor="transparent" height="20"></u-gap>
<div class="list"> <div class="list">
<div class="list__item" v-for="(vo,inx) in mallList" :key="inx"> <div class="list__item" v-for="(vo,inx) in mallList" :key="inx">
<image :src="vo.mainImgUrl" class="list__img"></image> <image :src="vo.mainImgUrl" class="list__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>
...@@ -113,7 +114,7 @@ ...@@ -113,7 +114,7 @@
export default { export default {
data() { data() {
return { return {
nums:0, nums: 0,
show: false, show: false,
addressShow: false, addressShow: false,
content: "地址不能为空", content: "地址不能为空",
...@@ -164,10 +165,10 @@ export default { ...@@ -164,10 +165,10 @@ export default {
}, },
methods: { methods: {
pay() { pay() {
if(!this.addressId) { if (!this.addressId) {
uni.showToast({ uni.showToast({
title:'请添加一个收货地址', title: '请添加一个收货地址',
icon:'none', icon: 'none',
}) })
} else { } else {
let list = [{ let list = [{
...@@ -175,9 +176,12 @@ export default { ...@@ -175,9 +176,12 @@ export default {
nums: 1, nums: 1,
}] }]
let idMap = this.mallSelectMap let idMap = this.mallSelectMap
for(let id in idMap){ for (let id in idMap) {
if(idMap[id] > 0){ if (idMap[id] > 0) {
let commodity = { id: id, nums: idMap[id] } let commodity = {
id: id,
nums: idMap[id]
}
list.push(commodity) list.push(commodity)
} }
} }
...@@ -186,17 +190,23 @@ export default { ...@@ -186,17 +190,23 @@ export default {
commodityList: list, commodityList: list,
} }
let that = this let that = this
let opts = { url: '/app/mall/create/order', method: 'post' }; let opts = {
url: '/app/mall/create/order',
method: 'post'
};
this.http.httpTokenRequest(opts, this.createOrder).then(res => { this.http.httpTokenRequest(opts, this.createOrder).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
let orderIds = res.data.data let orderIds = res.data.data
if(orderIds && orderIds.length > 0) { if (orderIds && orderIds.length > 0) {
that.orderSubmit = { that.orderSubmit = {
appId: 6, appId: 6,
ids: orderIds, ids: orderIds,
channelCode: 'wx_lite', channelCode: 'wx_lite',
} }
let opts = { url: '/app/pay/order/submit/more', method: 'post' } let opts = {
url: '/app/pay/order/submit/more',
method: 'post'
}
this.http.httpTokenRequest(opts, that.orderSubmit).then(res => { this.http.httpTokenRequest(opts, that.orderSubmit).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
let paymentData = res.data.data.invokeResponse; let paymentData = res.data.data.invokeResponse;
...@@ -228,14 +238,14 @@ export default { ...@@ -228,14 +238,14 @@ export default {
} else { } else {
uni.showToast({ uni.showToast({
title: res.data.msg, title: res.data.msg,
icon:'none', icon: 'none',
}) })
} }
}) })
} }
}, },
add(){ add() {
this.nums++ this.nums++
}, },
addAddress() { addAddress() {
...@@ -243,28 +253,31 @@ export default { ...@@ -243,28 +253,31 @@ export default {
url: '/pagesD/pages/personal/addAddress' url: '/pagesD/pages/personal/addAddress'
}); });
}, },
getAddressList(){ getAddressList() {
let opts = { url: '/app/user/address/list', method: 'get' }; let opts = {
url: '/app/user/address/list',
method: 'get'
};
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.addressList = res.data.data this.addressList = res.data.data
if(this.addressList !== undefined && this.addressList != null && this.addressList.length > 0){ if (this.addressList !== undefined && this.addressList != null && this.addressList.length > 0) {
let defaultFlagExist = false let defaultFlagExist = false
this.addressList.forEach(element => { this.addressList.forEach(element => {
if(this.addressId){ if (this.addressId) {
if(element.id == this.addressId){ if (element.id == this.addressId) {
this.addressInfo = element this.addressInfo = element
this.addressShow = true this.addressShow = true
defaultFlagExist = true defaultFlagExist = true
} }
}else if(element.defaultFlag){ } else if (element.defaultFlag) {
this.addressInfo = element this.addressInfo = element
this.addressId = element.id this.addressId = element.id
this.addressShow = true this.addressShow = true
defaultFlagExist = true defaultFlagExist = true
} }
}); });
if(!defaultFlagExist){ if (!defaultFlagExist) {
this.addressInfo = this.addressList[0] this.addressInfo = this.addressList[0]
this.addressShow = true this.addressShow = true
} }
...@@ -272,57 +285,61 @@ export default { ...@@ -272,57 +285,61 @@ export default {
} }
}) })
}, },
goAddress(){ goAddress() {
uni.navigateTo({ uni.navigateTo({
url: '/pagesD/pages/personal/myAddress?pay=1' url: '/pagesD/pages/personal/myAddress?pay=1'
}) })
}, },
getMoveCode(){ getMoveCode() {
let opts = { url: '/app/mall/free/code', method: 'get' }; let opts = {
url: '/app/mall/free/code',
method: 'get'
};
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.freeCode = res.data.data this.freeCode = res.data.data
} }
}) })
}, },
getMallList(){ getMallList() {
let opts = { url: '/app/mall/add/purchase', method: 'get' }; let opts = {
url: '/app/mall/add/purchase',
method: 'get'
};
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.mallList = res.data.data this.mallList = res.data.data
this.mallList.forEach(element=>{ this.mallList.forEach(element => {
element.selectNum = 0 element.selectNum = 0
}) })
} }
}) })
}, },
selectMoney(value){ selectMoney(value) {
this.mallMoney = value this.mallMoney = value
}, },
selectMall(num){ selectMall(num) {
//当添加数量且数量为1就加总共商品数量 //当添加数量且数量为1就加总共商品数量
this.quantityChange = (num.value == 0 || num.value == 1) this.quantityChange = (num.value == 0 || num.value == 1)
}, },
plusMall(vo){ plusMall(vo) {
// if(!this.mallSelectMap[vo.id] || this.mallSelectMap[vo.id] == 0){
// this.countNum = this.countNum + 1
// this.mallSelectMap[vo.id] = 1
// }else{
// this.mallSelectMap[vo.id] += 1
// }
if(!this.mallSelectMap[vo.id]){
this.mallSelectMap[vo.id] = 0
}
this.mallSelectMap[vo.id] += 1
this.countNum = this.countNum + 1 this.countNum = this.countNum + 1
if (!this.mallSelectMap[vo.id] || this.mallSelectMap[vo.id] == 0) {
this.mallSelectMap[vo.id] = 1
} else {
this.mallSelectMap[vo.id] += 1
}
this.countMoney += vo.currentPrice this.countMoney += vo.currentPrice
//console.log(this.mallSelectMap)
}, },
minusMall(vo){ minusMall(vo) {
if(this.mallSelectMap[vo.id] && this.mallSelectMap[vo.id] > 0){ if (this.countNum == 0) {
// if(this.mallSelectMap[vo.id] == 1){ return
// this.countNum -= 1 }
// } this.countNum = this.countNum - 1
this.countNum -= 1 if (this.mallSelectMap[vo.id] && this.mallSelectMap[vo.id] > 0) {
if (this.mallSelectMap[vo.id] == 1) {}
this.mallSelectMap[vo.id] -= 1 this.mallSelectMap[vo.id] -= 1
this.countMoney -= vo.currentPrice this.countMoney -= vo.currentPrice
} }
...@@ -344,9 +361,11 @@ export default { ...@@ -344,9 +361,11 @@ export default {
/deep/ .u-modal__content__text { /deep/ .u-modal__content__text {
text-align: center !important; text-align: center !important;
} }
/deep/ .u-input__content__field-wrapper__field { /deep/ .u-input__content__field-wrapper__field {
text-align: right !important; text-align: right !important;
} }
.price__bottom { .price__bottom {
width: 100%; width: 100%;
height: 156rpx; height: 156rpx;
...@@ -422,9 +441,15 @@ export default { ...@@ -422,9 +441,15 @@ 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;
.right__title { .right__title {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC; font-family: PingFang SC;
...@@ -437,13 +462,17 @@ export default { ...@@ -437,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) {
...@@ -452,14 +481,12 @@ export default { ...@@ -452,14 +481,12 @@ export default {
font-weight: 500; font-weight: 500;
color: #666666; color: #666666;
} }
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;
} }
} }
} }
...@@ -473,6 +500,11 @@ export default { ...@@ -473,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;
...@@ -604,6 +636,7 @@ export default { ...@@ -604,6 +636,7 @@ export default {
margin: 0 20rpx; margin: 0 20rpx;
margin-left: 100rpx; margin-left: 100rpx;
width: 400rpx; width: 400rpx;
.money__title { .money__title {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC; font-family: PingFang SC;
...@@ -658,25 +691,23 @@ export default { ...@@ -658,25 +691,23 @@ 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;
} }
.input { .input {
padding: 0 10px; padding: 0 10px;
} }
.plus { .plus {
width: 22px; width: 22px;
height: 22px; height: 22px;
background-color: #FF0000; background-color: #FF0000;
...@@ -686,5 +717,5 @@ export default { ...@@ -686,5 +717,5 @@ export default {
/* #endif */ /* #endif */
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
</style> </style>
...@@ -98,6 +98,12 @@ export default { ...@@ -98,6 +98,12 @@ export default {
message: "请填写车型", message: "请填写车型",
trigger: ["blur", "change"], trigger: ["blur", "change"],
}, },
"carInfo.mileage": {
type: "number",
required: false,
message: "请填写正确的里程数",
trigger: ["blur", "change"],
},
"carInfo.carNo": [{ "carInfo.carNo": [{
min: 7, min: 7,
max: 8, max: 8,
...@@ -185,7 +191,6 @@ export default { ...@@ -185,7 +191,6 @@ export default {
this.getMoveCode() this.getMoveCode()
}) })
}, },
onLoad(e) { onLoad(e) {
this.orderId = e.orderId this.orderId = e.orderId
......
...@@ -157,7 +157,6 @@ export default { ...@@ -157,7 +157,6 @@ export default {
/deep/.u-input__content__field-wrapper__field { /deep/.u-input__content__field-wrapper__field {
text-align: right !important; text-align: right !important;
padding-right: 30rpx;
} }
.u-checkbox-group { .u-checkbox-group {
......
...@@ -71,6 +71,12 @@ export default { ...@@ -71,6 +71,12 @@ export default {
message: "请填写车型", message: "请填写车型",
trigger: ["blur", "change"], trigger: ["blur", "change"],
}, },
"carInfo.mileage": {
type: "number",
required: false,
message: "请填写正确的里程数",
trigger: ["blur", "change"],
},
"carInfo.carNo": [{ "carInfo.carNo": [{
min: 7, min: 7,
max: 8, max: 8,
...@@ -194,7 +200,6 @@ export default { ...@@ -194,7 +200,6 @@ export default {
/deep/ .u-input__content__field-wrapper__field { /deep/ .u-input__content__field-wrapper__field {
text-align: right !important; text-align: right !important;
padding-right: 30rpx;
justify-content: space-evenly; justify-content: space-evenly;
} }
......
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
carNumber: "", carNumber: "",
model1: { model1: {
addressInfo: { addressInfo: {
address : '' address: ''
}, },
value: false, value: false,
}, },
...@@ -61,12 +61,25 @@ export default { ...@@ -61,12 +61,25 @@ export default {
message: "收货人不能为空", message: "收货人不能为空",
trigger: ["blur", "change"], trigger: ["blur", "change"],
}, },
"addressInfo.telNumber": { "addressInfo.telNumber": [{
type: "string", type: "string",
required: true, required: true,
message: "手机号不能为空", message: "手机号不能为空",
trigger: ["blur", "change"], trigger: ["blur", "change"],
}, },
{
// 自定义验证函数,见上说明
validator: (rule, value, callback) => {
// 上面有说,返回true表示校验通过,返回false表示不通过
// uni.$u.test.mobile()就是返回true或者false的
return uni.$u.test.mobile(value);
},
message: '手机格式错误,请输入11位手机号',
// 触发器可以同时用blur和change
trigger: ['change', 'blur'],
}
],
"addressInfo.address": { "addressInfo.address": {
type: "string", type: "string",
required: true, required: true,
...@@ -88,13 +101,16 @@ export default { ...@@ -88,13 +101,16 @@ export default {
delta: 1 delta: 1
}) })
}, },
addAddress(){ addAddress() {
this.$refs.form1.validate().then(res => { this.$refs.form1.validate().then(res => {
this.model1.addressInfo.defaultFlag = false this.model1.addressInfo.defaultFlag = false
if(this.model1.value){ if (this.model1.value) {
this.model1.addressInfo.defaultFlag = true this.model1.addressInfo.defaultFlag = true
} }
let opts = { url: '/app/user/address', method: 'post' }; let opts = {
url: '/app/user/address',
method: 'post'
};
this.http.httpTokenRequest(opts, this.model1.addressInfo).then(res => { this.http.httpTokenRequest(opts, this.model1.addressInfo).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
//添加成功 //添加成功
...@@ -198,6 +214,7 @@ export default { ...@@ -198,6 +214,7 @@ export default {
image { image {
width: 34rpx; width: 34rpx;
height: 36rpx; height: 36rpx;
padding-left: 20rpx;
} }
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
--> -->
<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">
问题/意见描述 问题/意见描述
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div class="view__btn view__no__bind" @click="addFeedback()"> <div class="view__btn view__no__bind" @click="addFeedback()">
提交 提交
</div> </div>
</div> </div>
</view> </view>
</template> </template>
...@@ -41,15 +41,27 @@ export default { ...@@ -41,15 +41,27 @@ export default {
}; };
}, },
methods: { methods: {
addFeedback(){ addFeedback() {
let opts = { url: '/app/user/feedback', method: 'post' }; let regChinese = /^[^\u4e00-\u9fa5]{0,}$/;
let checkChinese = regChinese.test(this.feedback.contact);
if(!checkChinese){
uni.showToast({
title: '请填写正确的联系方式',
icon: 'none',
})
return;
}
let opts = {
url: '/app/user/feedback',
method: 'post'
};
this.http.httpTokenRequest(opts, this.feedback).then(res => { this.http.httpTokenRequest(opts, this.feedback).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
uni.showToast({ uni.showToast({
title: '提交成功', title: '提交成功',
icon: 'success', icon: 'success',
}) })
}else{ } else {
uni.showToast({ uni.showToast({
title: '提交失败', title: '提交失败',
icon: 'error', icon: 'error',
...@@ -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;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
--> -->
<template> <template>
<view class="appCotent"> <view class="appCotent">
<div class="editAddress"> <div class="editAddress">
<u-gap bgColor="transparent" height="20"></u-gap> <u-gap bgColor="transparent" height="20"></u-gap>
<div class="car_info"> <div class="car_info">
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
<u--input v-model="model1.addressInfo.address" placeholder="点击选择收货地址" border="none"></u--input> <u--input v-model="model1.addressInfo.address" placeholder="点击选择收货地址" border="none"></u--input>
<span @click.stop="getAuthorize"> <span @click.stop="getAuthorize">
<span class="app__gps"> <span class="app__gps">
<image src="@/static/my/gps.png" > <image src="@/static/my/gps.png">
</span> </span>
<span class="app__right"> <span class="app__right">
<image src="@/static/my/my6.png" > <image src="@/static/my/my6.png">
</span> </span>
</span> </span>
</u-form-item> </u-form-item>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<div class="view__btn view__back" @click="del"> <div class="view__btn view__back" @click="del">
删除该地址 删除该地址
</div> </div>
</div> </div>
</view> </view>
</template> </template>
...@@ -62,12 +62,24 @@ export default { ...@@ -62,12 +62,24 @@ export default {
message: "收货人不能为空", message: "收货人不能为空",
trigger: ["blur", "change"], trigger: ["blur", "change"],
}, },
"addressInfo.telNumber": { "addressInfo.telNumber": [{
type: "string", type: "string",
required: true, required: true,
message: "手机号不能为空", message: "手机号不能为空",
trigger: ["blur", "change"], trigger: ["blur", "change"],
}, },
{
// 自定义验证函数,见上说明
validator: (rule, value, callback) => {
// 上面有说,返回true表示校验通过,返回false表示不通过
// uni.$u.test.mobile()就是返回true或者false的
return uni.$u.test.mobile(value);
},
message: '手机格式错误,请输入11位手机号',
// 触发器可以同时用blur和change
trigger: ['change', 'blur'],
}
],
"addressInfo.address": { "addressInfo.address": {
type: "string", type: "string",
required: true, required: true,
...@@ -91,14 +103,17 @@ export default { ...@@ -91,14 +103,17 @@ export default {
delta: 1 delta: 1
}) })
}, },
del(){ del() {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '确定删除该地址吗?', content: '确定删除该地址吗?',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
//提示删除成功 //提示删除成功
let opts = { url: '/app/user/address/' + this.id, method: 'delete' }; let opts = {
url: '/app/user/address/' + this.id,
method: 'delete'
};
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
uni.showToast({ uni.showToast({
...@@ -115,17 +130,23 @@ export default { ...@@ -115,17 +130,23 @@ export default {
} }
}); });
}, },
getAddress(){ getAddress() {
let opts = { url: '/app/user/address/info/' + this.id, method: 'get' }; let opts = {
url: '/app/user/address/info/' + this.id,
method: 'get'
};
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.model1.addressInfo = res.data.data this.model1.addressInfo = res.data.data
} }
}) })
}, },
editAddress(){ editAddress() {
this.$refs.form1.validate().then(res => { this.$refs.form1.validate().then(res => {
let opts = { url: '/app/user/address', method: 'put' }; let opts = {
url: '/app/user/address',
method: 'put'
};
this.http.httpTokenRequest(opts, this.model1.addressInfo).then(res => { this.http.httpTokenRequest(opts, this.model1.addressInfo).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
//添加成功 //添加成功
...@@ -219,7 +240,7 @@ export default { ...@@ -219,7 +240,7 @@ export default {
onLoad(option) { onLoad(option) {
this.id = option.id this.id = option.id
}, },
onShow(){ onShow() {
this.getAddress() this.getAddress()
}, },
...@@ -228,22 +249,26 @@ export default { ...@@ -228,22 +249,26 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.editAddress { .editAddress {
.app__gps{ .app__gps {
display: inline-block; display: inline-block;
image{
image {
width: 34rpx; width: 34rpx;
height: 36rpx; height: 36rpx;
} }
} }
.app__right{
.app__right {
display: inline-block; display: inline-block;
padding-left: 20rpx; padding-left: 20rpx;
padding-bottom: 10rpx; padding-bottom: 10rpx;
image{
image {
width: 11rpx; width: 11rpx;
height: 18rpx; height: 18rpx;
} }
} }
.love__btn { .love__btn {
height: 76rpx; height: 76rpx;
background: url('@/static/move-car/love-car4.png') no-repeat; background: url('@/static/move-car/love-car4.png') no-repeat;
...@@ -258,6 +283,7 @@ export default { ...@@ -258,6 +283,7 @@ export default {
margin: 0 auto; margin: 0 auto;
margin-top: 40rpx; margin-top: 40rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
image { image {
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<view class="appCotent"> <view class="appCotent">
<div class="myOrder"> <div class="myOrder">
<u-tabs :current='current' :list="list4" lineWidth="30" @change="changeVal" lineColor="#f56c6c" :activeStyle="{ <u-tabs :current='current' :list="list4" lineWidth="30" @change="changeVal" lineColor="#f56c6c" :activeStyle="{
color: '#303133', color: 'rgba(241, 37, 27, 1)',
fontWeight: 'bold', fontSize: '32rpx',
transform: 'scale(1.05)' transform: 'scale(1.05)'
}" :inactiveStyle="{ }" :inactiveStyle="{
color: '#606266', color: '#606266',
......
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
this.http.httpTokenRequest(opts, orderRefund).then(res => { this.http.httpTokenRequest(opts, orderRefund).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
uni.showToast({ uni.showToast({
title: '退款成功', title: '退款申请成功',
icon: 'success', icon: 'success',
}) })
} }
......
No preview for this file type
...@@ -32,7 +32,7 @@ const store = new Vuex.Store({ ...@@ -32,7 +32,7 @@ const store = new Vuex.Store({
{ {
pagePath: '/pagesC/pages/releaseBtn/releaseBtn', pagePath: '/pagesC/pages/releaseBtn/releaseBtn',
iconPath: '', iconPath: '',
selectedIconPath: '/static/tarbar/index31.png' selectedIconPath: ''
}, },
{ {
pagePath: '/pagesC/pages/shop/index', pagePath: '/pagesC/pages/shop/index',
......
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