Browse Source

上传

master
前端-胡立永 7 months ago
parent
commit
878e31ef3d
5 changed files with 103 additions and 116 deletions
  1. +29
    -72
      components/config/customerServicePopup.vue
  2. +3
    -0
      pages.json
  3. +17
    -5
      pages/index/center.vue
  4. +46
    -37
      pages_order/mine/updateUserInfo.vue
  5. +8
    -2
      pages_order/order/orderDetail.vue

+ 29
- 72
components/config/customerServicePopup.vue View File

@ -6,13 +6,13 @@
<view class="title">联系客服</view> <view class="title">联系客服</view>
<view class="center">确定拨打客服电话?</view> <view class="center">确定拨打客服电话?</view>
<view class="bottom"> <view class="bottom">
<view>
<uv-button type="info" shape="circle" text="取消" :custom-style="customStyle1"
@click="close"></uv-button>
<view class="btn1"
@click="close">
取消
</view> </view>
<view>
<uv-button type="info" shape="circle" text="确定" :custom-style="customStyle2"
@click="confirm"></uv-button>
<view class="btn2"
@click="confirm">
确定
</view> </view>
</view> </view>
</view> </view>
@ -28,38 +28,6 @@
phone:'', phone:'',
} }
}, },
computed: {
customStyle1() {
return {
height: '60rpx',
background: '#FFF',
color: '#000000',
fontSize: '36rpx',
borderRadius: '40rpx', //
// nvue
'border-top-right-radius': '40rpx',
'border-bottom-left-radius': '40rpx',
'border-bottom-right-radius': '40rpx',
'width': '150rpx',
}
},
customStyle2() {
return {
height: '60rpx',
background: '#fd5100',
color: '#FFF',
fontSize: '34px',
borderRadius: '40rpx', //
// nvue
'border-top-right-radius': '40rpx',
'border-bottom-left-radius': '40rpx',
'border-bottom-right-radius': '40rpx',
'width': '150rpx',
}
}
},
mounted() { mounted() {
this.getCustomPhone() this.getCustomPhone()
}, },
@ -78,39 +46,15 @@
// //
confirm() { confirm() {
this.show = false this.show = false
let phone = this.phone; //
// console.log('', phone)
const res = uni.getSystemInfoSync();
// ios
if (res.platform == 'ios') {
uni.makePhoneCall({
phoneNumber: phone,
success() {
console.log('ios拨打成功');
},
fail() {
console.log('ios拨打失败');
}
})
} else {
//showActionSheet
uni.showActionSheet({
itemList: [phone, '呼叫'],
success: function(res) {
if (res.tapIndex == 1) {
uni.makePhoneCall({
phoneNumber: phone,
success() {
console.log('安卓拨打成功');
},
fail() {
console.log('安卓拨打失败');
}
})
}
}
})
}
uni.makePhoneCall({
phoneNumber: this.phone,
success() {
console.log('安卓拨打成功');
},
fail() {
console.log('安卓拨打失败');
}
})
}, },
} }
} }
@ -134,7 +78,7 @@
.title { .title {
padding: 10rpx 0 0 15rpx; padding: 10rpx 0 0 15rpx;
background-color: #fd5100;
background-color: $uni-color;
color: #FFF; color: #FFF;
text-align: left; text-align: left;
width: 100%; width: 100%;
@ -154,6 +98,19 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
gap: 50rpx; gap: 50rpx;
view{
height: 60rpx;
line-height: 60rpx;
padding: 0 50rpx;
border-radius: 30rpx;
}
.btn1{
background-color: #fff;
}
.btn2{
background-color: $uni-color;
color: #fff;
}
} }
} }
</style> </style>

+ 3
- 0
pages.json View File

@ -51,6 +51,9 @@
{ {
"path": "mine/purse" "path": "mine/purse"
}, },
{
"path": "mine/updateUserInfo"
},
{ {
"path": "mine/runningWater" "path": "mine/runningWater"
}, },


+ 17
- 5
pages/index/center.vue View File

@ -5,11 +5,11 @@
<view class="head"> <view class="head">
<view class="headImage"> <view class="headImage">
<image :src="userInfo.headImage" mode=""></image>
<image :src="headImage" mode="aspectFill"></image>
</view> </view>
<view class="info"> <view class="info">
<view class="name"> <view class="name">
{{ userInfo.nickName || '用户昵称' }}
{{ username }}
</view> </view>
<!-- 营业时间写这个view里面 --> <!-- 营业时间写这个view里面 -->
@ -30,9 +30,9 @@
<!-- <view class="headBtn" @click="headBtn"> <!-- <view class="headBtn" @click="headBtn">
角色切换 角色切换
</view> --> </view> -->
<!-- <view class="setting">
<view class="setting" @click="$utils.navigateTo('/pages_order/mine/updateUserInfo')">
<uv-icon name="setting" size="40rpx"></uv-icon> <uv-icon name="setting" size="40rpx"></uv-icon>
</view> -->
</view>
</view> </view>
<!-- 水洗店 --> <!-- 水洗店 -->
@ -185,6 +185,18 @@
computed: { computed: {
...mapGetters(['userShop']), ...mapGetters(['userShop']),
...mapState(['userInfo']), ...mapState(['userInfo']),
username(){
return this.userInfo.shop
&& this.userInfo.shop.name
|| this.userInfo.nickName
|| '用户昵称'
},
headImage(){
return this.userInfo.shop
&& this.userInfo.shop.pic
|| this.userInfo.headImage
|| '/static/image/center/3.png'
},
}, },
data() { data() {
return { return {
@ -295,7 +307,7 @@
.headImage { .headImage {
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
background-image: url(/static/image/center/3.png);
// background-image: url(/static/image/center/3.png);
background-size: 100% 100%; background-size: 100% 100%;
overflow: hidden; overflow: hidden;
border-radius: 50%; border-radius: 50%;


+ 46
- 37
pages_order/mine/updateUserInfo.vue View File

@ -8,9 +8,11 @@
<view class="headImage"> <view class="headImage">
<view style="" class="key">头像</view> <view style="" class="key">头像</view>
<button style="" class="value" @chooseavatar="onChooseAvatar" open-type="chooseAvatar"> <button style="" class="value" @chooseavatar="onChooseAvatar" open-type="chooseAvatar">
<image :src="form.headImage" v-if="form.headImage" style="width: 150%;height: 100%" mode="">
<image
:src="form.headImage" v-if="form.headImage"
style="width: 100%;height: 100%" mode="aspectFill">
</image> </image>
<image src="/static/image/tabbar/6.png" v-else style="width: 100%;height: 100%" mode="">
<image src="/static/image/tabbar/6.png" v-else style="width: 100%;height: 100%" mode="aspectFill">
</image> </image>
</button> </button>
</view> </view>
@ -25,12 +27,12 @@
<view class="label">性别</view> <view class="label">性别</view>
<view>{{form.sex}}</view> <view>{{form.sex}}</view>
</view> --> </view> -->
<view class="item">
<!-- <view class="item">
<view class="label">联系方式</view> <view class="label">联系方式</view>
<view class="value"> <view class="value">
<uv-input v-model="form.phone" placeholder="联系方式" border="bottom" clearable></uv-input> <uv-input v-model="form.phone" placeholder="联系方式" border="bottom" clearable></uv-input>
</view> </view>
</view>
</view> -->
</view> </view>
<!-- ActionSheet 操作菜单 --> <!-- ActionSheet 操作菜单 -->
@ -45,15 +47,12 @@
</template> </template>
<script> <script>
import '../../common.css'; // CSS
import { import {
mapState, mapState,
mapGetters
} from 'vuex' } from 'vuex'
export default { export default {
computed: { computed: {
...mapState(['userInfo']), ...mapState(['userInfo']),
...mapGetters(['isVedio']),
}, },
data() { data() {
return { return {
@ -76,7 +75,7 @@
], ],
} }
}, },
mounted() {
onLoad() {
this.form.phone = this.userInfo.phone this.form.phone = this.userInfo.phone
this.form.headImage = this.userInfo.headImage this.form.headImage = this.userInfo.headImage
this.form.nickName = this.userInfo.nickName this.form.nickName = this.userInfo.nickName
@ -101,38 +100,33 @@
confirmEditUserInfo() { confirmEditUserInfo() {
let self = this let self = this
uni.createSelectorQuery().in(this) uni.createSelectorQuery().in(this)
.select("#nickName")
.fields({
properties: ["value"],
})
.exec((res) => {
const nickName = res?.[0]?.value
self.form.nickName = nickName
if (self.$utils.verificationAll(self.form, {
headImage: '请选择头像',
nickName: '请填写昵称'
})) {
return
}
.select("#nickName")
.fields({
properties: ["value"],
})
.exec((res) => {
const nickName = res?.[0]?.value
self.form.nickName = nickName
if (self.$utils.verificationAll(self.form, {
headImage: '请选择头像',
nickName: '请填写昵称'
})) {
return
}
self.$api('infoUpdateInfo', self.form, res => {
if (res.code == 200) {
uni.navigateTo({
url: '/pages/index/index'
})
}
})
self.$api('updateInfo', {
headImg : self.form.headImage,
nickname : self.form.nickName,
}, res => {
if (res.code == 200) {
uni.redirectTo({
url: '/pages/index/center'
})
}
}) })
this.$api('infoUpdateInfo', this.form, res => {
if (res.code == 200) {
uni.navigateTo({
url: '/pages/index/index'
})
}
}) })
}, },
sexChange() { sexChange() {
@ -184,6 +178,7 @@
overflow: hidden; overflow: hidden;
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
padding: 0;
} }
} }
@ -220,4 +215,18 @@
/deep/ .uv-input__content__field-wrapper__field { /deep/ .uv-input__content__field-wrapper__field {
text-align: right; text-align: right;
} }
.bottomBtn {
position: fixed;
bottom: 5%;
left: 10%;
width: 80%;
height: 80rpx;
text-align: center;
color: #ffffff;
background: $uni-color;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
}
</style> </style>

+ 8
- 2
pages_order/order/orderDetail.vue View File

@ -240,13 +240,17 @@
<!-- {{msgShop.projectExplain}} --> <!-- {{msgShop.projectExplain}} -->
</view> </view>
<view class="btns"> <view class="btns">
<view @click="clickService" class="btn">
<view @click="$refs.customerServicePopup.open()" class="btn">
联系客服 联系客服
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 联系客服弹框 -->
<customerServicePopup ref="customerServicePopup" />
</view> </view>
</template> </template>
@ -256,9 +260,11 @@
} from 'vuex' } from 'vuex'
import orderTypeBtn from "../components/order/orderTypeBtn.vue" import orderTypeBtn from "../components/order/orderTypeBtn.vue"
import mixinOrder from '@/mixins/order.js' import mixinOrder from '@/mixins/order.js'
import customerServicePopup from '@/components/config/customerServicePopup.vue'
export default { export default {
components: { components: {
orderTypeBtn
orderTypeBtn,
customerServicePopup
}, },
mixins : [mixinOrder], mixins : [mixinOrder],
computed: { computed: {


Loading…
Cancel
Save