@ -1,347 +0,0 @@ | |||
<template> | |||
<view class="refundsOrExchange"> | |||
<navbar :title="titleList[titleIndex]" leftClick @leftClick="$utils.navigateBack" /> | |||
<view class="frame"> | |||
<!-- 登录和注册 --> | |||
<view class="loginRegister" v-if='titleIndex!=2'> | |||
<!-- 标题 --> | |||
<view class="title">{{titleList[titleIndex]}}</view> | |||
<!-- 头像 --> | |||
<view class="userIamge"> | |||
<view> | |||
<img src="/static/image/center/11.svg" alt="" style="width: 100%;height: 100%;"> | |||
</view> | |||
</view> | |||
<!-- 用户名&密码&隐私条款 --> | |||
<view class="form"> | |||
<view> | |||
<uv-input v-model="form.account" placeholder="请输入账号" border="surround" shape='circle' | |||
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input> | |||
</view> | |||
<view> | |||
<uv-input v-model="form.password" password placeholder="请输入密码" border="surround" shape='circle' | |||
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input> | |||
</view> | |||
<view> | |||
<uv-checkbox-group v-model="checkboxValue" shape="circle"> | |||
<view class="content"> | |||
<view style="display: flex;flex-wrap: wrap;"> | |||
<uv-checkbox size="30rpx" :name="1"></uv-checkbox> | |||
请你阅读并同意我们的<span style="color: #fd5100" | |||
@click="$refs.popup.open('getPrivacyPolicy')">《隐私条款》</span>和<span | |||
style="color: #fd5100" | |||
@click="$refs.popup.open('getUserAgreement')">《服务协议》</span> | |||
</view> | |||
</view> | |||
</uv-checkbox-group> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- 忘记密码 --> | |||
<view class='forgetPassword' v-if='titleIndex==2'> | |||
<!-- 标题 --> | |||
<view class="title">{{titleList[titleIndex]}}</view> | |||
<!-- 表单 --> | |||
<view class="form1"> | |||
<view class="userName"> | |||
<uv-input v-model="form1.userName" placeholder="请输入手机号/用户/邮箱" border="surround" shape='circle' | |||
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input> | |||
</view> | |||
<view class="code"> | |||
<view class="left"> | |||
<uv-input v-model="form1.code" placeholder="请输入验证码" border="surround" shape='circle' | |||
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input> | |||
</view> | |||
<view class="right"> | |||
<view> | |||
<uv-toast ref="toast"></uv-toast> | |||
<uv-code :seconds="seconds" @end="end" @start="start" ref="code" | |||
@change="codeChange"></uv-code> | |||
<uv-button @tap="getCode" iconSize='10rpx' color='#fd5100' | |||
shape='circle'>{{tips}}</uv-button> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="password1"> | |||
<uv-input v-model="form1.password1" placeholder="设置您的新密码(6到50个字符)" password clearable | |||
border="surround" shape='circle' :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input> | |||
</view> | |||
<view class="password2"> | |||
<uv-input v-model="form1.password2" placeholder="重新确认密码" password clearable border="surround" | |||
shape='circle' :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- 按钮 --> | |||
<view class="btn" | |||
@click="submit"> | |||
<button class='a'>{{titleList[titleIndex]}}</button> | |||
</view> | |||
<!-- tab --> | |||
<!-- <view class="bottomTab"> | |||
<span :class="titleIndex==0 ? 'tabbarItemActive' : 'tabbarItemNoActive'" | |||
@click='changePage(0)'>注册账号</span> | |||
<span style="color: #9c9fa4">|</span> | |||
<span :class="titleIndex==1 ? 'tabbarItemActive' : 'tabbarItemNoActive'" | |||
@click='changePage(1)'>账号登录</span> | |||
<span style="color: #9c9fa4">|</span> | |||
<span :class="titleIndex==2 ? 'tabbarItemActive' : 'tabbarItemNoActive'" | |||
@click='changePage(2)'>忘记密码</span> | |||
</view> --> | |||
</view> | |||
<configPopup ref="popup"></configPopup> | |||
</view> | |||
</template> | |||
<script> | |||
import configPopup from '@/components/config/configPopup.vue'; | |||
export default { | |||
components: { | |||
configPopup | |||
}, | |||
onLoad(option) { | |||
this.titleIndex = option.index || 1 | |||
}, | |||
data() { | |||
return { | |||
titleIndex: 0, | |||
titleList: ['注册', '登录', '重置密码'], | |||
checkboxValue: [], | |||
form: { | |||
account: '13135294009', | |||
password: 'lzx123456', | |||
}, | |||
form1: { | |||
userName: '', | |||
code: '', | |||
password1: '', | |||
password2: '', | |||
}, | |||
tips: '获取验证码', | |||
seconds: 60, | |||
} | |||
}, | |||
methods: { | |||
submit(){ | |||
if(!this.checkboxValue.length){ | |||
return uni.showToast({ | |||
title: '请先同意隐私协议', | |||
icon:'none' | |||
}) | |||
} | |||
if(this.$utils.verificationAll(this.form, { | |||
account: '请输入账号', | |||
password: '请输入密码', | |||
})){ | |||
return | |||
} | |||
this.$store.commit('accountLogin', this.form) | |||
}, | |||
// 切换页面 | |||
changePage(index) { | |||
this.titleIndex = index | |||
}, | |||
confirm() { | |||
}, | |||
codeChange(text) { | |||
this.tips = text; | |||
}, | |||
getCode() { | |||
if (this.$refs.code.canGetCode) { | |||
// 模拟向后端请求验证码 | |||
uni.showLoading({ | |||
title: '正在获取验证码' | |||
}) | |||
setTimeout(() => { | |||
uni.hideLoading(); | |||
// 这里此提示会被this.start()方法中的提示覆盖 | |||
uni.$uv.toast('验证码已发送'); | |||
// 通知验证码组件内部开始倒计时 | |||
this.$refs.code.start(); | |||
}, 2000); | |||
} else { | |||
uni.$uv.toast('请勿重复发送'); | |||
} | |||
}, | |||
end() { | |||
// uni.$uv.toast('倒计时结束'); | |||
}, | |||
start() { | |||
// uni.$uv.toast('倒计时开始'); | |||
} | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
* { | |||
box-sizing: border-box; | |||
} | |||
.refundsOrExchange { | |||
background-color: #FFF; | |||
height: 100vh; | |||
.frame { | |||
background-color: #FFF; | |||
.loginRegister { | |||
display: flex; | |||
flex-direction: column; | |||
gap: 40rpx; | |||
.title { | |||
display: flex; | |||
justify-content: center; | |||
align-items: flex-end; | |||
height: 10vh; | |||
color: #000; | |||
font-size: 40rpx; | |||
font-weight: 700; | |||
} | |||
.userIamge { | |||
display: flex; | |||
justify-content: center; | |||
height: 10vh; | |||
>view:nth-of-type(1) { | |||
width: 25%; | |||
height: 100%; | |||
border-radius: 50%; | |||
overflow: hidden; | |||
} | |||
} | |||
.form { | |||
line-height: 50rpx; | |||
>view:nth-of-type(1) { | |||
padding: 20rpx 100rpx; | |||
} | |||
>view:nth-of-type(2) { | |||
padding: 0 100rpx; | |||
} | |||
>view:nth-of-type(3) { | |||
display: flex; | |||
padding: 30rpx 100rpx 0 100rpx; | |||
font-size: 22rpx | |||
} | |||
} | |||
} | |||
.btn { | |||
// height: 5vh; | |||
display: flex; | |||
justify-content: center; | |||
margin: 90rpx 0 0 0; | |||
.a { | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
width: 70%; | |||
height: 80rpx; | |||
color: #FFF; | |||
background-color: $uni-color; | |||
border: 1px solid red; | |||
border-radius: 100rpx; | |||
font-size: 30rpx; | |||
} | |||
} | |||
.bottomTab { | |||
display: flex; | |||
justify-content: space-between; | |||
height: 10vh; | |||
padding: 0 80rpx; | |||
margin-top: 30rpx; | |||
.tabbarItemActive { | |||
color: $uni-color; | |||
} | |||
.tabbarItemNoActive { | |||
color: #9c9fa4; | |||
} | |||
} | |||
.forgetPassword { | |||
padding: 100rpx 40rpx 0 40rpx; | |||
.title { | |||
display: flex; | |||
justify-content: center; | |||
align-items: flex-end; | |||
height: 10vh; | |||
color: #000; | |||
font-size: 40rpx; | |||
font-weight: 700; | |||
} | |||
.form1 { | |||
display: flex; | |||
flex-direction: column; | |||
gap: 30rpx; | |||
margin-top: 20rpx; | |||
padding: 20rpx 80rpx; | |||
.userName { | |||
// padding: 20rpx 100 rpx; | |||
} | |||
.code { | |||
display: flex; | |||
width: 100%; | |||
.left { | |||
width: 55%; | |||
} | |||
.right { | |||
width: 45%; | |||
height: 100%; | |||
>view:nth-of-type(1) { | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
width: 100%; | |||
} | |||
} | |||
} | |||
.password1 {} | |||
.password2 {} | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@ -1,151 +0,0 @@ | |||
<template> | |||
<view class="login"> | |||
<view class="logo"> | |||
<image :src="configList.logo_image" mode=""></image> | |||
</view> | |||
<view class="title"> | |||
欢迎使用{{ configList.logo_name }} | |||
</view> | |||
<view class="btn mt" | |||
@click="wxLogin"> | |||
<view class="icon"> | |||
<image src="../static/auth/wx.png" mode=""></image> | |||
</view> | |||
<view class=""> | |||
微信授权登录 | |||
</view> | |||
</view> | |||
<!-- <view class="btn b2"> | |||
使用短信验证登录 | |||
</view> --> | |||
<view class="config"> | |||
<uv-checkbox-group | |||
v-model="checkboxValue" | |||
shape="circle"> | |||
<view class="content"> | |||
<view | |||
style="display: flex;"> | |||
<uv-checkbox | |||
size="40rpx" | |||
icon-size="30rpx" | |||
activeColor="#A3D250" | |||
:name="1" | |||
></uv-checkbox> | |||
阅读并同意我们的<text @click="$refs.popup.open('user_xy')">“用户协议”</text> | |||
</view> | |||
<view class=""> | |||
以及<text @click="$refs.popup.open('user_ys')">隐私政策</text> | |||
</view> | |||
</view> | |||
</uv-checkbox-group> | |||
</view> | |||
<configPopup ref="popup"></configPopup> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
name : 'Login', | |||
data() { | |||
return { | |||
checkboxValue : [] | |||
} | |||
}, | |||
methods: { | |||
wxLogin(){ | |||
if(!this.checkboxValue.length){ | |||
return uni.showToast({ | |||
title: '请先同意隐私协议', | |||
icon:'none' | |||
}) | |||
} | |||
this.$store.commit('login') | |||
}, | |||
//打开应用配置 | |||
openConfigDetail(key){ | |||
this.$refs.popup.open(key) | |||
} | |||
} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.login{ | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
height: 80vh; | |||
flex-direction: column; | |||
position: relative; | |||
.logo{ | |||
height: 140rpx; | |||
width: 140rpx; | |||
image{ | |||
height: 140rpx; | |||
width: 140rpx; | |||
border-radius: 30rpx; | |||
} | |||
margin-bottom: 20rpx; | |||
} | |||
.title{ | |||
position: relative; | |||
font-weight: 900; | |||
font-size: 45rpx; | |||
&::after{ | |||
content: ''; | |||
position: absolute; | |||
left: 0; | |||
top: 100%; | |||
display: block; | |||
height: 8rpx; | |||
width: 210rpx; | |||
background: linear-gradient(to right,$uni-color, #fff); | |||
} | |||
} | |||
.btn{ | |||
width: 80%; | |||
height: 100rpx; | |||
background-color: $uni-color; | |||
color: #fff; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
margin: 20rpx 0; | |||
border-radius: 20rpx; | |||
.icon{ | |||
margin-right: 10rpx; | |||
image{ | |||
width: 40rpx; | |||
height: 35rpx; | |||
} | |||
} | |||
} | |||
.b2{ | |||
background-color: rgba($uni-color, 0.2); | |||
color: $uni-color; | |||
} | |||
.mt{ | |||
margin-top: 200rpx; | |||
} | |||
.config{ | |||
position: absolute; | |||
bottom: 0; | |||
font-size: 24rpx; | |||
text-align: center; | |||
line-height: 40rpx; | |||
text{ | |||
color: $uni-color; | |||
} | |||
} | |||
} | |||
</style> |
@ -1,136 +0,0 @@ | |||
<template> | |||
<view class="login"> | |||
<view class="title"> | |||
{{ configList.logo_name }} | |||
</view> | |||
<view class="title"> | |||
申请获取你的头像、昵称 | |||
</view> | |||
<button class="chooseAvatar" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"> | |||
<view class="line"> | |||
<view class=""> | |||
头像 | |||
</view> | |||
<view class=""> | |||
<image :src="userInfo.headImage" v-if="userInfo.headImage" style="width: 60rpx;height: 60rpx;" | |||
mode=""></image> | |||
<image src="../static/auth/headImage.png" v-else style="width: 50rpx;height: 50rpx;" mode=""></image> | |||
</view> | |||
</view> | |||
</button> | |||
<view class="line"> | |||
<view class=""> | |||
昵称 | |||
</view> | |||
<view class=""> | |||
<input type="nickname" placeholder="请输入昵称" style="text-align: right;" id="nickName" | |||
v-model="userInfo.nickName" /> | |||
</view> | |||
</view> | |||
<view class="btn" @click="submit"> | |||
确认 | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
userInfo: { | |||
headImage: '', | |||
nickName: '', | |||
} | |||
}; | |||
}, | |||
onShow() {}, | |||
computed: {}, | |||
methods: { | |||
onChooseAvatar(res) { | |||
let self = this | |||
self.$Oss.ossUpload(res.target.avatarUrl) | |||
.then(url => { | |||
self.userInfo.headImage = url | |||
}) | |||
}, | |||
submit() { | |||
let self = this | |||
uni.createSelectorQuery().in(this) | |||
.select("#nickName") | |||
.fields({ | |||
properties: ["value"], | |||
}) | |||
.exec((res) => { | |||
const nickName = res?.[0]?.value | |||
self.userInfo.nickName = nickName | |||
if (self.$utils.verificationAll(self.userInfo, { | |||
headImage: '请选择头像', | |||
nickName: '请填写昵称', | |||
})) { | |||
return | |||
} | |||
self.$api('updateInfo', { | |||
avatarUrl : self.userInfo.headImage, | |||
nickName : self.userInfo.nickName | |||
}, res => { | |||
if (res.code == 200) { | |||
uni.reLaunch({ | |||
url:'/pages/index/index' | |||
}) | |||
} | |||
}) | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.login { | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
align-items: center; | |||
height: 80vh; | |||
.title { | |||
line-height: 45rpx; | |||
font-weight: 900; | |||
} | |||
.line { | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
width: 80%; | |||
border-bottom: 1px solid #00000023; | |||
padding: 30rpx 0; | |||
margin: 0 auto; | |||
} | |||
.chooseAvatar { | |||
width: 100%; | |||
padding: 0; | |||
margin: 0; | |||
margin-top: 10vh; | |||
border: none; | |||
} | |||
.btn { | |||
// background: $uni-linear-gradient-btn-color; | |||
background: $uni-color; | |||
color: #fff; | |||
width: 80%; | |||
padding: 20rpx 0; | |||
text-align: center; | |||
border-radius: 15rpx; | |||
margin-top: 10vh; | |||
} | |||
} | |||
</style> |
@ -1,244 +0,0 @@ | |||
<template> | |||
<scroll-view | |||
scroll-y="true" | |||
:style="{height: height}" | |||
@scrolltolower="moreAddress"> | |||
<uv-radio-group v-model="selectAddress" | |||
@change="editDefault" | |||
v-if="addressList.length > 0"> | |||
<view v-for="item in addressList" :key="item.id" class="address-item"> | |||
<view class="address-item-top" | |||
@click="select(item)"> | |||
<view class="img-box"> | |||
<image src="../../static/address/icon1.png" mode="aspectFill"></image> | |||
</view> | |||
<view class="address-info"> | |||
<view class="user-info"> | |||
<text class="user-name">{{ item.name }}</text> | |||
<text class="user-phone">{{ item.phone }}</text> | |||
<text v-if="item.defaultFlag == 1" class="is-default">默认</text> | |||
</view> | |||
<view class="address-detail"> | |||
{{ item.address + " " + item.addressDetails }} | |||
</view> | |||
</view> | |||
</view> | |||
<view class="controls" | |||
v-if="controls"> | |||
<view class="default-checkbox"> | |||
<uv-radio | |||
:name="item.id" | |||
label-disabled | |||
size="30rpx" | |||
icon-size="30rpx"> | |||
默认地址 | |||
</uv-radio> | |||
</view> | |||
<view class="edit-btn"> | |||
<uv-icon name="edit-pen"></uv-icon> | |||
<text @click="editAddress(item)" class="control-title">编辑</text> | |||
</view> | |||
<view class="del-btn"> | |||
<uv-icon name="trash"></uv-icon> | |||
<text class="control-title" @click="deleteAddress(item.id)">删除</text> | |||
</view> | |||
</view> | |||
</view> | |||
</uv-radio-group> | |||
<view | |||
style="padding: 100rpx 0;" | |||
v-else> | |||
<uv-empty | |||
mode="history" | |||
textSize="28rpx" | |||
iconSize="100rpx"/> | |||
</view> | |||
</scroll-view> | |||
</template> | |||
<script> | |||
export default { | |||
props : { | |||
controls : { | |||
default : false, | |||
type : Boolean, | |||
}, | |||
height : { | |||
default : 'calc(90vh - 180rpx)' | |||
} | |||
}, | |||
data() { | |||
return { | |||
selectAddress : 0, | |||
queryParams: { | |||
pageNo: 1, | |||
pageSize: 10, | |||
}, | |||
addressList: [], | |||
total : 0, | |||
} | |||
}, | |||
methods: { | |||
//获取地址列表 | |||
getAddressList() { | |||
return new Promise((success, fail) => { | |||
this.$api('getAddressPageList', this.queryParams, res => { | |||
if (res.code == 200) { | |||
this.addressList = res.result.records || []; | |||
this.total = res.result.total || 0; | |||
res.result.records.forEach(n => { //筛选默认地址 | |||
if (n.defaultFlag == 1) { | |||
this.selectAddress = n.id | |||
} | |||
}) | |||
success(res.result) | |||
} | |||
}) | |||
}) | |||
}, | |||
// 加载更多 | |||
moreAddress(){ | |||
if(this.queryParams.pageSize > this.total){ | |||
return | |||
} | |||
this.queryParams.pageSize += 10 | |||
this.getAddressList() | |||
}, | |||
// 删除地址 | |||
deleteAddress(e){ | |||
this.$emit('deleteAddress', e) | |||
}, | |||
// 修改地址 | |||
editAddress(e){ | |||
this.$emit('editAddress', e) | |||
}, | |||
// 切换默认地址 | |||
editDefault(e){ | |||
this.$emit('editDefault', e) | |||
}, | |||
// 选择了地址 | |||
select(e){ | |||
this.$emit('select', e) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.address-item { | |||
background: white; | |||
border-radius: 20rpx; | |||
overflow: hidden; | |||
margin-bottom: 20rpx; | |||
padding: 15rpx 15rpx 0rpx 15rpx; | |||
width: 680rpx; | |||
.address-item-top { | |||
border-bottom: 1px dashed #D3D1D1; | |||
display: flex; | |||
align-items: center; | |||
padding: 0rpx 0rpx 15rpx 0rpx; | |||
.img-box { | |||
width: 100rpx; | |||
height: 120rpx; | |||
image { | |||
width: 75%; | |||
height: 75%; | |||
display: block; | |||
margin: 12.5% auto; | |||
} | |||
} | |||
.address-info { | |||
width: calc(100% - 120rpx); | |||
height: 100%; | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: space-between; | |||
.user-info { | |||
display: flex; | |||
align-items: center; | |||
text { | |||
display: block; | |||
line-height: 40rpx; | |||
margin-right: 20rpx; | |||
} | |||
.user-name, | |||
.user-phone { | |||
font-size: 30rpx; | |||
} | |||
.is-default { | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
background: #FEB773; | |||
color: white; | |||
width: 80rpx; | |||
height: 35rpx; | |||
border-radius: 20rpx; | |||
font-size: 22rpx; | |||
} | |||
} | |||
.address-detail { | |||
color: #4a4a4a; | |||
font-size: 26rpx; | |||
overflow: hidden; | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-line-clamp: 2; | |||
text-overflow: ellipsis; | |||
} | |||
} | |||
} | |||
.controls { | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
align-items: center; | |||
font-size: 26rpx; | |||
padding: 15rpx 15rpx 25rpx 15rpx; | |||
.default-checkbox { | |||
display: flex; | |||
text { | |||
margin-left: 8rpx; | |||
} | |||
} | |||
.control-title { | |||
height: 30rpx; | |||
line-height: 30rpx; | |||
color: #666666; | |||
} | |||
view { | |||
display: flex; | |||
align-items: center; | |||
} | |||
image { | |||
width: 23rpx; | |||
height: 23rpx; | |||
vertical-align: middle; | |||
margin-right: 8rpx; | |||
} | |||
} | |||
} | |||
</style> |
@ -1,224 +0,0 @@ | |||
<template> | |||
<uv-popup round="40rpx" ref="addressPopup" :customStyle="{ height: 'auto' , width : '100%' , padding : '20rpx'}"> | |||
<view class="redact-address"> | |||
<view class="redact-address-title">{{title}}</view> | |||
<uv-form label-width="210rpx" :model="addressDetail" ref="form"> | |||
<uv-form-item label="联系人" prop="name"> | |||
<uv-input v-model="addressDetail.name" placeholder="请输入联系人姓名" border="none"> | |||
</uv-input> | |||
</uv-form-item> | |||
<uv-form-item label="手机号" prop="phone"> | |||
<uv-input v-model="addressDetail.phone" placeholder="请输入手机号" border="none"> | |||
</uv-input> | |||
</uv-form-item> | |||
<uv-form-item label="所在地区" prop="address"> | |||
<uv-input v-model="addressDetail.address" placeholder="请选择所在地区" border="none"> | |||
</uv-input> | |||
<template #right> | |||
<view style="padding-right: 40rpx;color: #FBAB32;" @click.stop="selectAddr"> | |||
<image src="../../static/address/selectIcon.png" mode="aspectFit"></image>定位 | |||
</view> | |||
</template> | |||
</uv-form-item> | |||
<uv-form-item label="详细地址" prop="addressDetail"> | |||
<uv-input v-model="addressDetail.addressDetails" placeholder="请输入详细地址" border="none"> | |||
</uv-input> | |||
</uv-form-item> | |||
</uv-form> | |||
<view @click="onSubmit" class="save">{{ addressDetail.id ? '修改地址' : '新增地址'}}</view> | |||
</view> | |||
</uv-popup> | |||
</template> | |||
<script> | |||
import Position from '@/utils/position.js' | |||
export default { | |||
data() { | |||
return { | |||
addressDetail: {} | |||
} | |||
}, | |||
props: { | |||
title: { | |||
type: String, | |||
default: '新增地址' | |||
} | |||
}, | |||
methods: { | |||
open(addressDetail) { | |||
this.addressDetail = addressDetail | |||
this.$refs.addressPopup.open('bottom') | |||
}, | |||
close(){ | |||
this.$refs.addressPopup.close() | |||
}, | |||
//新增和修改地址 | |||
onSubmit() { | |||
let isOk = this.parameterVerification(this.addressDetail) | |||
if (isOk && !isOk.auth) { | |||
return uni.showToast({ | |||
icon: 'none', | |||
title: isOk.title, | |||
'zIndex': 10000 | |||
}) | |||
} | |||
this.$emit('saveOrUpdate', this.addressDetail) | |||
}, | |||
//验证用户参数合法性 | |||
parameterVerification(addressForm) { | |||
let { | |||
name, | |||
phone, | |||
address, | |||
addressDetails | |||
} = addressForm | |||
if (name.trim() == '') { | |||
return { | |||
title: '请填写联系人', | |||
auth: false | |||
} | |||
} else if (phone.trim() == '') { | |||
return { | |||
title: '请填写手机号', | |||
auth: false | |||
} | |||
} else if (address.trim() == '') { | |||
return { | |||
title: '请填写所在地区', | |||
auth: false | |||
} | |||
} else if (addressDetails.trim() == '') { | |||
return { | |||
title: '请填写详细地址', | |||
auth: false | |||
} | |||
} else if (phone.trim() != '') { | |||
if (!this.$utils.verificationPhone(phone)) { | |||
return { | |||
title: '手机号格式不合法', | |||
auth: false | |||
} | |||
} | |||
} | |||
return { | |||
title: '验证通过', | |||
auth: true | |||
} | |||
}, | |||
//地图上选择地址 | |||
selectAddr() { | |||
// Position.getLocation(res => { | |||
Position.selectAddress(0, 0, success => { | |||
this.setAddress(success) | |||
}) | |||
// }) | |||
}, | |||
//提取用户选择的地址信息复制给表单数据 | |||
setAddress(res) { | |||
//经纬度信息 | |||
this.addressDetail.latitude = res.latitude | |||
this.addressDetail.longitude = res.longitude | |||
if (!res.address && res.name) { //用户直接选择城市的逻辑 | |||
return this.addressDetail.address = res.name | |||
} | |||
if (res.address || res.name) { | |||
return this.addressDetail.address = res.address + res.name | |||
} | |||
this.addressDetail.address = '' //用户啥都没选就点击勾选 | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.redact-address { | |||
box-sizing: border-box; | |||
.redact-address-title { | |||
height: 80rpx; | |||
line-height: 80rpx; | |||
font-size: 30rpx; | |||
color: #333333; | |||
font-weight: 600; | |||
} | |||
.save { | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
width: 90%; | |||
height: 80rpx; | |||
border-radius: 40rpx; | |||
color: white; | |||
font-size: 28rpx; | |||
margin: 0rpx auto; | |||
background: $uni-color; | |||
margin-top: 150rpx; | |||
} | |||
image { | |||
width: 25rpx; | |||
height: 25rpx; | |||
} | |||
//修改组件默认样式 | |||
.uv-form { | |||
padding: 30rpx 0rpx; | |||
} | |||
.uv-input__content__field-wrapper__field{ | |||
padding: 30rpx !important; | |||
height: 180rpx !important; | |||
} | |||
&::v-deep .uv-cell { | |||
padding: 0rpx 0rpx; | |||
font-size: 26rpx; | |||
&::after { | |||
border: none !important; | |||
} | |||
.uv-field__label { | |||
display: flex; | |||
align-items: center; | |||
height: 80rpx; | |||
} | |||
.uv-field__control, | |||
.uv-field__right-icon { | |||
height: 80rpx; | |||
font-size: 26rpx; | |||
border-bottom: 2rpx solid #cbc8c8; | |||
} | |||
.uv-field__right-icon { | |||
display: flex; | |||
align-items: center; | |||
height: 78rpx; | |||
color: #5FCC9F; | |||
} | |||
.uv-cell__value { | |||
height: 120rpx; | |||
} | |||
} | |||
&::v-deep .uv-field__error-message { | |||
color: #5AC796; | |||
font-size: 20rpx; | |||
margin-top: 10rpx; | |||
} | |||
} | |||
</style> |
@ -1,122 +0,0 @@ | |||
<template> | |||
<view class="submit"> | |||
<!-- <view class="" | |||
@click="$emit('share')"> | |||
<uv-icon | |||
size="40rpx" | |||
name="share-square"></uv-icon> | |||
<view class=""> | |||
分享 | |||
</view> | |||
</view> | |||
<view class="" | |||
@click="$utils.navigateTo('/index/cart')"> | |||
<uv-icon | |||
size="40rpx" | |||
name="shopping-cart"></uv-icon> | |||
<view class=""> | |||
购物车 | |||
</view> | |||
</view> --> | |||
<!-- <view class="btn" | |||
@click="$emit('submit')"> | |||
{{ submiitTitle }} | |||
</view> --> | |||
<view class="submit-btn" | |||
> | |||
<view class="l"s | |||
v-if="detail.type == 2" | |||
@click="$emit('addCart')"> | |||
加入购物车 | |||
</view> | |||
<view class="r" | |||
@click="$emit('submit')"> | |||
{{ submiitTitle }} | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
name:"submit", | |||
props : { | |||
submiitTitle : { | |||
default : '立即购买', | |||
type : String, | |||
}, | |||
detail : { | |||
default : {} | |||
}, | |||
}, | |||
data() { | |||
return { | |||
} | |||
}, | |||
methods: { | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.submit{ | |||
position: fixed; | |||
bottom: 0; | |||
left: 0; | |||
width: 100vw; | |||
background-color: #fff; | |||
height: 100rpx; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
font-size: 24rpx; | |||
// .btn{ | |||
// background: $uni-color; | |||
// width: 600rpx; | |||
// height: 80rpx; | |||
// color: #fff; | |||
// border-radius: 40rpx; | |||
// font-size: 28rpx; | |||
// } | |||
// view{ | |||
// width: 100rpx; | |||
// margin: 0 10rpx; | |||
// display: flex; | |||
// justify-content: center; | |||
// align-items: center; | |||
// flex-direction: column; | |||
// } | |||
.submit-btn{ | |||
width: 600rpx; | |||
height: 80rpx; | |||
color: #fff; | |||
border-radius: 40rpx; | |||
font-size: 28rpx; | |||
margin: 20rpx auto; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
border: 1rpx solid $uni-color; | |||
overflow: hidden; | |||
.l{ | |||
flex: 1; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
color: $uni-color; | |||
} | |||
.r{ | |||
background: $uni-color; | |||
flex: 1; | |||
height: 100%; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
} | |||
} | |||
} | |||
</style> |
@ -1,367 +0,0 @@ | |||
<template> | |||
<uv-popup ref="popup" | |||
:round="30" | |||
bgColor="#f7f7f7"> | |||
<view class="content"> | |||
<!-- 地址 --> | |||
<view class="address" | |||
@click="openAddress"> | |||
<image src="../../static/address/selectIcon.png" mode=""></image> | |||
<view class=""> | |||
{{ address.name }} | |||
</view> | |||
<view class=""> | |||
{{ address.addressDetail }} | |||
</view> | |||
<view class="icon"> | |||
<uv-icon | |||
size="30rpx" | |||
name="arrow-right"></uv-icon> | |||
</view> | |||
</view> | |||
<!-- 商品信息和数量 --> | |||
<view class="submit-info"> | |||
<view class="title"> | |||
桌布租赁 | |||
</view> | |||
<view class="box"> | |||
<image | |||
class="image" | |||
:src="unit.pic" | |||
mode=""></image> | |||
<view class="info"> | |||
<view class="price"> | |||
¥<text>{{ unit.depositPrice }}</text>元 | |||
</view> | |||
<view class="unit"> | |||
请选择规格 | |||
</view> | |||
<view class=""> | |||
<uv-number-box v-model="num"></uv-number-box> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- 规格 --> | |||
<!-- <view class="submit-unit"> | |||
<view class="title"> | |||
规格选择 | |||
</view> | |||
<view class="list"> | |||
<view :class="{act : unitIndex == index}" | |||
v-for="(item, index) in detail.hotelGoodsSkuList" | |||
@click="selectUnit(item, index)" | |||
:key="index"> | |||
{{ item.title }} | |||
</view> | |||
</view> | |||
</view> --> | |||
<!-- 费用明细 --> | |||
<view class="expense-detail"> | |||
<view class="title"> | |||
费用明细 | |||
</view> | |||
<view class="detail"> | |||
押金:¥{{ unit.depositPrice }} | |||
</view> | |||
</view> | |||
<!-- 提交按钮 --> | |||
<view class="submit-btn"> | |||
<view class="l" | |||
@click="addCart"> | |||
加入购物车 | |||
</view> | |||
<view class="r" | |||
@click="orderPay"> | |||
{{ submiitTitle }} | |||
</view> | |||
</view> | |||
</view> | |||
<uv-popup ref="addressPopup" :round="30"> | |||
<addressList | |||
ref="addressList" | |||
height="60vh" | |||
@select="selectAddress" | |||
/> | |||
</uv-popup> | |||
</uv-popup> | |||
</template> | |||
<script> | |||
import addressList from '../address/addressList.vue' | |||
export default { | |||
components : { | |||
addressList, | |||
}, | |||
props : { | |||
submiitTitle : { | |||
default : '立即购买', | |||
type : String, | |||
}, | |||
detail : { | |||
default : {} | |||
} | |||
}, | |||
data() { | |||
return { | |||
unitIndex : 0, | |||
address : { | |||
name : '请选择联系人', | |||
addressDetail : '', | |||
}, | |||
num : 1, | |||
unit : {}, | |||
addressTotal : 0, | |||
} | |||
}, | |||
methods: { | |||
// 打开 | |||
open(){ | |||
this.$refs.popup.open('bottom') | |||
if(!this.unit.id){ | |||
this.selectUnit(this.detail.hotelGoodsSkuList[0], 0) | |||
} | |||
// 获取地址列表 | |||
this.$refs.addressList.getAddressList().then(res => { | |||
this.addressTotal = res.total | |||
if(this.addressTotal != 0){ | |||
this.address = res.records[0] | |||
} | |||
}) | |||
}, | |||
// 关闭 | |||
close(){ | |||
this.$refs.popup.close() | |||
}, | |||
// 打开选择地址 | |||
openAddress(){ | |||
if (this.addressTotal == 0) { | |||
this.$refs.popup.close() | |||
return uni.navigateTo({ | |||
url: '/pages_order/mine/address?type=back' | |||
}) | |||
} | |||
this.$refs.addressPopup.open('bottom') | |||
}, | |||
// 选择地址 | |||
selectAddress(e){ | |||
this.address = e | |||
this.$refs.addressPopup.close() | |||
}, | |||
// 选择规格 | |||
selectUnit(item, index){ | |||
this.unit = item | |||
this.unitIndex = index | |||
}, | |||
addCart(){ | |||
this.$api('cartAdd', { | |||
id : this.detail.id, | |||
skuId : this.unit.id, | |||
}, res => { | |||
if(res.code == 200){ | |||
uni.showToast({ | |||
title: '添加成功', | |||
}); | |||
this.$refs.popup.close() | |||
} | |||
}) | |||
}, | |||
orderPay(){ | |||
let data = { | |||
id : this.detail.id,//商品id | |||
skuId : this.unit.id,//规格id | |||
addressId : this.address.id,//地址id | |||
sku : this.unit.title,//规格 | |||
num : this.num, | |||
} | |||
if(this.$utils.verificationAll(data, { | |||
skuId : '请选择规格', | |||
addressId : '请选择地址', | |||
})){ | |||
return | |||
} | |||
this.$api('orderPay', data, res => { | |||
if(res.code == 200){ | |||
uni.redirectTo({ | |||
url: '/pages/index/order' | |||
}) | |||
// uni.requestPayment({ | |||
// provider: 'wxpay', // 服务提提供商 | |||
// timeStamp: res.result.timeStamp, // 时间戳 | |||
// nonceStr: res.result.nonceStr, // 随机字符串 | |||
// package: res.result.packageValue, | |||
// signType: res.result.signType, // 签名算法 | |||
// paySign: res.result.paySign, // 签名 | |||
// success: function (res) { | |||
// console.log('支付成功',res); | |||
// uni.redirectTo({ | |||
// url: '/pages/index/order' | |||
// }) | |||
// }, | |||
// fail: function (err) { | |||
// console.log('支付失败',err); | |||
// uni.showToast({ | |||
// icon:'none', | |||
// title:"支付失败" | |||
// }) | |||
// } | |||
// }); | |||
} | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.content{ | |||
max-height: 80vh; | |||
overflow: hidden; | |||
overflow-y: auto; | |||
.address{ | |||
display: flex; | |||
padding: 20rpx; | |||
background-color: #fff; | |||
image{ | |||
width: 30rpx; | |||
height: 30rpx; | |||
margin: 20rpx; | |||
} | |||
view{ | |||
margin: 20rpx; | |||
overflow:hidden; //超出的文本隐藏 | |||
text-overflow:ellipsis; //溢出用省略号显示 | |||
white-space:nowrap; //溢出不换行 | |||
} | |||
.icon{ | |||
margin-left: auto; | |||
} | |||
} | |||
.submit-info{ | |||
background-color: #fff; | |||
padding: 30rpx; | |||
margin-top: 20rpx; | |||
.title{ | |||
font-size: 30rpx; | |||
padding: 10rpx; | |||
font-weight: 600; | |||
} | |||
.box{ | |||
display: flex; | |||
margin-top: 10rpx; | |||
.image{ | |||
width: 200rpx; | |||
height: 200rpx; | |||
border-radius: 20rpx; | |||
margin-right: 20rpx; | |||
} | |||
.info{ | |||
flex: 1; | |||
.unit{ | |||
font-size: 24rpx; | |||
padding: 10rpx 20rpx; | |||
color: #717171; | |||
display: flex; | |||
align-items: center; | |||
} | |||
.price{ | |||
color: $uni-color; | |||
font-size: 28rpx; | |||
padding: 10rpx 20rpx; | |||
text{ | |||
font-size: 36rpx; | |||
font-weight: 900; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
.submit-unit{ | |||
padding: 30rpx; | |||
background-color: #fff; | |||
.title{ | |||
font-size: 28rpx; | |||
font-weight: 600; | |||
} | |||
.list{ | |||
display: flex; | |||
flex-wrap: wrap; | |||
font-size: 22rpx; | |||
.act{ | |||
color: $uni-color; | |||
border: 1px solid $uni-color; | |||
background-color: #F9E7DE; | |||
} | |||
view{ | |||
border-radius: 15rpx; | |||
width: 320rpx; | |||
background-color: #F3F3F3; | |||
border: 1px solid #F3F3F3; | |||
margin: 10rpx; | |||
display: flex; | |||
justify-content: center; | |||
padding: 15rpx 0; | |||
} | |||
} | |||
} | |||
.expense-detail{ | |||
padding: 30rpx; | |||
background-color: #fff; | |||
font-size: 28rpx; | |||
.title{ | |||
font-weight: 600; | |||
} | |||
.detail{ | |||
background-color: #F6F6F6; | |||
color: #717171; | |||
margin: 10rpx 0; | |||
padding: 10rpx 20rpx; | |||
} | |||
} | |||
.submit-btn{ | |||
width: 600rpx; | |||
height: 80rpx; | |||
color: #fff; | |||
border-radius: 40rpx; | |||
font-size: 28rpx; | |||
margin: 20rpx auto; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
border: 1rpx solid $uni-color; | |||
overflow: hidden; | |||
.l{ | |||
flex: 1; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
color: $uni-color; | |||
} | |||
.r{ | |||
background: $uni-color; | |||
flex: 1; | |||
height: 100%; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
} | |||
} | |||
} | |||
</style> |
@ -1,351 +0,0 @@ | |||
<template> | |||
<view class="applyLaundryStore"> | |||
<navbar title="渠道合作" leftClick @leftClick="$utils.navigateBack" /> | |||
<view class="frame"> | |||
<view class="title"> | |||
<span | |||
style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span> | |||
<span>申请信息</span> | |||
</view> | |||
<view class="shopName"> | |||
<view>类型</view> | |||
<view> | |||
<uv-radio-group v-model="form.type"> | |||
<uv-radio | |||
v-for="(item, index) in typeList" | |||
:key="index" | |||
:customStyle="{margin: '16rpx'}" | |||
size="40rpx" | |||
iconSize="30rpx" | |||
labelSize="30rpx" | |||
:disabled="isUpdate" | |||
:label="item.name" | |||
:name="item.type"> | |||
</uv-radio> | |||
</uv-radio-group> | |||
</view> | |||
</view> | |||
<view class="shopName"> | |||
<view style="width: 300rpx;" | |||
v-if="form.type">身份证</view> | |||
<view style="width: 300rpx;" | |||
v-else>营业执照</view> | |||
<view> | |||
<uv-upload | |||
:fileList="fileList" | |||
name="fileList" | |||
:maxCount="2" | |||
width="180rpx" | |||
height="180rpx" | |||
:disabled="isUpdate" | |||
multiple | |||
@afterRead="afterRead" | |||
@delete="deleteImage"> | |||
</uv-upload> | |||
</view> | |||
</view> | |||
<view class="shopName"> | |||
<view>姓名</view> | |||
<view> | |||
<input v-model="form.name" | |||
:disabled="isUpdate" placeholder="请输入姓名" clearable></input> | |||
</view> | |||
</view> | |||
<view class="shopName"> | |||
<view>性别</view> | |||
<view> | |||
<uv-radio-group v-model="form.sex"> | |||
<uv-radio | |||
v-for="(item, index) in sexList" | |||
:key="index" | |||
:customStyle="{margin: '16rpx'}" | |||
size="40rpx" | |||
iconSize="30rpx" | |||
:disabled="isUpdate" | |||
labelSize="30rpx" | |||
:label="item.name" | |||
:name="item.name"> | |||
</uv-radio> | |||
</uv-radio-group> | |||
</view> | |||
</view> | |||
<view class="shopName"> | |||
<view>手机号</view> | |||
<view> | |||
<input v-model="form.phone" | |||
:disabled="isUpdate" type="number" placeholder="请输入手机号" clearable></input> | |||
</view> | |||
</view> | |||
<view class="shopName" v-if="form.type"> | |||
<view>身份证号</view> | |||
<view> | |||
<input v-model="form.no" | |||
:disabled="isUpdate" placeholder="请输入身份证号" clearable></input> | |||
</view> | |||
</view> | |||
<view class="shopName" v-else> | |||
<view>社会信用代码</view> | |||
<view> | |||
<input v-model="form.no" | |||
:disabled="isUpdate" placeholder="请输入社会信用统一代码" clearable></input> | |||
</view> | |||
</view> | |||
<view class="shopName"> | |||
<view>邮寄地址</view> | |||
<view> | |||
<input v-model="form.address" | |||
:disabled="isUpdate" placeholder="请输入邮寄地址" clearable></input> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="config"> | |||
<uv-checkbox-group | |||
v-model="checkboxValue" | |||
shape="circle"> | |||
<view class="content"> | |||
<view | |||
style="display: flex;"> | |||
<uv-checkbox | |||
size="40rpx" | |||
icon-size="30rpx" | |||
activeColor="#A3D250" | |||
:name="1" | |||
></uv-checkbox> | |||
阅读并同意我们的<text @click="$refs.popup.open('shop_user_xy')">“合作协议”</text> | |||
</view> | |||
</view> | |||
</uv-checkbox-group> | |||
</view> | |||
<!-- 底部按钮 --> | |||
<view class="uni-color-btn" | |||
@click="submitApplication" | |||
v-if="!isUpdate"> | |||
提交 | |||
</view> | |||
<configPopup ref="popup"></configPopup> | |||
</view> | |||
</template> | |||
<script> | |||
import Position from '@/utils/position.js' | |||
export default { | |||
components: { | |||
}, | |||
data() { | |||
return { | |||
checkboxValue : [], | |||
form: { | |||
userName: '', | |||
name: '', | |||
phone: '', | |||
sex : '男', | |||
type : 0, | |||
state : 0, | |||
}, | |||
fileList: [], | |||
sexList : [ | |||
{ | |||
name: '男', | |||
}, | |||
{ | |||
name: '女', | |||
}, | |||
], | |||
typeList : [ | |||
{ | |||
name: '企业', | |||
type : 0, | |||
}, | |||
{ | |||
name: '个人', | |||
type : 1, | |||
}, | |||
], | |||
} | |||
}, | |||
computed: { | |||
isUpdate(){ | |||
return this.form.state == 1 | |||
}, | |||
}, | |||
onShow() { | |||
}, | |||
onLoad() { | |||
this.getData() | |||
}, | |||
methods: { | |||
deleteImage(e){ | |||
this[e.name].splice(e.index, 1) | |||
}, | |||
afterRead(e){ | |||
let self = this | |||
e.file.forEach(file => { | |||
self.$Oss.ossUpload(file.url).then(url => { | |||
self[e.name].push({ | |||
url | |||
}) | |||
}) | |||
}) | |||
}, | |||
// 提交按钮 | |||
submitApplication() { | |||
if(!this.checkboxValue.length){ | |||
return uni.showToast({ | |||
title: '请先同意合作协议', | |||
icon:'none' | |||
}) | |||
} | |||
this.form.image = this.fileList.map((item) => item.url).join(",") | |||
let p = { | |||
image: '请上传店铺照片', | |||
name: '请输入您的姓名', | |||
phone: '请输入联系电话', | |||
no: '请输入社会信用代码', | |||
address: '请输入邮寄地址', | |||
} | |||
if(this.form.type){ | |||
p.no = '请输入身份证号' | |||
} | |||
if (this.$utils.verificationAll(this.form, p)) { | |||
return | |||
} | |||
if(!this.$utils.verificationPhone(this.form.phone)){ | |||
return uni.showToast({ | |||
title: '手机号格式不正确', | |||
icon:'none' | |||
}) | |||
} | |||
this.$api('addOrUpdateCommonUser', this.form, res => { | |||
if (res.code == 200) { | |||
uni.showToast({ | |||
title: '申请成功待审核', // 提示的内容 | |||
icon: 'success', // 图标,可选值有 'success', 'loading', 'none' | |||
duration: 1500 // 提示的持续时间,默认是1500毫秒 | |||
}); | |||
setTimeout(uni.navigateBack, 1000, -1) | |||
} | |||
}) | |||
}, | |||
getData(){ | |||
this.$api('getCommonUser', res => { | |||
if(res.code == 200){ | |||
this.form = res.result | |||
delete this.form.userId | |||
delete this.form.createTime | |||
delete this.form.createBy | |||
delete this.form.state | |||
delete this.form.updateBy | |||
delete this.form.updateTime | |||
res.result.image && res.result.image.split(',') | |||
.forEach(url => { | |||
this.fileList.push({ | |||
url | |||
}) | |||
}) | |||
} | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
* { | |||
box-sizing: border-box; | |||
} | |||
.applyLaundryStore { | |||
padding: 0 20rpx 0 20rpx; | |||
background-color: #f5f5f5; | |||
.frame { | |||
display: flex; | |||
flex-direction: column; | |||
gap: 20rpx; | |||
background-color: #FFF; | |||
margin-top: 20rpx; | |||
padding: 20rpx; | |||
.title { | |||
display: flex; | |||
// padding-top: 40rpx; | |||
font-size: 34rpx; | |||
font-weight: 700; | |||
padding: 0 0 0 20rpx; | |||
>span:nth-of-type(1) { | |||
margin: 4rpx 0 0 8rpx; | |||
background-color: #FFF; | |||
} | |||
>span:nth-of-type(2) { | |||
margin: 0 0 0 8rpx; | |||
background-color: #FFF; | |||
} | |||
} | |||
.shopName { | |||
display: flex; | |||
align-items: center; | |||
background-color: #FFF; | |||
// margin: 10rpx 0 0 0; | |||
padding: 10rpx 0 0 20rpx; | |||
>view:nth-of-type(1) { | |||
width: 30%; | |||
// font-weight: 700; | |||
} | |||
>view:nth-of-type(2) { | |||
width: 70%; | |||
// padding: 0 20rpx 0 0; | |||
border-radius: 10rpx; | |||
overflow: hidden; | |||
input { | |||
background-color: #f5f5f5; | |||
// color: #a4a4a4; | |||
font-size: 28rpx; | |||
padding: 8rpx 8rpx 8rpx 15rpx; | |||
} | |||
} | |||
} | |||
} | |||
.config{ | |||
font-size: 26rpx; | |||
padding: 20rpx; | |||
/deep/ .uv-checkbox-group{ | |||
display: flex; | |||
justify-content: center; | |||
} | |||
text{ | |||
color: $uni-color; | |||
} | |||
} | |||
} | |||
</style> |
@ -1,88 +0,0 @@ | |||
<template> | |||
<view class="page"> | |||
<navbar title="联系我们" leftClick @leftClick="$utils.navigateBack" /> | |||
<view class="box"> | |||
<view class="" | |||
v-if="configList.wx_image"> | |||
<image :src="configList.wx_image" mode="aspectFill"></image> | |||
<view class="uni-color-btn" | |||
@click="saveImage(configList.wx_image)"> | |||
保存二维码 | |||
</view> | |||
</view> | |||
<view class="" | |||
v-if="configList.phone"> | |||
全国联系电话:{{ configList.phone }} | |||
<view class="uni-color-btn" | |||
@click="confirm"> | |||
拨打电话 | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
} | |||
}, | |||
methods: { | |||
// 拨打电话 | |||
confirm() { | |||
uni.makePhoneCall({ | |||
phoneNumber: this.configList.phone, | |||
success() { | |||
console.log('安卓拨打成功'); | |||
}, | |||
fail() { | |||
console.log('安卓拨打失败'); | |||
} | |||
}) | |||
}, | |||
saveImage(image){ | |||
/* 获取图片的信息 */ | |||
uni.getImageInfo({ | |||
src: image, | |||
success: function(image) { | |||
/* 保存图片到手机相册 */ | |||
uni.saveImageToPhotosAlbum({ | |||
filePath: image.path, | |||
success: function() { | |||
uni.showModal({ | |||
title: '保存成功', | |||
content: '图片已成功保存到相册', | |||
showCancel: false | |||
}); | |||
}, | |||
complete(res) { | |||
console.log(res); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.page{ | |||
.box{ | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
height: 70vh; | |||
flex-direction: column; | |||
gap: 40rpx; | |||
image{ | |||
width: 400rpx; | |||
height: 400rpx; | |||
} | |||
} | |||
} | |||
</style> |
@ -1,75 +0,0 @@ | |||
<template> | |||
<view class="page"> | |||
<navbar :title="title[type]" leftClick @leftClick="$utils.navigateBack" /> | |||
<view class="box"> | |||
<view class="box-imgs"> | |||
<view | |||
:key="index" | |||
@click="$utils.navigateTo(`/pages_order/home/notice?id=${item.id}&type=${type}`)" | |||
class="box-img" | |||
v-for="(item, index) in list"> | |||
<image :src="item.image" mode="aspectFill"></image> | |||
<view>{{ item.title }}</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
import mixinsList from '@/mixins/list.js' | |||
export default { | |||
mixins: [mixinsList], | |||
data() { | |||
return { | |||
mixinsListApi: 'getInfoIntroduce',//获取相关介绍 | |||
title : ['公司介绍', '产品介绍', '关于我们', '其他'], | |||
type : 0, | |||
} | |||
}, | |||
onLoad({type}) { | |||
this.type = type || 0 | |||
this.queryParams.type = this.type | |||
}, | |||
computed: {}, | |||
methods: {} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.page { | |||
height: 100Vh; | |||
background-color: #F3F3F3; | |||
.box { | |||
margin: 20rpx; | |||
image{ | |||
width: 220rpx; | |||
height: 400rpx; | |||
} | |||
.box-imgs { | |||
display: flex; | |||
justify-content: space-between; | |||
flex-wrap: wrap; | |||
.box-img{ | |||
border-radius: 20rpx; | |||
overflow: hidden; | |||
position: relative; | |||
view{ | |||
position: absolute; | |||
left: 50%; | |||
transform: translate(-50%); | |||
bottom: 80rpx; | |||
color: #fff; | |||
background-color: #A3D250; | |||
border-radius: 30rpx; | |||
width: 80%; | |||
height: 60rpx; | |||
line-height: 60rpx; | |||
text-align: center; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@ -1,73 +0,0 @@ | |||
<template> | |||
<view class="page"> | |||
<navbar title="新闻中心" leftClick @leftClick="$utils.navigateBack" /> | |||
<view class="card" | |||
@click="$utils.navigateTo('/pages_order/home/newsDetail?id=' + item.id)" | |||
v-for="(item, index) in list" :key="item.id"> | |||
<view class="card-img"> | |||
<image :src="item.image && | |||
item.image.split(',')[0]" mode="aspectFill"></image> | |||
</view> | |||
<view> | |||
{{ item.title }} | |||
</view> | |||
<view class="text"> | |||
{{ item.descValue }} | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
import mixinsList from '@/mixins/list.js' | |||
export default { | |||
mixins: [mixinsList], | |||
data() { | |||
return { | |||
mixinsListApi: 'getRiceNewsList', | |||
} | |||
}, | |||
computed: {}, | |||
methods: {} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.page { | |||
height: 100Vh; | |||
background-color: #F3F3F3; | |||
.card { | |||
margin: 30rpx; | |||
background-color: #fff; | |||
overflow: hidden; | |||
border-radius: 20rpx; | |||
.card-img { | |||
height: 250rpx; | |||
width: 100%; | |||
image { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
} | |||
view:nth-child(2) { | |||
font-size: 32rpx; | |||
color: #474747; | |||
padding: 20rpx; | |||
font-weight: 500; | |||
} | |||
.text { | |||
font-size: 24rpx; | |||
color: #A2A2A2; | |||
padding: 0rpx 20rpx 40rpx; | |||
} | |||
} | |||
} | |||
</style> |
@ -1,40 +0,0 @@ | |||
<template> | |||
<view class="page"> | |||
<navbar title="详情" leftClick @leftClick="$utils.navigateBack" /> | |||
<view style="padding: 20rpx;"> | |||
<uv-parse :content="detail.details"></uv-parse> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
detail: {}, | |||
id: 0, | |||
} | |||
}, | |||
onLoad(args) { | |||
this.id = args.id | |||
this.queryNewsById() | |||
}, | |||
methods: { | |||
//公告信息-根据id查询公告信息 | |||
queryNewsById() { | |||
this.$api('getRiceNewsDetail', { | |||
id: this.id | |||
}, res => { | |||
if (res.code == 200) { | |||
this.detail = res.result | |||
} | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.page {} | |||
</style> |
@ -1,58 +0,0 @@ | |||
<template> | |||
<!-- 公告 --> | |||
<view class="page"> | |||
<navbar :title="title" leftClick @leftClick="$utils.navigateBack" /> | |||
<view style="padding: 20rpx;"> | |||
<uv-parse :content="notice"></uv-parse> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
notice : {}, | |||
id : 0, | |||
title : '公告', | |||
titles : ['公司介绍', '产品介绍', '关于我们', '其他'], | |||
} | |||
}, | |||
onLoad({id, type}) { | |||
if(type){ | |||
this.title = this.titles[type] | |||
} | |||
if(id){ | |||
this.id = id | |||
this.getInfoIntroduce() | |||
}else{ | |||
this.getRiceNoticeList() | |||
} | |||
}, | |||
methods: { | |||
// 获取公告 | |||
getRiceNoticeList(){ | |||
this.$api('getRiceNoticeList', res => { | |||
if(res.code == 200){ | |||
this.notice = res.result.content | |||
} | |||
}) | |||
}, | |||
// 获取相关介绍 | |||
getInfoIntroduce(){ | |||
this.$api('getInfoIntroduceDetail', { | |||
id : this.id | |||
}, res => { | |||
if(res.code == 200){ | |||
this.notice = res.result.details | |||
} | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.page { | |||
} | |||
</style> |
@ -1,213 +0,0 @@ | |||
<template> | |||
<view class="address"> | |||
<navbar title="地址管理" leftClick @leftClick="leftClick" /> | |||
<view class="address-list"> | |||
<addressList | |||
controls | |||
ref="addressList" | |||
@deleteAddress="deleteAddress" | |||
@editAddress="editAddress" | |||
@editDefault="editDefault"/> | |||
</view> | |||
<redactAddress | |||
ref="addressPopup" | |||
:addressDetail="addressDetail" | |||
@saveOrUpdate="saveOrUpdate" | |||
:title="title"></redactAddress> | |||
<view class="add-btn"> | |||
<view @click="addBtn" class="btn"> | |||
新增地址 | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
import redactAddress from '../components/address/redactAddress.vue' | |||
import addressList from '../components/address/addressList.vue' | |||
export default { | |||
components: { | |||
redactAddress, | |||
addressList | |||
}, | |||
data() { | |||
return { | |||
title: '新增地址', | |||
type : '', | |||
} | |||
}, | |||
onLoad(args) { | |||
this.type = args.type | |||
if(this.type == 'back'){ | |||
this.addBtn() | |||
} | |||
}, | |||
onShow() { | |||
this.getAddressList() | |||
}, | |||
methods: { | |||
//获取地址列表 | |||
getAddressList() { | |||
this.$refs.addressList.getAddressList() | |||
}, | |||
//获取地址详情 | |||
editAddress(address) { | |||
this.$refs.addressPopup.open({...address}) | |||
}, | |||
//返回个人中心 | |||
leftClick() { | |||
uni.navigateBack(-1) | |||
}, | |||
//添加和修改地址 | |||
saveOrUpdate(addressDetail) { | |||
let data = { | |||
name: addressDetail.name, | |||
phone: addressDetail.phone, | |||
address: addressDetail.address, | |||
addressDetails: addressDetail.addressDetails, | |||
defaultFlag: addressDetail.defaultFlag || '0', | |||
latitude: addressDetail.latitude, | |||
longitude: addressDetail.longitude | |||
} | |||
if (addressDetail.id) { | |||
data.id = addressDetail.id | |||
} | |||
this.$api('addOrUpdateAddress', data, res => { | |||
if (res.code == 200) { | |||
this.$refs.addressPopup.close() | |||
this.getAddressList() | |||
if(this.type == 'back'){ | |||
uni.navigateBack(-1) | |||
} | |||
uni.showToast({ | |||
title: '操作成功', | |||
icon: 'none' | |||
}) | |||
} | |||
}) | |||
}, | |||
//修改默认地址 | |||
editDefault(id) { | |||
this.$api('updateDefaultAddress', { | |||
id: id, | |||
}, res => { | |||
if (res.code == 200) { | |||
this.$refs.addressPopup.close() | |||
uni.showToast({ | |||
title: '操作成功', | |||
icon: 'none' | |||
}) | |||
this.getAddressList() | |||
} | |||
}) | |||
}, | |||
//删除地址 | |||
deleteAddress(id) { | |||
let self = this | |||
uni.showModal({ | |||
title: '删除地址', | |||
content: '确认删除此地址?删除后数据不可恢复', | |||
success(e) { | |||
if(e.confirm){ | |||
self.$api('deleteAddress', { | |||
id | |||
}, res => { | |||
if (res.code == 200) { | |||
uni.showToast({ | |||
title: '删除成功', | |||
icon: 'none' | |||
}) | |||
self.getAddressList() | |||
} | |||
}) | |||
} | |||
} | |||
}) | |||
}, | |||
//点击新增按钮 | |||
addBtn() { | |||
this.title = '新增地址' | |||
this.$refs.addressPopup.open({ //初始化数据 | |||
name: '', | |||
phone: '', | |||
address: '', | |||
addressDetails: '', | |||
defaultFlag: '', | |||
latitude: '', | |||
longitude: '' | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.address { | |||
width: 750rpx; | |||
margin: 0rpx auto; | |||
background: #F5F5F5; | |||
box-sizing: border-box; | |||
min-height: 100vh; | |||
.address-list { | |||
padding: 40rpx 20rpx 120rpx 20rpx; | |||
} | |||
.add-btn { | |||
position: fixed; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
left: 0; | |||
bottom: 0; | |||
width: 750rpx; | |||
height: 100rpx; | |||
background: white; | |||
.btn { | |||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
width: 85%; | |||
height: 80rpx; | |||
border-radius: 40rpx; | |||
color: white; | |||
text-align: center; | |||
font-size: 28rpx; | |||
background: $uni-color; | |||
} | |||
} | |||
} | |||
@media all and (min-width: 961px) { | |||
.add-btn { | |||
left: 50% !important; | |||
transform: translateX(-50%); | |||
} | |||
} | |||
//选择位置地图样式 | |||
:deep(.uni-system-choose-location) { | |||
z-index: 99999 !important; | |||
} | |||
</style> |
@ -1,143 +0,0 @@ | |||
<template> | |||
<view class="page"> | |||
<navbar title="收支明细" | |||
bgColor="#A3D250" | |||
color="#fff" | |||
leftClick | |||
@leftClick="$utils.navigateBack" /> | |||
<view class="bg"/> | |||
<!-- <view class="price"> | |||
<view class="title"> | |||
我的余额(元) | |||
</view> | |||
<view class="num"> | |||
{{ riceInfo.balance || 0 }} | |||
</view> | |||
</view> --> | |||
<view class="cell"> | |||
<view class="cell-top">收支明细</view> | |||
<view class="cell-box" | |||
:key="index" | |||
v-for="(item,index) in list"> | |||
<uv-cell-group> | |||
<uv-cell | |||
:title="item.title" | |||
:label="item.createTime" | |||
:center="true"> | |||
<template #value> | |||
<view class="cell-text"> | |||
<view class="price-text" | |||
v-if="item.type">{{ type[item.type] }}{{ item.money }}</view> | |||
<view class="price-text add" | |||
v-else>{{ type[item.type] }}{{ item.money }}</view> | |||
<view class="tips">{{ state[item.state] }}</view> | |||
</view> | |||
</template> | |||
</uv-cell> | |||
</uv-cell-group> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
import mixinsList from '@/mixins/list.js' | |||
import { mapState } from 'vuex' | |||
export default { | |||
mixins : [mixinsList], | |||
data() { | |||
return { | |||
mixinsListApi : 'getWaterPageList', | |||
list : [], | |||
type : ['+', '-'], | |||
state : ['未到账', '已到账'], | |||
} | |||
}, | |||
computed: { | |||
...mapState(['userInfo', 'riceInfo']), | |||
}, | |||
onShow() { | |||
this.$store.commit('getUserInfo') | |||
this.$store.commit('getRiceInfo') | |||
}, | |||
methods: { | |||
} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.page{ | |||
.bg{ | |||
background-color: $uni-color; | |||
height: 300rpx; | |||
position: absolute; | |||
left: 0; | |||
width: 100%; | |||
z-index: -1; | |||
border-bottom-left-radius: 30rpx; | |||
border-bottom-right-radius: 30rpx; | |||
} | |||
.price{ | |||
color: #FFFFFF; | |||
padding: 40rpx; | |||
.title{ | |||
color: #eee; | |||
font-size: 28rpx; | |||
} | |||
.num{ | |||
font-size: 50rpx; | |||
font-weight: 900; | |||
margin-top: 10rpx; | |||
} | |||
} | |||
.cell { | |||
margin: 20rpx; | |||
background-color: #FFFFFF; | |||
border-radius: 16rpx; | |||
.cell-top { | |||
padding: 40rpx 34rpx; | |||
color: #474747; | |||
font-size: 34rpx; | |||
font-weight: 600; | |||
position: relative; | |||
&::after{ | |||
content: ''; | |||
display: block; | |||
position: absolute; | |||
left: 55rpx; | |||
bottom: 38rpx; | |||
height: 10rpx; | |||
width: 120rpx; | |||
background: linear-gradient(to right, #fff, $uni-color); | |||
} | |||
} | |||
.cell-text{ | |||
text-align: right; | |||
.price-text{ | |||
font-size: 32rpx; | |||
font-weight: 900; | |||
} | |||
.add{ | |||
color: #f40; | |||
} | |||
.tips{ | |||
font-size: 22rpx; | |||
color: #aaa; | |||
margin-top: 10rpx; | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@ -1,132 +0,0 @@ | |||
<template> | |||
<view class="page"> | |||
<navbar title="佣金" | |||
bgColor="#A3D250" | |||
color="#fff" | |||
leftClick | |||
@leftClick="$utils.navigateBack" /> | |||
<view class="bg"/> | |||
<view class="price"> | |||
<view class="title"> | |||
我的佣金(元) | |||
</view> | |||
<view class="num"> | |||
16666 | |||
</view> | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-top">收支明细</view> | |||
<view class="cell-box" | |||
:key="index" | |||
v-for="(item,index) in list"> | |||
<uv-cell-group> | |||
<uv-cell | |||
:title="item.title" | |||
:label="item.createTime" | |||
:center="true"> | |||
<template #value> | |||
<view class="cell-text"> | |||
<view class="price-text">{{ type[item.type] }}{{ item.money }}</view> | |||
<view class="tips">已到账</view> | |||
</view> | |||
</template> | |||
</uv-cell> | |||
</uv-cell-group> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
import mixinsList from '@/mixins/list.js' | |||
export default { | |||
mixins : [mixinsList], | |||
data() { | |||
return { | |||
mixinsListApi : 'getWaterPageList', | |||
type : ['+', '-'], | |||
state : ['审核中', '成功', '失败'], | |||
} | |||
}, | |||
onShow() { | |||
this.$store.commit('getUserInfo') | |||
this.$store.commit('getRiceInfo') | |||
}, | |||
methods: { | |||
} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.page{ | |||
.bg{ | |||
background-color: $uni-color; | |||
height: 160rpx; | |||
position: absolute; | |||
left: 0; | |||
width: 100%; | |||
z-index: -1; | |||
border-bottom-left-radius: 30rpx; | |||
border-bottom-right-radius: 30rpx; | |||
} | |||
.price{ | |||
background-color: #fff; | |||
padding: 40rpx; | |||
margin: 20rpx; | |||
border-radius: 20rpx; | |||
.title{ | |||
color: #777; | |||
font-size: 28rpx; | |||
} | |||
.num{ | |||
font-size: 50rpx; | |||
font-weight: 900; | |||
margin-top: 10rpx; | |||
} | |||
} | |||
.cell { | |||
margin: 20rpx; | |||
background-color: #FFFFFF; | |||
border-radius: 16rpx; | |||
.cell-top { | |||
padding: 40rpx 34rpx; | |||
color: #474747; | |||
font-size: 34rpx; | |||
font-weight: 600; | |||
position: relative; | |||
&::after{ | |||
content: ''; | |||
display: block; | |||
position: absolute; | |||
left: 55rpx; | |||
bottom: 38rpx; | |||
height: 10rpx; | |||
width: 120rpx; | |||
background: linear-gradient(to right, #fff, $uni-color); | |||
} | |||
} | |||
.cell-text{ | |||
text-align: right; | |||
.price-text{ | |||
color: #f40; | |||
font-size: 32rpx; | |||
font-weight: 900; | |||
} | |||
.tips{ | |||
font-size: 22rpx; | |||
color: #aaa; | |||
margin-top: 10rpx; | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@ -1,172 +0,0 @@ | |||
<template> | |||
<!-- 帮助与反馈 --> | |||
<view class="help"> | |||
<navbar title="帮助与反馈" leftClick @leftClick="$utils.navigateBack" /> | |||
<view class="help-box"> | |||
<view> | |||
<view class="help-issue"> | |||
<text>问题和意见</text> | |||
<text style="color: #BD3624;">*</text> | |||
</view> | |||
<uv-textarea v-model="form.question" :count="true" border="none" height="400" | |||
placeholder="请把发现的问题提交给我们,感谢您的参与(必填)" | |||
:text-style="{color:'#BCB7B7',fontSize:'28rpx'}" /> | |||
</view> | |||
<view> | |||
<view class="help-issue"> | |||
<text>问题截图</text> | |||
<!-- <text style="color: #BD3624;">*</text> --> | |||
</view> | |||
<view class="help-screenshot"> | |||
<uv-upload :fileList="fileList" multiple :maxCount="3" width="180rpx" | |||
height="180rpx" multiple @afterRead="afterRead" @delete="deleteImage"> | |||
<image src="../static/help/uploading.png" mode="aspectFill" | |||
style="width: 180rpx;height: 180rpx;" /> | |||
</uv-upload> | |||
</view> | |||
</view> | |||
<view> | |||
<view class="help-issue"> | |||
<text>联系方式</text> | |||
<text style="color: #BD3624;">*</text> | |||
</view> | |||
<view class="form-sheet-cell"> | |||
<view> | |||
联系姓名 | |||
</view> | |||
<input placeholder="请输入联系姓名" v-model="form.name" /> | |||
</view> | |||
<view class="form-sheet-cell"> | |||
<view> | |||
联系电话 | |||
</view> | |||
<input placeholder="请输入联系电话" v-model="form.phone" /> | |||
</view> | |||
</view> | |||
<view class="help-button"> | |||
<!-- <view>历史提交</view> --> | |||
<view @click="submit">确认</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
form : { | |||
question : '', | |||
phone : '', | |||
name : '', | |||
image : '', | |||
}, | |||
fileList: [] | |||
} | |||
}, | |||
onLoad(args) { | |||
}, | |||
methods: { | |||
deleteImage(e){ | |||
this.fileList.splice(e.index, 1) | |||
}, | |||
afterRead(e){ | |||
let self = this | |||
e.file.forEach(file => { | |||
self.$Oss.ossUpload(file.url).then(url => { | |||
self.fileList.push({ | |||
url | |||
}) | |||
}) | |||
}) | |||
}, | |||
submit(){ | |||
let data = JSON.parse(JSON.stringify(this.form)) | |||
if(this.$utils.verificationAll(this.form, { | |||
question : '请输入你的问题和意见',//问题和意见 | |||
// image : '请上传截图',// | |||
name : '请输入姓名',// | |||
phone : '请输入手机号码',//手机号码 | |||
})){ | |||
return | |||
} | |||
data.image = this.fileList.map((item) => item.url).join(",") | |||
this.$api('addAdvice', data, res => { | |||
if(res.code == 200){ | |||
uni.showToast({ | |||
title: res.message, | |||
icon:'none' | |||
}) | |||
setTimeout(uni.navigateBack, 800, -1) | |||
} | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.help { | |||
.help-box { | |||
width: 92%; | |||
margin-left: 4%; | |||
.help-issue { | |||
margin: 20rpx; | |||
font-size: 28rpx; | |||
font-weight: 600; | |||
color: #333333; | |||
} | |||
.help-screenshot { | |||
display: flex; | |||
align-items: center; | |||
background-color: #fff; | |||
padding: 20rpx; | |||
} | |||
.form-sheet-cell{ | |||
display: flex; | |||
background-color: #fff; | |||
padding: 20rpx 30rpx; | |||
font-size: 24rpx; | |||
align-items: center; | |||
view{ | |||
width: 150rpx; | |||
} | |||
} | |||
.help-button { | |||
display: flex; | |||
justify-content: center; | |||
font-size: 24rpx; | |||
flex-shrink: 0; | |||
margin-top: 60rpx; | |||
view { | |||
padding: 14rpx 120rpx; | |||
border-radius: 38rpx; | |||
} | |||
view:nth-child(1) { | |||
background: $uni-color; | |||
color: #fff; | |||
} | |||
view:nth-child(2) { | |||
color: #FFFDF6; | |||
background-color: #C83741; | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@ -1,247 +0,0 @@ | |||
<template> | |||
<view class="promotion"> | |||
<navbar title="二维码" | |||
bgColor="#A3D250" | |||
color="#fff" | |||
leftClick @leftClick="$utils.navigateBack" /> | |||
<view class="promotion-card"> | |||
<!-- <view class="user-info"> --> | |||
<!-- <image class="image" :src="userInfo.headImage" mode="widthFix"></image> --> | |||
<!-- <image class="image" src="../../static/logo.png" mode="widthFix"></image> --> | |||
<!-- <view class="user-name">{{ userInfo.nickName }}</view> --> | |||
<!-- <view class="user-name">湖南第一深情</view> --> | |||
<!-- </view> --> | |||
<!-- <view class="invitation-code-img"> | |||
<image | |||
style="width: 400rpx;" | |||
:src="imagePath" mode="widthFix"></image> | |||
</view> --> | |||
<image :src="userInfo.headImage" mode="aspectFill" | |||
class="headImage"></image> | |||
<image style="width: 100%;" :src="imagePath" mode="widthFix"></image> | |||
<!-- <view class="invitation-code">加油站: {{ title }}</view> --> | |||
<canvas id="myCanvas" type="2d" canvas-id="firstCanvas1"></canvas> | |||
<view class="uni-color-btn" | |||
@click="preservationImg(imagePath)">保存二维码</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
import { mapState } from 'vuex' | |||
export default { | |||
name: 'Promotion', | |||
computed: { | |||
...mapState(['userInfo']), | |||
}, | |||
data() { | |||
return { | |||
url: '', | |||
title: '123123', | |||
baseUrl: 'https://dianpin-img.xzaiyp.top/', | |||
canvas: {}, | |||
imagePath: '', | |||
} | |||
}, | |||
onShow() { | |||
this.getQrCode() | |||
this.$store.commit('getUserInfo') | |||
}, | |||
methods: { | |||
getQrCode() { | |||
this.$api('getInviteCode', res => { | |||
if (res.code == 200) { | |||
this.url = res.result.url | |||
this.title = res.result.name | |||
this.draw() | |||
} | |||
}) | |||
}, | |||
draw() { | |||
uni.showLoading({ | |||
title: "拼命绘画中..." | |||
}) | |||
wx.createSelectorQuery() | |||
.select('#myCanvas') // 绘制的canvas的id | |||
.fields({ | |||
node: true, | |||
size: true | |||
}) | |||
.exec((res) => { | |||
const canvas = res[0].node | |||
// 渲染上下文 | |||
const ctx = canvas.getContext('2d') | |||
// Canvas 画布的实际绘制宽高 | |||
const width = res[0].width | |||
const height = res[0].height | |||
// 初始化画布大小 | |||
const dpr = wx.getWindowInfo().pixelRatio | |||
//根据dpr调整 | |||
// dpr 2 4 | |||
// 3 6 | |||
let Ratio = dpr * 2 | |||
console.log("bug", dpr) | |||
canvas.width = width * dpr | |||
canvas.height = height * dpr | |||
this.canvas = canvas | |||
ctx.scale(dpr, dpr) | |||
ctx.clearRect(0, 0, width, height) | |||
ctx.fillStyle = '#fff' | |||
ctx.fillRect(0, 0, canvas.width, canvas.height) | |||
//用户图片 | |||
// const image = canvas.createImage() | |||
// image.onload = () => { | |||
// ctx.drawImage(image, 30, 18, 40, 40) | |||
// } | |||
// image.src = '/public/img/wechar_1.png' | |||
// image.src = this.userInfo.headImage | |||
ctx.fillStyle = 'black' | |||
ctx.font = '22px PingFangSC-regular'; | |||
// 绘制用户姓名 | |||
// let nickName = this.userInfo.nickName || '绘制用户姓名' | |||
// ctx.fillText(nickName, canvas.width / Ratio - nickName.length * 11, 40); | |||
// ctx.font = '18px PingFangSC-regular'; | |||
// 绘制欢迎语 | |||
let s = this.title || '' | |||
ctx.fillText(s, canvas.width / Ratio - s.length * 11, 50); | |||
//二维码图片 | |||
const coderImage = canvas.createImage() | |||
coderImage.src = this.baseUrl + this.url | |||
coderImage.onload = () => { | |||
ctx.drawImage(coderImage, | |||
canvas.width / Ratio - 240 / 2, 100, 240, 240) | |||
} | |||
// 绘制完成后存储路径 | |||
setTimeout(() => { | |||
wx.canvasToTempFilePath({ | |||
x: 0, | |||
y: 0, | |||
width: this.canvas.width, | |||
height: this.canvas.height, | |||
canvas, | |||
success: (res) => { | |||
var tempFilePath = res.tempFilePath; | |||
this.imagePath = tempFilePath | |||
uni.hideLoading() | |||
} | |||
}); | |||
}, 600); | |||
}) | |||
}, | |||
back() { | |||
uni.navigateBack(-1) | |||
}, | |||
preservationImg(img) { | |||
let that = this | |||
uni.authorize({ | |||
/* scope.writePhotosAlbum 类型是保存到相册 */ | |||
scope: 'scope.writePhotosAlbum', | |||
success() { | |||
/* 已授权进入 */ | |||
/* 保存图片到相册方法方法 */ | |||
that.imgApi(img); | |||
}, | |||
complete(res) { | |||
/* 判断如果没有授权就打开设置选项让用户重新授权 */ | |||
uni.getSetting({ | |||
success(res) { | |||
if (!res.authSetting['scope.writePhotosAlbum']) { | |||
/* 打开设置的方法 */ | |||
that.openInstall(); | |||
} | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
imgApi(image) { | |||
/* 获取图片的信息 */ | |||
uni.getImageInfo({ | |||
src: image, | |||
success: function(image) { | |||
/* 保存图片到手机相册 */ | |||
uni.saveImageToPhotosAlbum({ | |||
filePath: image.path, | |||
success: function() { | |||
uni.showModal({ | |||
title: '保存成功', | |||
content: '图片已成功保存到相册', | |||
showCancel: false | |||
}); | |||
}, | |||
complete(res) { | |||
console.log(res); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.promotion { | |||
width: 100%; | |||
height: 100vh; | |||
background-color: $uni-color; | |||
.promotion-card { | |||
width: 90%; | |||
margin: 140rpx auto 0rpx auto; | |||
box-shadow: 0rpx 0rpx 15rpx rgba(0, 0, 0, .2); | |||
border-radius: 40rpx; | |||
padding: 40rpx 30rpx; | |||
box-sizing: border-box; | |||
background-color: #fff; | |||
position: relative; | |||
padding-top: 100rpx; | |||
.headImage{ | |||
position: absolute; | |||
height: 180rpx; | |||
width: 180rpx; | |||
border-radius: 50%; | |||
top: -80rpx; | |||
left: 50%; | |||
transform: translate(-50%); | |||
border: 10rpx solid #fff; | |||
box-shadow: 0 0 10rpx 10rpx #00000013; | |||
} | |||
} | |||
} | |||
#myCanvas { | |||
position: fixed; | |||
left: 100%; | |||
/* visibility: hidden */ | |||
/* visibility: hidden; */ | |||
/* margin-top: 100rpx; */ | |||
margin: 68rpx auto; | |||
width: 750rpx; | |||
height: 750rpx; | |||
/* line-height: 20px; */ | |||
background-color: rgba(255, 255, 255, 1); | |||
text-align: center; | |||
} | |||
</style> |
@ -1,170 +0,0 @@ | |||
<template> | |||
<view class="purse"> | |||
<navbar title="提现" leftClick @leftClick="$utils.navigateBack" /> | |||
<view class="top-box"> | |||
<view class="top-one"> | |||
输入提现金额(元) | |||
</view> | |||
<view class="top-two"> | |||
<view>168.88</view> | |||
<view>全部提现</view> | |||
</view> | |||
<view class="top-three"> | |||
<view>可提现金额:</view> | |||
<view>168.88</view> | |||
</view> | |||
</view> | |||
<view class="middle"> | |||
<view class="middle-one">提现说明</view> | |||
<view style="padding-bottom: 20rpx;"> | |||
<view class="middle-two"> | |||
<view style="color: #A7D458;">1.</view> | |||
<view>说明文本说明文本说明文本说明文本说明文本说明文本说明文本说明文本说明文本说明文本。</view> | |||
</view> | |||
<view class="middle-two"> | |||
<view style="color: #A7D458;">2.</view> | |||
<view>说明文本说明文本说明文本说明文本说明文本说明文本说明文本说明文本说明文本说明文本。</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="cell"> | |||
<view class="middle-one">提现记录</view> | |||
<uv-cell-group> | |||
<uv-cell :center="true" :border="false" v-for="(item,index) in 10" :key="index"> | |||
<template v-slot:title> | |||
<text style="font-size: 28rpx;">提现</text> | |||
</template> | |||
<template v-slot:label> | |||
<text style="font-size: 24rpx;color: #999; margin-top: 10rpx;">2024-11-12 12:56:48</text> | |||
</template> | |||
<template v-slot:value> | |||
<view> | |||
<view style="font-size: 28rpx;">+56.6</view> | |||
<view style="font-size: 24rpx;color: #999; margin-top: 10rpx;">提现成功</view> | |||
</view> | |||
</template> | |||
</uv-cell> | |||
</uv-cell-group> | |||
</view> | |||
<view class="b-fiexd"> | |||
<view class="button-submit">确定提现</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
notice: '' | |||
} | |||
}, | |||
methods: { | |||
} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.purse { | |||
min-height: 100vh; | |||
background-color: #F3F3F3; | |||
.top-box { | |||
height: 370rpx; | |||
width: 100%; | |||
background-image: url(../static/home/2.png); | |||
background-size: 100% 100%; | |||
.top-one { | |||
font-size: 28rpx; | |||
color: #FFF; | |||
padding: 40rpx 20rpx 10rpx 20rpx; | |||
} | |||
.top-two { | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
margin: 10rpx; | |||
padding: 10rpx; | |||
background-color: #FFF; | |||
border-radius: 16rpx; | |||
view:nth-child(1) { | |||
font-size: 80rpx; | |||
color: #474747; | |||
} | |||
view:nth-child(2) { | |||
font-size: 28rpx; | |||
color: #92D823; | |||
} | |||
} | |||
.top-three { | |||
display: flex; | |||
padding: 10rpx 20rpx; | |||
color: #474747; | |||
font-size: 28rpx; | |||
view:nth-child(2) { | |||
color: #F53546; | |||
} | |||
} | |||
} | |||
.middle { | |||
margin: 0 20rpx; | |||
background-color: #fff; | |||
border-radius: 16rpx; | |||
margin-top: -70rpx; | |||
.middle-one { | |||
font-size: 34rpx; | |||
color: #474747; | |||
font-weight: 600; | |||
padding: 40rpx 20rpx 10rpx; | |||
} | |||
.middle-two { | |||
display: flex; | |||
margin: 20rpx; | |||
font-size: 26rpx; | |||
color: #A2A2A2; | |||
} | |||
} | |||
.cell { | |||
margin: 20rpx; | |||
background-color: #fff; | |||
border-radius: 16rpx; | |||
.middle-one { | |||
font-size: 34rpx; | |||
color: #474747; | |||
font-weight: 600; | |||
padding: 40rpx 20rpx 10rpx; | |||
} | |||
} | |||
.button-submit { | |||
width: 596rpx; | |||
height: 90rpx; | |||
line-height: 90rpx; | |||
background: $uni-color; | |||
border-radius: 46rpx; | |||
margin: 20rpx auto; | |||
font-size: 28rpx; | |||
font-family: PingFang SC, PingFang SC-Regular; | |||
font-weight: 400; | |||
text-align: center; | |||
color: #ffffff; | |||
} | |||
} | |||
</style> |
@ -1,201 +0,0 @@ | |||
<template> | |||
<view class="page"> | |||
<navbar title="充值" | |||
bgColor="#A3D250" | |||
color="#fff" | |||
leftClick | |||
@leftClick="$utils.navigateBack" /> | |||
<view class="bg"/> | |||
<view class="price"> | |||
<view class="title"> | |||
请输入充值金额(元) | |||
</view> | |||
<view class="input-box"> | |||
<view class="input"> | |||
<input type="text" v-model="form.money"/> | |||
</view> | |||
</view> | |||
<view class="num"> | |||
余额:{{ riceInfo.balance || 0 }} | |||
</view> | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-top">充值说明</view> | |||
<view style="padding: 0 20rpx 20rpx 20rpx;"> | |||
<uv-parse :content="configList.recharge_instructions"></uv-parse> | |||
</view> | |||
</view> | |||
<view class="uni-color-btn" | |||
@click="submit"> | |||
充值 | |||
</view> | |||
<!-- <view class="cell"> | |||
<view class="cell-top">提现记录</view> | |||
<view class="cell-box" | |||
:key="index" | |||
v-for="(item,index) in list"> | |||
<uv-cell-group> | |||
<uv-cell | |||
:title="item.title" | |||
:label="item.createTime" | |||
:center="true"> | |||
<template #value> | |||
<view class="cell-text"> | |||
<view class="price-text">-19.9</view> | |||
<view class="tips">已到账</view> | |||
</view> | |||
</template> | |||
</uv-cell> | |||
</uv-cell-group> | |||
</view> | |||
</view> --> | |||
</view> | |||
</template> | |||
<script> | |||
import mixinsList from '@/mixins/list.js' | |||
import { mapState } from 'vuex' | |||
export default { | |||
mixins : [mixinsList], | |||
data() { | |||
return { | |||
// mixinsListApi : 'getWaterPageList', | |||
list : [], | |||
type : ['-', '+'], | |||
form : { | |||
money : 0, | |||
}, | |||
} | |||
}, | |||
computed: { | |||
...mapState(['userInfo', 'riceInfo']), | |||
}, | |||
onShow() { | |||
this.$store.commit('getUserInfo') | |||
this.$store.commit('getRiceInfo') | |||
}, | |||
methods: { | |||
submit(){ | |||
if(this.$utils.verificationAll(this.form, { | |||
money : '请输入金额' | |||
})){ | |||
return | |||
} | |||
if(this.form.money <= 0){ | |||
uni.showToast({ | |||
title: '输入金额必须大于0', | |||
icon: 'none' | |||
}) | |||
return | |||
} | |||
this.$api('recharge', res => { | |||
if(res.code == 200){ | |||
uni.showToast({ | |||
title: '充值成功', | |||
icon : 'none' | |||
}) | |||
this.form.money = 0 | |||
setTimeout(uni.navigateBack, 800, -1) | |||
} | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.page{ | |||
.bg{ | |||
background-color: $uni-color; | |||
height: 380rpx; | |||
position: absolute; | |||
left: 0; | |||
width: 100%; | |||
z-index: -1; | |||
border-bottom-left-radius: 30rpx; | |||
border-bottom-right-radius: 30rpx; | |||
} | |||
.price{ | |||
color: #FFFFFF; | |||
padding: 40rpx; | |||
.title{ | |||
color: #eee; | |||
font-size: 28rpx; | |||
} | |||
.input-box{ | |||
background-color: #FFFFFF; | |||
color: $uni-color; | |||
display: flex; | |||
justify-content: center; | |||
border-radius: 30rpx; | |||
align-items: center; | |||
padding: 10rpx; | |||
margin: 20rpx 0; | |||
.input{ | |||
color: #000; | |||
font-size: 40rpx; | |||
font-weight: 900; | |||
display: flex; | |||
flex: 1; | |||
input{ | |||
flex: 1; | |||
padding: 14rpx 20rpx; | |||
} | |||
} | |||
} | |||
.num{ | |||
font-size: 30rpx; | |||
font-weight: 900; | |||
margin-top: 10rpx; | |||
} | |||
} | |||
.cell { | |||
margin: 20rpx; | |||
background-color: #FFFFFF; | |||
border-radius: 16rpx; | |||
.cell-top { | |||
padding: 40rpx 34rpx; | |||
color: #474747; | |||
font-size: 34rpx; | |||
font-weight: 600; | |||
position: relative; | |||
&::after{ | |||
content: ''; | |||
display: block; | |||
position: absolute; | |||
left: 55rpx; | |||
bottom: 38rpx; | |||
height: 10rpx; | |||
width: 120rpx; | |||
background: linear-gradient(to right, #fff, $uni-color); | |||
} | |||
} | |||
.cell-text{ | |||
text-align: right; | |||
.price-text{ | |||
color: #f40; | |||
font-size: 32rpx; | |||
font-weight: 900; | |||
} | |||
.tips{ | |||
font-size: 22rpx; | |||
color: #aaa; | |||
margin-top: 10rpx; | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@ -1,89 +0,0 @@ | |||
<template> | |||
<view class="page"> | |||
<navbar title="推广明细" leftClick @leftClick="$utils.navigateBack" /> | |||
<view class="top"> | |||
<view class="top-text"> | |||
<view>{{ total }}</view> | |||
<view>直推人数</view> | |||
</view> | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-top">推广明细</view> | |||
<view class="cell-box" | |||
:key="index" | |||
v-for="(item,index) in list"> | |||
<uv-cell-group> | |||
<uv-cell | |||
:title="item.nickName" | |||
:label="item.createTime" | |||
:center="true"> | |||
<template #value> | |||
<text style="font-weight: 600; font-size: 28rpx;"> | |||
{{ vipType[item.isPay] }} | |||
</text> | |||
</template> | |||
</uv-cell> | |||
</uv-cell-group> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
import mixinsList from '@/mixins/list.js' | |||
export default { | |||
mixins : [mixinsList], | |||
data() { | |||
return { | |||
mixinsListApi : 'getFansPageList', | |||
vipType : ['普通会员', '黄金会员', '渠道商'], | |||
} | |||
}, | |||
onLoad(e) {}, | |||
methods: { | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.page { | |||
background-color: #F3F3F3; | |||
height: 100vh; | |||
.top { | |||
display: flex; | |||
height: 400rpx; | |||
justify-content: center; | |||
align-items: center; | |||
color: #474747; | |||
.top-text { | |||
text-align: center; | |||
view:nth-child(1) { | |||
font-size: 78rpx; | |||
font-weight: 600; | |||
} | |||
view:nth-child(2) { | |||
font-size: 28rpx; | |||
} | |||
} | |||
} | |||
.cell { | |||
margin: 20rpx; | |||
background-color: #FFFFFF; | |||
border-radius: 16rpx; | |||
.cell-top { | |||
padding: 40rpx 34rpx; | |||
color: #474747; | |||
font-size: 34rpx; | |||
font-weight: 600; | |||
} | |||
} | |||
} | |||
</style> |
@ -1,88 +0,0 @@ | |||
<template> | |||
<view class="running-water"> | |||
<navbar :title="title[status]" leftClick @leftClick="leftClick" /> | |||
<view class="tab-box"> | |||
<view class="tab-box1" v-if="agentFlow && agentFlow.total"> | |||
<uv-cell center border :title="item.title" | |||
v-for="(item, index) in agentFlow.records" | |||
:value="x[item.type] + item.money" :label="item.createTime" /> | |||
</view> | |||
<view | |||
style="padding: 100rpx 0;" | |||
v-else> | |||
<uv-empty | |||
mode="history" | |||
textSize="28rpx" | |||
iconSize="100rpx"/> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
title : ['余额记录','提现记录','佣金记录'], | |||
agentFlow : { | |||
total : 0, | |||
records : [ | |||
{ | |||
type : 0, | |||
money : 100, | |||
createTime : '2024-04-02 20:00', | |||
title : "佣金提现", | |||
}, | |||
{ | |||
type : 0, | |||
money : 100, | |||
createTime : '2024-04-02 20:00', | |||
title : "佣金提现", | |||
}, | |||
{ | |||
type : 0, | |||
money : 100, | |||
createTime : '2024-04-02 20:00', | |||
title : "佣金提现", | |||
}, | |||
] | |||
}, | |||
x : ['+', '-' , '-' , '+'], | |||
status : 0, | |||
} | |||
}, | |||
onLoad(e) { | |||
this.status = e.status | |||
}, | |||
methods: { | |||
leftClick() { //返回钱包 | |||
uni.navigateBack(-1) | |||
}, | |||
getAgentFlow(){ //获取流水记录 | |||
let type = this.status; | |||
this.$api('getAgentFlow', { type }, res => { | |||
if(res.code == 200){ | |||
this.agentFlow = res.result | |||
} | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.running-water{ | |||
width: 750rpx; | |||
background: #F5F5F5; | |||
margin: 0 auto; | |||
min-height: 100vh; | |||
.tab-box{ | |||
margin: 20rpx; | |||
background-color: #fff; | |||
border-radius: 20rpx; | |||
overflow: hidden; | |||
} | |||
} | |||
</style> |
@ -1,219 +0,0 @@ | |||
<template> | |||
<view class="page"> | |||
<navbar title="提现" | |||
bgColor="#A3D250" | |||
color="#fff" | |||
leftClick | |||
@leftClick="$utils.navigateBack" /> | |||
<view class="bg"/> | |||
<view class="price"> | |||
<view class="title"> | |||
请输入提现金额(元) | |||
</view> | |||
<view class="input-box"> | |||
<view class="input"> | |||
<input type="text" v-model="form.money"/> | |||
</view> | |||
<view class="" | |||
@click="selectAll"> | |||
全部提现 | |||
</view> | |||
</view> | |||
<view class="num"> | |||
可提现金额:{{ riceInfo.canWithdraw || 0 }} | |||
</view> | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-top">提现说明</view> | |||
<view style="padding: 0 20rpx;"> | |||
<uv-parse :content="configList.withdrawal_instructions"></uv-parse> | |||
</view> | |||
</view> | |||
<view class="uni-color-btn" | |||
@click="submit"> | |||
提现 | |||
</view> | |||
<view class="cell"> | |||
<view class="cell-top">提现记录</view> | |||
<view class="cell-box" | |||
:key="index" | |||
v-for="(item,index) in list"> | |||
<uv-cell-group> | |||
<uv-cell | |||
:title="item.title" | |||
:label="item.createTime" | |||
:center="true"> | |||
<template #value> | |||
<view class="cell-text"> | |||
<view class="price-text" | |||
v-if="item.type">{{ type[item.type] }}{{ item.money }}</view> | |||
<view class="price-text add" | |||
v-else>{{ type[item.type] }}{{ item.money }}</view> | |||
<view class="tips">{{ state[item.state] }}</view> | |||
</view> | |||
</template> | |||
</uv-cell> | |||
</uv-cell-group> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
import mixinsList from '@/mixins/list.js' | |||
import { mapState } from 'vuex' | |||
export default { | |||
mixins : [mixinsList], | |||
data() { | |||
return { | |||
mixinsListApi : 'getWaterPageList', | |||
list : [], | |||
type : ['+', '-'], | |||
state : ['未到账', '已到账'], | |||
form : { | |||
money : 0, | |||
}, | |||
} | |||
}, | |||
computed: { | |||
...mapState(['userInfo', 'riceInfo']), | |||
}, | |||
onShow() { | |||
this.$store.commit('getUserInfo') | |||
this.$store.commit('getRiceInfo') | |||
}, | |||
methods: { | |||
selectAll(){ | |||
this.form.money = this.riceInfo.canWithdraw | |||
}, | |||
submit(){ | |||
if(this.$utils.verificationAll(this.form, { | |||
money : '请输入金额' | |||
})){ | |||
return | |||
} | |||
if(this.form.money <= 0){ | |||
uni.showToast({ | |||
title: '输入金额必须大于0', | |||
icon: 'none' | |||
}) | |||
return | |||
} | |||
this.$api('withdraw', this.form, res => { | |||
if(res.code == 200){ | |||
uni.showToast({ | |||
title: '提现成功', | |||
icon : 'none' | |||
}) | |||
this.form.money = 0 | |||
this.$store.commit('getUserInfo') | |||
this.$store.commit('getRiceInfo') | |||
this.getData() | |||
} | |||
}) | |||
}, | |||
}, | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.page{ | |||
.bg{ | |||
background-color: $uni-color; | |||
height: 380rpx; | |||
position: absolute; | |||
left: 0; | |||
width: 100%; | |||
z-index: -1; | |||
border-bottom-left-radius: 30rpx; | |||
border-bottom-right-radius: 30rpx; | |||
} | |||
.price{ | |||
color: #FFFFFF; | |||
padding: 40rpx; | |||
.title{ | |||
color: #eee; | |||
font-size: 28rpx; | |||
} | |||
.input-box{ | |||
background-color: #FFFFFF; | |||
color: $uni-color; | |||
display: flex; | |||
justify-content: center; | |||
border-radius: 30rpx; | |||
align-items: center; | |||
padding: 10rpx; | |||
margin: 20rpx 0; | |||
.input{ | |||
color: #000; | |||
font-size: 40rpx; | |||
font-weight: 900; | |||
display: flex; | |||
flex: 1; | |||
input{ | |||
flex: 1; | |||
padding: 14rpx 20rpx; | |||
} | |||
} | |||
} | |||
.num{ | |||
font-size: 30rpx; | |||
font-weight: 900; | |||
margin-top: 10rpx; | |||
} | |||
} | |||
.cell { | |||
margin: 20rpx; | |||
background-color: #FFFFFF; | |||
border-radius: 16rpx; | |||
.cell-top { | |||
padding: 40rpx 34rpx; | |||
color: #474747; | |||
font-size: 34rpx; | |||
font-weight: 600; | |||
position: relative; | |||
&::after{ | |||
content: ''; | |||
display: block; | |||
position: absolute; | |||
left: 55rpx; | |||
bottom: 38rpx; | |||
height: 10rpx; | |||
width: 120rpx; | |||
background: linear-gradient(to right, #fff, $uni-color); | |||
} | |||
} | |||
.cell-text{ | |||
text-align: right; | |||
.price-text{ | |||
font-size: 32rpx; | |||
font-weight: 900; | |||
} | |||
.add{ | |||
color: #f40; | |||
} | |||
.tips{ | |||
font-size: 22rpx; | |||
color: #aaa; | |||
margin-top: 10rpx; | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@ -1,407 +0,0 @@ | |||
<template> | |||
<view class="page"> | |||
<navbar title="下单支付" leftClick @leftClick="$utils.navigateBack" /> | |||
<view class="box"> | |||
<!-- 地址 --> | |||
<view class="address" @click="openAddress"> | |||
<image src="../static/address/icon1.png" mode=""></image> | |||
<view class=""> | |||
{{ address.name }} | |||
</view> | |||
<view class=""> | |||
{{ address.address }} | |||
</view> | |||
<view class="icon"> | |||
<uv-icon size="30rpx" name="arrow-right"></uv-icon> | |||
</view> | |||
</view> | |||
<view class="productList"> | |||
<view class="item" | |||
:key="index" | |||
v-for="(item, index) in productList"> | |||
<view class="item-image"> | |||
<image :src="item.image && | |||
item.image.split(',')[0]" | |||
mode="aspectFill"></image> | |||
</view> | |||
<view class="info"> | |||
<view class="title"> | |||
{{ item.title }} | |||
</view> | |||
<view class="desc"> | |||
{{ item.sku }} | |||
</view> | |||
<view class="price-box"> | |||
<view class=""> | |||
<uv-number-box | |||
v-model="item.num" | |||
v-if="[1, 2].includes(item.type)" | |||
></uv-number-box> | |||
</view> | |||
<!-- 会员价:普通商品并且是会员的时候显示 --> | |||
<view class="price" | |||
v-if="[2].includes(item.type) && [1].includes(userInfo.isPay)"> | |||
会员价¥{{ item.vipPrice }} | |||
</view> | |||
<!-- 零售价、价格 --> | |||
<view class="price" | |||
v-else> | |||
¥{{ item.price }} | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="submit-box"> | |||
<view class="peis"> | |||
<view class=""> | |||
配送方式 | |||
</view> | |||
<view class=""> | |||
商家自行配送 | |||
</view> | |||
</view> | |||
<view class="priceInfo"> | |||
<view class=""> | |||
付款金额 | |||
</view> | |||
<view class="totalPrice"> | |||
¥{{ totalPrice }} | |||
</view> | |||
</view> | |||
<view class="remark"> | |||
<input type="text" | |||
placeholder="请输入备注" | |||
v-model="remark"/> | |||
</view> | |||
</view> | |||
<view class="uni-color-btn" | |||
@click="submit"> | |||
确认下单 | |||
</view> | |||
</view> | |||
<!-- 地址选择 --> | |||
<uv-popup ref="addressPopup" :round="30"> | |||
<addressList ref="addressList" height="60vh" @select="selectAddress" /> | |||
</uv-popup> | |||
</view> | |||
</template> | |||
<script> | |||
import addressList from '../components/address/addressList.vue' | |||
import { mapState } from 'vuex' | |||
export default { | |||
components: { | |||
addressList, | |||
}, | |||
data() { | |||
return { | |||
productList: [], | |||
address: { | |||
name: '请选择地址', | |||
address: '', | |||
}, | |||
addressTotal: 0, | |||
remark : '', | |||
num : 1, | |||
} | |||
}, | |||
computed : { | |||
totalPrice(){ | |||
let price = 0 | |||
this.productList.forEach(n => { | |||
if([2].includes(n.type) && | |||
[1].includes(this.userInfo.isPay)){ | |||
// 常规、普通商品的同时用户是会员就计算会员价 | |||
price += n.vipPrice * n.num | |||
}else{ | |||
// 普通价格 | |||
price += n.price * n.num | |||
} | |||
}) | |||
return Number(price).toFixed(2) | |||
}, | |||
...mapState(['payOrderProduct', 'userInfo']), | |||
}, | |||
onLoad() { | |||
this.getRiceProductDetail() | |||
this.$store.commit('getUserInfo') | |||
}, | |||
onShow() { | |||
this.getAddressList() | |||
}, | |||
methods: { | |||
// 获取商品 | |||
getRiceProductDetail() { | |||
this.productList = JSON.parse(JSON.stringify(this.payOrderProduct)) | |||
}, | |||
// 打开 | |||
getAddressList() { | |||
// 获取地址列表 | |||
this.$refs.addressList.getAddressList().then(res => { | |||
this.addressTotal = res.total | |||
if (this.addressTotal != 0) { | |||
this.address = res.records[0] | |||
} | |||
}) | |||
}, | |||
// 打开选择地址 | |||
openAddress() { | |||
if (this.addressTotal == 0) { | |||
return uni.navigateTo({ | |||
url: '/pages_order/mine/address?type=back' | |||
}) | |||
} | |||
this.$refs.addressPopup.open('bottom') | |||
}, | |||
// 选择地址 | |||
selectAddress(e) { | |||
this.address = e | |||
this.$refs.addressPopup.close() | |||
}, | |||
// 确认下单 | |||
// submit(){ | |||
// this.$api('createOrder', { | |||
// productId : this.productList[0].id, | |||
// num : 1, | |||
// }, res => { | |||
// if(res.code == 200){ | |||
// uni.showToast({ | |||
// title: '购买成功', | |||
// icon: 'none' | |||
// }) | |||
// setInterval(uni.navigateTo, 1000, { | |||
// url : '/pages/index/order' | |||
// }) | |||
// } | |||
// }) | |||
// }, | |||
submit(){ | |||
let addressId = this.address.id | |||
if(!addressId){ | |||
uni.showToast({ | |||
title: '请选择地址', | |||
icon: 'none' | |||
}) | |||
return | |||
} | |||
let data = {} | |||
let api = '' | |||
if(this.productList[0].shopId || this.productList[0].type == 2){//普通商品 | |||
let list = [] | |||
this.productList.forEach(n => { | |||
list.push({ | |||
num : n.num, | |||
shopId : n.shopId || n.id, | |||
}) | |||
}) | |||
data = { | |||
addressId, | |||
list : JSON.stringify(list), | |||
} | |||
api = 'createSumOrder' | |||
this.deleteCart(this.productList.map(n => n.id).join(',')) | |||
}else{//体验、常规商品 | |||
data = { | |||
addressId, | |||
num : this.productList[0].num, | |||
shopId : this.productList[0].id, | |||
} | |||
api = 'createOrder' | |||
} | |||
this.$api(api, data, res => { | |||
if(res.code == 200){ | |||
uni.requestPaymentWxPay(res) | |||
.then(res => { | |||
uni.showToast({ | |||
title: '下单成功', | |||
icon: 'none' | |||
}) | |||
setTimeout(uni.redirectTo, 700, { | |||
url: '/pages/index/order' | |||
}) | |||
}).catch(n => { | |||
setTimeout(uni.redirectTo, 700, { | |||
url: '/pages/index/order' | |||
}) | |||
}) | |||
}else if(res.code == 902){ | |||
uni.showModal({ | |||
title: res.message, | |||
success(e) { | |||
if(e.confirm){ | |||
uni.redirectTo({ | |||
url: '/pages/index/order' | |||
}) | |||
} | |||
} | |||
}) | |||
} | |||
}) | |||
}, | |||
// 删除购物车 | |||
deleteCart(ids){ | |||
this.$api('deleteCart', { | |||
ids | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.page { | |||
.box { | |||
padding: 20rpx; | |||
.address { | |||
display: flex; | |||
padding: 20rpx; | |||
background-color: #fff; | |||
align-items: center; | |||
border-radius: 20rpx; | |||
image { | |||
width: 60rpx; | |||
height: 40rpx; | |||
margin: 20rpx; | |||
} | |||
view { | |||
margin: 20rpx; | |||
overflow: hidden; //超出的文本隐藏 | |||
text-overflow: ellipsis; //溢出用省略号显示 | |||
white-space: nowrap; //溢出不换行 | |||
} | |||
.icon { | |||
margin-left: auto; | |||
} | |||
} | |||
.productList { | |||
margin-top: 20rpx; | |||
background-color: #fff; | |||
border-radius: 20rpx; | |||
.item { | |||
padding: 10rpx 20rpx; | |||
align-items: center; | |||
margin-bottom: 20rpx; | |||
display: flex; | |||
width: 100%; | |||
box-sizing: border-box; | |||
.item-image { | |||
width: 140rpx; | |||
height: 140rpx; | |||
flex-shrink: 0; | |||
image { | |||
height: 100%; | |||
width: 100%; | |||
border-radius: 20rpx; | |||
} | |||
} | |||
.info { | |||
padding: 20rpx; | |||
color: #555; | |||
flex: 1; | |||
.title { | |||
font-size: 28rpx; | |||
font-weight: 900; | |||
} | |||
.desc { | |||
font-size: 22rpx; | |||
color: #777; | |||
margin-top: 10rpx; | |||
} | |||
.price-box { | |||
display: flex; | |||
justify-content: space-between; | |||
color: #f40; | |||
font-size: 30rpx; | |||
font-weight: 900; | |||
.price{ | |||
&>view:nth-child(2){ | |||
font-size: 22rpx; | |||
color: #777; | |||
text{ | |||
font-size: 26rpx; | |||
font-weight: 900; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} | |||
.submit-box{ | |||
background-color: #fff; | |||
padding: 20rpx; | |||
border-radius: 20rpx; | |||
&>view:nth-child(2){ | |||
margin-top: 20rpx; | |||
} | |||
&>view{ | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
font-size: 28rpx; | |||
&>view:nth-child(1){ | |||
font-weight: 900; | |||
} | |||
&>view:nth-child(2){ | |||
color: #999; | |||
font-size: 24rpx; | |||
} | |||
.totalPrice{ | |||
color: #f40 !important; | |||
font-size: 34rpx !important; | |||
font-weight: 900; | |||
} | |||
} | |||
.remark{ | |||
margin-top: 30rpx; | |||
input{ | |||
background-color: #f3f3f3; | |||
padding: 14rpx 20rpx; | |||
border-radius: 20rpx; | |||
flex: 1; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
</style> |
@ -1,552 +0,0 @@ | |||
<template> | |||
<view> | |||
<navbar | |||
title="订单详情" | |||
leftClick | |||
@leftClick="$utils.navigateBack" | |||
/> | |||
<!-- <view class=""> | |||
<view class="controls"> | |||
<view class="title"> | |||
<image src="../static/order/icon.png" mode=""></image> | |||
服务完成 | |||
</view> | |||
<view class="tips"> | |||
待送回 | |||
</view> | |||
<view class="btns"> | |||
<view class="btn1"> | |||
快递寄回 | |||
</view> | |||
<view class="btn2"> | |||
线下配送 | |||
</view> | |||
</view> | |||
</view> | |||
<view class="steps"> | |||
<uv-steps | |||
activeColor="#FD5100" | |||
:current="stepsCurrent" dot> | |||
<uv-steps-item :title="item" | |||
:key="index" | |||
v-for="(item, index) in steps"></uv-steps-item> | |||
</uv-steps> | |||
</view> | |||
</view> --> | |||
<view class="info"> | |||
<view class="flex" | |||
style="display: flex;"> | |||
<view style="width: 8rpx;height: 30rpx; | |||
background: #A3D250;border-radius: 6rpx;" | |||
/> | |||
<view class="head-title">产品</view> | |||
</view> | |||
<view class="flex"> | |||
<view class="server-item" | |||
:key="index" | |||
v-for="(good, index) in order.commonOrderSkuList" | |||
> | |||
<view class="img-box"> | |||
<image :src="good.image && good.image.split(',')[0]" mode="aspectFill"></image> | |||
</view> | |||
<view class="server-info"> | |||
<view class="server-title"> | |||
{{good.title}} | |||
<!-- <view class="coupon">领券立减</view> --> | |||
</view> | |||
<view class="current-price"> | |||
<text class="unit">¥</text>{{good.price}} | |||
</view> | |||
<view class="sales-volume" style="margin-top: 5px;"> | |||
<view class="desc">规格:{{good.sku}}</view> | |||
</view> | |||
<view class="time-coupon"> | |||
<!-- <view class="flex"> | |||
<image src="@/static/home/time-icon.png"></image> | |||
<view class="time">{{order.useTime}}分钟</view> | |||
</view> --> | |||
<!-- <view class="sales-volume"> | |||
<image src="@/static/icons/icon1.png"></image> | |||
<view class="desc">已售出{{msgShop.payNum}}+单</view> | |||
</view> --> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- <view class="line min_tips"> | |||
<view class="head-div flex"> | |||
<view style="width: 118rpx;height: 118rpx;border-radius: 50%;overflow: hidden;"> | |||
<image style="width: 118rpx;" :src="msgTechnician.image" mode="widthFix"></image> | |||
</view> | |||
<view style="padding: 10rpx 34rpx;display: flex;flex-direction: column;justify-content: space-around;"> | |||
<view class="nickname"> | |||
{{msgTechnician.title}} | |||
<view v-if="msgTechnician.isVip" class="tag"> | |||
<image src="@/static/order/s.png" mode="aspectFit"></image> | |||
<view class="auth">官方认证</view> | |||
</view> | |||
</view> | |||
<view class="days"> | |||
<van-rate v-model="msgTechnician.score" :size="10" readonly color="#ffb54c" void-icon="star" | |||
void-color="#eee" /> | |||
<view class=""> | |||
好评{{msgTechnician.pinNum}} | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view @click="gototechnicianDetail(msgTechnician)" class="btn-x"> | |||
服务技师 | |||
</view> | |||
</view> --> | |||
<view class="line address"> | |||
<view class="address-top"> | |||
<view class=""> | |||
收货地址 | |||
</view> | |||
<view class="copy"> | |||
<image @click="copy(order.name + ' ' + order.phone + ' ' + order.address + order.addressDetails)" src="/static/order/copy.png"></image> | |||
</view> | |||
</view> | |||
<view class="addressDetail"> | |||
<view class="">{{order.name}} {{order.phone}}</view> | |||
<view class="">{{order.address}} {{order.addressDetails}}</view> | |||
</view> | |||
</view> | |||
<view class="line"> | |||
<view class="t min_tips"> | |||
<view class=""> | |||
实付款 | |||
</view> | |||
<view class="current-price"> | |||
¥{{ order.price }} | |||
</view> | |||
</view> | |||
</view> | |||
<!-- 订单信息 --> | |||
<view class="line"> | |||
<view class="t min_tips"> | |||
<view class=""> | |||
订单信息 | |||
</view> | |||
</view> | |||
<view class="min_tips"> | |||
<view class=""> | |||
订单编号 | |||
</view> | |||
<view class=""> | |||
{{order.id}} | |||
</view> | |||
</view> | |||
<view class="min_tips"> | |||
<view class=""> | |||
下单时间 | |||
</view> | |||
<view class=""> | |||
{{order.createTime}} | |||
</view> | |||
</view> | |||
</view> | |||
<!-- 下单须知 --> | |||
<view class="line"> | |||
<!-- <view class="t min_tips"> | |||
<view class=""> | |||
下单须知 | |||
</view> | |||
</view> | |||
<view class="min_tips" style="line-height: 40rpx;"> | |||
{{msgShop.projectExplain}} | |||
</view> --> | |||
<view class="btns"> | |||
<view @click="$refs.customerServicePopup.open()" class="btn"> | |||
联系客服 | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<customerServicePopup ref="customerServicePopup"/> | |||
</view> | |||
</template> | |||
<script> | |||
import customerServicePopup from '@/components/config/customerServicePopup.vue' | |||
import { mapState } from 'vuex' | |||
export default { | |||
components : { | |||
customerServicePopup | |||
}, | |||
computed : { | |||
}, | |||
data() { | |||
return { | |||
stepsCurrent : 0, | |||
steps : [ | |||
'接单', | |||
'检查', | |||
'开始清洗', | |||
'服务完成', | |||
], | |||
order : {}, | |||
id : 0, | |||
} | |||
}, | |||
onLoad(args) { | |||
this.id = args.id | |||
}, | |||
onShow() { | |||
this.getOrderDetail() | |||
}, | |||
onPullDownRefresh() { | |||
this.getOrderDetail() | |||
}, | |||
methods: { | |||
getOrderDetail(){ | |||
this.$api('getOrderDetail', { | |||
id : this.id | |||
}, res => { | |||
uni.stopPullDownRefresh() | |||
if(res.code == 200){ | |||
this.order = res.result | |||
} | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.order { | |||
background: linear-gradient(#4899a6, #6fc6ad, #6fc6ad); | |||
padding-bottom: 10px; | |||
} | |||
.controls{ | |||
margin: 20rpx; | |||
background-color: #fff; | |||
height: 400rpx; | |||
display: flex; | |||
flex-direction: column; | |||
width: 710rpx; | |||
border-radius: 20rpx; | |||
justify-content: center; | |||
align-items: center; | |||
.title{ | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
font-size: 40rpx; | |||
image{ | |||
width: 100rpx; | |||
height: 100rpx; | |||
margin-right: 20rpx; | |||
} | |||
} | |||
.tips{ | |||
font-size: 26rpx; | |||
color: #FD5100; | |||
margin-top: 10rpx; | |||
} | |||
.btns{ | |||
margin-top: 50rpx; | |||
display: flex; | |||
view{ | |||
margin: 0 20rpx; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
color: #fff; | |||
background-color: $uni-color; | |||
padding: 15rpx 40rpx; | |||
border-radius: 40rpx; | |||
} | |||
.btn2{ | |||
background-color: #FFFFFF; | |||
border: 1px solid #A7A7A7; | |||
color: #A7A7A7; | |||
} | |||
} | |||
} | |||
.steps{ | |||
margin: 20rpx; | |||
background-color: #fff; | |||
display: flex; | |||
flex-direction: column; | |||
width: 710rpx; | |||
border-radius: 20rpx; | |||
padding: 70rpx 0; | |||
/deep/ .uv-text__value{ | |||
font-size: 22rpx !important; | |||
} | |||
} | |||
.box { | |||
padding: 20px; | |||
.btns { | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
margin-top: 10px; | |||
.btn { | |||
color: #fff; | |||
padding: 10rpx 50rpx; | |||
background-color: #ffb300; | |||
border-radius: 30rpx; | |||
font-size: 25rpx; | |||
margin-right: 10rpx; | |||
} | |||
.btc{ | |||
background: #ccc; | |||
} | |||
} | |||
} | |||
.info { | |||
margin: 10px; | |||
padding: 20rpx; | |||
background-color: #fff; | |||
width: calc(100% - 40px); | |||
border-radius: 10px; | |||
.head-title { | |||
font-family: PingFang SC, PingFang SC-Bold; | |||
color: #2f2e2e; | |||
line-height: 30rpx; | |||
margin-left: 10rpx; | |||
} | |||
.server-item { | |||
display: flex; | |||
flex-wrap: wrap; | |||
align-items: center; | |||
justify-content: space-between; | |||
background: white; | |||
border-radius: 15rpx; | |||
box-sizing: border-box; | |||
margin: 20rpx 0rpx; | |||
width: 100%; | |||
.img-box { | |||
width: 150rpx; | |||
height: 150rpx; | |||
border-radius: 10rpx; | |||
overflow: hidden; | |||
image { | |||
width: 100%; | |||
height: 100%; | |||
} | |||
} | |||
.server-info { | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: space-around; | |||
width: calc(100% - 180rpx); | |||
box-sizing: border-box; | |||
padding: 10rpx 15rpx; | |||
.server-title { | |||
display: flex; | |||
margin-bottom: 10rpx; | |||
} | |||
.coupon { | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
background: #F29E45; | |||
color: white; | |||
width: 120rpx; | |||
height: 40rpx; | |||
border-radius: 10rpx; | |||
margin-left: 10rpx; | |||
font-size: 22rpx; | |||
} | |||
.time-coupon, | |||
.price { | |||
display: flex; | |||
flex-wrap: wrap; | |||
align-items: center; | |||
} | |||
.time-coupon { | |||
margin: 10rpx 0rpx; | |||
font-size: 26rpx; | |||
justify-content: space-between; | |||
width: 100%; | |||
.flex { | |||
justify-content: center; | |||
align-items: center; | |||
} | |||
image { | |||
width: 25rpx; | |||
height: 25rpx; | |||
} | |||
.time { | |||
color: #B8B8B8; | |||
margin-left: 6rpx; | |||
} | |||
} | |||
.sales-volume { | |||
display: flex; | |||
align-items: center; | |||
color: #B8B8B8; | |||
font-size: 24rpx; | |||
image { | |||
width: 25rpx; | |||
height: 25rpx; | |||
} | |||
} | |||
} | |||
} | |||
.address { | |||
.address-top{ | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
image{ | |||
width: 30rpx; | |||
height: 30rpx; | |||
} | |||
} | |||
.addressDetail { | |||
color: #777; | |||
font-size: 22rpx; | |||
padding: 5px 0; | |||
} | |||
text { | |||
background-color: #F29E45; | |||
padding: 8rpx 10rpx; | |||
color: #fff; | |||
font-size: 20rpx; | |||
margin-left: 10px; | |||
border-radius: 5px; | |||
} | |||
} | |||
.min_tips { | |||
font-size: 22rpx; | |||
color: #777; | |||
display: flex; | |||
justify-content: space-between; | |||
padding: 5px 0; | |||
align-items: center; | |||
} | |||
.current-price { | |||
font-size: 30rpx; | |||
color: #FD5100; | |||
} | |||
.line { | |||
border-top: 2px dotted #00000011; | |||
padding: 20rpx 0; | |||
.t { | |||
padding: 5px 0; | |||
color: #000; | |||
font-size: 26rpx; | |||
} | |||
} | |||
.head-div { | |||
.nickname { | |||
font-size: 30rpx; | |||
font-weight: 600; | |||
text-align: left; | |||
line-height: 42rpx; | |||
display: flex; | |||
align-items: center; | |||
.tag { | |||
position: relative; | |||
display: flex; | |||
align-items: center; | |||
image { | |||
height: 45rpx; | |||
width: 90rpx; | |||
vertical-align: middle; | |||
} | |||
.auth { | |||
position: absolute; | |||
white-space: nowrap; | |||
color: #FF6200; | |||
left: 23rpx; | |||
font-size: 17rpx; | |||
} | |||
} | |||
} | |||
.days { | |||
font-size: 20rpx; | |||
font-weight: 400; | |||
text-align: left; | |||
line-height: 56rpx; | |||
display: flex; | |||
align-items: center; | |||
view { | |||
padding-left: 5px; | |||
} | |||
} | |||
} | |||
.btn-x { | |||
color: #6fc6ad; | |||
border: 1px solid #6fc6ad; | |||
padding: 10rpx 20rpx; | |||
border-radius: 30rpx; | |||
} | |||
.btns { | |||
display: flex; | |||
justify-content: center; | |||
.btn { | |||
color: #6fc6ad; | |||
border: 1px solid #6fc6ad; | |||
padding: 10rpx 20rpx; | |||
border-radius: 30rpx; | |||
} | |||
} | |||
} | |||
</style> |
@ -0,0 +1,11 @@ | |||
<template> | |||
<view> | |||
</view> | |||
</template> | |||
<script> | |||
</script> | |||
<style> | |||
</style> |
@ -1,179 +0,0 @@ | |||
<template> | |||
<view class="page"> | |||
<navbar | |||
bgColor="transparent" | |||
style="position: absolute;" | |||
leftClick @leftClick="$utils.navigateBack" /> | |||
<view class="swipe"> | |||
<uv-swiper | |||
:list="productDetail.image | |||
&& productDetail.image.split(',')" | |||
indicator | |||
height="520rpx"></uv-swiper> | |||
</view> | |||
<view class="info"> | |||
<view style="width: 440rpx;"> | |||
<view class="title"> | |||
{{ productDetail.title }} | |||
</view> | |||
<view class="desc"> | |||
{{ productDetail.sku }} | |||
</view> | |||
</view> | |||
<view class="" | |||
v-if="[2].includes(productDetail.type)"> | |||
<view class="price"> | |||
会员价¥<text>{{ productDetail.vipPrice }}</text> | |||
</view> | |||
<view class="oldPrice"> | |||
零售价¥<text>{{ productDetail.price }}</text> | |||
</view> | |||
</view> | |||
<view class="" | |||
v-else> | |||
<view class="price"> | |||
价格¥<text>{{ productDetail.price }}</text> | |||
</view> | |||
<view class="oldPrice"> | |||
原价¥<text>{{ productDetail.oldPrice }}</text> | |||
</view> | |||
</view> | |||
</view> | |||
<uv-parse :content="productDetail.details"></uv-parse> | |||
<!-- 分享和购买按钮 --> | |||
<submit | |||
@addCart="addCart" | |||
@submit="submit" | |||
:detail="productDetail" | |||
/> | |||
<!-- <submit | |||
@submit="$refs.submitUnitSelect.open()" | |||
@share="share"/> --> | |||
<!-- 选择规格 --> | |||
<!-- <submitUnitSelect | |||
:detail="productDetail" | |||
ref="submitUnitSelect"/> --> | |||
</view> | |||
</template> | |||
<script> | |||
import submit from '../components/product/submit.vue' | |||
import submitUnitSelect from '../components/product/submitUnitSelect.vue' | |||
export default { | |||
components : { | |||
submit, | |||
submitUnitSelect | |||
}, | |||
data() { | |||
return { | |||
productDetail : { | |||
image : '', | |||
details : '', | |||
}, | |||
id : 0, | |||
} | |||
}, | |||
onLoad(args) { | |||
this.id = args.id | |||
}, | |||
onShow() { | |||
this.getRiceProductDetail() | |||
}, | |||
methods: { | |||
// 分享商品 | |||
share(){ | |||
}, | |||
// 立即下单 | |||
submit(){ | |||
this.$store.commit('setPayOrderProduct', [ | |||
this.productDetail | |||
]) | |||
this.$utils.navigateTo('/pages_order/order/createOrder') | |||
}, | |||
// 获取商品 | |||
getRiceProductDetail(){ | |||
this.$api('getRiceProductDetail', { | |||
id : this.id | |||
}, res => { | |||
if(res.code == 200){ | |||
res.result.num = 1 | |||
this.productDetail = res.result | |||
} | |||
}) | |||
}, | |||
// 添加购物车 | |||
addCart(){ | |||
this.$api('addCart', { | |||
shopId : this.id, | |||
num : 1, | |||
}, res => { | |||
if(res.code == 200){ | |||
uni.showToast({ | |||
title: '加入购物车成功', | |||
icon: 'none' | |||
}) | |||
} | |||
}) | |||
}, | |||
} | |||
} | |||
</script> | |||
<style scoped lang="scss"> | |||
.page{ | |||
.swipe{ | |||
} | |||
.info{ | |||
padding: 30rpx; | |||
background-color: #fff; | |||
display: flex; | |||
justify-content: space-between; | |||
.title{ | |||
font-size: 34rpx; | |||
font-weight: 900; | |||
} | |||
.price{ | |||
font-size: 34rpx; | |||
color: $uni-color; | |||
font-weight: 900; | |||
text-align: right; | |||
} | |||
.oldPrice{ | |||
font-size: 26rpx; | |||
color: #999; | |||
text-align: right; | |||
// text-decoration: line-through; | |||
margin-top: 14rpx; | |||
} | |||
.desc{ | |||
font-size: 26rpx; | |||
color: #777; | |||
margin-top: 20rpx; | |||
} | |||
} | |||
.info-unit{ | |||
margin-top: 20rpx; | |||
padding: 30rpx; | |||
background-color: #fff; | |||
/deep/ text{ | |||
font-size: 26rpx; | |||
} | |||
/deep/ .text{ | |||
color: #7C7C7C; | |||
margin-right: 20rpx; | |||
font-size: 26rpx; | |||
} | |||
} | |||
} | |||
</style> |