Browse Source

feat: 样式优化; 删除无用代码;

pull/1/head
Fox-33 2 months ago
parent
commit
14e53a3c90
10 changed files with 10 additions and 871 deletions
  1. +1
    -0
      common.scss
  2. +1
    -1
      pages/index/index.vue
  3. +4
    -3
      pages/index/record.vue
  4. +0
    -213
      pages_order/mine/address.vue
  5. +0
    -172
      pages_order/mine/help.vue
  6. +0
    -283
      pages_order/mine/promotion.vue
  7. +0
    -109
      pages_order/mine/purse.vue
  8. +0
    -88
      pages_order/mine/runningWater.vue
  9. +2
    -1
      pages_order/mine/team.vue
  10. +2
    -1
      pages_order/mine/wallet.vue

+ 1
- 0
common.scss View File

@ -58,6 +58,7 @@
width: auto;
height: auto !important;
border: none !important;
border-radius: none;
box-shadow: none;
padding: 0 !important;
margin: 0;


+ 1
- 1
pages/index/index.vue View File

@ -4,7 +4,7 @@
<image src="../../static/image/home/bg.png" class="bg" mode="scaleToFill"></image>
<view class="content">
<navbar title="首页" bgColor="#001137" color="#FFFFFF" />
<navbar title="首页" bgColor="transparent" color="#FFFFFF" />
<view class="btns">
<button


+ 4
- 3
pages/index/record.vue View File

@ -21,7 +21,7 @@
}"
lineHeight="13rpx"
lineWidth="77rpx"
:lineColor="`url('../../static/image/record/slider.png') 100% 100%`"
:lineColor="`url(${sliderBgUrl}) 100% 100%`"
:scrollable="false"
@click="clickTabs"
>
@ -41,7 +41,7 @@
@click="toSharingDetail(item.id)"
:key="item.id"
>
// todo: video?
<!-- todo: video? -->
<image class="left" :src="item.imageUrl"></image>
<view class="right">
<view class="title">{{ item.title }}</view>
@ -166,7 +166,8 @@
0: '../../static/image/record/audit.png', //
1: '../../static/image/record/pass.png', //
2: '../../static/image/record/fail.png', //
}
},
sliderBgUrl: 'https://thumbnail0.baidupcs.com/thumbnail/5128034cfj9ac619ca072da4706a6c90?fid=3983569511-250528-294545550145327&time=1742428800&rt=sh&sign=FDTAER-DCb740ccc5511e5e8fedcff06b081203-VWAeSoeU3wgv7WSjyY55eZnxp0E%3D&expires=8h&chkv=0&chkbd=0&chkpc=&dp-logid=8734843342929196277&dp-callid=0&file_type=0&size=c850_u580&quality=100&vuk=-&ft=video'
}
},
onShow() {


+ 0
- 213
pages_order/mine/address.vue View File

@ -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,
addressDetail: addressDetail.addressDetail,
defaultId: addressDetail.defaultId || '0',
latitude: addressDetail.latitude,
longitude: addressDetail.longitude
}
if (addressDetail.id) {
data.id = addressDetail.id
}
this.$api(data.id ? 'addressEdit' : 'addressAdd', 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('addressDefault', {
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('addressDelete', {
id
}, res => {
if (res.code == 200) {
uni.showToast({
title: '删除成功',
icon: 'none'
})
self.getAddressList()
}
})
}
}
})
},
//
addBtn() {
this.title = '新增地址'
this.$refs.addressPopup.open({ //
name: '',
phone: '',
address: '',
addressDetail: '',
defaultId: '',
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>

+ 0
- 172
pages_order/mine/help.vue View File

@ -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>

+ 0
- 283
pages_order/mine/promotion.vue View File

@ -1,283 +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 style="width: 100%;" :src="imagePath" mode="widthFix"></image>
<!-- <view class="invitation-code">加油站: {{ title }}</view> -->
<canvas id="myCanvas" type="2d" canvas-id="firstCanvas1"></canvas>
</view>
<view class="btns">
<view class="btn"
@click="preservationImg(imagePath)">保存</view>
<!-- <view class="btn">立即邀请</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') // canvasid
.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 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: 100rpx auto 0rpx auto;
box-shadow: 0rpx 0rpx 15rpx rgba(0, 0, 0, .2);
border-radius: 15rpx;
padding: 40rpx 30rpx;
box-sizing: border-box;
background-color: #fff;
.user-info {
display: flex;
align-items: center;
.image {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-right: 10rpx;
}
.user-name {
font-size: 30rpx;
}
}
.invitation-code-img {
display: flex;
align-items: center;
justify-content: center;
margin: 100rpx 0rpx;
.image {
width: 30%;
border-radius: 50%;
}
}
.invitation-code {
text-align: center;
color: #818181;
font-size: 28rpx;
}
}
.btns {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 120rpx;
display: flex;
background: #fff;
font-size: 28rpx;
color: $uni-color;
.btn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
&:nth-child(2) {
background: orange;
}
}
}
}
#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>

+ 0
- 109
pages_order/mine/purse.vue View File

@ -1,109 +0,0 @@
<template>
<view class="purse">
<navbar title="立即提现" leftClick @leftClick="$utils.navigateBack" />
<!-- 水洗店 -->
<view class="userShop">
<userShopCommission purse />
</view>
<view class="from-body">
<view>我要提现</view>
<view class="from-line">
<input placeholder="请输入提现金额" />
</view>
<view class="from-line">
<input placeholder="请输入姓名" />
</view>
<view class="from-line">
<input placeholder="请输入开户行" />
</view>
<view class="from-line">
<input placeholder="请输入银行卡卡号" />
</view>
<view class="mt56">提现说明</view>
<view style="line-height: 45rpx; font-size: 24rpx;color: #666666;" v-html="notice">
</view>
<!-- <p>1本次提现必须通过银行卡提现暂不支持其他途径</p>
<p>2如若遇到24小时提现未到账请联系客服</p> -->
</view>
<view class="b-fiexd">
<view class="button-submit">提交</view>
</view>
</view>
</template>
<script>
import userShopCommission from '@/components/userShop/userShopCommission.vue'
export default {
components: {
userShopCommission,
},
data() {
return {
notice : ''
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
.purse{
min-height: 100vh;
background-color: #ffffff;
.from-body {
padding: 40rpx 20rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Bold;
font-weight: 700;
text-align: left;
color: #333333;
line-height: 40px;
padding-bottom: 160rpx;
.from-line {
margin-top: 40rpx;
}
input {
width: 612rpx;
height: 90rpx;
line-height: 90rpx;
background: #F5F5F5;
border-radius: 46rpx;
padding: 0 50rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #333;
}
}
.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>

+ 0
- 88
pages_order/mine/runningWater.vue View File

@ -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>

+ 2
- 1
pages_order/mine/team.vue View File

@ -60,7 +60,7 @@
}"
lineHeight="13rpx"
lineWidth="77rpx"
:lineColor="`url('../../static/image/record/slider.png') 100% 100%`"
:lineColor="`url(${sliderBgUrl}) 100% 100%`"
:scrollable="false"
@click="clickTabs"
>
@ -175,6 +175,7 @@
pageSize: 10,
role: null,
},
sliderBgUrl: 'https://thumbnail0.baidupcs.com/thumbnail/5128034cfj9ac619ca072da4706a6c90?fid=3983569511-250528-294545550145327&time=1742428800&rt=sh&sign=FDTAER-DCb740ccc5511e5e8fedcff06b081203-VWAeSoeU3wgv7WSjyY55eZnxp0E%3D&expires=8h&chkv=0&chkbd=0&chkpc=&dp-logid=8734843342929196277&dp-callid=0&file_type=0&size=c850_u580&quality=100&vuk=-&ft=video'
}
},
onShow() {


+ 2
- 1
pages_order/mine/wallet.vue View File

@ -39,7 +39,7 @@
</view>
<view class="detail-tools">
<uv-calendars ref="calendars" @confirm="onSelectDate" />
<button class="flex btn-calendar" @click="openCalendars">
<button plain class="flex btn-calendar" @click="openCalendars">
<text>日期选择</text>
<image class="btn-calendar-arrow" src="../static/center/down.png"></image>
</button>
@ -245,6 +245,7 @@
}
.text {
white-space: nowrap;
color: #1B1B1B;
font-size: 36rpx;
font-weight: 900;


Loading…
Cancel
Save