Parcourir la source

Merge branch 'new-version' into feature/dd-1935-lastemlv

root il y a 3 ans
Parent
commit
fadf384ace

+ 12 - 2
backendEle/src/utils/tool.js

@@ -2,7 +2,7 @@ import errorCode from './errorCode'
 import baseInfo from './baseInfo'
 import userInfo from './userInfo'
 import router from '@/router'
-import {PRICE_IS_ROUND} from './config'
+import {PRICE_IS_ROUND, CDN_BASE_URL} from './config'
 import ElementUI from 'element-ui'
 
 let tool = {
@@ -265,7 +265,17 @@ let tool = {
       let searchStr = new RegExp('(\\?|&)('+paramName+'=)([^&]*)(&|$)')
       window.location.href = window.location.href.replace(searchStr, '$1$2'+value+'$4')
     }
-  }
+  },
+
+  /**
+   * 拼装图片地址.
+   * @param imageUrl
+   * @param path
+   * @returns {string}
+   */
+  getLocaleLink(imageUrl, path = '') {
+      return imageUrl.indexOf('http') > -1 ? imageUrl : `${CDN_BASE_URL}${path}${imageUrl}`;
+  },
 }
 
 export default tool

+ 11 - 3
backendEle/src/views/ad/edit.vue

@@ -36,6 +36,7 @@
 <script>
 import network from '../../utils/network'
 import LeoUploader from '../../components/Uploader'
+import tool from '@/utils/tool'
 
 export default {
   name: 'ad_edit',
@@ -47,8 +48,11 @@ export default {
         this.form.lid = response.oneData.LID
         this.form.type = response.oneData.TYPE
         this.form.content = response.oneData.CONTENT
-        this.form.image = response.oneData.IMAGE
-        this.defaultImageUrl = response.oneData.IMAGE
+
+        this.imageAd = response.oneData.IMAGE;
+        this.form.image = tool.getLocaleLink(response.oneData.IMAGE, '/files/');
+        this.defaultImageUrl = tool.getLocaleLink(response.oneData.IMAGE, '/files/');
+
         this.allLocation = response.allLocation
         this.loading = false
         this.isEdit = true
@@ -74,6 +78,7 @@ export default {
       loading: false,
       submitButtonStat: false,
       isEdit: false,
+      imageAd: '',
     }
   },
   methods: {
@@ -83,6 +88,7 @@ export default {
       if (this.$route.name === 'ad_edit') {
         path = 'ad/edit/' + this.$route.params.id
       }
+      this.form.image = this.imageAd
       network.postData(path, this.form).then(response => {
         this.submitButtonStat = false
         this.$message({
@@ -95,7 +101,9 @@ export default {
       })
     },
     handleSuccess (imageUrl) {
-      this.form.image = imageUrl
+      this.imageAd = imageUrl
+      this.form.image = tool.getLocaleLink(imageUrl, '/files/')
+      this.defaultImageUrl = tool.getLocaleLink(imageUrl, '/files/')
     },
   }
 }

+ 5 - 2
backendEle/src/views/ad/list.vue

@@ -5,7 +5,7 @@
                 @selection-change="handleSelectionChange" @row-click="handleExpand">
         <el-table-column type="expand">
           <template slot-scope="scope">
-            <img :src="scope.row.IMAGE" :alt="scope.row.TITLE">
+            <img :src="getImage(scope.row.IMAGE)" width="100%" height="100%" :alt="scope.row.TITLE">
           </template>
         </el-table-column>
         <el-table-column type="selection" width="55"></el-table-column>
@@ -180,6 +180,9 @@ export default {
 
       })
     },
+    getImage(imageUrl) {
+        return tool.getLocaleLink(imageUrl, '/files/');
+    },
   }
 }
 
@@ -187,4 +190,4 @@ export default {
 
 <style scoped>
 
-</style>
+</style>

+ 1 - 1
backendEle/src/views/finance/recharge.vue

@@ -158,7 +158,7 @@
                     this.dialogInvoiceLoading = false
                     let invoiceUrl = response.list;
                     console.log(row)
-                    this.urlimg=row.BANK_PROVE
+                    this.urlimg=tool.getLocaleLink(row.BANK_PROVE, '/files/')
                     console.log(this.urlimg)
 
                 })

+ 5 - 2
backendEle/src/views/shop/goods-add.vue

@@ -129,13 +129,16 @@
             },
             upLoadSuccess(file){
                 this.form.cover=file;
+                this.form.cover = tool.getLocaleLink(file, '/files/');
+                this.form.coverOrigin = file
+                this.img_show=false;
             },
             handlePictureCardPreview(file) {
                 this.dialogImageUrl = file.url;
                 this.dialogVisible = true;
                 this.file=file;
                 // console.log(file);
-                
+
             },
             handleDownload(file) {
                 console.log(file);
@@ -243,4 +246,4 @@
 .up_load{
     width: 100px;
 }
-</style>
+</style>

+ 13 - 9
backendEle/src/views/shop/index.vue

@@ -160,9 +160,9 @@
                               placeholder="选择日期时间"
                               value-format="timestamp"
                               popper-class='goodsdate'>
-                            </el-date-picker>
-							
-		
+                            </el-date-picker>
+
+
 
                     </el-form-item>
                     </transition>
@@ -256,7 +256,7 @@
                 img_show:true
             }
         },
-        methods: {
+        methods: {
 
             handleSelectionChange(val) {
                 this.multipleSelection = val
@@ -280,7 +280,8 @@
                 this.$router.push({path: `/shop/goods-add`})
             },
             upLoadSuccess(file){
-                this.form.cover=file;
+                this.form.cover = tool.getLocaleLink(file, '/files/');
+                this.form.coverOrigin = file
                 this.img_show=false;
             },
             handleEditShow(row) {
@@ -336,7 +337,6 @@
                     vueObj.form.content=response.goodsInfo.CONTENT
                     vueObj.form.sort=response.goodsInfo.SORT
                     vueObj.form.id=response.goodsInfo.ID
-                    vueObj.form.cover=response.goodsInfo.COVER
                     vueObj.form.statusdate=response.goodsInfo.STATUS_DATE
                     vueObj.form.goodsstatusdate=response.goodsInfo.GOODS_STATUS_DATE
                     vueObj.form.goodsdate=response.goodsInfo.GOODS_DATE * 1000
@@ -344,6 +344,9 @@
                     //   return response.goodsInfo.SELL_TYPE.some(val=>(index+1).toString()==val)
                     //   })
 
+                    vueObj.form.coverOrigin = response.goodsInfo.COVER
+                    vueObj.form.cover = tool.getLocaleLink(response.goodsInfo.COVER, '/files/')
+
                     this.$forceUpdate()
 
                 })
@@ -406,11 +409,11 @@
                     vueObj.form.content=response.goodsInfo.CONTENT
                     vueObj.form.sort=response.goodsInfo.SORT
                     vueObj.form.id=response.goodsInfo.ID
-                    vueObj.form.cover=response.goodsInfo.COVER
                     vueObj.form.statusdate=response.goodsInfo.STATUS_DATE
                     vueObj.form.goodsstatusdate=response.goodsInfo.GOODS_STATUS_DATE
                     vueObj.form.goodsdate=response.goodsInfo.GOODS_DATE * 1000
-
+                    vueObj.form.coverOrigin = response.goodsInfo.COVER
+                    vueObj.form.cover = tool.getLocaleLink(response.goodsInfo.COVER, '/files/')
 
                     this.$forceUpdate()
 
@@ -441,7 +444,8 @@
                     }
                 })
                 this.form.giftType=sen_gift;
-
+                this.form.cover = this.form.coverOrigin;
+                delete this.form.coverOrigin;
                 network.postData(path, {...this.form}).then(response => {
                     this.$message({
                         message: response,

+ 13 - 0
common/helpers/Tool.php

@@ -9,6 +9,7 @@
 namespace common\helpers;
 
 
+use Faker\Provider\Uuid;
 use yii\base\Exception;
 use yii\helpers\Url;
 use yii\httpclient\Client;
@@ -458,4 +459,16 @@ class Tool {
         }
         return $prefix.$random_string;
     }
+
+    /**
+     * 生成UUID
+     * @param $upper boolean 是否大写
+     * @param $symbol string 替换符号
+     * @return string|string[]
+     */
+    public static function generateId(bool $upper = true, string $symbol = '')
+    {
+        $uuid = !$upper ? Uuid::uuid() : strtoupper(Uuid::uuid());
+        return str_replace('-', $symbol, $uuid);
+    }
 }

+ 8 - 4
common/models/forms/UploadForm.php

@@ -9,6 +9,7 @@ use common\helpers\Excel;
 use common\helpers\Form;
 use common\helpers\http\RemoteUploadApi;
 use common\helpers\ocr\OcrApi;
+use common\helpers\Tool;
 use common\helpers\user\Info;
 use common\models\ExcelAddUser;
 use common\models\ExcelImport;
@@ -32,7 +33,7 @@ class UploadForm extends Model {
 
     private $_ocrResult;
     private $_remoteScenario = [
-        'idCardFront', 'idCardBack', 'ad', 'invoiceFront','proveFront','goodsImg'
+//        'idCardFront', 'idCardBack', 'ad', 'invoiceFront','proveFront','goodsImg'
     ];
 
     /**
@@ -181,15 +182,18 @@ class UploadForm extends Model {
                 // 删除本地临时文件
                 unlink($this->file->tempName);
             } else {
+                // 生成文件名
+                $fileName = Tool::generateId(false);
                 // 保存在本地
-                $localPath = \Yii::getAlias('@common/runtime/uploads/') . $this->file->baseName . '.' . $this->file->extension;
+                $localPath = '/Volumes/HDD/workshop/old/ar.upload.ming/files/' . $fileName . '.' . $this->file->extension;
                 if (!$this->file->saveAs($localPath)) {
                     throw new Exception('文件保存失败');
                 }
                 $uploadInfo = [
-                    'fileName' => $this->file->baseName . '.' . $this->file->extension,
+                    'fileName' => $fileName . '.' . $this->file->extension,
                     'category' => $uploadCategory,
-                    'url' => $localPath,
+//                    'url' => $localPath,
+                    'url' => $fileName . '.' . $this->file->extension,
                     'fileSize' => null,
                     'md5' => null,
                 ];

+ 6 - 1
frontendApi/modules/v1/controllers/ShopController.php

@@ -153,7 +153,7 @@ class ShopController extends BaseController {
      */
     public function actionOrderList() {
         $uname = Info::getUserNameByUserId(\Yii::$app->user->id);
-        $condition = " AND IS_DELETE=0 AND ORDER_TYPE='FX' AND (USER_ID=:USER_ID OR CREATE_USER='$uname')";
+        $condition = " AND IS_DELETE=0 AND (USER_ID=:USER_ID OR CREATE_USER='$uname')";
         $params[':USER_ID'] = \Yii::$app->user->id;
         $data = Order::lists($condition, $params, [
             'select' => 'O.*,U.REAL_NAME,OG.*',
@@ -165,6 +165,11 @@ class ShopController extends BaseController {
             ],
         ]);
         foreach ($data['list'] as $key => $value) {
+            if($value['ORDER_TYPE']=='ZC'){
+                $data['list'][$key]['ORDER_TYPE'] = '报单';
+            }else{
+                $data['list'][$key]['ORDER_TYPE'] = in_array($value['PAY_TYPE'], ['cash', 'paystack']) ? '复消': '积分';
+            }
             //$data['list'][$key]['PROVINCE_NAME'] = $value['PROVINCE'] ? Region::getCnName($value['PROVINCE']) : '';
            //$data['list'][$key]['CITY_NAME'] = $value['CITY'] ? Region::getCnName($value['CITY']) : '';
             //$data['list'][$key]['COUNTY_NAME'] = $value['COUNTY'] ? Region::getCnName($value['COUNTY']) : '';

+ 11 - 1
frontendEle/src/utils/tool.js

@@ -1,6 +1,6 @@
 import errorCode from './errorCode'
 import baseInfo from './baseInfo'
-import {PRICE_IS_ROUND} from './config'
+import {PRICE_IS_ROUND,SERVER_API_HTTP_TYPE,SERVER_API_DOMAIN,CDN_BASE_URL} from './config'
 import userInfo from "../../../backendEle/src/utils/userInfo";
 
 let tool = {
@@ -210,6 +210,16 @@ let tool = {
         if (hasStatusBar) return window.innerHeight - 320
         return window.innerHeight - 260
     },
+
+  /**
+   * 拼装图片地址.
+   * @param imageUrl
+   * @param path
+   * @returns {string}
+   */
+  getLocaleLink(imageUrl, path = '') {
+      return imageUrl.indexOf('http') > -1 ? imageUrl : `${CDN_BASE_URL}${path}${imageUrl}`;
+  },
 }
 
 export default tool

+ 256 - 253
frontendEle/src/views/dashboard/index.vue

@@ -1,254 +1,257 @@
-<template>
-  <div v-loading="loading">
-    <div>
-      <div class="welcome" :style="getEmpBg(myEmpLv['ICON_TYPE'])">
-        <h1>欢迎您,{{userName}}
-
-        <b v-if="verified==='0'" class="text-danger"> 您未实名认证,请登录商城系统完善会员资料并上传身份证</b>
-        </h1>
-        <el-row :gutter="0" class="wel-info">
-          <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
-            <el-row :gutter="10">
-              <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">当前系统时间:{{nowDateTime}}</el-col>
-              <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">最高聘级:{{myEmpLv['LEVEL_NAME']!='无聘级'?myEmpLv['LEVEL_NAME']:''}}<span v-if="myEmpLv['ICON_TYPE']==0">无</span><img
-                  :src="getEmpIco(myEmpLv['ICON_TYPE'])" alt=""
-                  v-for="(o,key) in parseInt(myEmpLv['ICON_NUM'])"
-                  :key="key" v-if="myEmpLv['ICON_TYPE']>0">
-              </el-col>
-              <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">会员级别:{{decLvName}}</el-col>
-              <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">当前业绩期:{{periodNum}}</el-col>
-            </el-row>
-          </el-col>
-        </el-row>
-      </div>
-      <div style="display: none;">
-<!--        <el-button type="primary" @click="go('/config/base')">个人设置</el-button>-->
-        <el-button type="success" @click="go('/user/index')">个人资料</el-button>
-<!--        <el-button type="danger" @click="go('/user/rec-user')">开拓会员</el-button>-->
-        <el-button type="primary" @click="go('/finance/flow-bonus')">奖金流水</el-button>
-        <el-button type="warning" @click="go('/finance/withdraw')">提现明细</el-button>
-        <el-button type="success" @click="go('/finance/perf')">往期业绩</el-button>
-      </div>
-    </div>
-    <el-carousel trigger="click" :height="bannerHeight+'px'">
-      <el-carousel-item v-for="(item,key) in slides" :key="key">
-        <template v-if="item.TYPE==='1'">
-          <a :href="item.CONTENT" target="_blank" class="islide">
-            <img ref="bannerHeight" :src="item.IMAGE" alt="" @load="imgLoad">
-          </a>
-        </template>
-        <template v-else>
-          <router-link :to="`/article/detail/${item.CONTENT}`" target="_blank" class="islide"><img ref="bannerHeight" :src="item.IMAGE" alt="" @load="imgLoad"></router-link>
-        </template>
-      </el-carousel-item>
-    </el-carousel>
-
-    <el-row :gutter="10" class="news-c">
-      <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-for="(item,key) in news" :key="key">
-        <el-card class="box-card">
-          <div slot="header" class="clearfix">
-            <span>{{item.CATE_NAME}}</span>
-            <el-button type="text" class="box-card-more">
-              <router-link :to="`/article/list/${item.ID}`">more+</router-link>
-            </el-button>
-          </div>
-          <div v-for="(o,k) in item.LISTS" :key="k" class="text item" v-if="item.LISTS.length>0">
-            <router-link :to="`/article/detail/${o.ID}`" :title="o.TITLE">{{sub_str(o.TITLE)}}</router-link>
-            <span>{{tool.formatDate(o.CREATED_AT,false)}}</span>
-          </div>
-          <div v-if="item.LISTS.length==0">暂无内容</div>
-        </el-card>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-  import network from '@/utils/network'
-  import tool from '@/utils/tool'
-  import baseInfo from '@/utils/baseInfo'
-  import userInfo from '@/utils/userInfo'
-  import countUp from 'vue-countup-v2'
-
-  export default {
-    name: 'dashboard_index',
-    components: {
-      countUp
-    },
-    mounted() {
+<template>
+  <div v-loading="loading">
+    <div>
+      <div class="welcome" :style="getEmpBg(myEmpLv['ICON_TYPE'])">
+        <h1>欢迎您,{{userName}}
+
+        <b v-if="verified==='0'" class="text-danger"> 您未实名认证,请登录商城系统完善会员资料并上传身份证</b>
+        </h1>
+        <el-row :gutter="0" class="wel-info">
+          <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
+            <el-row :gutter="10">
+              <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">当前系统时间:{{nowDateTime}}</el-col>
+              <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">最高聘级:{{myEmpLv['LEVEL_NAME']!='无聘级'?myEmpLv['LEVEL_NAME']:''}}<span v-if="myEmpLv['ICON_TYPE']==0">无</span><img
+                  :src="getEmpIco(myEmpLv['ICON_TYPE'])" alt=""
+                  v-for="(o,key) in parseInt(myEmpLv['ICON_NUM'])"
+                  :key="key" v-if="myEmpLv['ICON_TYPE']>0">
+              </el-col>
+              <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">会员级别:{{decLvName}}</el-col>
+              <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">当前业绩期:{{periodNum}}</el-col>
+            </el-row>
+          </el-col>
+        </el-row>
+      </div>
+      <div style="display: none;">
+<!--        <el-button type="primary" @click="go('/config/base')">个人设置</el-button>-->
+        <el-button type="success" @click="go('/user/index')">个人资料</el-button>
+<!--        <el-button type="danger" @click="go('/user/rec-user')">开拓会员</el-button>-->
+        <el-button type="primary" @click="go('/finance/flow-bonus')">奖金流水</el-button>
+        <el-button type="warning" @click="go('/finance/withdraw')">提现明细</el-button>
+        <el-button type="success" @click="go('/finance/perf')">往期业绩</el-button>
+      </div>
+    </div>
+    <el-carousel trigger="click" :height="bannerHeight+'px'">
+      <el-carousel-item v-for="(item,key) in slides" :key="key">
+        <template v-if="item.TYPE==='1'">
+          <a :href="item.CONTENT" target="_blank" class="islide">
+            <img ref="bannerHeight" :src="imageArticle(item.IMAGE)" alt="" @load="imgLoad">
+          </a>
+        </template>
+        <template v-else>
+          <router-link :to="`/article/detail/${item.CONTENT}`" target="_blank" class="islide"><img ref="bannerHeight" :src="imageArticle(item.IMAGE)" alt="" @load="imgLoad"></router-link>
+        </template>
+      </el-carousel-item>
+    </el-carousel>
+
+    <el-row :gutter="10" class="news-c">
+      <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-for="(item,key) in news" :key="key">
+        <el-card class="box-card">
+          <div slot="header" class="clearfix">
+            <span>{{item.CATE_NAME}}</span>
+            <el-button type="text" class="box-card-more">
+              <router-link :to="`/article/list/${item.ID}`">more+</router-link>
+            </el-button>
+          </div>
+          <div v-for="(o,k) in item.LISTS" :key="k" class="text item" v-if="item.LISTS.length>0">
+            <router-link :to="`/article/detail/${o.ID}`" :title="o.TITLE">{{sub_str(o.TITLE)}}</router-link>
+            <span>{{tool.formatDate(o.CREATED_AT,false)}}</span>
+          </div>
+          <div v-if="item.LISTS.length==0">暂无内容</div>
+        </el-card>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+  import network from '@/utils/network'
+  import tool from '@/utils/tool'
+  import baseInfo from '@/utils/baseInfo'
+  import userInfo from '@/utils/userInfo'
+  import countUp from 'vue-countup-v2'
+
+  export default {
+    name: 'dashboard_index',
+    components: {
+      countUp
+    },
+    mounted() {
       network.getData(`dashboard/index`).then(response => {
-        console.log(response);
-        this.myEmpLv.ID = this.baseEmpLevels[response.empLv]['ID']
-        this.myEmpLv.LEVEL_NAME = this.baseEmpLevels[response.empLv]['LEVEL_NAME']
-        this.myEmpLv.ICON_TYPE = this.baseEmpLevels[response.empLv]['ICON_TYPE']
-        this.myEmpLv.ICON_NUM = this.baseEmpLevels[response.empLv]['ICON_NUM']
-        this.slides = response.slides
-        this.news = response.news
-        this.periodNum = response.periodNum
-        this.decLvName = response.decLvName
-        this.loading = false
-        this.imgLoad()
-        return network.getData(`dashboard/bonus-num`)
-      })
-      if(this.verified==='0'){
-        this.$confirm('您未实名认证,请登录商城系统完善会员资料并上传身份证', '请注意', {
-          confirmButtonText: '确定',
-          type: 'warning'
-        }).then(() => {
-        }).catch(() => {
-
-        })
-      }
-      this.calcTime()
-      window.addEventListener('resize', () => {
-        this.imgLoad()
-      }, false)
-    },
-    data() {
-      return {
-        loading: true,
-        tool: tool,
-        nowTime: tool.getTimestamp(),
-        userName: userInfo.userName(),
-        verified: userInfo.baseData().VERIFIED,
-        baseEmpLevels: baseInfo.empLevels(),
-        myEmpLv: {'ID': 0, 'LEVEL_NAME': null, 'ICON_TYPE': 0, 'ICON_NUM': 0},
-        slides: [],
-        news: [],
-        periodNum: '',
-        decLvName: '',
-        bannerHeight: '',
-      }
-    },
-    computed: {
-      nowDateTime: function () {
-        return tool.formatDate(this.nowTime)
-      }
-    },
-    methods: {
-      getEmpIco(type) {
-        if (type) return require('@/assets/emp-ico-' + type + '.png')
-      },
-      getEmpBg(type) {
-        if (type != 0) return 'backgroundImage:url(' + require('@/assets/emp-bg-' + type + '.png') + ')'
-      },
-      sub_str(str, len = 15) {
-        if (str) return str.slice(0, len)
-      },
-      calcTime() {
-        let obj = this
-        setInterval(function () {
-          obj.nowTime += 1
-        }, 1000)
-      },
-      go: function (url) {
-        this.$router.push(url)
-      },
-      imgLoad() {
-        let _this = this
-        _this.$nextTick(function () {
-          _this.bannerHeight = _this.$refs.bannerHeight[0].height
-        })
-      }
-    }
-  }
-</script>
-
-<style scoped>
-  h1 {
-    margin-top: 0
-  }
-
-  .welcome {
-    padding-bottom: 10px;
-    background-repeat: no-repeat;
-    background-position: right top;
-  }
-
-  .wel-info {
-    line-height: 36px;
-  }
-
-  .wel-info img {
-    vertical-align: middle;
-  }
-
-  .news-c .el-col .box-card {
-    margin-top: 10px;
-  }
-
-  .news-c .el-col:nth-child(3n+1) .box-card {
-    border-bottom: 4px solid #f34d14;
-  }
-
-  .news-c .el-col:nth-child(3n+2) .box-card {
-    border-bottom: 4px solid #27a2d3;
-  }
-
-  .news-c .el-col:nth-child(3n+3) .box-card {
-    border-bottom: 4px solid #1bbc61;
-  }
-
-  .box-card-more {
-    float: right;
-    padding: 3px 10px;
-    border: 1px solid #ddd;
-    border-radius: 10px;
-  }
-
-  .box-card-more a {
-    color: #666;
-  }
-
-  .box-card-more:hover {
-    border-color: #409EFF;
-  }
-
-  .box-card .item {
-    position: relative;
-    line-height: 30px;
-    padding-left: 10px;
-  }
-
-  .box-card .item:before {
-    content: '';
-    display: block;
-    width: 4px;
-    height: 4px;
-    background: #f60;
-    position: absolute;
-    left: 0px;
-    top: 14px;
-  }
-
-  .box-card .item:after {
-    content: '';
-    display: table;
-    clear: both;
-  }
-
-  .box-card .item a {
-    color: #333;
-    float: left;
-  }
-
-  .box-card .item a:hover {
-    color: #f60;
-  }
-
-  .box-card .item span {
-    float: right;
-    color: #999;
-    font-size: 12px;
-  }
-
-  .islide {
-    display: block;
-    text-align: center;
-  }
-
-  .islide img {
-    max-width: 100%;
-    max-height: 330px;
-  }
-</style>
+        console.log(response);
+        this.myEmpLv.ID = this.baseEmpLevels[response.empLv]['ID']
+        this.myEmpLv.LEVEL_NAME = this.baseEmpLevels[response.empLv]['LEVEL_NAME']
+        this.myEmpLv.ICON_TYPE = this.baseEmpLevels[response.empLv]['ICON_TYPE']
+        this.myEmpLv.ICON_NUM = this.baseEmpLevels[response.empLv]['ICON_NUM']
+        this.slides = response.slides
+        this.news = response.news
+        this.periodNum = response.periodNum
+        this.decLvName = response.decLvName
+        this.loading = false
+        this.imgLoad()
+        return network.getData(`dashboard/bonus-num`)
+      })
+      if(this.verified==='0'){
+        this.$confirm('您未实名认证,请登录商城系统完善会员资料并上传身份证', '请注意', {
+          confirmButtonText: '确定',
+          type: 'warning'
+        }).then(() => {
+        }).catch(() => {
+
+        })
+      }
+      this.calcTime()
+      window.addEventListener('resize', () => {
+        this.imgLoad()
+      }, false)
+    },
+    data() {
+      return {
+        loading: true,
+        tool: tool,
+        nowTime: tool.getTimestamp(),
+        userName: userInfo.userName(),
+        verified: userInfo.baseData().VERIFIED,
+        baseEmpLevels: baseInfo.empLevels(),
+        myEmpLv: {'ID': 0, 'LEVEL_NAME': null, 'ICON_TYPE': 0, 'ICON_NUM': 0},
+        slides: [],
+        news: [],
+        periodNum: '',
+        decLvName: '',
+        bannerHeight: '',
+      }
+    },
+    computed: {
+      nowDateTime: function () {
+        return tool.formatDate(this.nowTime)
+      }
+    },
+    methods: {
+      getEmpIco(type) {
+        if (type) return require('@/assets/emp-ico-' + type + '.png')
+      },
+      getEmpBg(type) {
+        if (type != 0) return 'backgroundImage:url(' + require('@/assets/emp-bg-' + type + '.png') + ')'
+      },
+      sub_str(str, len = 15) {
+        if (str) return str.slice(0, len)
+      },
+      calcTime() {
+        let obj = this
+        setInterval(function () {
+          obj.nowTime += 1
+        }, 1000)
+      },
+      go: function (url) {
+        this.$router.push(url)
+      },
+      imgLoad() {
+        let _this = this
+        _this.$nextTick(function () {
+          _this.bannerHeight = _this.$refs.bannerHeight[0].height
+        })
+      },
+      imageArticle(imageUrl) {
+        return tool.getLocaleLink(imageUrl, '/files/');
+      },
+    }
+  }
+</script>
+
+<style scoped>
+  h1 {
+    margin-top: 0
+  }
+
+  .welcome {
+    padding-bottom: 10px;
+    background-repeat: no-repeat;
+    background-position: right top;
+  }
+
+  .wel-info {
+    line-height: 36px;
+  }
+
+  .wel-info img {
+    vertical-align: middle;
+  }
+
+  .news-c .el-col .box-card {
+    margin-top: 10px;
+  }
+
+  .news-c .el-col:nth-child(3n+1) .box-card {
+    border-bottom: 4px solid #f34d14;
+  }
+
+  .news-c .el-col:nth-child(3n+2) .box-card {
+    border-bottom: 4px solid #27a2d3;
+  }
+
+  .news-c .el-col:nth-child(3n+3) .box-card {
+    border-bottom: 4px solid #1bbc61;
+  }
+
+  .box-card-more {
+    float: right;
+    padding: 3px 10px;
+    border: 1px solid #ddd;
+    border-radius: 10px;
+  }
+
+  .box-card-more a {
+    color: #666;
+  }
+
+  .box-card-more:hover {
+    border-color: #409EFF;
+  }
+
+  .box-card .item {
+    position: relative;
+    line-height: 30px;
+    padding-left: 10px;
+  }
+
+  .box-card .item:before {
+    content: '';
+    display: block;
+    width: 4px;
+    height: 4px;
+    background: #f60;
+    position: absolute;
+    left: 0px;
+    top: 14px;
+  }
+
+  .box-card .item:after {
+    content: '';
+    display: table;
+    clear: both;
+  }
+
+  .box-card .item a {
+    color: #333;
+    float: left;
+  }
+
+  .box-card .item a:hover {
+    color: #f60;
+  }
+
+  .box-card .item span {
+    float: right;
+    color: #999;
+    font-size: 12px;
+  }
+
+  .islide {
+    display: block;
+    text-align: center;
+  }
+
+  .islide img {
+    max-width: 100%;
+    max-height: 330px;
+  }
+</style>

+ 3 - 3
frontendEle/src/views/finance/recharge.vue

@@ -146,7 +146,7 @@
                 this.$router.push({path: `/finance/recharge-add`})
             },
             handlePictureCardPreview(file) {
-                this.dialogImageUrl = file.url;
+                this.dialogImageUrl = tool.getLocaleLink(file.url, '/files/');
                 this.dialogVisible = true;
                 this.file=file;
                 // console.log(file);
@@ -203,7 +203,7 @@
                     this.dialogInvoiceLoading = false
                     let invoiceUrl = response.list;
                     console.log(row)
-                    this.urlimg=row.BANK_PROVE
+                    this.urlimg=tool.getLocaleLink(row.BANK_PROVE, '/files/');
 
 
                 })
@@ -215,4 +215,4 @@
 
 <style scoped>
 
-</style>
+</style>

+ 7 - 7
frontendEle/src/views/shop/index.vue

@@ -7,19 +7,19 @@
                     type="selection"
                     width="55">
                 </el-table-column>
-                <!-- <el-table-column label="创建时间"> 
+                <!-- <el-table-column label="创建时间">
                      <template slot-scope="scope">
                         {{tool.formatDate(scope.row.CREATED_AT)}}
-                    </template> 
+                    </template>
                 </el-table-column> -->
                 <el-table-column label="商品名称" prop="GOODS_NAME">
-                   
+
                 </el-table-column>
 
                 <el-table-column label="图片" >
                      <template slot-scope="scope">
-                        <img :src="scope.row.COVER" alt="" style="width:100%" >
-                    </template>
+                        <el-image style="width: 100px; height: 100px" :src="tool.getLocaleLink(scope.row.COVER, '/files/')" :preview-src-list="[tool.getLocaleLink(scope.row.COVER, '/files/')]"></el-image>
+                     </template>
                 </el-table-column>
 
                 <el-table-column label="商品价格" prop="SELL_PRICE">
@@ -104,7 +104,7 @@
                         this.$router.push({path: `/shop/order`})
                     }
                 },0)
-                 
+
                 // if (rows) {
                 // rows.forEach(row => {
                 //     this.$refs.multipleTable.toggleRowSelection(row);
@@ -216,4 +216,4 @@
 .flex{
     display: flex;
 }
-</style>
+</style>

+ 28 - 27
frontendEle/src/views/shop/order-list.vue

@@ -1,32 +1,33 @@
 <template>
-    <div v-loading="loading">
-        <div class="white-box">
-            <el-table class="withdraw-table" :data="tableData" style="width: 100%;" :span-method="objectSpanMethod">
-              <el-table-column label="商品编号" prop="SKU_CODE"></el-table-column>
-              <el-table-column label="商品名称" prop="GOODS_TITLE"></el-table-column>
-                <el-table-column label="数量" prop="BUY_NUMS"></el-table-column>
-                <el-table-column label="会员价格">
-                    <template slot-scope="props">
-                        {{ props.row.REAL_PRICE * props.row.BUY_NUMS }}
-                    </template>
-                </el-table-column>
-                <el-table-column label="会员PV">
-                    <template slot-scope="props">
-                        {{ props.row.REAL_PV * props.row.BUY_NUMS }}
-                    </template>
-                </el-table-column>
-                <el-table-column label="订单编号" prop="SN"></el-table-column>
-                <el-table-column label="会员编号" prop="USER_NAME"></el-table-column>
-                <el-table-column label="会员姓名" prop="REAL_NAME"></el-table-column>
-                <el-table-column label="收货人" prop="CONSIGNEE"></el-table-column>
-                <el-table-column label="收货电话" prop="MOBILE"></el-table-column>
-                <el-table-column label="支付时间" prop="PAY_AT"></el-table-column>
-            </el-table>
-            <div class="white-box-footer">
-                <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
-            </div>
-        </div>
+  <div v-loading="loading">
+    <div class="white-box">
+      <el-table class="withdraw-table" :data="tableData" style="width: 100%;" :span-method="objectSpanMethod">
+        <el-table-column width="120" label="订单类型" prop="ORDER_TYPE"></el-table-column>
+        <el-table-column label="商品编号" prop="SKU_CODE"></el-table-column>
+        <el-table-column label="商品名称" prop="GOODS_TITLE"></el-table-column>
+        <el-table-column label="数量" prop="BUY_NUMS"></el-table-column>
+        <el-table-column label="会员价格">
+          <template slot-scope="props">
+            {{ props.row.REAL_PRICE * props.row.BUY_NUMS }}
+          </template>
+        </el-table-column>
+        <el-table-column label="会员PV">
+          <template slot-scope="props">
+            {{ props.row.REAL_PV * props.row.BUY_NUMS }}
+          </template>
+        </el-table-column>
+        <el-table-column label="订单编号" prop="SN"></el-table-column>
+        <el-table-column label="会员编号" prop="USER_NAME"></el-table-column>
+        <el-table-column label="会员姓名" prop="REAL_NAME"></el-table-column>
+        <el-table-column label="收货人" prop="CONSIGNEE"></el-table-column>
+        <el-table-column label="收货电话" prop="MOBILE"></el-table-column>
+        <el-table-column label="支付时间" prop="PAY_AT"></el-table-column>
+      </el-table>
+      <div class="white-box-footer">
+        <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
+      </div>
     </div>
+  </div>
 </template>
 
 <script>

+ 6 - 5
frontendEle/src/views/shop/order.vue

@@ -10,11 +10,11 @@
                      <el-table-column label="商品名称" prop="GOODS_NAME">
                     </el-table-column>
 
-                    <el-table-column label="图片" >
-                        <template slot-scope="scope">
-                            <img :src="scope.row.COVER" alt="" style="width:100%">
-                        </template>
-                    </el-table-column>
+                  <el-table-column label="图片" >
+                    <template slot-scope="scope">
+                      <el-image style="width: 100px; height: 100px" :src="tool.getLocaleLink(scope.row.COVER, '/files/')" :preview-src-list="[tool.getLocaleLink(scope.row.COVER, '/files/')]"></el-image>
+                    </template>
+                  </el-table-column>
 
                     <el-table-column label="会员价格" prop="member_price">
                     </el-table-column>
@@ -95,6 +95,7 @@
         data(){
             return{
                 loading: true,
+                tool: tool,
                 goods:[],
                 payList:[],
                 all_address:[],