Commit 10de5c7f by honghong

联系客服弹窗+个人信息+0元判断+发布默认展示用户信息

parent 0eedf152
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<view class="content-form"> <view class="content-form">
<u--form :label-style="{'font-size':'26rpx'}" label-position="top" labelWidth="150" :model="formInfo" <u--form :label-style="{'font-size':'26rpx'}" label-position="top" labelWidth="150" :model="formInfo"
ref="form" :rules="rules"> ref="form" :rules="rules">
<u-form-item required label="标题" prop="title" borderBottom :customStyle="{ <u-form-item label="公司名称" prop="title" borderBottom :customStyle="{
'flex-direction': 'row !important'}"> 'flex-direction': 'row !important'}">
<u--input fontSize="24rpx" placeholderStyle="color: #999" inputAlign="right" border="none" <u--input fontSize="24rpx" placeholderStyle="color: #999" inputAlign="right" border="none"
v-model="formInfo.title" placeholder="请填写标题"> v-model="formInfo.title" placeholder="请填写公司名称">
</u--input> </u--input>
</u-form-item> </u-form-item>
<u-form-item required label="联系人" prop="linkman" borderBottom :customStyle="{ <u-form-item required label="联系人" prop="linkman" borderBottom :customStyle="{
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
}"> }">
<view class="input-box d-flex a-center" @click="showTime = true"> <view class="input-box d-flex a-center" @click="showTime = true">
<u-datetime-picker ref="datePicker" :formatter="formatter" v-model="formInfo.repairTime" <u-datetime-picker ref="datePicker" :formatter="formatter" v-model="formInfo.repairTime"
:show="showTime" mode="date" @confirm="handleConfirmDate" @cancel="handleClose"> :show="showTime" mode="date" @confirm="handleConfirmDate" @cancel="handleClose" :minDate="timeValue">
</u-datetime-picker> </u-datetime-picker>
<view class="time-text">{{formInfo.repairTime ? formInfo.repairTime : '请选择时间'}}</view> <view class="time-text">{{formInfo.repairTime ? formInfo.repairTime : '请选择时间'}}</view>
<!-- <input type="text" v-model="formInfo.repairTime" placeholder="请选择时间"> --> <!-- <input type="text" v-model="formInfo.repairTime" placeholder="请选择时间"> -->
...@@ -123,9 +123,12 @@ ...@@ -123,9 +123,12 @@
</template> </template>
<script> <script>
import {mapGetters} from 'vuex'
import { import {
addOrderFunction addOrderFunction,
updateUserMsg
} from '@/api/system/index.js' } from '@/api/system/index.js'
import freeAudio from '@/components/chengpeng-audio/free-audio.vue' import freeAudio from '@/components/chengpeng-audio/free-audio.vue'
import recordCom from '@/components/record/record.vue' import recordCom from '@/components/record/record.vue'
export default { export default {
...@@ -136,7 +139,8 @@ ...@@ -136,7 +139,8 @@
}, },
props: { props: {
statusBtn: Number, statusBtn: Number,
detailData: Object detailData: Object,
}, },
data() { data() {
...@@ -145,6 +149,7 @@ ...@@ -145,6 +149,7 @@
} }
return { return {
timeValue:'',
showTime: false, //时间选择器是否显示 showTime: false, //时间选择器是否显示
acceptType: 'video', acceptType: 'video',
isMultiple: false, //视频上传数量(多张、单张) isMultiple: false, //视频上传数量(多张、单张)
...@@ -153,12 +158,12 @@ ...@@ -153,12 +158,12 @@
showPopup: false, showPopup: false,
formInfo: {}, formInfo: {},
rules: { rules: {
title: { // title: {
type: 'string', // type: 'string',
required: true, // required: true,
message: '请填写标题', // message: '请填写标题',
trigger: ['blur', 'change'] // trigger: ['blur', 'change']
}, // },
linkman: { linkman: {
type: 'string', type: 'string',
required: true, required: true,
...@@ -204,6 +209,9 @@ ...@@ -204,6 +209,9 @@
mounted() { mounted() {
this.$refs.form.setRules(this.rules); this.$refs.form.setRules(this.rules);
}, },
computed:{
...mapGetters(['userInfo'])
},
watch: { watch: {
detailData: { detailData: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
...@@ -211,6 +219,7 @@ ...@@ -211,6 +219,7 @@
if (newVal) { if (newVal) {
that.formInfo = that.detailData that.formInfo = that.detailData
} else { } else {
console.log('金')
that.resetForm() that.resetForm()
} }
}, },
...@@ -233,18 +242,26 @@ ...@@ -233,18 +242,26 @@
} else { } else {
that.formInfo.repairTime = uni.$u.timeFormat(that.formInfo.repairTime, 'yyyy-mm-dd') that.formInfo.repairTime = uni.$u.timeFormat(that.formInfo.repairTime, 'yyyy-mm-dd')
} }
that.inite()
that.$set(that.formInfo,'linkman',that.userInfo.user.linkMan)
that.$set(that.formInfo,'phone',that.userInfo.user.mobile)
that.$set(that.formInfo,'title',that.userInfo.user.company)
that.$set(that.formInfo,'repairAddress',that.userInfo.user.address)
}, },
methods: { methods: {
inite() {
let self = this;
self.timeValue = Number(new Date())
},
// 获取上传图片的值 // 获取上传图片的值
getPhotoList(data) { getPhotoList(data) {
let that = this let that = this
if(that.formInfo.pictureList){ if (that.formInfo.pictureList) {
that.formInfo.pictureList.push({ that.formInfo.pictureList.push({
url: data.url, url: data.url,
fileType: 'picture' fileType: 'picture'
}) })
}else{ } else {
let photoList = [] let photoList = []
photoList.push({ photoList.push({
url: data.url, url: data.url,
...@@ -252,7 +269,7 @@ ...@@ -252,7 +269,7 @@
}) })
that.formInfo.pictureList = photoList that.formInfo.pictureList = photoList
} }
}, },
//删除照片 //删除照片
delPhotoItem(index) { delPhotoItem(index) {
...@@ -274,7 +291,6 @@ ...@@ -274,7 +291,6 @@
// 上传音频事件 // 上传音频事件
getVoiceList(data, time) { getVoiceList(data, time) {
console.log(time, '总是从')
let that = this let that = this
that.showPopup = false that.showPopup = false
let voiceList = [] let voiceList = []
...@@ -288,22 +304,9 @@ ...@@ -288,22 +304,9 @@
//确认修改和重新发布按钮 //确认修改和重新发布按钮
handleUpdateForm() { handleUpdateForm() {
let that = this let that = this
// that.$emit('submit', that.formInfo)
// that.$refs.form.validate().then(res => {
// if (res) {
// console.log('金1111')
// if (that.formInfo.pictureList.length || that.formInfo.videoList.length || that.formInfo
// .voiceList.length) {
// that.$emit('submit', that.formInfo)
// } else {
// uni.$u.toast('图片、视频、音频选其一必填')
// }
// }
// }).catch(errors => {
// uni.$u.toast('请完善信息')
// })
this.$refs.form.validate().then(res => { this.$refs.form.validate().then(res => {
if (that.formInfo.pictureList || that.formInfo.videoList || that.formInfo.voiceList) { if (that.formInfo.pictureList || that.formInfo.videoList || that.formInfo.voiceList) {
that.$emit('submit', that.formInfo) that.$emit('submit', that.formInfo)
} else { } else {
uni.$u.toast('图片、视频、音频选其一必填') uni.$u.toast('图片、视频、音频选其一必填')
...@@ -312,6 +315,7 @@ ...@@ -312,6 +315,7 @@
uni.$u.toast('请完善信息') uni.$u.toast('请完善信息')
}) })
}, },
//发布接口
async handleAdd() { async handleAdd() {
let that = this let that = this
that.formInfo.repairTime = uni.$u.timeFormat(that.formInfo.repairTime, 'yyyy-mm-dd'); that.formInfo.repairTime = uni.$u.timeFormat(that.formInfo.repairTime, 'yyyy-mm-dd');
...@@ -325,6 +329,12 @@ ...@@ -325,6 +329,12 @@
icon: 'none', icon: 'none',
duration: 2000, duration: 2000,
success() { success() {
//判断用户信息列表的联系人是否为空,为空修改用户信息
if(!that.userInfo.user.linkMan || !that.userInfo.user.mobile || !that.userInfo.user.address || !that.userInfo.user.company){
that.updateUser()
}else{
console.log('幼稚')
}
let cleatTime = setTimeout(() => { let cleatTime = setTimeout(() => {
clearTimeout(cleatTime) clearTimeout(cleatTime)
that.$uniGo.reLaunch({ that.$uniGo.reLaunch({
...@@ -336,6 +346,37 @@ ...@@ -336,6 +346,37 @@
}) })
} }
}, },
// 修改用户信息接口
async updateUser() {
let that = this
let userQuery = {
linkMan: that.formInfo.linkman, //联系人
mobile: that.formInfo.phone, //手机号
company: that.formInfo.title, //公司名
address: that.formInfo.repairAddress, //地址
}
const back_data = await updateUserMsg(userQuery)
console.log(back_data,'修改')
const {
code
} = back_data
if (code === 200) {
uni.showToast({
title: '保存成功!',
icon: 'none',
duration:2000,
success() {
let time = setTimeout(()=>{
clearTimeout(time)
uni.navigateBack({
delta:1
})
},1000)
}
})
// that.upDateUserInfoMount()
}
},
//发布需求按钮 //发布需求按钮
handlePublish() { handlePublish() {
let that = this let that = this
......
...@@ -48,6 +48,17 @@ ...@@ -48,6 +48,17 @@
const data_back = await createPayOrder(that.orderQuery) const data_back = await createPayOrder(that.orderQuery)
const {code,data} = data_back const {code,data} = data_back
if(code === 200){ if(code === 200){
console.log(that.payInfo.sumPrice,'但')
if(that.payInfo.sumPrice == 0.00){
uni.showToast({
title:'价格为0',
icon:'none'
})
this.$uniGo.reLaunch({
url: `/pages/demand/index?id=3`
});
}else{
uni.requestPayment({ uni.requestPayment({
provider:'wxpay', provider:'wxpay',
nonceStr: data.nonceStr, // 随机字符串 nonceStr: data.nonceStr, // 随机字符串
...@@ -70,6 +81,7 @@ ...@@ -70,6 +81,7 @@
} }
}) })
}
} }
}, },
async jump(){ async jump(){
......
<template> <template>
<view class="content"> <view class="content">
<view class="content-textarea"> <view class="content-textarea">
<view class="">标题</view> <view class="">公司名称</view>
<view class="">{{detailData.title}}</view> <view class="">{{detailData.title}}</view>
</view> </view>
<view class="content-textarea"> <view class="content-textarea">
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
let that = this let that = this
if (option.detailInfo) { if (option.detailInfo) {
this.detailInfo = JSON.parse(decodeURIComponent(option.detailInfo)) this.detailInfo = JSON.parse(decodeURIComponent(option.detailInfo))
console.log(this.detailInfo,'的萨科你')
} }
this.timer = setInterval(() => { this.timer = setInterval(() => {
let allTime = 0; let allTime = 0;
...@@ -105,7 +106,7 @@ ...@@ -105,7 +106,7 @@
sumPrice() { sumPrice() {
let that = this let that = this
// 1.判断优惠券是否有值并且价格大于优惠券时 // 1.判断优惠券是否有值并且价格大于优惠券时
// console.log(that.payInfo.fullSubtraction,that.detailInfo.actualAmount,'第三句话') console.log(that.payInfo.fullSubtraction,that.detailInfo.actualAmount,'第三句话')
if (that.payInfo.fullSubtraction && Number(that.detailInfo.actualAmount) > Number(that.payInfo if (that.payInfo.fullSubtraction && Number(that.detailInfo.actualAmount) > Number(that.payInfo
.fullSubtraction)) { .fullSubtraction)) {
// console.log('优质',that.detailInfo.actualAmount - that.payInfo.fullSubtraction) // console.log('优质',that.detailInfo.actualAmount - that.payInfo.fullSubtraction)
...@@ -113,7 +114,12 @@ ...@@ -113,7 +114,12 @@
return that.isUse ? Number((that.detailInfo.actualAmount - that.payInfo.fullSubtraction) * that return that.isUse ? Number((that.detailInfo.actualAmount - that.payInfo.fullSubtraction) * that
.discountList[0].discountRatio).toFixed(2) : Number(that.detailInfo.actualAmount - that.payInfo .discountList[0].discountRatio).toFixed(2) : Number(that.detailInfo.actualAmount - that.payInfo
.fullSubtraction).toFixed(2) .fullSubtraction).toFixed(2)
} else { }else if(!that.payInfo.fullSubtraction && that.detailInfo.actualAmount){
return that.detailInfo.actualAmount
}else if(!that.payInfo.fullSubtraction && !that.detailInfo.actualAmount){
return 0
}
else {
if (that.discountList.length && that.discountList[0].discountRatio) { if (that.discountList.length && that.discountList[0].discountRatio) {
return that.detailInfo.actualAmount && that.isUse ? Number(that.detailInfo.actualAmount * that return that.detailInfo.actualAmount && that.isUse ? Number(that.detailInfo.actualAmount * that
.discountList[0].discountRatio).toFixed(2) : that.detailInfo.actualAmount .discountList[0].discountRatio).toFixed(2) : that.detailInfo.actualAmount
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<view class="content"> <view class="content">
<view class="content-textarea"> <view class="content-textarea">
<view class=""> <view class="">
标题 公司名称
</view> </view>
<view class=""> <view class="">
{{orderDetail && orderDetail.title ? orderDetail.title : '' }} {{orderDetail && orderDetail.title ? moneyFormat(orderDetail.title) : '' }}
</view> </view>
</view> </view>
<view class="content-textarea"> <view class="content-textarea">
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
成交金额 成交金额
</view> </view>
<view class=""> <view class="">
{{orderDetail && orderDetail.actualAmount ? orderDetail.actualAmount : ''}} {{orderDetail && orderDetail.actualAmount ? moneyFormat(orderDetail.actualAmount) : ''}}
</view> </view>
</view> </view>
<view class="content-photograph"> <view class="content-photograph">
...@@ -78,6 +78,22 @@ ...@@ -78,6 +78,22 @@
path: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-hello-uniapp/2cc220e0-c27a-11ea-9dfb-6da8e309e0d8.mp3' path: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-hello-uniapp/2cc220e0-c27a-11ea-9dfb-6da8e309e0d8.mp3'
}; };
}, },
computed: {
// 格式化金额,等位数转换为星
moneyFormat(e) {
return e => {
if (e || e == 0) {
e = e.toString();
}
let temp = [];
e.split('').forEach(item => {
temp.push('*');
});
return temp.join('');
};
}
},
onLoad(option) { onLoad(option) {
console.log(option.id, '结束') console.log(option.id, '结束')
this.getDetailData(option.id) this.getDetailData(option.id)
......
<template>
<view class="content">
<!-- <com-navbar :title="status == 1 ? '添加个人信息' : '修改个人信息'" :titleStyle="{ color: '#000000', fontSize: '32rpx' }" /> -->
<view class="content-form">
<u--form label-position="top" labelWidth="120" :model="model" :rules="rules" ref="form">
<u-form-item label="公司名称" prop="company" borderBottom :customStyle="{
'flex-direction': 'row !important'
}">
<u--input inputAlign="right" border="none" v-model="model.company" placeholder="请输入公司名称">
</u--input>
</u-form-item>
<u-form-item required label="联系人" prop="linkMan" borderBottom :customStyle="{
'flex-direction': 'row !important'
}">
<u--input inputAlign="right" border="none" v-model="model.linkMan" placeholder="请输入联系人">
</u--input>
</u-form-item>
<u-form-item required label="联系电话" prop="mobile" borderBottom :customStyle="{
'flex-direction': 'row !important'
}">
<u--input inputAlign="right" border="none" v-model="model.mobile" placeholder="请输入联系电话">
</u--input>
</u-form-item>
<u-form-item label="地址" prop="address" borderBottom :customStyle="{
'flex-direction': 'row !important'
}">
<u--input inputAlign="right" border="none" v-model="model.address" placeholder="请输入地址">
</u--input>
</u-form-item>
</u--form>
</view>
<!-- 新增时按钮的样式 -->
<u-button @click="handleSave" text="保存" color="#2C66FF" :customStyle="{
width: '710rpx',
height: '80rpx',
borderRadius: '10rpx',
padding: '0rpx',
position: 'absolute',
bottom: '142rpx',
left: '20rpx'
}"></u-button>
<!-- 编辑时按钮的样式 -->
<!-- <view v-else-if="status == 2" class="d-flex">
<u-button type="primary" color="#FD0000" :plain="true" text="删除" :customStyle="{
width: '340rpx',
height: '80rpx',
borderRadius: '10rpx',
padding: '0rpx',
position: 'absolute',
bottom: '142rpx',
left: '20rpx'
}"></u-button>
<u-button color="#2C66FF" text="确定修改" :customStyle="{
width: '340rpx',
height: '80rpx',
borderRadius: '10rpx',
padding: '0rpx',
position: 'absolute',
bottom: '142rpx',
right: '20rpx'
}"></u-button>
</view> -->
</view>
</template>
<script>
import {
updateUserMsg
} from '@/api/system/index.js'
import {mapGetters} from 'vuex'
export default {
data() {
const mobile = (rule, value, callback) => {
return /^1[3-9]\d{9}$/.test(value) ? callback() : callback(new Error('请输入正确的手机号码'))
}
return {
// status:1,
model: {
linkMan: '', //联系人
mobile: '', //手机号
company: '', //公司名
address: '', //地址
},
rules: {
linkMan: {
type: 'string',
required: true,
message: '请填写联系人',
trigger: ['blur', 'change']
},
mobile: [{
type: 'string',
required: true,
message: '请输入联系电话',
max: 11,
min: 11,
trigger: 'blur'
},
{
// 自定义验证函数,见上说明
validator: mobile,
message: '手机号码不正确',
// 触发器可以同时用blur和change
trigger: ['change', 'blur'],
}
],
}
}
},
computed:{
...mapGetters(['userInfo'])
},
mounted() {
this.$refs.form.setRules(this.rules);
},
onLoad() {
this.model = {
...this.userInfo.user,
}
},
methods: {
async updateUser(data) {
let that = this
const back_data = await updateUserMsg(data)
console.log(back_data,'修改')
const {
code
} = back_data
if (code === 200) {
uni.showToast({
title: '保存成功!',
icon: 'none',
duration:2000,
success() {
let time = setTimeout(()=>{
clearTimeout(time)
uni.navigateBack({
delta:1
})
},1000)
}
})
// that.upDateUserInfoMount()
}
},
handleSave() {
let that = this
that.$refs.form.validate().then(res => {
// uni.$u.toast('校验通过')
that.updateUser(that.model)
}).catch(errors => {
uni.$u.toast('请完善信息')
})
},
}
// onLoad(option){
// let that = this
// that.status = option.status
// },
}
</script>
<style lang="scss" scoped>
.content {
&-form {
margin: 30rpx 20rpx;
width: calc(100% - 20rpx * 2);
/deep/ .u-form {
width: calc(100% - 20rpx * 2);
margin: 0rpx 20rpx;
}
}
}
</style>
<template>
<view class="index">
<view class="index-item" @tap="tapDetail" v-for="item in 10">
<view class="index-item-top baiyin-flex baiyin-flex-c-sb a-center">
<view class="index-item-top-left" >
<text></text>公司名称:上海信息科技技术有限公司
</view>
<image @click="handleAdd(2)" src="../../static/icon/edit.png" mode=""></image>
</view>
<view class="index-item-li" >
联系人:马飞飞
</view>
<view class="index-item-li">
联系电话:16619884840
</view>
<view class="index-item-li">
地址:上海市青浦区赵巷镇移动智地1号楼
</view>
</view>
<view class="btn-bg">
<u-button @click="handleAdd(1)" text="添加个人信息" color="#2C66FF" :customStyle="{
width: '710rpx',
height: '80rpx',
borderRadius: '10rpx',
padding: '0rpx',
position: 'fixed',
bottom: '142rpx',
left: '20rpx'
}"></u-button>
</view>
</view>
</template>
<script>
import apiBaseConfig from '@/config/index.js';
export default {
data() {
return {
imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
scrollTopHeader: 0,
};
},
onPageScroll(res) {
// console.log('页面滚动了onPageScroll-app', res.scrollTop);
this.scrollTopHeader = res.scrollTop;
},
onLoad() {},
methods: {
tapDetail() {
},
// 添加个人信息按钮事件
handleAdd(status){
// status 1修改 2添加
let that = this
that.$uniGo.navigateTo({
url: `/my/addPersonMsg/index?status=${status}`
});
}
}
};
</script>
<style>
page{
background:#F7F8F9;
}
</style>
<style lang="scss" scoped>
.index {
&-item {
width: calc(100% - 20rpx * 2);
margin: 30rpx 20rpx 50rpx;
padding: 30rpx 30rpx 25rpx;
background-color: #ffffff;
box-shadow: 0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 14rpx;
margin-bottom: 30rpx;
box-sizing: border-box;
&-top {
image{
width: 32rpx;
height: 32rpx;
}
// &-right {
// font-size: 24rpx;
// font-weight: 500;
// color: #F6595C;
// margin-left: 15rpx;
// }
&-left {
font-size: 28rpx;
font-weight: 700;
color: #333333;
line-height: 44rpx;
flex: 1;
text {
display: inline-block;
width: 6rpx;
height: 30rpx;
background: #2C66FF;
margin: 0rpx 10rpx -5rpx 0rpx;
}
}
}
&-li {
font-size: 24rpx;
font-weight: 400;
color: #333333;
line-height: 36rpx;
margin-top: 20rpx;
}
}
}
</style>
\ No newline at end of file
...@@ -58,49 +58,63 @@ ...@@ -58,49 +58,63 @@
"navigationBarTitleText": "订单详情", "navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} ,{ }, {
"path" : "introduce/introduce", "path": "introduce/introduce",
"style" : "style": {
{ "navigationBarTitleText": "简介",
"navigationBarTitleText": "简介", "enablePullDownRefresh": false
"enablePullDownRefresh": false }
}
}]
}
]
}, },
{ {
"root": "my", //子包的根目录 "root": "my", //子包的根目录
"pages": [{ //这里的配置路径和pages里的一样 "pages": [{ //这里的配置路径和pages里的一样
"path": "feedback/index", //配置页面路径,这里要注意,因为root已经选中了文件夹,所以我们只要填写文件名就好 "path": "feedback/index", //配置页面路径,这里要注意,因为root已经选中了文件夹,所以我们只要填写文件名就好
"style": { "style": {
"navigationBarTitleText": "意见反馈" "navigationBarTitleText": "意见反馈"
} }
}, { //这里的配置路径和pages里的一样 }, { //这里的配置路径和pages里的一样
"path": "invite/index", //配置页面路径,这里要注意,因为root已经选中了文件夹,所以我们只要填写文件名就好 "path": "invite/index", //配置页面路径,这里要注意,因为root已经选中了文件夹,所以我们只要填写文件名就好
"style": { "style": {
"navigationBarTitleText": "我的邀请" "navigationBarTitleText": "我的邀请"
} }
}, { //这里的配置路径和pages里的一样 }, { //这里的配置路径和pages里的一样
"path": "agreeOn/index", //配置页面路径,这里要注意,因为root已经选中了文件夹,所以我们只要填写文件名就好 "path": "agreeOn/index", //配置页面路径,这里要注意,因为root已经选中了文件夹,所以我们只要填写文件名就好
"style": { "style": {
"navigationBarTitleText": "用户协议" "navigationBarTitleText": "用户协议"
} }
}, { //这里的配置路径和pages里的一样 }, { //这里的配置路径和pages里的一样
"path": "coupon/index", //配置页面路径,这里要注意,因为root已经选中了文件夹,所以我们只要填写文件名就好 "path": "coupon/index", //配置页面路径,这里要注意,因为root已经选中了文件夹,所以我们只要填写文件名就好
"style": { "style": {
"navigationBarTitleText": "优惠券", "navigationBarTitleText": "优惠券",
"mp-weixin": { "mp-weixin": {
"navigationStyle": "custom" "navigationStyle": "custom"
}
}
},
{
"path": "login/login",
"style": {
"navigationBarTitleText": "授权登录"
}
},
{
"path": "personList/index",
"style": {
"navigationBarTitleText": "个人信息"
}
},
{ //这里的配置路径和pages里的一样
"path": "addPersonMsg/index", //配置页面路径,这里要注意,因为root已经选中了文件夹,所以我们只要填写文件名就好
"style": {
"navigationBarTitleText": "个人信息"
// "mp-weixin": {
// "navigationStyle": "custom"
// }
} }
} }
}, ]
{
"path": "login/login",
"style": {
"navigationBarTitleText": "授权登录"
}
}]
}, },
{ {
"root": "demand", //子包的根目录 "root": "demand", //子包的根目录
...@@ -144,15 +158,13 @@ ...@@ -144,15 +158,13 @@
}, },
{ {
"root": "order", "root": "order",
"pages": [ "pages": [{
{ "path": "detail/detail",
"path": "detail/detail", "style": {
"style": { "navigationBarTitleText": "动态",
"navigationBarTitleText": "动态", "enablePullDownRefresh": false
"enablePullDownRefresh": false
}
} }
] }]
} }
], ],
"globalStyle": { "globalStyle": {
...@@ -166,4 +178,4 @@ ...@@ -166,4 +178,4 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"onReachBottomDistance": 50 "onReachBottomDistance": 50
} }
} }
...@@ -61,8 +61,8 @@ ...@@ -61,8 +61,8 @@
scrollTopHeader: 0, scrollTopHeader: 0,
swiperList: [ swiperList: [
// 'https://cdn.uviewui.com/uview/swiper/swiper1.png', // 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png', 'https://img1.baidu.com/it/u=1945791441,1199076173&fm=253&fmt=auto&app=138&f=JPEG?w=790&h=404',
'https://cdn.uviewui.com/uview/swiper/swiper3.png', 'https://img2.baidu.com/it/u=2561584855,1468094658&fm=253&fmt=auto&app=138&f=JPEG?w=499&h=156',
], ],
tabBarList: [{ tabBarList: [{
name: "首页", // name name: "首页", // name
......
...@@ -24,15 +24,38 @@ ...@@ -24,15 +24,38 @@
</view> </view>
</view> </view>
<view class="content-in-item baiyin-flex baiyin-flex-c-sb baiyin-flex-c-b" v-for="(item, index) in list" <view class="content-in-item baiyin-flex baiyin-flex-c-sb baiyin-flex-c-b" v-for="(item, index) in list"
:key="index" @click="index != 0 ? clickJumpNPage(item) : null"> :key="index" @click="clickJumpNPage(item,index)">
<!-- @click="index != 0 ? clickJumpNPage(item) : null" -->
<!-- 联系客服生成 --> <!-- 联系客服生成 -->
<button class="content-in-item-btn" v-if="index === 0" open-type="contact"></button> <!-- <button class="content-in-item-btn" v-if="index === 0" open-type="contact"></button> -->
<view class="baiyin-flex baiyin-flex-c-b"> <view class="baiyin-flex baiyin-flex-c-b">
<image :src="item.icon" mode=""></image> <image :src="item.icon" mode=""></image>
<text>{{ item.title }}</text> <text>{{ item.title }}</text>
</view> </view>
<image src="@/static/icon/my09.png" mode=""></image> <image src="@/static/icon/my09.png" mode=""></image>
</view> </view>
<u-popup :show="showPopup" @close="close" @open="open">
<view class="border">
<view class="support d-flex a-center">
<view class="support-line"></view>
<view class="margin-left-one">技术支持</view>
</view>
<view class="serve d-flex j-sa ">
<button @click="close" class="serve_btn d-flex flex-column a-center" open-type="contact" show-message-card
session-from send-message-path send-message-title>
<!-- <image src="../../static/font/online_serve.png" mode=""></image> -->
<image src="../../static/font/online_serve.png" mode=""></image>
<view class="mt-1 font">在线客服</view>
</button>
<button class="serve_btn d-flex flex-column a-center" @click="handleCallPhone">
<!-- <image src="../../static/font/phone_serve.png" mode=""></image> -->
<image src="../../static/font/phone_serve.png" mode=""></image>
<view class="mt-1 font">电话客服</view>
</button>
</view>
</view>
</u-popup>
<view class="content-in-btn" @click="handleLogin"> <view class="content-in-btn" @click="handleLogin">
<u-button :text="token ? '退出登录' : '登录'" color="#EA654E" :customStyle="{ <u-button :text="token ? '退出登录' : '登录'" color="#EA654E" :customStyle="{
width: '560rpx', width: '560rpx',
...@@ -125,11 +148,17 @@ ...@@ -125,11 +148,17 @@
icon: require('@/static/icon/my08.png'), icon: require('@/static/icon/my08.png'),
title: '我的优惠券', title: '我的优惠券',
url: '/my/coupon/index?type=coupon' url: '/my/coupon/index?type=coupon'
},
{
icon: require('@/static/icon/person.png'),
title: '个人信息',
url: '/my/addPersonMsg/index'
} }
], ],
token: '', token: '',
uploadUrl: apiBaseConfig.upload, uploadUrl: apiBaseConfig.upload,
headImgUrl: '' headImgUrl: '',
showPopup: false, //选择联系方式的弹窗
}; };
}, },
onLoad() { onLoad() {
...@@ -212,12 +241,36 @@ ...@@ -212,12 +241,36 @@
that.upDateUserInfoMount() that.upDateUserInfoMount()
} }
}, },
clickJumpNPage(row) { clickJumpNPage(row, index) {
if (row.url) { if (index == 0) {
this.$uniGo.navigateTo({ this.showPopup = true
url: row.url } else {
}); if (row.url) {
this.$uniGo.navigateTo({
url: row.url
});
}
} }
},
handleCallPhone() {
let phone = '13585756959'
uni.makePhoneCall({
phoneNumber: phone,
success: function() {
this.showPopup = false
},
fail() {
this.showPopup = false
}
})
},
open() {
// console.log('open');
},
close() {
this.showPopup = false
// console.log('close');
}, },
handleLogin() { handleLogin() {
if (this.token) { if (this.token) {
...@@ -370,5 +423,38 @@ ...@@ -370,5 +423,38 @@
margin-bottom: 0rpx; margin-bottom: 0rpx;
} }
} }
.border {
.support {
padding-left: 30rpx;
padding-top: 30px;
font-size: 24rpx;
&-line {
width: 6rpx;
height: 36rpx;
background: #2C66FF;
border-radius: 3rpx;
}
}
.serve_btn {
background: transparent;
}
.serve {
margin-top: 50rpx;
image {
width: 54rpx;
height: 54rpx;
}
}
button::after {
border: none;
}
}
} }
</style> </style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view> <view>
<view :style="{ height: `calc(${globalData.statusBarHeight}rpx + 130rpx)` }"></view> <view :style="{ height: `calc(${globalData.statusBarHeight}rpx + 130rpx)` }"></view>
<view class="paddding-x-two "> <view class="paddding-x-two ">
<releaseForm :statusBtn="statusBtn" @submit="handleSubmit"></releaseForm> <releaseForm :statusBtn="statusBtn"></releaseForm>
</view> </view>
<com-navbar :leftIcon="false" :homeShow="false" bgColor="#fff" title="发布" <com-navbar :leftIcon="false" :homeShow="false" bgColor="#fff" title="发布"
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
</template> </template>
<script> <script>
import releaseForm from '@/components/form.vue' import releaseForm from '@/components/form.vue'
export default { export default {
components: { components: {
...@@ -63,13 +62,12 @@ ...@@ -63,13 +62,12 @@
} }
} }
}, },
onShow() { onShow() {
let that = this let that = this
}, },
methods: { methods: {
handleSubmit(info) {
console.log(info, '拿到表单')
},
} }
} }
......
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