Commit ad3db05c by zhangxw

Merge remote-tracking branch 'origin/v3.0' into zhangxw_dev_3.0

2 parents 2313f979 1b82c8ad
Showing 42 changed files with 1410 additions and 225 deletions
project.config.json
project.private.config.json
sitemap.json
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
...@@ -52,6 +52,16 @@ ...@@ -52,6 +52,16 @@
"pages/taskDetail/taskDetail", "pages/taskDetail/taskDetail",
"pages/warReport/warReport" "pages/warReport/warReport"
] ]
},
{
"root": "packageMine",
"pages": [
"pages/editBasicInfo/index",
"pages/settingName/index",
"pages/withdrawal/index",
"pages/withdrawalSuccess/index",
"pages/withdrawalNote/index"
]
} }
], ],
"usingComponents": { "usingComponents": {
......
...@@ -96,7 +96,21 @@ ...@@ -96,7 +96,21 @@
font-size: 24rpx; font-size: 24rpx;
height: 100%; height: 100%;
} }
.flex_sc {
display: flex;
align-items: center;
}
.flex_cc {
display: flex;
align-items: center;
justify-content: center;
}
.flex_scb{
display: flex;
align-items: center;
justify-content: space-between;
}
@keyframes show-box { @keyframes show-box {
0% { 0% {
opacity: 0; opacity: 0;
......
Page({
data: {
list_fill: [
{
label: '姓名',
value: '百晓生',
},
{
label: '部门',
value: '市场部',
},
],
list_disable: [
{
label: '门店',
value: '广联数科4s店',
},
{
label: '电话',
value: '18269555555',
},
],
showModal: false,
department: [{
id: 1,
name: '销售部',
}, {
id: 2,
name: '售后部',
}, {
id: 3,
name: '客服部',
}, {
id: 4,
name: '续保部',
},]
},
onConfirm(e) {
let {value} = e.detail
this.setData({
'list_fill[1].value':value.name,
showModal:false,
'user.seriseName':value.name
},()=>{
wx.$eventbus.emit('SETTING',{user:this.data.user})
})
},
clickRow(e) {
const { index,name } = e.currentTarget.dataset
if (index == 1) {
this.setData({
showModal: true
})
return
}
wx.$router.go('packageMine.settingName.index',{name})
},
onClose() {
this.setData({
showModal: false
})
},
toComfirm() { },
onShow(options){
},
onRoute(options) {
let {list_fill,list_disable} = this.data
if(options.user){
let user = options.user
list_fill[0].value = user.nickName
list_fill[1].value = user.seriseName
list_disable[0].value = user.merchantName
list_disable[1].value = user.phone
this.setData({
list_fill,
list_disable,
user
})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"van-popup": "@vant/weapp/popup/index",
"van-picker": "@vant/weapp/picker/index"
},
"navigationBarTitleText":"编辑"
}
\ No newline at end of file \ No newline at end of file
page {
background: #F7F8FA;
}
.container {
padding: 32rpx;
}
.wrapper {
background: #FFFFFF;
border-radius: 16rpx;
.row_widget {
padding: 36rpx 32rpx;
.label {
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
.value {
font-weight: 400;
font-size: 30rpx;
color: #666666;
}
.icon {
width: 24rpx;
height: 24rpx;
margin-left: 8rpx;
}
}
.border_line {
border-bottom: 2rpx solid #F0F0F0;
}
}
.martop32 {
margin-top: 32rpx;
}
.popclass {
position: relative;
border-radius: 24rpx 24rpx 0 0;
}
.active-class {
font-weight: 500 !important;
font-size: 32rpx !important;
color: #333333 !important;
}
\ No newline at end of file \ No newline at end of file
<wxs module="strSubstr">
var getString = function(str,len=8){
if(!str)return ''
if(str.length<len+1)return str
var newStr = str.substring(0,len)+'...'
return newStr
}
module.exports.getString = getString
</wxs>
<view class="container">
<view class="wrapper">
<block wx:for="{{list_fill}}" wx:key="index">
<view class="row_widget flex_scb {{index?'':'border_line'}}" data-index="{{index}}" data-name="{{item.value}}" bind:tap="clickRow">
<view class="label">{{item.label}}</view>
<view class="value flex_sc">
<text>{{strSubstr.getString(item.value,12)}}</text>
<image class="icon" src="{{IMGURL}}right_arrow_icon.png" />
</view>
</view>
</block>
</view>
<view class="wrapper martop32">
<block wx:for="{{list_disable}}" wx:key="index">
<view class="row_widget flex_scb {{index?'':'border_line'}}">
<view class="label">{{item.label}}</view>
<view style="color:#999" class="value flex_sc">{{strSubstr.getString(item.value,12)}}</view>
</view>
</block>
</view>
</view>
<van-popup show="{{ showModal }}" custom-class="popclass" position="bottom" custom-style="height: 55%" >
<van-picker
title="选择部门"
show-toolbar
active-class="active-class"
value-key="name"
columns="{{ department }}"
bind:cancel="onClose"
bind:confirm="onConfirm" />
</van-popup>
\ No newline at end of file \ No newline at end of file
Page({
data: {
nickName:''
},
changeName(e){
this.setData({
nickName:e.detail.value
})
},
comfirm(){
if(!this.data.nickName)return wx.$api.showToast('请输入名字')
wx.$eventbus.emit('SETTING',{user:{nickName:this.data.nickName}})
wx.$router.back((p)=>{
p.setData({
'list_fill[0].value':this.data.nickName,
})
},1)
},
onRoute(options) {
this.setData({
nickName:options.name
})
},
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText":"设置名字"
}
\ No newline at end of file \ No newline at end of file
page {
background: #F7F8FA;
}
.container {
padding: 32rpx;
}
.input_wrapper {
height: 108rpx;
background: #FFFFFF;
border-radius: 16rpx;
box-sizing: border-box;
padding-left: 32rpx;
.int_class {
width: calc(100% - 64rpx);
height: 100%;
font-weight: 400;
font-size: 32rpx;
color: #333;
caret-color:#556AF5;
}
}
.sumbit_btn {
margin: 0 auto;
margin-top: 102rpx;
width: calc(100% - 32rpx);
height: 88rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border-radius: 20rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
}
\ No newline at end of file \ No newline at end of file
<view class="container">
<view class="input_wrapper">
<input bindinput="changeName" class="int_class" maxlength="50" value="{{nickName}}" placeholder="请输入名字" />
</view>
<view class="sumbit_btn flex_cc" bind:tap="comfirm">提交</view>
</view>
\ No newline at end of file \ No newline at end of file
import { IMG_URL } from '~/utils/constantData'
Page({
data: {
IMGURL: IMG_URL,
withdrawalScore: 0,
sumbitScore: ''
},
toSumbitData() {
let {sumbitScore} = this.data
if(!sumbitScore)return wx.$api.showToast('请输入提现积分')
if(sumbitScore==0)return wx.$api.showToast('提现积分不能为0')
wx.$router.go('packageMine.withdrawalSuccess.index')
},
onRoute(options) {
this.setData({
withdrawalScore: options.withdrawalScore,
user: options.user,
})
},
toFillCount(e) {
let { value } = e.detail
let { withdrawalScore, sumbitScore } = this.data
sumbitScore = this.priceVerify(value, withdrawalScore)
this.setData({
sumbitScore: sumbitScore || ''
})
},
// 失焦校验
checkNum(e){
let { value } = e.detail
if(value[value.length-1]=="."){
this.setData({
sumbitScore: ''
})
}
},
toTixianAll() {
let { withdrawalScore } = this.data
this.setData({
sumbitScore: withdrawalScore
})
},
// 价格输入校验规则
priceVerify(price, max, min = 0) {
let result = 0
// 1.限制小数点为2位
price = price.replace(/[^\d.]/g, "")
price = price.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
// 2.禁止第一位为小数点
if (price.indexOf('.') == 0) {
price = ''
}
// 3.如果第一位是0,那第二位开始禁止为数值,只可以为小数点
if (price.indexOf('0') == 0 && price.length > 1) {
if (price.indexOf('.') != 1) {
price = '0'
}
if (price[2] == '.') {
price = '0.'
}
}
result = price
// 4.判断最大值和最小值
if (price) {
price = Number(price)
max = Number(max)
if (max && price > max) {
result = max
}
if (min && price < min) {
result = min
}
}
return result
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText":"积分提现"
}
\ No newline at end of file \ No newline at end of file
page {
background: #F7F8FA;
}
.container {
padding: 32rpx;
}
.tip_wrapper {
height: 108rpx;
background: #FFFFFF;
border-radius: 16rpx;
box-sizing: border-box;
padding: 0 32rpx;
.label {
font-weight: 400;
font-size: 32rpx;
color: #333333;
}
.tip {
.icon {
width: 56rpx;
height: 56rpx;
border-radius: 50%;
margin-right: 8rpx;
}
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
}
.input_wrapper {
width: 686rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin-top: 32rpx;
box-sizing: border-box;
padding: 32rpx;
.title {
font-weight: 400;
font-size: 32rpx;
color: #333333;
}
.int_widget {
box-sizing: border-box;
padding: 8rpx 0;
margin-top: 32rpx;
.input-placeholder {
font-weight: 400;
font-size: 24rpx;
color: #999999;
}
.intClass {
width: calc(100% - 174rpx);
font-weight: 400;
font-size: 24rpx;
color: #333;
caret-color:#556AF5;
}
.btn {
width: 154rpx;
height: 48rpx;
background: rgba(85, 106, 245, 0.10);
border-radius: 24rpx;
font-weight: 400;
font-size: 24rpx;
color: #556AF5;
}
}
}
.tip_msg{
font-weight: 400;
font-size: 24rpx;
color: #666666;
margin-top: 16rpx;
margin-left: 32rpx;
}
.sumbit_btn {
margin: 0 auto;
margin-top: 70rpx;
width: calc(100% - 32rpx);
height: 88rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border-radius: 20rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
}
\ No newline at end of file \ No newline at end of file
<wxs module="strSubstr">
var getString = function(str,len=8){
if(!str)return ''
if(str.length<len+1)return str
var newStr = str.substring(0,len)+'...'
return newStr
}
module.exports.getString = getString
</wxs>
<view class="container">
<view class="tip_wrapper flex_scb">
<view class="label">提现人</view>
<view class="tip flex_sc">
<image mode="aspectFill" class="icon" src="{{user.headImgUrl}}" />
<text>{{strSubstr.getString(user.nickName)}}</text>
</view>
</view>
<view class="input_wrapper">
<view class="title">输入提现的积分值</view>
<view class="int_widget flex_scb">
<input type="digit" bindblur="checkNum" value="{{sumbitScore}}" focus="{{true}}" bindinput="toFillCount" class="intClass" maxlength="20" placeholder="请输入" placeholder-class="input-placeholder"/>
<view class="btn flex_cc" bind:tap="toTixianAll">全部提现</view>
</view>
</view>
<view class="tip_msg">当前可提现积分:{{withdrawalScore}}</view>
<view class="sumbit_btn flex_cc" bind:tap="toSumbitData">提交</view>
</view>
\ No newline at end of file \ No newline at end of file
import { IMG_URL } from '~/utils/constantData'
Page({
data: {
IMGURL:IMG_URL,
STATUSICON:['wait','comlpete','fail'],
listData:[
{
num:110,
status:0,
},
{
num:1100,
status:1,
},
{
num:11000,
status:2,
},
]
},
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText":"提现记录"
}
\ No newline at end of file \ No newline at end of file
page {
background: #F7F8FA;
}
.container {
padding: 40rpx 32rpx;
}
.title_widget {
margin-bottom: 38rpx;
.text_1 {
font-weight: 600;
font-size: 36rpx;
color: #1B233D;
}
.marlf8 {
margin: 0 8rpx;
}
.text_2 {
font-weight: 400;
font-size: 28rpx;
color: #2D2D33;
}
}
.list {
.element {
position: relative;
.bgicon {
height: 260rpx;
}
.posi_wrap {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
box-sizing: border-box;
padding: 32rpx;
.avatar_info {
.icon {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
margin-right: 8rpx;
}
.nameText {
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
}
.countText {
font-weight: Bold;
font-size: 60rpx;
color: #333333;
line-height: 72rpx;
margin-top: 16rpx;
margin-bottom: 15rpx;
}
.line {
width: calc(100% - 32rpx);
height: 2rpx;
background: #EDEDED;
}
.date_wrap {
margin-top: 15rpx;
box-sizing: border-box;
padding-right: 32rpx;
.dateText {
font-weight: 400;
font-size: 20rpx;
color: #999999;
line-height: 32rpx;
}
}
}
}
}
\ No newline at end of file \ No newline at end of file
<view class="container">
<view class="title_widget flex_sc">
<view class="text_1">提现记录</view>
<view class="text_2 marlf8">·</view>
<view class="text_2">80</view>
</view>
<view class="list">
<block wx:for="{{listData}}" wx:key="index">
<view class="element">
<image mode="widthFix" class="bgicon" src="{{IMGURL}}status_{{STATUSICON[item.status]}}.png" />
<view class="posi_wrap">
<view class="avatar_info flex_sc">
<image mode="aspectFill" class="icon" src="{{IMGURL}}discovery_prod1.png" />
<view class="nameText">百晓生</view>
</view>
<view class="countText">-{{item.num}}</view>
<view class="line"></view>
<view class="date_wrap flex_scb">
<view class="dateText">申请时间:2022-10-12 17:32</view>
<view wx:if="{{item.status}}" class="dateText">完成时间:2022-10-12 17:32</view>
</view>
</view>
</view>
</block>
</view>
</view>
\ No newline at end of file \ No newline at end of file
Page({
data: {
},
toWatchNote(){
wx.$router.go('packageMine.withdrawalNote.index')
},
toBackMine(){
wx.switchTab({
url: '/pages/tab/mine/mine',
});
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText":"积分提现"
}
\ No newline at end of file \ No newline at end of file
page {
background: white;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
}
.icon {
width: 400rpx;
height: 400rpx;
margin-top: 64rpx;
}
.max_text {
font-weight: 600;
font-size: 40rpx;
color: #1B233D;
margin-top: 16rpx;
margin-bottom: 24rpx;
}
.tip_text {
font-weight: 400;
font-size: 28rpx;
color: #7A8299;
}
.btn_group {
margin-top: 128rpx;
.btn_left {
width: 316rpx;
height: 88rpx;
background: #FFFFFF;
border: 2rpx solid #DCDFE6;
border-radius: 20rpx;
font-weight: 400;
font-size: 32rpx;
color: #1B233D;
}
.btn_right {
width: 316rpx;
height: 88rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border-radius: 20rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
margin-left: 22rpx;
}
}
\ No newline at end of file \ No newline at end of file
<view class="container">
<image mode="widthFix" class="icon" src="{{IMGURL}}success_icon_1.png" />
<view class="max_text">提交成功</view>
<view class="tip_text">您的提现申请已成功提交,预计将在24小时</view>
<view class="tip_text">到达您的微信零钱,请留意到账情况</view>
<view class="btn_group flex_cc">
<view class="btn_left flex_cc" bind:tap="toWatchNote">查看提现记录</view>
<view class="btn_right flex_cc" bind:tap="toBackMine">返回我的积分</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
import { IMG_URL } from '~/utils/constantData'
Component({
options: {
addGlobalClass: true
},
properties: {
boxStyle: String,
user:Object
},
/**
* 组件的初始数据
*/
data: {
IMGURL: IMG_URL,
withdrawalScore:0,
},
/**
* 组件的方法列表
*/
methods: {
toTiXian(){
let {user,withdrawalScore} = this.data
if(!user.bindStatus){
this.triggerEvent('showModal',true)
return
}
wx.$router.go('packageMine.withdrawal.index',{withdrawalScore,user})
},
toWatchNote(){
wx.$router.go('packageMine.withdrawalNote.index')
},
},
lifetimes: {
attached() {
wx.$eventbus.on('WITHDRALWAL', (res) => {
this.setData({
withdrawalScore:res || 0
})
})
}
}
})
{
"component": true
}
\ No newline at end of file \ No newline at end of file
.integral_widget {
position: relative;
z-index: 2;
.wrapper {
position: relative;
width: calc(100% - 64rpx);
margin-left: 33rpx;
.bg_icon {
width: 100%;
height: 100%;
}
.btn_wrap {
position: absolute;
top: 48rpx;
right: 20rpx;
height: 64rpx;
width: 160rpx;
}
.tip {
position: absolute;
top: 32rpx;
left: 40rpx;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
letter-spacing: 0;
line-height: 44rpx;
}
.money {
position: absolute;
top: 84rpx;
left: 40rpx;
font-weight: Bold;
font-size: 72rpx;
color: #FFFFFF;
}
.note_btn {
position: absolute;
right: 60rpx;
top: 152rpx;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
line-height: 36rpx;
text-decoration: underline;
}
}
}
\ No newline at end of file \ No newline at end of file
<view style="{{boxStyle}}" class="integral_widget">
<view class="wrapper">
<image mode="widthFix" class="bg_icon" src="{{IMGURL}}intergral_bg_icon.png" />
<view bind:tap="toTiXian" class="btn_wrap"></view>
<view class="tip">我的积分</view>
<view class="money">{{withdrawalScore}}</view>
<view class="note_btn" bind:tap="toWatchNote">提现记录</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
import { IMG_URL } from '~/utils/constantData'
Component({
options: {
addGlobalClass: true
},
properties: {
},
/**
* 组件的初始数据
*/
data: {
IMGURL: IMG_URL,
listData:[1,2,3,4,5,6,7]
},
/**
* 组件的方法列表
*/
methods: {
getWithdrawalData(){
let data = {
score:{
currentScore:1000,
totalReWardScore:59895557,
totalWithdrawalScore:4546546
},
list:[
{
infoName:'充值赠送',
updatedTime:'2022-10-13 17:03:20',
withdrawalScore:100,
type:0
},
{
infoName:'购买商品',
updatedTime:'2022-10-13 17:03:20',
withdrawalScore:100,
type:-1
},
{
infoName:'购买商品',
updatedTime:'2022-10-13 17:03:20',
withdrawalScore:100,
type:-1
},
{
infoName:'购买商品',
updatedTime:'2022-10-13 17:03:20',
withdrawalScore:100,
type:-1
},
{
infoName:'购买商品',
updatedTime:'2022-10-13 17:03:20',
withdrawalScore:100,
type:-1
},
]
}
wx.$eventbus.emit('WITHDRALWAL',data.score.currentScore)
this.setData({
score:data.score,
listData:data.list,
})
}
},
lifetimes: {
attached() {
this.getWithdrawalData()
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
.list_widget {
position: relative;
z-index: 3;
margin-top: -70rpx;
.image_wrap {
position: relative;
.box {
width: 335rpx;
height: 152rpx;
.icon {
width: 72rpx;
height: 72rpx;
margin-right: 16rpx;
}
.text_wrap {
.price {
font-weight: Bold;
font-size: 32rpx;
color: #333333;
line-height: 48rpx;
}
.tip {
font-weight: 400;
font-size: 28rpx;
color: #6E6E7A;
}
}
}
.left_box {
position: absolute;
left: 32rpx;
top: 32rpx;
}
.right_box {
position: absolute;
right: 32rpx;
top: 32rpx;
}
}
.title_wrap {
margin-top: 24rpx;
margin-bottom: 8rpx;
.icon {
width: 176rpx;
height: 64rpx;
}
}
.list_data_widget {
box-sizing: border-box;
padding: 0 48rpx;
.element {
width: 100%;
border-bottom: 2rpx solid #f2f2f2;
padding: 28rpx 0;
position: relative;
.title {
font-weight: 500;
font-size: 28rpx;
color: #333333;
line-height: 44rpx;
}
.date {
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 36rpx;
}
.price {
position: absolute;
right: 0;
top: 50%;
transform: translate(0, -50%);
color: #FE5662;
font-size: 40rpx;
display: flex;
align-items: flex-end;
.mini {
font-size: 32rpx;
}
}
.blackColor{
color: #333333;
}
}
.no_more_tip {
margin-top: 40rpx;
font-weight: 400;
font-size: 24rpx;
color: #BEBEBE;
line-height: 36rpx;
text-align: center;
}
}
}
\ No newline at end of file \ No newline at end of file
<view class="list_widget">
<view class="image_wrap">
<image mode="widthFix" class="banner_icon" src="{{IMGURL}}list_bg_icon.png" />
<view class="box flex_cc left_box">
<image class="icon" src="{{IMGURL}}num_icon_1.png" />
<view class="text_wrap">
<view class="price">{{score.totalReWardScore}}</view>
<view class="tip">累计收益积分</view>
</view>
</view>
<view class="box flex_cc right_box">
<image class="icon" src="{{IMGURL}}num_icon_2.png" />
<view class="text_wrap">
<view class="price">{{score.totalWithdrawalScore}}</view>
<view class="tip">累计提现积分</view>
</view>
</view>
</view>
<view class="title_wrap flex_cc">
<image mode="widthFix" class="icon" src="{{IMGURL}}title_icon.png" />
</view>
<view class="list_data_widget">
<block wx:for="{{listData}}" wx:key="index">
<view class="element">
<view class="title">{{item.infoName}}</view>
<view class="date">{{item.updatedTime}}</view>
<view class="price {{item.type==0?'':'blackColor'}}">
<text class="mini">{{item.type==0?'+':'-'}}</text>
<text>{{item.withdrawalScore}}</text>
</view>
</view>
</block>
<view class="no_more_tip">没有更多啦</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
import { IMG_URL } from '~/utils/constantData'
Component({
options: {
addGlobalClass: true
},
properties: {
boxStyle: String,
user:Object
},
data: {
IMGURL: IMG_URL,
},
methods: {
toEditPage() {
wx.$router.go('packageMine.editBasicInfo.index', { user: this.data.user })
},
// toAddEvent() {
// wx.$eventbus.on('SETTING', (res) => {
// let user = this.data.user
// if (res) {
// Object.assign(user, res.user)
// this.setData({
// user
// })
// }
// })
// }
},
lifetimes: {
attached() {
// this.toAddEvent()
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
.userInfo_widget {
width: 100%;
height: 232rpx;
position: relative;
z-index: 2;
box-sizing: border-box;
padding-top: 16rpx;
.wrap {
padding: 0 32rpx;
position: relative;
.header_icon {
width: 104rpx;
height: 104rpx;
border-radius: 50%;
}
.info_text {
margin-left: 24rpx;
.label {
font-weight: 600;
font-size: 36rpx;
color: #333333;
}
.edit_icon {
width: 32rpx;
height: 32rpx;
margin-left: 24rpx;
}
.contact_widget {
font-weight: 400;
font-size: 28rpx;
color: #7A8299;
margin-top: 8rpx;
.wecat_wrap {
height: 40rpx;
padding: 0 12rpx;
background: rgba(111, 111, 111, 0.10);
border-radius: 20rpx;
font-weight: 400;
font-size: 24rpx;
color: #999999;
margin-left: 16rpx;
.icon {
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
}
}
}
.logout {
position: absolute;
right: 0;
top: 0;
width: 144rpx;
height: 48rpx;
background: #FAFAFA;
border-radius: 24rpx 0 0 24rpx;
font-weight: 400;
font-size: 24rpx;
color: #868686;
}
}
.store_widget {
margin-top: 24.62rpx;
.line {
width: 2rpx;
height: 28rpx;
background: #D3D5DB;
margin-left: 39rpx;
margin-right: 31rpx;
}
.label {
.icon {
width: 28.8rpx;
height: 26.7rpx;
margin-right: 13.6rpx;
}
.tip {
font-weight: 400;
font-size: 28rpx;
color: #7A8299;
}
}
}
}
\ No newline at end of file \ No newline at end of file
<wxs module="strSubstr">
var getString = function(str,len=8){
if(!str)return ''
if(str.length<len+1)return str
var newStr = str.substring(0,len)+'...'
return newStr
}
module.exports.getString = getString
</wxs>
<view style="{{boxStyle}}" class="userInfo_widget">
<view class="wrap flex_sc">
<image mode="aspectFill" class="header_icon" src="{{user.headImgUrl}}" />
<view class="info_text">
<view class="label flex_sc">
<text>{{strSubstr.getString(user.nickName)}}</text>
<image bind:tap="toEditPage" mode="aspectFill" class="edit_icon" src="{{IMGURL}}center_edit_icon.png" />
</view>
<view class="contact_widget flex_sc">
<view class="text">{{user.phone}}</view>
<view class="wecat_wrap flex_cc">
<block wx:if="{{user.bindStatus}}">
<image class="icon" src="{{IMGURL}}wechat_active_icon.png" />
<text>{{strSubstr.getString(user.brandName)}}</text>
</block>
<block wx:else>
<image class="icon" src="{{IMGURL}}wechat_icon.png" />
<text>未绑定</text>
</block>
</view>
</view>
</view>
<view class="logout flex_cc">退出登录</view>
</view>
<view class="store_widget flex_cc">
<view class="flex_sc label">
<image class="icon" src="{{IMGURL}}merchant_icon.png" />
<view class="tip">{{user.seriseName}}</view>
</view>
<view class="line"></view>
<view class="flex_sc label">
<image class="icon" src="{{IMGURL}}shop_icon.png" />
<view class="tip">{{strSubstr.getString(user.merchantName,10)}}</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// pages/tab/mine/mine.js const navStyle = "background-color: transparent;";
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
navStyle,
showModal: false
}, },
/** navbarReady(e) {
* 生命周期函数--监听页面加载 let {
*/ height
onLoad: function (options) {}, } = e.detail;
/** this.setData({
* 生命周期函数--监听页面初次渲染完成 user_box_style: `padding-top:${height + 10}px`,
*/ count_box_style: `padding-top:${height}px`,
onReady: function () {}, });
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
}, },
onPageScroll: function (e) {
/** this.setData({
* 生命周期函数--监听页面隐藏 navStyle: e.scrollTop >= 38 ? "" : navStyle,
*/ });
onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
}, },
getUserInfo() {
/** const USERINFO = {
* 页面上拉触底事件的处理函数 headImgUrl: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/store-assistant/default_avatar.png',
*/ nickName: '小黄鸭',
onReachBottom: function () {}, phone: '18269441444',
seriseName: '销售部',
/** merchantName: '广联数科4S店广联数科4S店广联数科4S店广联数科4S店',
* 用户点击右上角分享 brandName: '绑定的名称名称',
*/ bindStatus: 0
onShareAppMessage: function () { }
this.setData({
user: USERINFO
})
},
toAddEvent() {
wx.$eventbus.on('SETTING', (res) => {
let user = this.data.user
if (res) {
Object.assign(user, res.user)
this.setData({
user
})
}
})
},
toShowBindModal(e) {
this.setData({
showModal: e.detail
})
}, },
toCloseModal(){
this.setData({
showModal:false
})
},
onLoad: function (options) {
this.getUserInfo()
this.toAddEvent()
},
}) })
{ {
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": true, "enablePullDownRefresh": false,
"usingComponents": { "usingComponents": {
"user-info-widget":"./components/userInfo/userInfo",
"count-info-widget":"./components/countInfo/countInfo",
"list-info-widget":"./components/listInfo/listInfo",
"van-popup": "@vant/weapp/popup/index"
} }
} }
\ No newline at end of file \ No newline at end of file
page {
background: #FFFFFF;
}
.bar-text {
font-weight: 600;
font-size: 34rpx;
color: #2D2D2E;
}
.container {
position: relative;
}
.topBg {
position: absolute;
left: 0;
right: 0;
top: 0;
}
.popclass {
position: relative;
border-radius: 24rpx 24rpx 0 0;
z-index: 999;
.modal_title {
font-weight: 500;
font-size: 40rpx;
color: #333333;
box-sizing: border-box;
padding-top: 48rpx;
padding-left: 49rpx;
}
.modal_tip {
font-weight: 400;
font-size: 32rpx;
color: #333333;
margin-top: 64rpx;
padding-left: 49rpx;
}
.modal_btn {
margin: 0;
width: calc(100% - 98rpx);
height: 88rpx;
margin: 0 auto;
margin-top: 120rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border-radius: 20rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
}
}
\ No newline at end of file \ No newline at end of file
<view class="navigation-bar"> <view class="container">
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady" page-title="个人中心">个人中心</navigation-bar> <!-- 导航栏 -->
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}" page-title="个人中心">
<view class="bar-text">个人中心</view>
</navigation-bar>
<!-- 顶部背景图 -->
<view class="topBg">
<image mode="widthFix" src="{{IMGURL}}mine_center_bg.png" />
</view>
<!-- 个人基础信息 -->
<user-info-widget user="{{user}}" boxStyle="{{user_box_style}}"></user-info-widget>
<!-- 积分信息 -->
<count-info-widget bind:showModal="toShowBindModal" user="{{user}}" boxStyle="{{count_box_style}}"></count-info-widget>
<!-- 收益明细信息 -->
<list-info-widget></list-info-widget>
</view> </view>
<view class="layout" wx:if="{{user_box_style}}">
<view class="user-box" style="{{user_box_style}}">
<view class="user-info">
<view class="avatar">
<block wx:if="{{userInfo && userInfo.headImgUrl}}">
<image webp src="{{userInfo.headImgUrl}}"></image>
</block>
<block wx:else>
<image webp src="{{IMGURL}}mine/default-avatar.jpg?v={{img_version}}"></image>
</block>
</view>
<view class="info {{userInfo?'':'auth'}}">
<block wx:if="{{userInfo}}">
<view class="nickName">
{{userInfo.nickName || '微信用户'}}
<view class="vip text-center">已认证</view>
</view>
<view class="phone">{{userInfo.phone}}</view>
</block>
<block wx:else>点击登录</block>
</view>
<block wx:if="{{!userInfo}}">
<view class="auth-button" bindtap="login"></view>
<!-- <button open-type="getPhoneNumber" bindtap="login" bindgetphonenumber="getPhoneNumber" class="auth-button"></button> -->
</block>
<block wx:if="{{userInfo && !userInfo.nickName}}">
<view class="auth-button" bindtap="showAuthModal"></view>
</block>
</view>
<view class="coupon-info flex">
<view class="item flex" bindtap="goto" data-url="coupon">
{{total || '0'}}
<view>我的优惠券/张</view>
</view>
<view class="item flex" bindtap="goto" data-url="boutique">
{{gitTotal || '0'}}
<view>精品礼券/张</view>
</view>
</view>
</view>
<!-- 广汇车辆 -->
<block wx:if="{{carFlag}}">
<view class="car-box box GH">
<block wx:if="{{!carList.length}}">
<view class="add-car text-center">
添加爱车专属优惠
<view class="btn flex" bindtap="goto" data-url="GHVehicleInfo">
<view class="sprite-icon icon-mine-add"></view>
添加
</view>
</view>
</block>
<block wx:else>
<view class="car-info">
<view class="title">
我的爱车
<view class="edit" bindtap="goto" data-url="GHVehicleInfo" data-name="list">
管理
<view class="sprite-icon icon-mine-arrow"></view>
</view>
</view>
<view class="my-car">
<gh-car-card item="{{carList[0]}}" selectedCar="null"></gh-car-card>
</view>
</view>
</block>
</view>
</block>
<block wx:if="{{merchantDetail}}">
<view class="merchant-box box">
<view class="title">
<view class="name text-hide">{{merchantDetail.storeName}}</view>
</view>
<view class="address">{{merchantDetail.address}}</view>
<view class="serve-item">
<block wx:if="{{merchantDetail.appointmentPhone}}">
<view class="item flex" bindtap="phoneCall" data-phone="{{merchantDetail.appointmentPhone}}">
<view class="sprite-icon icon-mine-gh-phone"></view>
通话
</view>
</block>
<block wx:if="{{merchantDetail.merchantAddress}}">
<view class="item flex" bindtap="openLocation" data-item="{{merchantDetail}}">
<view class="sprite-icon icon-mine-gh-gps"></view>
导航
</view>
</block>
<block wx:if="{{consultant == null}}">
<view class="item-counselor flex" bindtap="openConsultant" data-item="{{merchantDetail}}">
<view class="icon">
<image webp src="{{IMGURL}}mine/serve.png?v={{img_version}}"></image>
</view>
选择服务顾问
</view>
</block>
</view>
<block wx:if="{{consultant != null}}">
<view class="counselor">
<view class="userInfo">
<view class="counselor-avatar">
<block wx:if="{{consultant.avatar}}">
<image webp src="{{consultant.avatar}}"></image>
</block>
<block wx:else>
<image webp src="{{IMGURL}}mine/default-avatar.png?v={{img_version}}"></image>
</block>
</view>
<view>{{consultant.consultantName}}</view>
</view>
<view class="userInfo">
<view class="user-phone" bindtap="phoneCall" data-phone="{{consultant.phone}}">
<view class="sprite-icon icon-mine-gh-phone"></view>
通话
</view>
<view class="more" bindtap="goCounselor">更多</view>
</view>
</view>
</block>
</view>
</block>
<view class="user-items box">
<block wx:for="{{utilList}}" wx:key="index">
<view class="item" bindtap="jump" data-item="{{item}}">
<view class="label">
<view class="sprite-icon icon-mine-{{item.icon || item.url}} icon"></view>
{{item.text}}
</view>
<view class="sprite-icon icon-mine-arrow"></view>
</view>
</block>
</view>
</view>
<login show="{{showLogin}}"></login>
<authorize scopeType="userInfo" title="是否授权用户昵称&头像" confirmText="授权" cancelText="拒绝" show="{{showAuth}}" bindsuccess="authSuccess"></authorize>
\ No newline at end of file \ No newline at end of file
<van-popup bind:click-overlay="toCloseModal" show="{{ showModal }}" custom-class="popclass" position="bottom" custom-style="height: 35%" >
<view class="modal_title">提示</view>
<view class="modal_tip">您未绑定微信,请先完成绑定</view>
<button class="modal_btn">去绑定</button>
</van-popup>
\ No newline at end of file \ No newline at end of file
/* pages/webView/webView.wxss */
\ No newline at end of file \ No newline at end of file
{ {
"setting": { "setting": {
"compileHotReLoad": true, "compileHotReLoad": false,
"urlCheck": false, "urlCheck": false,
"lazyloadPlaceholderEnable": true "lazyloadPlaceholderEnable": true
}, },
...@@ -8,57 +8,15 @@ ...@@ -8,57 +8,15 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "加油", "name": "个人中心",
"pathName": "packageEquity/pages/oil/oil", "pathName": "pages/tab/mine/mine",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "车牌键盘", "name": "编辑",
"pathName": "packageEquity/pages/keyboard/keyboard", "pathName": "packageMine/pages/editBasicInfo/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/tab/index/index",
"query": "merchantId=44205858",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packageMine/pages/coupon/recommend/recommend",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/serviceCode/serviceCode",
"query": "id=100&sendDate=1656496796863139&merchantId=123",
"launchMode": "default",
"scene": 1194
},
{
"name": "",
"pathName": "pages/serviceCode/serviceCode",
"query": "id=100&sendDate=1656496796863139",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/tab/discovery/discovery",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
...@@ -131,5 +89,5 @@ ...@@ -131,5 +89,5 @@
}, },
"projectname": "store-assistant", "projectname": "store-assistant",
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"libVersion": "2.24.4" "libVersion": "2.26.1"
} }
\ No newline at end of file \ No newline at end of file
...@@ -35,7 +35,7 @@ export const generateRoutList = routerList => { ...@@ -35,7 +35,7 @@ export const generateRoutList = routerList => {
} }
if (item.parent !== 'pages') { if (item.parent !== 'pages') {
let parentList = item.url.split(`/`) let parentList = item.url.split(`/`)
if (parentList.length > 5) { if (parentList.length > 4) {
item.url = item.url.replace(/\/__plugin__\/[a-z0-9A-Z]+/, '') item.url = item.url.replace(/\/__plugin__\/[a-z0-9A-Z]+/, '')
obj.subPages = item.url.split(`/${item.parent}/pages/`)[1].split('/')[0] obj.subPages = item.url.split(`/${item.parent}/pages/`)[1].split('/')[0]
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!