123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
- <template>
- <view>
- <view style="background-color:#E75F37;height: 250rpx;">
- <view style="padding: 33rpx;display: flex;align-items: center;">
- <view class="">
- <image src="/static/images/tabBar/head.png" style="width:100rpx;height: 100rpx;" mode="scaleToFill">
- </image>
- </view>
- <view style="color:#fff;margin-left: 13rpx;font-size: 30rpx;font-weight: 500;">
- {{name?name:''}}
- </view>
- </view>
- </view>
- <view class="card" style="height: 114rpx;">
- <view style="display: flex;justify-content: space-around;align-items: center;height: 114rpx;">
- <!-- <text style="color:#818181;font-size: 24rpx;">
- 产生积分:
- <text style="color:#FE8301;font-size: 26rpx;">
- {{form.addPoints?form.addPoints:'0.00'}}
- </text>
- </text>
- <text style="color:#818181;font-size: 24rpx;">
- 使用积分:
- <text style="color:#FE8301;font-size: 26rpx;">
- {{form.subPoints?form.subPoints:'0.00'}}
- </text>
- </text>-->
- <text style="color:#818181;font-size: 24rpx;">
- 积分余额:
- <text style="color:#FE8301;font-size: 26rpx;">
- {{form.pointsBalance?form.pointsBalance:'0.00'}}
- </text>
- </text>
- <text style="color:#818181;font-size: 24rpx;">
- 现金余额:
- <text style="color:#FE8301;font-size: 26rpx;">
- {{form.recoveredBalance?form.recoveredBalance:'0.00'}}
- </text>
- </text>
- </view>
- </view>
- <view class="card" style="margin-top: 20rpx;height: 141rpx;">
- <view style="display: flex;justify-content: space-around;align-items: center;height: 141rpx;">
- <view style="display: flex;flex-direction:column;align-items: center;" @click="clickIntegralOrder">
- <image src="/static/images/tabBar/280-1.png" style="width:40rpx;height: 40rpx;" mode="scaleToFill">
- </image>
- <view style="color: #414141;font-size: 26rpx;margin-top: 13rpx;">积分订单
- <uni-icons type="right" size="13" color='#8A8A8A'></uni-icons>
- </view>
- </view>
- <view style="display: flex;flex-direction:column;align-items: center;" @click="inIntegralMall">
- <image src="/static/images/tabBar/280-2.png" style="width:40rpx;height: 40rpx;" mode="scaleToFill">
- </image>
- <view style="color: #414141;font-size: 26rpx;margin-top: 13rpx;" >积分商城
- <uni-icons type="right" size="13" color='#8A8A8A'></uni-icons>
- </view>
- </view>
- <view style="display: flex;flex-direction:column;align-items: center;" @click="RedemptionOfPoints">
- <image src="/static/images/tabBar/280-3.png" style="width:40rpx;height: 40rpx;" mode="scaleToFill">
- </image>
- <view style="color: #414141;font-size: 26rpx;margin-top: 13rpx;">我的积分
- <uni-icons type="right" size="13" color='#8A8A8A'></uni-icons>
- </view>
- </view>
- </view>
- </view>
- <view class="card" style="margin-top: 20rpx;height: 238rpx;padding: 20rpx 0;">
- <u-cell-group :border="false">
- <u-cell title="我的订单" value="查看全部订单" :border="false" :clickable="false" @click="pageJump('')">
- <view slot="right-icon">
- <uni-icons type="right" size="18" color='#D2D2D2'></uni-icons>
- </view>
- </u-cell>
- </u-cell-group>
- <view style="display: flex;justify-content: space-around;">
- <view style="display: flex;flex-direction:column;align-items: center;" @click="obligationBtn('待付款')">
- <image src="/static/images/tabBar/280@2x(1).png" style="width:81rpx;height: 81rpx;"
- mode="scaleToFill">
- </image>
- <view style="color: #414141;font-size: 26rpx;margin-top: 13rpx;">待付款</view>
- </view>
- <view style="display: flex;flex-direction:column;align-items: center;" @click="pageJump('待发货')">
- <image src="/static/images/tabBar/280@2x(2).png" style="width:81rpx;height: 81rpx;"
- mode="scaleToFill">
- </image>
- <view style="color: #414141;font-size: 26rpx;margin-top: 13rpx;">待发货</view>
- </view>
- <view style="display: flex;flex-direction:column;align-items: center;" @click="pageJump('待收货')">
- <image src="/static/images/tabBar/280@2x(3).png" style="width:81rpx;height: 81rpx;"
- mode="scaleToFill">
- </image>
- <view style="color: #414141;font-size: 26rpx;margin-top: 13rpx;">待收货</view>
- </view>
- <view style="display: flex;flex-direction:column;align-items: center;" @click="pageJump('已收货')">
- <image src="/static/images/tabBar/280@2x(4).png" style="width:81rpx;height: 81rpx;"
- mode="scaleToFill">
- </image>
- <view style="color: #414141;font-size: 26rpx;margin-top: 13rpx;">已完成</view>
- </view>
- <view style="display: flex;flex-direction:column;align-items: center;" @click="pageJump('退款售后')">
- <image src="/static/images/tabBar/280@2x(5).png" style="width:81rpx;height: 81rpx;"
- mode="scaleToFill">
- </image>
- <view style="color: #414141;font-size: 26rpx;margin-top: 13rpx;">退款/售后</view>
- </view>
- </view>
- </view>
- <view class="card2" style="margin-top: 20rpx;display: flex;align-items: center;">
- <u-cell-group :border="false">
- <u-cell title="个人资料" :clickable="true" @click="clickMeans">
- <view slot="icon">
- <image src="/static/images/tabBar/100.png"
- style="width:26rpx;height: 27rpx;margin-right: 10rpx;" mode="scaleToFill">
- </image>
- </view>
- <view slot="right-icon">
- <uni-icons type="right" size="18" color='#CCCCCC'></uni-icons>
- </view>
- </u-cell>
- <u-cell title="员工信息" :clickable="true" @click="clickContacts">
- <view slot="icon">
- <image src="/static/images/tabBar/101.png"
- style="width:26rpx;height: 27rpx;margin-right: 10rpx;" mode="scaleToFill">
- </image>
- </view>
- <view slot="right-icon">
- <uni-icons type="right" size="18" color='#CCCCCC'></uni-icons>
- </view>
- </u-cell>
- <u-cell title="地址管理" :clickable="true" @click="clickAddress">
- <view slot="icon">
- <image src="/static/images/tabBar/102.png"
- style="width:26rpx;height: 27rpx;margin-right: 10rpx;" mode="scaleToFill">
- </image>
- </view>
- <view slot="right-icon">
- <uni-icons type="right" size="18" color='#CCCCCC'></uni-icons>
- </view>
- </u-cell>
- <u-cell title="设置" :clickable="true" :border="false" @click="setUp">
- <view slot="icon">
- <image src="/static/images/tabBar/103.png"
- style="width:26rpx;height: 27rpx;margin-right: 10rpx;" mode="scaleToFill">
- </image>
- </view>
- <view slot="right-icon">
- <uni-icons type="right" size="18" color='#CCCCCC'></uni-icons>
- </view>
- </u-cell>
- </u-cell-group>
- </view>
- <!-- 提取去登录 -->
- <u-modal :show="adminShow" :showCancelButton="true" content='当前还未登录请先登录!!' @confirm="adminConfirm"
- @cancel="adminCancel"></u-modal>
- </view>
- </template>
- <script>
- import {
- details,
- corpPointsDetail
- } from '@/api/views/personalInformation/index.js'
- export default {
- data() {
- return {
- name: null,
- badgeList: [],
- form: {},
- adminShow: false,
- }
- },
- onShow() {
- this.getUpdate()
- if (uni.getStorageSync('userInfo').tenant_id == '000000') {
- this.adminShow = true
- }
- details().then(res => {
- this.name = res.data.cname
- corpPointsDetail({
- corpId: res.data.id
- }).then(e => {
- this.form = e.data
- this.form.recoveredBalance = res.data.recoveredBalance
- })
- })
- },
- methods: {
- getUpdate() {
- const updateManager = uni.getUpdateManager();
- updateManager.onCheckForUpdate(function(res) {
- // 请求完新版本信息的回调
- if (res.hasUpdate) {
- updateManager.onUpdateReady(function() {
- uni.showModal({
- title: '更新提示',
- content: '新版本已经准备好,是否重启应用?',
- success: function(res) {
- if (res.confirm) {
- // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
- updateManager.applyUpdate();
- }
- }
- });
- });
- updateManager.onUpdateFailed(function() {
- // 新的版本下载失败
- uni.showModal({
- title: '已经有新版本了哟~',
- content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
- });
- });
- }
- });
- },
- // 确认
- adminConfirm() {
- uni.clearStorageSync();
- uni.redirectTo({
- url: '/pages/login/login'
- })
- },
- // 取消
- adminCancel() {
- uni.switchTab({
- url: '/pages/tabBar/home'
- })
- },
- clickCall() {
- uni.makePhoneCall({
- phoneNumber: this.form.contactNumber,
- success: function() {
- console.log('拨打电话成功');
- },
- fail() {
- console.log('打电话失败了');
- }
- })
- },
- setUp() {
- this.$u.route('/pages/user/setUp');
- },
- clickMeans() {
- uni.$u.route('/pages/views/personalInformation/index');
- },
- clickContacts() {
- uni.$u.route('/pages/views/personalInformation/contacts');
- },
- clickAddress() {
- this.$u.route('/pages/views/personalInformation/addressManagement');
- },
- // 车型
- clickVehicle() {
- this.$u.route('/pages/tabBar/vehicleModel');
- },
- // 积分商城
- clickPointsMall() {
- this.$u.route('/pages/tabBar/pointsMall');
- },
- clickIntegralOrder() {
- this.$u.route('/pages/views/salesSlip/IntegralOrder');
- },
- // 积分兑换记录
- RedemptionOfPoints() {
- this.$u.route('/pages/tabBar/integralList/index');
- },
- // 积分获取记录
- obtainRecord() {
- this.$u.route('/pages/tabBar/integralList/obtainRecord');
- },
- // 消费记录
- consumptionRecord() {
- this.$u.route('/pages/tabBar/integralList/consumptionRecord');
- },
- pageJump(value) {
- uni.$u.route('/pages/views/salesSlip/index', {
- text: value
- });
- },
- obligationBtn(value) {
- uni.$u.route('/pages/views/salesSlip/obligation', {
- text: value
- });
- },
- inIntegralMall() {
- uni.$u.route('/pages/integralMall/index');
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .card {
- position: relative;
- margin: 0 32rpx;
- background-color: #fff;
- border-radius: 14rpx;
- bottom: 96rpx;
- ::v-deep .u-cell__title-text {
- font-size: 26rpx;
- color: #333333;
- }
- ::v-deep .u-cell__value {
- font-size: 24rpx;
- color: #CBCBCB;
- }
- ::v-deep .u-icon__icon--info {
- font-size: 28rpx !important;
- color: #CBCBCB;
- }
- }
- .card2 {
- position: relative;
- margin: 0 32rpx;
- background-color: #fff;
- border-radius: 14rpx;
- bottom: 96rpx;
- ::v-deep .u-cell__title-text {
- font-size: 24rpx;
- font-weight: 400;
- color: #797979;
- }
- }
- </style>
|