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

交互增加

parent cf13973d
......@@ -63,7 +63,7 @@
placeholder-class="plaClass"
:placeholder="item.placeholder"
v-model="item.rules.label"
@click="formDate2[index].show = true"
@click="clickFn(index)"
/>
<view class="select-icon"> </view>
</view>
......@@ -321,6 +321,11 @@ export default {
},
},
methods: {
clickFn(index) {
this.formDate2[index].show = true
this.$emit('clickFn', index)
},
async getphonenumber({ detail }) {
if (detail.errMsg === "getPhoneNumber:ok") {
console.log("detail :>> ", detail);
......
......@@ -17,8 +17,8 @@
</view>
</div>
<div class="login__read">
<u-checkbox-group v-model="checked" placement="row">
<u-checkbox activeColor="ok"></u-checkbox>
<u-checkbox-group placement="row">
<u-checkbox v-model="checked" ></u-checkbox>
</u-checkbox-group>
已阅读并同意<span>京东挪车牌用户协议(含隐私政策)</span><span>京东用户注册协议</span><span>京东隐私政策</span><span>联通账号认证服务条款</span>并使用本机号码登录
</div>
......@@ -33,7 +33,7 @@
export default {
data() {
return {
checked: [],
checked: false,
formData: [{
id: "kjjns", //id必须唯一 可以是数字
placeholder: "请输入京东账号",
......
......@@ -12,8 +12,8 @@
微信一键登录
</div>
<div class="login__read">
<u-checkbox-group v-model="checked" placement="row">
<u-checkbox activeColor="ok"></u-checkbox>
<u-checkbox-group placement="row">
<u-checkbox v-model="checked" ></u-checkbox>
</u-checkbox-group>
已阅读并同意 <span>《京东用户注册协议》</span><span>《京东隐私政策》</span>。若您的手机号未注册,将为您直接注册京东账号
</div>
......@@ -25,7 +25,7 @@
export default {
data() {
return {
checked: [],
checked: true,
};
},
methods: {
......
......@@ -4,11 +4,11 @@
-->
<template>
<view class="appCotent">
<div class="getCarCode">
<div class="getCarCode">
<div class="get__content">
<div class="address" v-if="addressShow">
<div class="address__left">
<div class="right__title">
<div class="right__title" @click="geMap">
北京市朝阳区李家董镇太阳宫社区大唐公寓 2号楼3单元303
</div>
<div class="right__phone">
......@@ -61,7 +61,7 @@
<text class="num__two">¥{{vo.price2}}</text>
</div>
</div>
<div class="list__add">
<div class="list__add" @click="add">
<image src="@/static/index/get-car-code2.png" />
</div>
</div>
......@@ -73,7 +73,7 @@
<div class="price__bottom">
<div class="price">
<div class="price__num">
<span>1</span>
<span>{{nums}}</span>
</div>
<div class="price__all">
合计<span class="num__two">¥00.00</span>
......@@ -83,7 +83,7 @@
立即支付
</div>
</div>
</div>
</div>
</view>
</template>
......@@ -91,6 +91,7 @@
export default {
data() {
return {
nums:0,
show: false,
addressShow: false,
content: "地址不能为空",
......@@ -119,9 +120,21 @@ export default {
}
},
methods: {
getMap() {
uni.getLocation({
type: 'wgs84',
success: function (res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
}
});
},
pay() {
this.show = true
},
add(){
this.nums++
},
addAddress() {
this.addressShow = !this.addressShow
}
......
......@@ -28,8 +28,8 @@
</div>
</div>
<div class="add__user">
<u-checkbox-group v-model="checked" placement="row">
<u-checkbox activeColor="ok"></u-checkbox>
<u-checkbox-group placement="row">
<u-checkbox v-model="checked" ></u-checkbox>
</u-checkbox-group>
勾选同意<span>《用户服务协议》</span>
</div>
......@@ -48,6 +48,7 @@ export default {
},
data() {
return {
checked:false,
model1: {
userInfo: {
name: "",
......
......@@ -33,8 +33,8 @@
拨打车主电话通知
</div>
<div class="move-car__wx">
<u-checkbox-group v-model="checked" placement="row">
<u-checkbox activeColor="ok"></u-checkbox>
<u-checkbox-group placement="row">
<u-checkbox v-model="checked"></u-checkbox>
</u-checkbox-group> 微信通知(上限3次)
</div>
<div class="move-car__more">
......@@ -82,7 +82,7 @@ export default {
fontSize:'18',
},
],
checked: [],
checked:false,
}
},
methods: {
......
......@@ -4,7 +4,7 @@
-->
<template>
<view class="appCotent">
<div class="scan">
<div class="scan">
<div class="contentMoveCar">
<div class="car_item__one">
<div class="item__content">
......@@ -27,7 +27,7 @@
确认绑定
</div>
<div class="use__text">使用说明</div>
</div>
</div>
</view>
</template>
......@@ -112,10 +112,11 @@ export default {
<style lang="scss" scoped>
.scan {
/deep/ .form-container .line .input{
/deep/ .form-container .line .input {
text-align: right !important;
padding-right: 30rpx;
}
.use__text {
text-align: center;
font-size: 28rpx;
......@@ -148,6 +149,7 @@ export default {
.u-checkbox-group {
display: inline-block !important;
}
/deep/.u-checkbox-group--row {
display: inline-block !important;
}
......
......@@ -64,7 +64,6 @@ export default {
},
methods: {
goSearch() {
console.log('---');
uni.navigateTo({
url: '/pagesC/pages/shop/search'
})
......
......@@ -4,17 +4,17 @@
-->
<template>
<view class="appCotent">
<div class="payOk">
<div class="payOk">
<div class="ok__icon">
<image src="@/static/shop/pay-ok1.png" />
</div>
<div class="ok__msg">支付成功</div>
<div class="ok__tips">挪车码预计今天发货,请耐心等待</div>
<div class="ok__btn">
<div>查看订单</div>
<div>返回首页</div>
<div @click="viewId">查看订单</div>
<div @click="goGhome">返回首页</div>
</div>
</div>
</div>
</view>
</template>
......@@ -25,6 +25,18 @@ export default {
}
},
methods: {
viewId() {
uni.navigateTo({
url: '/pagesD/pages/personal/myOrder'
})
},
goGhome() {
uni.navigateTo({
url: '/pagesC/pages/shop/index'
})
}
},
}
</script>
......@@ -35,6 +47,7 @@ export default {
.ok__icon {
text-align: center;
image {
width: 144rpx;
height: 144rpx;
......@@ -64,6 +77,7 @@ export default {
align-items: center;
justify-content: space-between;
margin-top: 80rpx;
>div {
width: 320rpx;
height: 76rpx;
......
......@@ -18,7 +18,7 @@
<style lang="scss" scoped>
.hlep{
padding:40rpx 0;
padding:0rpx 0;
height: 1092rpx;
image{
height: 100%;
......
......@@ -27,7 +27,7 @@
<div class="shop__tab">
<div class="tab__top">
<span>商品订单</span>
<div class="tab__all" @click="goOrder">
<div class="tab__all" @click="goOrder(0)">
<span>全部订单</span>
<span>
<image src="@/static/my/my5.png">
......@@ -35,7 +35,7 @@
</div>
</div>
<div class="tab__bottom">
<div class="tab__item" v-for="(vo,inx) in items" :key="inx">
<div class="tab__item" v-for="(vo,inx) in items" :key="inx" @click="goOrder(vo.page)">
<image :src="vo.icon" />
<div>{{vo.title}}</div>
</div>
......@@ -54,7 +54,7 @@
</div>
</div>
</div>
<div class="ps__btn">退出登录</div>
<div class="ps__btn" @click="loginOut">退出登录</div>
</view>
<u-gap bgColor="transparent" height="70"></u-gap>
</view>
......@@ -92,25 +92,34 @@ export default {
],
items: [{
title: '待付款',
icon: require('@/static/my/my2.png')
icon: require('@/static/my/my2.png'),
page:0
},
{
title: '待收货',
icon: require('@/static/my/my3.png')
icon: require('@/static/my/my3.png'),
page:2
}, {
title: '已完成',
icon: require('@/static/my/my14.png')
icon: require('@/static/my/my14.png'),
page:3
}, {
title: '退款/售后',
icon: require('@/static/my/my9.png')
icon: require('@/static/my/my9.png'),
page:4
}
]
}
},
methods: {
goOrder() {
loginOut(){
uni.navigateTo({
url: '/pagesD/pages/personal/myOrder'
url: '/pages/binding/index'
});
},
goOrder(page=0) {
uni.navigateTo({
url: '/pagesD/pages/personal/myOrder?page=' + page
});
},
goUrl(vo) {
......
......@@ -4,7 +4,7 @@
-->
<template>
<view class="appCotent">
<div class="myOrder">
<div class="myOrder">
<u-tabs :current='current' :list="list4" lineWidth="30" @change="changeVal" lineColor="#f56c6c" :activeStyle="{
color: '#303133',
fontWeight: 'bold',
......@@ -142,7 +142,7 @@
</div>
</div>
</div>
</div>
</div>
</view>
</template>
......@@ -167,6 +167,11 @@ export default {
}],
}
},
onLoad: function (e) {
this.$nextTick(() => {
this.current = Number(e.page) || 0
})
},
methods: {
pull() {
uni.navigateTo({
......@@ -179,7 +184,6 @@ export default {
});
},
changeVal(v) {
console.log(v);
this.current = v.index
}
},
......
......@@ -67,7 +67,7 @@
<div class="bottom__price">¥48.00</div>
</div>
</div>
<div class="order__btn">
<div class="order__btn" @click="pull">
<span>申请退款</span>
</div>
</div>
......@@ -84,6 +84,11 @@ export default {
url: '/pagesD/pages/personal/carTime'
})
}
,pull() {
uni.navigateTo({
url: '/pagesD/pages/personal/pull'
})
}
},
}
</script>
......
......@@ -4,7 +4,7 @@
-->
<template>
<view class="appCotent">
<div class="userInfo">
<div class="userInfo">
<div class="info__cover" @click="select">
<span class="cover__name">头像</span>
<div class="cover">
......@@ -13,10 +13,27 @@
<image src="@/static/my/my6.png" /></span>
</div>
</div>
<u-popup :show="show" @close="close" closeOnClickOverlay>
<view class="user__title">
填写昵称
</view>
<div class="user__input"><input v-model="user__nikename" placeholder="输入昵称(最多输入20个字符)" type="text">
<div class="user__name__border"></div>
<div class="user__save" @click="save">保存</div>
</div>
</u-popup>
<u-popup :show="show__six" @close="close__sex" closeOnClickOverlay>
<div class="user__input user__sex" @click="select__sex('男')">
<div class="user__name__border user__name__border__sex" @click="select__sex('女')"></div>
</div>
</u-popup>
<u-datetime-picker :show="show__date" v-model="dateValue" ref='datetimePicker' mode="date" @confirm='confirm' @close='close__date' @cancel='close__date' :formatter="formatter" closeOnClickOverlay></u-datetime-picker>
<view class="info__content">
<active-form :formDate.sync="formData"></active-form>
<active-form @clickFn='clickFn' :formDate.sync="formData"></active-form>
</view>
</div>
</div>
</view>
</template>
......@@ -24,6 +41,11 @@
export default {
data() {
return {
dateValue: Number(new Date()),
user__nikename: '',
show__six: false,
show: false,
show__date: false,
formData: [{
id: "kjjns", //id必须唯一 可以是数字
placeholder: "请填写",
......@@ -38,50 +60,123 @@ export default {
},
{
id: "kjjns", //id必须唯一 可以是数字
placeholder: "请填写",
placeholder: "我是昵称",
label: "昵称", // 提示输入名
type: "text", //类型
type: "select", //类型
rules: {
name: "realName2", //字段名 即提交给后端的字段
value: "",
verify: false, //是否开启校验
errMess: "姓名未填写", //校验不通过的错误提示
label: ""
},
},
{
id: "kjjns", //id必须唯一 可以是数字
placeholder: "请选择",
label: "性别", // 提示输入名
type: "text", //类型
type: "select", //类型
rules: {
name: "realName3", //字段名 即提交给后端的字段
value: "",
verify: false, //是否开启校验
errMess: "姓名未填写", //校验不通过的错误提示
label: ''
},
},
{
id: "kjjns", //id必须唯一 可以是数字
placeholder: "请选择",
label: "生日", // 提示输入名
type: "text", //类型
type: "select", //类型
rules: {
name: "realName4", //字段名 即提交给后端的字段
value: "",
verify: false, //是否开启校验
errMess: "姓名未填写", //校验不通过的错误提示
label: ''
},
},
],
}
},
onReady() {
// 微信小程序需要用此写法
this.$refs.datetimePicker.setFormatter(this.formatter)
},
methods: {
formatter(type, value) {
if (type === 'year') {
return `${value}年`
}
if (type === 'month') {
return `${value}月`
}
if (type === 'day') {
return `${value}日`
}
return value
},
transformTime(timestamp) {
if (timestamp) {
var time = new Date(timestamp);
console.log(time);
var y = time.getFullYear(); //getFullYear方法以四位数字返回年份
var M = time.getMonth() + 1; // getMonth方法从 Date 对象返回月份 (0 ~ 11),返回结果需要手动加一
var d = time.getDate(); // getDate方法从 Date 对象返回一个月中的某一天 (1 ~ 31)
return y + '-' + M + '-' + d
} else {
return '';
}
},
confirm(e) {
this.formData.forEach(element => {
if (element.label === '生日') {
element.rules.label = this.transformTime(e.value)
}
});
this.show__date = false
},
select__sex(val) {
this.formData.forEach(element => {
if (element.label === '性别') {
element.rules.label = val
}
});
this.show__six = false
},
save() {
this.formData.forEach(element => {
if (element.label === '昵称') {
element.rules.label = this.user__nikename
}
});
this.show = false
},
clickFn(e) {
console.log(e)
switch (e) {
case 1:
this.show = true
break;
case 2:
this.show__six = true
break;
case 3:
this.show__date = true
break;
}
},
close() {
this.show = false;
},
close__sex() {
this.show__six = false;
},
close__date() {
this.show__date = false;
},
select() {
uni.chooseImage({
count: 6, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function (res) {
console.log(JSON.stringify(res.tempFilePaths));
}
......@@ -94,8 +189,65 @@ export default {
<style lang="scss" scoped>
.userInfo {
.user__save {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A86F7;
line-height: 42rpx;
text-align: center;
padding: 30rpx 0;
}
.user__title {
font-size: 36rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
line-height: 42rpx;
text-align: center;
padding: 30rpx 0;
}
/deep/ .u-popup__content {
border-radius: 20rpx 20rpx 0px 0px;
}
.user__input {
padding: 0 30rpx;
padding-bottom: 40rpx;
text-align: center;
.user__name__border {
width: 100%;
height: 2rpx;
background: url('@/static/my/border.png') no-repeat;
background-size: contain;
margin-top: 30rpx;
}
.user__name__border__sex {
margin-bottom: 30rpx;
}
}
.user__sex {
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
line-height: 42rpx;
padding: 30rpx 0;
padding-bottom: 60rpx;
}
padding: 40rpx;
/deep/ .form-container .line .input {
text-align: right !important;
padding-right: 20rpx;
}
.info__cover {
height: 140rpx;
background: #FFFFFF;
......
......@@ -81,17 +81,6 @@ var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
if (!_vm._isMounted) {
_vm.e0 = function($event, index) {
var _temp = arguments[arguments.length - 1].currentTarget.dataset,
_temp2 = _temp.eventParams || _temp["event-params"],
index = _temp2.index
var _temp, _temp2
_vm.formDate2[index].show = true
}
}
}
var recyclableRender = false
var staticRenderFns = []
......@@ -448,6 +437,11 @@ __webpack_require__.r(__webpack_exports__);
methods: {
clickFn: function clickFn(index) {
this.formDate2[index].show = true;
this.$emit('clickFn', index);
},
getphonenumber: function getphonenumber(_ref) {var _this = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var detail, _yield$_this$$api$yzh, code, data, _yield$_this$$store$d, user_info;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:detail = _ref.detail;if (!(
detail.errMsg === "getPhoneNumber:ok")) {_context.next = 14;break;}
console.log("detail :>> ", detail);
......
{
"usingComponents": {
"u-picker": "/common/uview-ui/components/u-picker/u-picker"
},
"component": true
}
\ No newline at end of file
{
"usingComponents": {},
"component": true
}
\ No newline at end of file
......@@ -191,7 +191,7 @@ var _default =
{
data: function data() {
return {
checked: [],
checked: false,
formData: [{
id: "kjjns", //id必须唯一 可以是数字
placeholder: "请输入京东账号",
......
......@@ -215,6 +215,7 @@ __webpack_require__.r(__webpack_exports__);
data: function data() {
return {
checked: false,
model1: {
userInfo: {
name: "",
......
......@@ -243,7 +243,7 @@ var _default =
fontSize: '18' }],
checked: [] };
checked: false };
},
methods: {
......
......@@ -25,7 +25,7 @@
/* 透明度 */
/* 文章场景相关 */
.hlep.data-v-509677b8 {
padding: 40rpx 0;
padding: 0rpx 0;
height: 1092rpx;
}
.hlep image.data-v-509677b8 {
......
{
"navigationBarTitleText": "编辑资料",
"usingComponents": {}
"usingComponents": {
"u-popup": "/common/uview-ui/components/u-popup/u-popup",
"u-datetime-picker": "/common/uview-ui/components/u-datetime-picker/u-datetime-picker"
}
}
\ No newline at end of file
This diff is collapsed.
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