Browse Source

上传

master
前端-胡立永 4 months ago
parent
commit
c2b3f31ad0
8 changed files with 163 additions and 161 deletions
  1. +1
    -0
      App.vue
  2. +40
    -0
      common.scss
  3. +0
    -81
      components/bottom/bottomBtn.vue
  4. +116
    -0
      components/config/customerServicePopup.vue
  5. +0
    -67
      pages/index/center.vue
  6. +2
    -3
      pages_order/auth/loginAndRegisterAndForgetPassword.vue
  7. +2
    -8
      pages_order/order/refundsOrExchange.vue
  8. +2
    -2
      utils/position.js

+ 1
- 0
App.vue View File

@ -11,6 +11,7 @@
</script> </script>
<style> <style>
@import url("common.scss");
/*每个页面公共css */ /*每个页面公共css */
body{ body{
background-color: #f7f7f7; background-color: #f7f7f7;


+ 40
- 0
common.scss View File

@ -0,0 +1,40 @@
// 文字益处处理
.text-ellipsis{
overflow:hidden; //超出的文本隐藏
text-overflow:ellipsis; //溢出用省略号显示
white-space:nowrap; //溢出不换行
}
.text-ellipsis-2{
overflow: hidden;
text-overflow: ellipsis;
display:-webkit-box; //作为弹性伸缩盒子模型显示
-webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-webkit-line-clamp:2; //显示的行
}
.text-ellipsis-3{
overflow: hidden;
text-overflow: ellipsis;
display:-webkit-box; //作为弹性伸缩盒子模型显示
-webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-webkit-line-clamp:3; //显示的行
}
.share{
padding: 0;
margin: 0;
background-color: #fff;
display: flex !important;
flex-direction: column !important;
justify-content: center !important;
align-items: center !important;
font-size: 26rpx;
}
.share::after{
border: none;
padding: 0;
margin: 0;
width: 0;
height: 0;
}

+ 0
- 81
components/bottom/bottomBtn.vue View File

@ -1,81 +0,0 @@
<template>
<view @click="$emit('confirm')" :style="{
position: 'fixed',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
width: '100vw',
bottom: bottom
}">
<button :style="{
color: color,
backgroundColor: backgroundColor,
fontSize: fontSize,
width: width,
height: height,
borderRadius: borderRadius
}">
{{ text }}
</button>
</view>
</template>
<script>
export default {
props: {
color: {
default: '#000000' //
},
backgroundColor: {
default: '#FFFFFF' //
},
fontSize: {
default: '36rpx' //
},
text: {
default: '按钮' //
},
width: {
default: '150rpx' //
},
height: {
default: '60rpx' //
},
borderRadius: {
default: '40rpx' //
},
bottom: {
default: '40rpx' //
},
},
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped lang="less">
// .container {
// position: fixed;
// display: flex;
// justify-content: center;
// /* */
// align-items: center;
// /* */
// width: 100%;
// /* 使 */
// }
button {
display: flex;
justify-content: center;
align-items: center;
}
</style>

+ 116
- 0
components/config/customerServicePopup.vue View File

@ -0,0 +1,116 @@
<template>
<!-- 联系客服弹框 -->
<uv-overlay :show="show" @click="close">
<view class="warp">
<view class="rect" @tap.stop>
<view class="title">联系客服</view>
<view class="center">确定拨打客服电话?</view>
<view class="bottom">
<view class="btn1"
@click="close">
取消
</view>
<view class="btn2"
@click="confirm">
确定
</view>
</view>
</view>
</view>
</uv-overlay>
</template>
<script>
export default {
data() {
return {
show: false,
phone:'',
}
},
onLoad() {
this.getCustomPhone()
},
methods: {
getCustomPhone(){
this.$api('customUser', {}, res => {
this.phone = res.result.phone
})
},
open() {
this.show = true
},
close() {
this.show = false
},
//
confirm() {
this.show = false
uni.makePhoneCall({
phoneNumber: this.phone,
success() {
console.log('安卓拨打成功');
},
fail() {
console.log('安卓拨打失败');
}
})
},
}
}
</script>
<style scoped lang="scss">
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.rect {
width: 600rpx;
height: 300rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
.title {
padding: 10rpx 0 0 15rpx;
background-color: $uni-color;
color: #FFF;
text-align: left;
width: 100%;
height: 18%;
font-size: 36rpx;
}
.center {
height: 40%;
display: flex;
justify-content: center;
align-items: center;
font-size: 36rpx;
}
.bottom {
display: flex;
justify-content: center;
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>

+ 0
- 67
pages/index/center.vue View File

@ -120,27 +120,6 @@
</view> </view>
</view> </view>
<!-- 联系客服弹框 -->
<uv-overlay :show="show" @click="show = false">
<view class="warp">
<view class="rect" @tap.stop>
<view class="title">联系客服</view>
<view class="center">确定拨打客服电话?</view>
<view class="bottom">
<view>
<uv-button type="info" shape="circle" text="取消" :custom-style="customStyle1"
@click="cancle"></uv-button>
</view>
<view>
<uv-button type="info" shape="circle" text="确定" :custom-style="customStyle2"
@click="confirm"></uv-button>
</view>
</view>
</view>
</view>
</uv-overlay>
<tabber select="4" /> <tabber select="4" />
</view> </view>
</template> </template>
@ -158,44 +137,12 @@
}, },
computed: { computed: {
...mapGetters(['userShop']), ...mapGetters(['userShop']),
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',
}
}
}, },
data() { data() {
return { return {
show: false,
} }
}, },
methods: { methods: {
headBtn() { headBtn() {
let self = this let self = this
uni.showModal({ uni.showModal({
@ -207,20 +154,6 @@
} }
}) })
}, },
//
contactUs() {
this.show = true
},
confirm() {
this.show = false
},
cancle() {
this.show = false
},
} }
} }
</script> </script>


+ 2
- 3
pages_order/auth/loginAndRegisterAndForgetPassword.vue View File

@ -28,7 +28,7 @@
<view> <view>
<uv-checkbox-group v-model="checkboxValue" shape="circle"> <uv-checkbox-group v-model="checkboxValue" shape="circle">
<view class="content"> <view class="content">
<view style="display: flex;">
<view style="display: flex;flex-wrap: wrap;">
<uv-checkbox size="30rpx" :name="1"></uv-checkbox> <uv-checkbox size="30rpx" :name="1"></uv-checkbox>
请你阅读并同意我们的<span style="color: #fd5100" 请你阅读并同意我们的<span style="color: #fd5100"
@click="$refs.popup.open('getPrivacyPolicy')">隐私条款</span><span @click="$refs.popup.open('getPrivacyPolicy')">隐私条款</span><span
@ -234,8 +234,7 @@
} }
.form { .form {
height: 12vh;
line-height: 50rpx;
>view:nth-of-type(1) { >view:nth-of-type(1) {
padding: 20rpx 100rpx; padding: 20rpx 100rpx;
} }


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

@ -76,12 +76,7 @@
</view> </view>
<!-- 底部按钮 --> <!-- 底部按钮 -->
<bottomBtn @confirm='confirm()' :color='bottomBtnStyle.color' :backgroundColor='bottomBtnStyle.backgroundColor'
:fontSize='bottomBtnStyle.fontSize' :text='bottomBtnStyle.text' :width="bottomBtnStyle.width"
:height="bottomBtnStyle.height" :borderRadius='bottomBtnStyle.borderRadius'
:bottom='bottomBtnStyle.bottom'
>
</bottomBtn>
<!--商品选择--> <!--商品选择-->
<uv-popup ref="spPopup" :round="30"> <uv-popup ref="spPopup" :round="30">
@ -95,7 +90,6 @@
</template> </template>
<script> <script>
import bottomBtn from "../../components/bottom/bottomBtn.vue"
import commoditySelect from "../components/commodity/commoditySelect.vue" import commoditySelect from "../components/commodity/commoditySelect.vue"
export default { export default {
@ -103,7 +97,7 @@ export default {
this.titleIndex = option.index this.titleIndex = option.index
}, },
components: { components: {
bottomBtn, commoditySelect
commoditySelect
}, },
data() { data() {
return { return {


+ 2
- 2
utils/position.js View File

@ -8,7 +8,7 @@ import config from '../config.js'
* @param {number} lon2 地点2维度 * @param {number} lon2 地点2维度
* @param {number} fixed 保留几位小数,默认0,单位km * @param {number} fixed 保留几位小数,默认0,单位km
*/ */
function calculateDistance(lat1, lon1, lat2, lon2) { //计算两点距离
function calculateDistance(lat1, lon1, lat2, lon2, fixed = 0) { //计算两点距离
let distance = 0 let distance = 0
if (!lat2 || !lon2) return distance if (!lat2 || !lon2) return distance
//先强制转换一下(后端给的字符串) //先强制转换一下(后端给的字符串)
@ -28,7 +28,7 @@ function calculateDistance(lat1, lon1, lat2, lon2) { //计算两点距离
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
// 计算距离 // 计算距离
distance = R * c; distance = R * c;
return distance.toFixed(0)
return distance.toFixed(fixed)
} }
function getLocation(fn) { //获取用户经纬度 function getLocation(fn) { //获取用户经纬度


Loading…
Cancel
Save