123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402 |
- <!DOCTYPE html>
- <html class="">
- <!--STATUS OK-->
- <head>
- <meta name="referrer" content="always" />
- <meta charset='utf-8' />
- <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta http-equiv="x-dns-prefetch-control" content="on">
- <meta name="description" content="">
- <meta name="format-detection" content="telephone=no" />
- <link rel="stylesheet" type="text/css" href="../../../../css/css/vant-ui.css" />
- <link rel="stylesheet" type="text/css" href="../../../../css/css/iconfont.css">
- <link rel="stylesheet" type="text/css" href="../../../../css/css/main.css" />
- <script src="https://b2bcnfile.sailuntire.com/upload/outerstyle/agentCommon/PCR/js/pcr_role_config.js" charset="utf-8"></script>
- <script src="../../../../script/js/vue.js"></script>
- <script src="../../../../script/js/vue-i18n.js"></script>
- <script src="../../../../script/js/vant-ui.js"></script>
- <script src="../../../../script/js/main.js"></script>
- <script type="text/javascript" src="../../js/zh.js"></script>
- <script type="text/javascript" src="../../js/en.js"></script>
- <style media="screen">
- .anniu {
- display: flex;
- padding: 0 .5rem;
- }
- .anniu>input {
- width: 100%;
- height: .86rem;
- background: linear-gradient(45deg, #005fa3, #00a0ea);
- border-radius: 5rem;
- color: #fff;
- font-size: .31rem;
- margin-top: .5rem;
- }
- .fanliBar .item h4 {
- font-size: 0.38rem;
- }
- .meberHeader .userTouxiang {
- width: 1rem;
- }
- .meberMenu01 .item {
- width: 50%
- }
- .mescroll{
- position: relative;;
- height: auto; /*如设置bottom:50px,则需height:auto才能生效*/
- }
- </style>
- <title>我的</title>
- </head>
- <body>
- <div id="app">
- <div class="view flex col">
- <div class="page router fx1 mescroll" id="mescroll">
- <div class="meberHeader" style="height: 3.95rem">
- <div class="flex jlr" style="padding-top: 1rem;">
- <div class="userTouxiang flex col a-center jlr">
- <!-- <div class="image"></div> -->
- <!-- <p>
- 联系人:{{ meterInfo.legalPerson }}
- </p> -->
- </div>
- <div class="shopInfo">
- <h2 class="flex a-center">{{ meterInfo.name }}
- </h2>
- <div class="tag">
- {{ meterInfo.street }}
- </div>
- </div>
- <div class="userTouxiang flex col a-center jlr"></div>
- <!-- <div class="ewm flex j-center">
- <div class="sysIcon"></div>
- </div> -->
- </div>
- <div class="meberHeaderBottom flex a-center j-center">
- <div class="item flex a-center j-center">
- <!-- 联系人:{{ meterInfo.legalPerson }} -->
- {{ $t('mine.meber.region') }}:{{ meterInfo.regioName }}
- </div>
- <div class="item flex a-center j-left" v-on:click="toastBrand(meterInfo.brandList)">
- {{ $t('mine.meber.brand') }}:{{filterBrand(meterInfo.brandList)}}
- </div>
- </div>
- <!-- <div class="meberHeaderBottom flex a-center j-center">
- <div class="item flex a-center j-center">
- 签约品牌:
- </div>
- </div> -->
- </div>
- <div class="fanliBar flex a-center">
- <div class="item flex a-center">
- <span>{{ $t('mine.meber.limit') }}:</span>
- <div class="flex a-end">
- <h4>{{ setCredit }}</h4>
- <em> {{ $t('mine.meber.tenThousand') }} RMB</em>
- </div>
- </div>
- <div class="fgx"></div>
- <div class="item flex a-center">
- <span>{{ $t('mine.meber.integral') }}:</span>
- <div class="flex a-end">
- <h4>{{roleConfig[subRoleName].pages[2].subEle.myIntegral.isShow?meterInfo.integration.allIntegration:"***" }}</h4>
- <em>{{ $t('common.ge') }}</em>
- </div>
- </div>
- </div>
- <div class="meberMenu01 flex wrap">
- <!-- <div class="item flex col a-center j-center">
- <b class="i1"></b>
- <h4>返利提交</h4>
- </div> -->
- <!-- <div class="item flex col a-center j-center">
- <b class="i3"></b>
- <h4>折款查询</h4>
- </div> -->
- <div v-if="roleConfig[subRoleName].pages[2].subEle.agent_storage.isShow" class="item flex col a-center j-center" v-on:click="openWin('agent_storage')">
- <b class="i4"></b>
- <h4>{{ $t('mine.meber.myInventory') }}</h4>
- </div>
- <div v-if="roleConfig[subRoleName].pages[2].subEle.agentList.isShow" class="item flex col a-center j-center" v-on:click="openWin('agentList')">
- <b class="i5"></b>
- <h4>{{ $t('mine.meber.myStore') }}</h4>
- </div>
- <!-- <div class="item flex col a-center j-center">
- <b class="i6"></b>
- <h4>我的积分</h4>
- </div> -->
- </div>
- <div class="meberList">
- <div v-if="roleConfig[subRoleName].pages[2].subEle.orderList.isShow" class="item flex a-center jlr" v-on:click="openWin('orderList')">
- <h4>{{ $t('mine.meber.storeOrder') }}</h4>
- <div class="flex a-center rightIcons">
- <span>{{ $t('mine.meber.view') }}</span>
- <i class="iconfont icon-right"></i>
- </div>
- </div>
- <!-- <div class="item flex a-center jlr" v-on:click="openWin('backList')">
- <h4>核销记录</h4>
- <div class="flex a-center rightIcons">
- <span>查看</span>
- <i class="iconfont icon-right"></i>
- </div>
- </div> -->
- <div class="item flex a-center jlr" v-on:click="checkVersion">
- <h4>{{ $t('mine.meber.checkVersion') }}</h4>
- <div class="flex a-center rightIcons" style="color:#f00">
- {{ version }}
- </div>
- </div>
- <!-- <div class="item flex a-center jlr" v-on:click="openWin('backMoneyList')">
- <h4>返利明细</h4>
- <div class="flex a-center rightIcons">
- <span>查看</span>
- <i class="iconfont icon-right"></i>
- </div>
- </div> -->
- <!-- <div class="item flex a-center jlr" v-on:click="openWin('addressList')">
- <h4>收货地址管理</h4>
- <div class="flex a-center rightIcons">
- <i class="iconfont icon-right"></i>
- </div>
- </div> -->
- <!-- <div class="item flex a-center jlr">
- <h4>设置</h4>
- <div class="flex a-center rightIcons">
- <i class="iconfont icon-right"></i>
- </div>
- </div> -->
- </div>
- <div class="anniu">
- <input type="button" :value="$t('mine.meber.logOut')" v-on:click="logout()">
- </div>
- </div>
- <!-- <van-tabbar v-model="active" fixed active-color="#0083ca" inactive-color="#808080" ref="footer" class="tabbar_footer">
- <van-tabbar-item v-for="(item,index) in icon" :key="index" replace :to="item.path">
- <span>{{item.label}}</span>
- <template #icon="props">
- <img :src="props.active ? item.active : item.inactive" />
- </template>
- </van-tabbar-item>
- </van-tabbar>-->
- </div>
- </div>
- </body>
- </html>
- <link rel="stylesheet" href="../../../../script/mescroll/mescroll.min.css">
- <script type="text/javascript" src="../../../../script/mescroll/mescroll.min.js"></script>
- <script type="text/javascript" src="../../../../script/api.js"></script>
- <script type="text/javascript" src="../../../../script/httpRequest.js"></script>
- <script type="text/javascript" src="../../../../script/vue_plugins.js"></script>
- <script type="text/javascript">
- apiready = function() {
- let langType = $api.getStorage('lang') || 'cn'
- const i18n = new VueI18n({
- locale: langType,//设置语言
- messages: {
- en: getEn(),
- cn: getCn()
- }
- })
- var roleConfig = $role;
- var vm = new Vue({
- el: '#app',
- i18n,
- data: {
- active: 3,
- footerHeight: 0,
- unit: '万元',
- icon: [{
- label: '首页',
- path: '/',
- active: "../../../../../image/img/images/tabar_home_active.png",
- inactive: "../../../../../image/img/images/tabar_home_inactive.png"
- }, {
- label: '发现',
- path: '/discover',
- active: '../../../../../image/img/images/faxian.png',
- inactive: '../../../../../image/img/images/faxian.png'
- }, {
- label: '消息',
- path: '/information',
- active: '../../../../../image/img/images/xiaoxi.png',
- inactive: '../../../../../image/img/images/xiaoxi.png'
- }, {
- label: '我的',
- path: '/meber',
- active: '../../../../../image/img/images/wode_active.png',
- inactive: '../../../../../image/img/images/wode.png'
- }],
- meterInfo: {
- integration: {}
- }, // 经销商详情
- subRoleName: "orderPer",
- roleConfig: roleConfig
- },
- computed: {
- version: function() {
- return this.getVersion();
- },
- setCredit: function () {
- var isShow = this.roleConfig[this.subRoleName].pages[2].subEle.myMoney.isShow;
- var str;
- if (isShow) {
- if (this.meterInfo.credit && this.meterInfo.credit.showCredit) {
- if (langType == 'en') {
- return str = parseInt( parseInt (this.meterInfo.credit.showCredit) / 1000 )
- } else {
- return str = parseInt( parseInt (this.meterInfo.credit.showCredit) / 10000 )
- }
- } else {
- return 0
- }
- } else {
- return str = "***"
- }
- }
- },
- methods: {
- // 获取经销商信息
- getMeberInfo: function(mescroll) {
- var url = "getMeberInfoU",
- _this = this,
- data = {
- token: $api.getStorage('token'),
- url: 'json',
- type: 'body'
- };
- setTimeout(function() {
- if (mescroll) {
- mescroll.endSuccess();
- }
- }, 1000);
- this.$post(url, data, function(ret) {
- if (ret.code == 0) {
- _this.meterInfo = ret.data.data == null ? {
- integration: {}
- } : ret.data.data;
- if (mescroll) {
- mescroll.endSuccess();
- }
- }
- })
- },
- openWin: function(src) {
- if($role[this.subRoleName].pages[2].subEle[src].isClick){
- this.goWin(src, "../home/"+src+"/"+src + '_win.html', '');
- }else{
- api.toast({
- msg: $role[this.subRoleName].pages[2].subEle[src].msg,
- });
- }
- },
- toastBrand: function(brands) {
- var brandss = this.$t('mine.meber.sellBrand');
- // var brandss = '经销品牌';
- if (brands) {
- for (var i = 0; i < brands.length; i++) {
- brandss += brands[i].brand + "|";
- }
- }
- api.toast({
- msg: brandss,
- duration: 2000,
- location: 'middle'
- });
- },
- logout: function() {
- $api.clearStorage();
- this.goWin("login", "../../../login.html", "");
- },
- // 检查版本更新
- checkVersion: function() {
- var _this = this;
- this.ifHasPrme('storage', function(ret) {
- if (ret == true) {
- _this.getNewVersionUrl(function() {
- });
- }
- })
- },
- filterBrand: function(brands) {
- var str = '';
- if (brands) {
- // var brandss = JSON.stringify(brands);
- // alertJson(brands);
- for (var i = 0; i < brands.length; i++) {
- str += brands[i].brand + "|";
- }
- if (str != null && str.length > 11) {
- str = str.substring(0, 10) + "...";
- }
- }
- return str;
- },
- initCredit: function(val,val2) {
- var str;
- if(val2){
- str = parseInt((parseInt(val) / 10000))
- }else{
- str = "***"
- }
- return str;
- }
- },
- // filters: {
- // filterBrand: function(brands) {
- // var str = '';
- // if (brands) {
- // // var brandss = JSON.stringify(brands);
- // // alertJson(brands);
- // for (var i = 0; i < brands.length; i++) {
- // str += brands[i].brand + "|";
- // }
- // if (str != null && str.length > 11) {
- // str = str.substring(0, 10) + "...";
- // }
- // }
- // return str;
- // },
- // initCredit: function(val,val2) {
- // alert(this.unit)
- // var str;
- // if(val2){
- // str = parseInt((parseInt(val) / 10000)) + this.unit
- // }else{
- // str = "***"
- // }
- // return str;
- // }
- // },
- mounted: function() {
- var _this = this;
- this.subRoleName = $api.getStorage('subRoleName');
- this.addEvent("refushUser", function() {
- _this.getMeberInfo();
- })
- this.getMeberInfo();
- this.configDownAndPull("mescroll", function(mescroll) {
- _this.getMeberInfo(mescroll);
- }, function() {
- }, false);
- }
- })
- }
- </script>
|