Commit 1a442095 by wangjian

Merge branch 'dev' of https://gitlab.jntmedia.cn/wangjian/FuLiMini into dev

* 'dev' of https://gitlab.jntmedia.cn/wangjian/FuLiMini: 退出账号 设置 积分详情 代码修改 合并代码 首页修改 商品列表 商品列表 商品列表 # Conflicts: # pages.json # pages/mine/mine.vue # router/router.js # unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/home/home.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/mine.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pagesA/integral/integral.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pagesA/login/login.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pagesA/selectAccount/selectAccount.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js.map # unpackage/dist/dev/mp-weixin/app.json # unpackage/dist/dev/mp-weixin/common/vendor.js # unpackage/dist/dev/mp-weixin/pages/home/home.js # unpackage/dist/dev/mp-weixin/pages/mine/mine.js # unpackage/dist/dev/mp-weixin/pages/mine/mine.wxml # unpackage/dist/dev/mp-weixin/pagesA/integral/integral.js # unpackage/dist/dev/mp-weixin/project.config.json # unpackage/dist/dev/mp-weixin/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js
parents 79e4eec5 7d9d45fe
.hbuilderx
unpackage
node_modules
package-lock.json
\ No newline at end of file
package-lock.json
/unpackage/
unpackage/
\ No newline at end of file
......@@ -40,75 +40,110 @@
"enablePullDownRefresh": false
}
},{
"path" : "integral/integral",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "selectAccount/selectAccount",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "goods/goods",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "submitOrder/submitOrder",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
]
"path" : "integral/integral",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "selectAccount/selectAccount",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "goods/goods",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "submitOrder/submitOrder",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "GoodSkuList/GoodSkuList",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "integralDetail/integralDetail",
"style": {
"navigationBarTitleText": "积分明细",
"enablePullDownRefresh": false
}
}, {
"path": "setting/setting",
"style": {
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false
}
}, {
"path": "VertifyPhone/VertifyPhone",
"style": {
"navigationBarTitleText": "验证手机号",
"enablePullDownRefresh": false
}
}, {
"path": "SetPwd/SetPwd",
"style": {
"navigationBarTitleText": "设置支付密码",
"enablePullDownRefresh": false
}
}
]
}],
"preloadRule":{
"pagesA/login/login": {
"network": "all",
"packages": ["__APP__"]
}
}
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#686868",
"selectedColor": "#FF0520",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/home/home",
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home_h.png",
"text": "首页"
}, {
"pagePath": "pages/order/order",
"iconPath": "static/tabbar/order.png",
"selectedIconPath": "static/tabbar/order_h.png",
"text": "订单"
}, {
"pagePath": "pages/mine/mine",
"iconPath": "static/tabbar/mine.png",
"selectedIconPath": "static/tabbar/mine_h.png",
"text": "我的"
}]
},
"tabBar": {
"color": "#686868",
"selectedColor": "#FF0520",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/home/home",
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home_h.png",
"text": "首页"
}, {
"pagePath": "pages/order/order",
"iconPath": "static/tabbar/order.png",
"selectedIconPath": "static/tabbar/order_h.png",
"text": "订单"
}, {
"pagePath": "pages/mine/mine",
"iconPath": "static/tabbar/mine.png",
"selectedIconPath": "static/tabbar/mine_h.png",
"text": "我的"
}]
}
}
<template>
<view class="layout">
<view class="title">懒人企业福利社</view>
<view class="header">
<view class="header-top">
<text v-if="isLogin" class="header-name">你好,{{ name }}</text>
<text v-else class="header-login" @click="goLogin()">请登录</text>
<view class="integral-detail">积分明细 ></view>
<view class="integral-detail" @click="goIntegralDetail">积分明细 ></view>
</view>
<view class="header-center">
<view class="header-integral">{{ integralCount }}</view>
......@@ -13,11 +12,13 @@
</view>
</view>
<view class="list">
<view class="item" v-for="(item, index) in brandList" :key="index">
<image class="icon"></image>
<view class="item-right">
<text class="item-title">叮咚买菜</text>
<text class="item-desc">最高70%返现</text>
<view class="item" v-for="(item, index) in brandList" :key="index" @click="goToGoodDetail(item.brandNo, item.name)">
<view class="item-layout">
<image class="icon" mode="aspectFill" :src="item.imgPath"></image>
<view class="item-right">
<text class="item-title">{{ item.name }}</text>
<text class="item-desc">{{ item.des }}</text>
</view>
</view>
</view>
</view>
......@@ -42,62 +43,76 @@ export default {
this.getData();
},
onShow() {
this.getUserInfo()
console.log('onShow');
this.getUserInfo();
},
methods: {
goLogin() {
this.$router.push('Login');
},
getUserInfo() {
if(this.$net.tokenGet().length > 0) {
this.isLogin = true
this.$net.get('/staff/detail', {})
.then(res => {
this.name = res.accountName
this.integralCount = res.allIntegral
})
.catch(err => {
console.log(err)
})
} else {
// 未登录
this.isLogin = false
}
this.isLogin = true;
this.$net
.get('/staff/detail', {})
.then(res => {
if (res.code === 200) {
this.name = res.data.staffName;
this.integralCount = res.data.allIntegral;
this.isLogin = true
this.$store.commit('refreshUserInfo', res.data)
} else {
this.isLogin = false
}
})
.catch(err => {
console.log(err);
this.isLogin = false
});
},
getData() {
this.$net
.get('/goods/brand', { page: this.page, pageSize: this.pageSize })
.then(res => {
if (res.list.length > 0) {
this.brandList.concat(res.list);
if (res.data.list.length > 0) {
this.brandList = this.brandList
.concat(res.data.list);
this.page += 1;
}
this.loadingType = res.list.length < this.pageSize ? 'more' : 'noMore';
this.loadingType = res.data.list.length < this.pageSize ? 'noMore' : 'more';
console.log(this.loadingType);
})
.catch(err => {
console.log(err);
});
},
goToGoodDetail(brandNo, brandName) {
if (!this.isLogin) {
this.goLogin();
return
}
this.$router.push('GoodSkuList', { brandNo: brandNo, brandName: brandName });
},
goIntegralDetail() {
if (!this.isLogin) {
this.goLogin();
return
}
this.$router.push('IntegralDetail')
}
}
};
</script>
<style lang="scss">
<style lang="scss" scoped>
.layout {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
.title {
background: #ffffff;
width: 100%;
color: #333333;
text-align: center;
height: 88rpx;
line-height: 88rpx;
}
.header {
height: 350rpx;
position: relative;
width: 100%;
position: sticky;
display: flex;
flex-direction: column;
background-image: url(../../static/home-header-bg.png);
......@@ -125,6 +140,7 @@ export default {
color: #ffffff;
line-height: 58rpx;
text-align: center;
background-size: 100% 100%;
}
}
.header-center {
......@@ -142,34 +158,60 @@ export default {
color: #ffffff;
}
}
.list {
display: flex;
flex-direction: row;
background: #ffeeee;
border-radius: 30rpx 30rpx 0rpx 0rpx;
padding-top: 25rpx;
.item {
width: 50%;
height: 144rpx;
}
.list {
display: flex;
flex-direction: row;
background: #ffeeee;
border-radius: 30rpx 30rpx 0rpx 0rpx;
padding-top: 25rpx;
margin-top: -50rpx;
z-index: 99;
padding: 15rpx 15rpx;
flex-wrap: wrap;
.item {
width: 50%;
height: 144rpx;
margin-top: 15rpx;
margin-bottom: 15rpx;
.item-layout {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
height: 144rpx;
margin: 0 15rpx;
background: #ffffff;
border-radius: 20rpx;
padding-left: 15rpx;
padding-right: 15rpx;
overflow: hidden;
.icon {
width: 90rpx;
height: 90rpx;
border-radius: 90rpx;
}
.item-right {
display: flex;
flex: 1;
flex-direction: column;
margin-left: 20rpx;
overflow: hidden;
.item-title {
font-size: 30rpx;
font-weight: bolder;
color: #333333;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.item-desc {
font-size: 24rpx;
color: #999999;
text-overflow: ellipsis;
white-space: nowrap;
margin-top: 15rpx;
overflow: hidden;
}
}
}
......
......@@ -55,7 +55,7 @@
</view>
<image class="right-arrow" src="../../static/arrow-right.png" mode=""></image>
</view>
<view class="item last-item" @click="clickItem(4)">
<view class="item last-item" @click="setting">
<view class="left">
<image class="left-img" src="../../static/setting.png" mode=""></image>
<view class="title">设置</view>
......@@ -103,7 +103,10 @@
});
},
clickItem(index) {
this.$router.push('GoodsDetail', {'spuNo':'50125','skuNo':'21'})
},
setting() {
this.$router.push('Setting')
}
}
}
......
<template>
<view class="layout">
<view class="list">
<view class="item" v-for="(item, index) in goodList" @click="goGoodDetail(item.spuNo, item.skuNo)" :key="index">
<image class="img" :src="item.spuImg"></image>
<view class="item-rigth">
<text class="item-title">{{ item.name }}{{ item.skuName }}</text>
<view><text class="item-brand">{{ item.name }}</text></view>
<text class="item-integral">{{ item.sellingPrice }}积分</text>
</view>
</view>
<uni-load-more v-if="brandList.length > 0" :status="loadingType"></uni-load-more>
</view>
</view>
</template>
<script>
export default {
data() {
return {
page: 1,
pageSize: 20,
loadingType: 'more',
goodList: [],
brandNo: ''
};
},
onLoad(option) {
this.brandNo = option.brandNo;
this.getData();
uni.setNavigationBarTitle({
title: option.brandName
})
},
methods: {
getData() {
this.$net
.get('/goods/sku', { page: this.page, pageSize: this.pageSize, brandNo: this.brandNo })
.then(res => {
if (res.data.list.length > 0) {
this.goodList = this.goodList
.concat(res.data.list);
this.page += 1;
}
this.loadingType = res.data.list.length < this.pageSize ? 'noMore' : 'more';
})
.catch(err => {
console.log(err);
});
},
goGoodDetail(spuNo, skuNo) {
this.$router.push('GoodsDetail', {'spuNo':spuNo,'skuNo':skuNo})
}
}
};
</script>
<style lang="scss" scoped>
.layout {
width: 100%;
height: 100%;
background: #f5f5f5;
.list {
display: flex;
flex-direction: column;
padding: 6rpx 12rpx;
.item {
display: flex;
flex-direction: row;
background: #ffffff;
padding: 20rpx 20rpx;
border-radius: 16rpx;
margin: 12rpx 0;
.img {
width: 200rpx;
height: 200rpx;
border-radius: 8rpx;
}
.item-rigth {
display: flex;
flex-direction: column;
justify-content: space-between;
margin-left: 24rpx;
.item-title {
font-size: 28rpx;
color: #333333;
height: 58rpx;
line-height: 28rpx;
overflow: hidden;
min-inline-size: 2;
line-clamp: 2;
text-overflow: ellipsis;
max-lines: 2;
}
.item-brand {
background: rgba(255, 5, 32, 0.03);
border-radius: 4rpx;
border: 1rpx solid #ff0520;
font-size: 22rpx;
color: #ff0520;
margin-top: 12rpx;
line-height: 22rpx;
margin-top: 8rpx;
padding: 0 8rpx;
width: auto;
}
.item-integral {
font-size: 32rpx;
font-weight: bolder;
color: #ff0520;
line-height: 33rpx;
margin-top: 36rpx;
}
}
}
}
}
</style>
<template>
<view class="layout">
<view class="title">支付密码</view>
<input class="input" placeholder="请输入6位数字支付密码" type="number" v-model="pwd" maxlength="6"/>
<view class="title">再次输入</view>
<input class="input" placeholder="再次输入上方相同的支付密码" type="number" v-model="pwdSecond" maxlength="6" />
<view :class="pwd.length == 6 && pwdSecond.length == 6 ? 'submit1' : 'submit'" @click="submit">提交</view>
</view>
</template>
<script>
export default {
data() {
return {
pwd: '',
pwdSecond: '',
randomCode: ''
}
},
onLoad(option) {
this.randomCode = option.randomCode ? option.randomCode : ''
},
methods: {
submit() {
if (this.pwd !== this.pwdSecond) {
this.toast('请输入相同密码')
return
}
this.$net.post('/staff/password/setting', {from: 'my', pwd: this.pwd, randomCode: this.randomCode})
.then(res => {
if (res.code == 200) {
this.$router.pop()
} else {
this.toast(res.message)
}
})
.catch(err => {
this.toast(err)
})
}
}
}
</script>
<style lang="scss" scoped>
.layout {
width: 100%;
height: 100%;
position: absolute;
background: #ffffff;
.title {
font-size: 32rpx;
font-weight: bolder;
color: #333333;
line-height: 48rpx;
margin-top: 80rpx;
padding-left: 49rpx;
padding-right: 49rpx;
}
.input {
outline: none;
border-bottom: solid 2rpx #FF0520;
font-size: 32rpx;
margin-top: 49rpx;
margin-left: 49rpx;
margin-right: 49rpx;
padding-bottom: 29rpx;
}
.submit {
width: 590rpx;
height: 96rpx;
background: #FF0520;
opacity: 0.5;
border-radius: 48rpx;
font-size: 32rpx;
color: #FFFFFF;
line-height: 96rpx;
text-align: center;
margin: 120rpx auto;
}
.submit1 {
width: 590rpx;
height: 96rpx;
background: #FF0520;
border-radius: 48rpx;
font-size: 32rpx;
color: #FFFFFF;
line-height: 96rpx;
text-align: center;
margin: 120rpx auto;
}
}
</style>
<template>
<view class="layout">
<view class="first-line">请完成以下认证</view>
<view class="sencond-line">请输入{{ phone }}收到的短信验证码</view>
<view class="code-layout">
<input class="input" placeholder="请输入短信验证码" v-model="code" type="number" maxlength="8" />
<text class="vertify-code" @click="getCode()">{{ verifyCode }}</text>
</view>
<view :class="code.length > 0 ? 'submit1' : 'submit'" @click="submit">下一步</view>
</view>
</template>
<script>
export default {
data() {
return {
phone: this.$store.state.userInfo.mobile.substring(0, 3) + '****' + this.$store.state.userInfo.mobile.substring(7, 11),
verifyCode: '获取验证码',
verifyTime: 300,
code: ''
};
},
onLoad() {
console.log(this.$store.state.userInfo.mobile);
},
methods: {
getCode() {
if (this.verifyTime !== 300) {
return;
}
this.$net
.post('/meta/sms', { codeType: 20, mobile: this.$store.state.userInfo.mobile })
.then(res => {
if (res.code == 200) {
this.toast('验证码发送成功');
this.startTime();
} else {
this.toast(res.messaage);
}
})
.catch(err => {
this.toast(err);
console.log(err);
});
},
// 开始倒计时
startTime() {
if (this.verifyTime !== 300) {
return;
}
this.verifyCode = this.verifyTime + 's';
const timer = setInterval(() => {
this.verifyTime--;
if (this.verifyTime > 0) {
this.verifyCode = this.verifyTime + 's';
} else {
this.verifyCode = '重新发送';
this.verifyTime = 300;
clearInterval(timer);
}
}, 1000);
},
submit() {
this.$net.post('/staff/password/change', {code: this.code})
.then(res => {
console.log(res)
if (res.code == 200) {
this.$router.replaceTo('SetPwd', {randomCode: res.data.randomCode})
}
})
.catch(err => {
})
}
}
};
</script>
<style lang="scss" scoped>
.layout {
width: 100%;
height: 100%;
background: #ffffff;
.first-line {
font-size: 36rpx;
font-weight: bolder;
color: #333333;
line-height: 48rpx;
margin: 80rpx 49rpx 0 49rpx;
}
.sencond-line {
font-size: 26rpx;
color: #333333;
line-height: 48rpx;
margin: 29rpx 49rpx 0 49rpx;
}
.code-layout {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin: 29rpx 49rpx 0 49rpx;
border-bottom: solid 2rpx #ff0520;
padding-bottom: 30rpx;
.input {
outline: none;
font-size: 32rpx;
font-weight: bolder;
flex: 1;
}
.vertify-code {
font-size: 32rpx;
color: #ff0520;
line-height: 48rpx;
}
}
.submit {
width: 590rpx;
height: 96rpx;
background: #ff0520;
opacity: 0.5;
border-radius: 48rpx;
font-size: 32rpx;
color: #ffffff;
line-height: 96rpx;
text-align: center;
margin: 120rpx auto;
}
.submit1 {
width: 590rpx;
height: 96rpx;
background: #ff0520;
border-radius: 48rpx;
font-size: 32rpx;
color: #ffffff;
line-height: 96rpx;
text-align: center;
margin: 120rpx auto;
}
}
</style>
......@@ -72,6 +72,7 @@
</template>
<script>
// import goodsSelect from '../../components/goodsSelect/goodsSelect'
export default {
data() {
return {
......@@ -90,6 +91,7 @@
isLogin: this.$store.state.isLogin,
};
},
// components: { goodsSelect },
onLoad(options) {
console.log(options);
this.scrollViewHeight = this.LRScreenHeight - this.CustomBarHeight - this.StatusBarHeight - uni.upx2px(120) - uni.upx2px(64);
......@@ -106,8 +108,6 @@
uni.setNavigationBarTitle({
title:this.goods.skuDetail.name
})
this.form.defaultSelect.sku = res.data.specsName || '1111'
this.form.defaultSelect.num = 1
} else {
this.toast(res.message)
}
......
<template>
<view class="layout">
<view class="header">
<view @click="showTimeSelect" class="header-left">
<text class="header-time">{{ applyDate }}</text>
<image class="time-bottom-row" src="../../static/icon-bottom-row.png"></image>
</view>
<view class="header-right">
<text :class="currentTab == 0 ? 'tab-select' : 'tab-unselect'" @click="selectTab(0)">综合</text>
<text :class="currentTab == 200 ? 'tab-select' : 'tab-unselect'" @click="selectTab(200)">支出¥{{ allConsume }}</text>
<text :class="currentTab == 100 ? 'tab-select' : 'tab-unselect'" @click="selectTab(100)">收入¥{{ allIncome }}</text>
</view>
</view>
<view v-if="integralList.length > 0" class="list">
<view class="item" v-for="(item, index) in integralList" :key="index">
<image class="icon" :src="item.img"></image>
<view class="item-right">
<view class="item-right-top">
<view class="item-title">
<text class="item-type">{{ item.tag }}</text>
<text class="item-name">{{ item.title }}</text>
<text class="item-count">{{ item.number <= 0 ? '' : '*' + item.number }}</text>
</view>
<text :class="item.integral > 0 ? 'item-integral' : 'item-integral-income'">{{ item.integral }}</text>
</view>
<view class="item-right-bottom">
<text class="item-time">{{ item.transactionTime }}</text>
<text class="item-integral-rest">积分余额: {{ item.surplusIntegral }}</text>
</view>
<view class="line"></view>
</view>
</view>
<uni-load-more v-if="integralList.length > 0" :status="loadingType"></uni-load-more>
</view>
<view v-else-if="!isLoading && integralList.length <= 0" class="empty">
<image class="empty-icon" src="../../static/integral-empty-icon.png"></image>
<text class="empty-desc">本月暂时没有支出积分哦</text>
</view>
<uni-popup class="pop" ref="timeShow" type="bottom" background-color="#fff" safeArea="true">
<text class="selectTime" @click="selectTime()">确定</text>
<picker-view :indicator-style="indicatorStyle" :value="value" @change="bindChange" class="picker-view">
<picker-view-column>
<view class="item" v-for="(item, index) in years" :key="index">{{ item }}</view>
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item, index) in months" :key="index">{{ item }}</view>
</picker-view-column>
</picker-view>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
const date = new Date();
const years = [];
const year = date.getFullYear();
const months = [];
const month = date.getMonth() + 1;
const days = [];
const day = date.getDate();
for (let i = year - 4; i <= date.getFullYear(); i++) {
years.push(i);
}
for (let i = 1; i <= date.getMonth() + 1; i++) {
months.push(i);
}
return {
integralList: [],
// 明细类型(0:综合;100:收入;200:支出)
currentTab: 0,
applyDate: '',
page: 1,
pageSize: 20,
loadingType: 'more',
isLoading: true,
allConsume: '',
allIncome: '',
title: 'picker-view',
years,
year,
months,
month,
days,
date: new Date(),
value: [9999, month - 1],
indicatorStyle: `height: 50rpx;`,
tmpYear: '',
tmpMonth: ''
};
},
created() {
this.getData(false);
},
methods: {
getData(isRefresh) {
this.isLoading = true;
if (isRefresh) {
this.page = 1;
this.loadingType = 'more';
this.integralList = [];
}
this.$net
.post('/integral/index', { page: this.page, pageSize: this.pageSize, applyDate: this.applyDate, type: this.currentTab })
.then(res => {
if (res.data.list.length > 0) {
this.integralList = this.integralList.concat(res.data.list);
this.applyDate = res.data.applyDate;
this.allConsume = res.data.allConsume;
this.allIncome = res.data.allIncome;
this.page += 1;
}
this.loadingType = res.data.list.length < this.pageSize ? 'noMore' : 'more';
this.isLoading = false;
})
.catch(err => {
this.isLoading = false;
});
},
selectTab(type) {
this.currentTab = type;
this.getData(true);
},
showTimeSelect() {
this.$refs.timeShow.open()
},
selectTime() {
this.year = this.tmpYear
this.month = this.tmpMonth
this.applyDate = this.year + "-" + this.month
this.$refs.timeShow.close()
this.getData(true)
},
bindChange(e) {
console.log(e);
const val = e.detail.value
this.tmpYear = this.years[val[0]]
if(this.tmpYear == this.date.getFullYear()) {
this.months = []
for (let i = 1; i <= this.date.getMonth() + 1; i++) {
this.months.push(i);
}
} else {
this.months = []
for (let i = 1; i <= 12; i++) {
this.months.push(i);
}
}
if(this.months[val[1]] > this.date.getMonth() + 1) {
this.tmpMonth = this.date.getMonth() + 1
this.month = this.date.getMonth() + 1
} else {
this.tmpMonth = this.months[val[1]]
}
}
}
};
</script>
<style lang="scss" scoped>
.layout {
width: 100%;
height: 100%;
position: relative;
background: #f5f5f5;
.header {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
position: sticky;
height: 100rpx;
padding-left: 30rpx;
padding-right: 30rpx;
.header-left {
display: flex;
flex-direction: row;
align-items: center;
.header-time {
font-size: 30rpx;
font-weight: bolder;
color: #333333;
}
.time-bottom-row {
width: 20rpx;
height: 14rpx;
margin-left: 15rpx;
}
}
.header-right {
display: flex;
flex-direction: row;
.tab-select {
font-size: 24rpx;
font-weight: bolder;
color: #333333;
margin-left: 24rpx;
}
.tab-unselect {
font-size: 24rpx;
color: #999999;
margin-left: 24rpx;
}
}
}
.list {
display: flex;
flex-direction: column;
height: 100%;
background: #ffffff;
.item {
display: flex;
flex-direction: row;
margin-top: 34rpx;
.icon {
width: 90rpx;
height: 90rpx;
background: #ffffff;
border: 2px solid #efefef;
border-radius: 50%;
margin-left: 30rpx;
}
.item-right {
display: flex;
flex-direction: column;
margin-left: 30rpx;
flex: 1;
.item-right-top {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-right: 30rpx;
.item-title {
display: flex;
flex-direction: row;
.item-type {
font-size: 30rpx;
color: #333333;
}
.item-name {
max-width: 250rpx;
font-size: 30rpx;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-count {
font-size: 30rpx;
color: #333333;
}
}
.item-integral {
font-size: 30rpx;
font-weight: bolder;
color: #333333;
}
.item-integral-income {
font-size: 30rpx;
font-weight: bolder;
color: #ff0520;
}
}
.item-right-bottom {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-right: 30rpx;
align-items: center;
margin-top: 24rpx;
.item-time {
font-size: 26rpx;
color: #999999;
}
.item-integral-rest {
font-size: 26rpx;
color: #999999;
}
}
.line {
height: 2rpx;
background: #f5f5f5;
width: 100%;
margin-top: 34rpx;
}
}
}
}
.empty {
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
background: #ffffff;
.empty-icon {
width: 364rpx;
height: 300rpx;
margin-top: 180rpx;
}
.empty-desc {
font-size: 28rpx;
color: #999999;
line-height: 28rpx;
margin-top: 49rpx;
}
}
.pop {
.selectTime {
text-align: right;
color: #FF0520;
font-size: 24rpx;
position: absolute;
right: 0;
top: 0;
height: 48rpx;
line-height: 48rpx;
margin-right: 30rpx;
z-index: 999;
}
.picker-view {
// width: 750rpx;
height: 500rpx;
margin-top: 20rpx;
}
.item {
height: 50rpx;
align-items: center;
justify-content: center;
text-align: center;
line-height: 50rpx;
}
}
}
</style>
<template>
<view class="layout">
<view class="item" @click="changePwd">
<text class="item-title">设置支付密码</text>
<view>
<text v-if="hasPwd" class="already-set">已设置</text>
<image class="item-right-row" src="../../static/arrow-right.png"></image>
</view>
</view>
<view class="item" @click="changeAccount">
<text class="item-title">切换账号</text>
<image class="item-right-row" src="../../static/arrow-right.png"></image>
</view>
<view class="item1">
<text class="item-quit" @click="quit">退出账号</text>
</view>
<uni-popup class="pop" ref="popup" type="center">
<view class="dialog">
<view class="title">是否退出登陆?</view>
<view class="button-layout">
<text class="cancel" @click="cancel">取消</text>
<text class="sure" @click="sure">确认</text>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
return {
hasPwd: this.$store.state.userInfo.settingCheckCode === 1
}
},
methods: {
changePwd() {
if (this.hasPwd) {
this.$router.push('VertifyPhone')
return
}
this.$router.push('SetPwd')
},
changeAccount() {
if (this.$store.state.userInfo.allowSwitching == 0) {
this.toast('暂无可切换账号')
} else {
this.$router.push('SelectAccount')
}
// this.$router.push('SelectAccount')
},
quit() {
this.$refs.popup.open()
},
cancel() {
this.$refs.popup.close()
},
sure() {
this.$store.commit("refreshUserInfo", {})
this.$net.tokenSave('')
this.$router.pop()
}
}
}
</script>
<style lang="scss" scoped>
.layout {
width: 100%;
height: 100%;
background: #f5f5f5;
padding-top: 20rpx;
position: absolute;
.item {
background: #ffffff;
height: 107rpx;
margin-top: 2rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 0 30rpx;
.item-title {
font-size: 30rpx;
color: #333333;
line-height: 85rpx;
}
.already-set {
font-size: 30rpx;
color: #333333;
line-height: 85px;
margin-right: 30rpx;
}
.item-right-row {
width: 12rpx;
height: 20rpx;
}
}
.item1 {
background: #ffffff;
height: 107rpx;
margin-top: 99rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
.item-quit {
font-size: 30rpx;
color: #333333;
line-height: 107rpx;
text-align: center;
width: 100%;
}
}
.pop {
.dialog {
width: 640rpx;
// height: 309rpx;
background: #FFFFFF;
border-radius: 16rpx;
padding-top: 80rpx;
padding-bottom: 40rpx;
.title {
font-size: 32rpx;
color: #333333;
line-height: 48rpx;
text-align: center;
margin:0 auto;
}
.button-layout {
margin: 80rpx 40rpx 0 40rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
.cancel {
width: 260rpx;
height: 80rpx;
background: #EFEFEF;
border-radius: 40rpx;
font-size: 32rpx;
color: #666666;
line-height: 80rpx;
text-align: center;
}
.sure {
width: 260rpx;
height: 80rpx;
background: #FF0520;
border-radius: 40rpx;
font-size: 32rpx;
color: #FFFFFF;
line-height: 80rpx;
text-align: center;
}
}
}
}
}
</style>
......@@ -7,7 +7,12 @@ const routers = {
'Mine': '/pages/mine/mine',
'SelectAccount': '/pagesA/selectAccount/selectAccount',
'GoodsDetail': '/pagesA/goods/goods',
'SubmitOrder': '/pagesA/submitOrder/submitOrder'
'SubmitOrder': '/pagesA/submitOrder/submitOrder',
'GoodSkuList': '/pagesA/GoodSkuList/GoodSkuList',
'IntegralDetail': '/pagesA/integralDetail/integralDetail',
'Setting': '/pagesA/setting/setting',
'VertifyPhone': '/pagesA/VertifyPhone/VertifyPhone',
'SetPwd': '/pagesA/SetPwd/SetPwd'
}
export function push(routerName, params, events) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -12,7 +12,12 @@
"integral/integral",
"selectAccount/selectAccount",
"goods/goods",
"submitOrder/submitOrder"
"submitOrder/submitOrder",
"GoodSkuList/GoodSkuList",
"integralDetail/integralDetail",
"setting/setting",
"VertifyPhone/VertifyPhone",
"SetPwd/SetPwd"
]
}
],
......
......@@ -235,7 +235,10 @@ var _default =
},
clickItem: function clickItem(index) {
this.$router.push('GoodsDetail', { 'spuNo': '50125', 'skuNo': '21' });
},
setting: function setting() {
this.$router.push('Setting');
} } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
......
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"backgroundColor": "#F5F5F5",
"usingComponents": {}
}
\ No newline at end of file
<view class="container data-v-dcbcfe34"><view class="mine-header data-v-dcbcfe34"><view class="header-top data-v-dcbcfe34"><view class="nav-bar data-v-dcbcfe34" style="{{'height:'+(height+'px')+';'+('padding-top:'+(statusBarHeight+'px')+';')}}"><text class="person-center data-v-dcbcfe34">我的</text></view><view class="user-info data-v-dcbcfe34"><view class="top data-v-dcbcfe34"><image class="avator data-v-dcbcfe34" src="{{userInfo.avatar}}" mode data-event-opts="{{[['tap',[['getImg']]]]}}" bindtap="__e"></image><view class="info data-v-dcbcfe34"><view class="name data-v-dcbcfe34">{{userInfo.staffName}}</view><view class="shop data-v-dcbcfe34">{{userInfo.accountName}}</view></view><block wx:if="{{userInfo.allowSwitching>0}}"><view class="select-acccount data-v-dcbcfe34">切换行号<image class="img data-v-dcbcfe34" src="../../static/arrow-right-w.png" mode></image></view></block></view><view class="line data-v-dcbcfe34"></view><view class="user-integral data-v-dcbcfe34"><view class="item data-v-dcbcfe34"><view class="num data-v-dcbcfe34">{{userInfo.allIntegral}}</view><view class="bottom data-v-dcbcfe34">累计积分</view></view><view class="item data-v-dcbcfe34"><view class="num data-v-dcbcfe34">{{userInfo.surplusIntegral}}</view><view class="bottom data-v-dcbcfe34">当前积分</view></view><view class="item data-v-dcbcfe34"><view class="num data-v-dcbcfe34">{{userInfo.consumeIntegral}}</view><view class="bottom data-v-dcbcfe34">消费积分</view></view></view></view></view><view class="bottom-setting data-v-dcbcfe34"><view data-event-opts="{{[['tap',[['clickItem',[1]]]]]}}" class="item data-v-dcbcfe34" bindtap="__e"><view class="left data-v-dcbcfe34"><image class="left-img data-v-dcbcfe34" src="../../static/coupon.png" mode></image><view class="title data-v-dcbcfe34">卡片回收</view></view><image class="right-arrow data-v-dcbcfe34" src="../../static/arrow-right.png" mode></image></view><view data-event-opts="{{[['tap',[['clickItem',[2]]]]]}}" class="item data-v-dcbcfe34" bindtap="__e"><view class="left data-v-dcbcfe34"><image class="left-img data-v-dcbcfe34" src="../../static/integral.png" mode></image><view class="title data-v-dcbcfe34">积分明细</view></view><image class="right-arrow data-v-dcbcfe34" src="../../static/arrow-right.png" mode></image></view><view data-event-opts="{{[['tap',[['clickItem',[3]]]]]}}" class="item data-v-dcbcfe34" bindtap="__e"><view class="left data-v-dcbcfe34"><image class="left-img data-v-dcbcfe34" src="../../static/customer.png" mode></image><view class="title data-v-dcbcfe34">联系客服</view></view><image class="right-arrow data-v-dcbcfe34" src="../../static/arrow-right.png" mode></image></view><view data-event-opts="{{[['tap',[['clickItem',[4]]]]]}}" class="item last-item data-v-dcbcfe34" bindtap="__e"><view class="left data-v-dcbcfe34"><image class="left-img data-v-dcbcfe34" src="../../static/setting.png" mode></image><view class="title data-v-dcbcfe34">设置</view></view><image class="right-arrow data-v-dcbcfe34" src="../../static/arrow-right.png" mode></image></view></view></view></view>
\ No newline at end of file
<view class="container data-v-dcbcfe34"><view class="mine-header data-v-dcbcfe34"><view class="header-top data-v-dcbcfe34"><view class="nav-bar data-v-dcbcfe34" style="{{'height:'+(height+'px')+';'+('padding-top:'+(statusBarHeight+'px')+';')}}"><text class="person-center data-v-dcbcfe34">我的</text></view><view class="user-info data-v-dcbcfe34"><view class="top data-v-dcbcfe34"><image class="avator data-v-dcbcfe34" src="{{userInfo.avatar}}" mode data-event-opts="{{[['tap',[['getImg']]]]}}" bindtap="__e"></image><view class="info data-v-dcbcfe34"><view class="name data-v-dcbcfe34">{{userInfo.staffName}}</view><view class="shop data-v-dcbcfe34">{{userInfo.accountName}}</view></view><block wx:if="{{userInfo.allowSwitching>0}}"><view class="select-acccount data-v-dcbcfe34">切换行号<image class="img data-v-dcbcfe34" src="../../static/arrow-right-w.png" mode></image></view></block></view><view class="line data-v-dcbcfe34"></view><view class="user-integral data-v-dcbcfe34"><view class="item data-v-dcbcfe34"><view class="num data-v-dcbcfe34">{{userInfo.allIntegral}}</view><view class="bottom data-v-dcbcfe34">累计积分</view></view><view class="item data-v-dcbcfe34"><view class="num data-v-dcbcfe34">{{userInfo.surplusIntegral}}</view><view class="bottom data-v-dcbcfe34">当前积分</view></view><view class="item data-v-dcbcfe34"><view class="num data-v-dcbcfe34">{{userInfo.consumeIntegral}}</view><view class="bottom data-v-dcbcfe34">消费积分</view></view></view></view></view><view class="bottom-setting data-v-dcbcfe34"><view data-event-opts="{{[['tap',[['clickItem',[1]]]]]}}" class="item data-v-dcbcfe34" bindtap="__e"><view class="left data-v-dcbcfe34"><image class="left-img data-v-dcbcfe34" src="../../static/coupon.png" mode></image><view class="title data-v-dcbcfe34">卡片回收</view></view><image class="right-arrow data-v-dcbcfe34" src="../../static/arrow-right.png" mode></image></view><view data-event-opts="{{[['tap',[['clickItem',[2]]]]]}}" class="item data-v-dcbcfe34" bindtap="__e"><view class="left data-v-dcbcfe34"><image class="left-img data-v-dcbcfe34" src="../../static/integral.png" mode></image><view class="title data-v-dcbcfe34">积分明细</view></view><image class="right-arrow data-v-dcbcfe34" src="../../static/arrow-right.png" mode></image></view><view data-event-opts="{{[['tap',[['clickItem',[3]]]]]}}" class="item data-v-dcbcfe34" bindtap="__e"><view class="left data-v-dcbcfe34"><image class="left-img data-v-dcbcfe34" src="../../static/customer.png" mode></image><view class="title data-v-dcbcfe34">联系客服</view></view><image class="right-arrow data-v-dcbcfe34" src="../../static/arrow-right.png" mode></image></view><view data-event-opts="{{[['tap',[['setting',['$event']]]]]}}" class="item last-item data-v-dcbcfe34" bindtap="__e"><view class="left data-v-dcbcfe34"><image class="left-img data-v-dcbcfe34" src="../../static/setting.png" mode></image><view class="title data-v-dcbcfe34">设置</view></view><image class="right-arrow data-v-dcbcfe34" src="../../static/arrow-right.png" mode></image></view></view></view></view>
\ No newline at end of file
......@@ -96,7 +96,7 @@ var components
try {
components = {
uniLoadMore: function() {
return Promise.all(/*! import() | uni_modules/uni-load-more/components/uni-load-more/uni-load-more */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uni-load-more/components/uni-load-more/uni-load-more")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue */ 81))
return Promise.all(/*! import() | uni_modules/uni-load-more/components/uni-load-more/uni-load-more */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uni-load-more/components/uni-load-more/uni-load-more")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue */ 121))
}
}
} catch (e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment