Kaynağa Gözat

小问题修复

Changpeng Duan 4 yıl önce
ebeveyn
işleme
85e3e6349e

+ 7 - 0
app/src/api/getApiRes.js

@@ -158,3 +158,10 @@ export function QueryNextWeek(postdata) {
 }
 }
 
 
 
 
+// 用户店铺信息查询
+export function MyShopQuery(postdata) {
+    let url = headapi + 'v1/Weixin/MyShopQuery';
+    return getApiBasic(url, postdata);
+}
+
+

+ 531 - 528
app/src/page/mine.vue

@@ -1,542 +1,545 @@
 <template>
 <template>
-  <div class="pages">
-    <img src="../static/images/main/banner.png" height="121" width="414"/>
-    <div class="context">
+    <div class="pages">
+        <img src="../static/images/main/banner.png" height="121" width="414"/>
+        <div class="context">
               <span class="num">
               <span class="num">
                 会员卡信息
                 会员卡信息
             </span>
             </span>
-      <div class="user">
-        <img src="../static/images/mine/User.png" height="53" width="53"/>
-        <span>{{ user.Name }}</span>
-        <em>{{ user.Phone  | hidePhone}}</em>
-      </div>
-      <div class="value" v-for="s in schools" v-if="s.IsJoin == 1">
-        <div class="vTitle year" v-if="s.VipType == 1"><i></i>年会员</div>
-        <div class="vTitle price" v-if="s.VipType == 2"><i></i>充值会员</div>
-        <div class="vNum">
-          <span> {{ s.ShopName }}</span>
-          <div class="center">
-            总计{{ s.ClassHourToatal }}课时
-          </div>
-          <em v-if="s.VipType == 1">(有效期至{{ s.ExpTime |fmtTime }})</em>
+            <div class="user">
+                <img src="../static/images/mine/User.png" height="53" width="53"/>
+                <span>{{ user.Name }}</span>
+                <em>{{ user.Phone | hidePhone}}</em>
+            </div>
+            <div class="value" v-for="s in schools">
+                <div class="vTitle year" v-if="s.VipType == 1"><i></i>年会员</div>
+                <div class="vTitle price" v-if="s.VipType == 2"><i></i>充值会员</div>
+                <div class="vNum">
+                    <span> {{ s.ShopName }}</span>
+                    <div class="center">
+                        总计{{ s.ClassHourToatal }}课时
+                    </div>
+                    <em v-if="s.VipType == 1">(有效期至{{ s.ExpTime |fmtTime }})</em>
+                </div>
+                <mu-flex class="linear-progress">
+                    <mu-linear-progress mode="determinate" :value="s.ClassHourRemain / s.ClassHourToatal *100"
+                                        :size="10"
+                                        color="secondary"></mu-linear-progress>
+                </mu-flex>
+                <div class="limit">
+                    <em>剩余 {{ s.ClassHourRemain }} 课时</em>
+                    <span>完成 {{ s.ClassHourConsume }} 课时</span>
+                </div>
+            </div>
+            <div class="dataSum">
+                <div class="row">
+                    <em>卡路里(月度)</em>
+                    <span>{{ ckRs.CleMonth }}</span>
+                </div>
+            </div>
+            <div class="dataSum">
+                <div class="row">
+                    <em>总卡路里</em>
+                    <span>{{ ckRs.Cle }}</span>
+                </div>
+            </div>
+            <div class="dataSum">
+                <div class="row">
+                    <em>CK(月度)</em>
+                    <span>{{ ckRs.CkMonth }}</span>
+                </div>
+            </div>
+            <div class="dataSum">
+                <div class="row">
+                    <em>总CK</em>
+                    <span>{{ ckRs.Ck }}</span>
+                </div>
+            </div>
+            <div class="btn_center">
+                <span class="btn btn-md login_btn" @click="logoutBtn">退出</span>
+            </div>
         </div>
         </div>
-        <mu-flex class="linear-progress">
-          <mu-linear-progress mode="determinate" :value="s.ClassHourRemain / s.ClassHourToatal *100" :size="10"
-                              color="secondary"></mu-linear-progress>
-        </mu-flex>
-        <div class="limit">
-          <em>剩余 {{ s.ClassHourRemain }} 课时</em>
-          <span>完成 {{ s.ClassHourConsume }} 课时</span>
-        </div>
-      </div>
-      <div class="dataSum">
-        <div class="row">
-          <em>卡路里(月度)</em>
-          <span>{{ ckRs.CleMonth }}</span>
-        </div>
-      </div>
-      <div class="dataSum">
-        <div class="row">
-          <em>总卡路里</em>
-          <span>{{ ckRs.Cle }}</span>
-        </div>
-      </div>
-      <div class="dataSum">
-        <div class="row">
-          <em>CK(月度)</em>
-          <span>{{ ckRs.CkMonth }}</span>
-        </div>
-      </div>
-      <div class="dataSum">
-        <div class="row">
-          <em>总CK</em>
-          <span>{{ ckRs.Ck }}</span>
-        </div>
-      </div>
-      <div class="btn_center">
-        <span class="btn btn-md login_btn" @click="logoutBtn">退出</span>
-      </div>
+        <bottomTab :curTab="thisTab"></bottomTab>
     </div>
     </div>
-    <bottomTab :curTab="thisTab"></bottomTab>
-  </div>
 </template>
 </template>
 
 
 <script>
 <script>
-import axios from 'axios';
-import bottomTab from '../components/bottomTab'
-import {
-  VipUserSelfQuery,
-  OrderShopQuery,
-  VipUserCleCkSum,
-  testSelect,
-  testTable,
-} from '../api/getApiRes.js'
-
-let qs = require('qs');
-import Global from '../Global.js'
-
-export default {
-  data() {
-    return {
-      num: 0,
-      thisTab: '我的',
-      active: 0,
-      sum: 0,
-      openAlert: false,
-      list: [],
-      dialog: {
-        id: '',
-        name: '',
-        timeLong: '',
-      },
-      user: {
-        Ck: 0,
-        CKMonth: 0,
-        Cle: 0,
-        CleMonth: 0,
-        CalorieMonth: 0,
-        CalorieTotal: 0,
-        ClassFinish: 0,
-        ClassRemain: 0,
-        ClassTotal: 0,
-        ExpTime: 0,
-        Name: '',
-        Phone: '',
-        VipType: 0,
-      },
-      ckRs:{
-        Ck: 0,
-        CKMonth: 0,
-        Cle: 0,
-        CleMonth: 0,
-      },
-      schools: [],
-    }
-  },
-  mounted() {
-    this.getInfo();
-    this.getOrderShopQuery();
-    this.getCalorie()
-  },
-  methods: {
-    // 获得卡路里
-    getCalorie() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      VipUserCleCkSum(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.ckRs = json;
-        } else {
-          that.$toast.message(json.Memo);
+    import axios from 'axios';
+    import bottomTab from '../components/bottomTab'
+    import {
+        VipUserSelfQuery,
+        OrderShopQuery,
+        VipUserCleCkSum,
+        MyShopQuery,
+        testSelect,
+        testTable,
+    } from '../api/getApiRes.js'
+
+    let qs = require('qs');
+    import Global from '../Global.js'
+
+    export default {
+        data() {
+            return {
+                num: 0,
+                thisTab: '我的',
+                active: 0,
+                sum: 0,
+                openAlert: false,
+                list: [],
+                dialog: {
+                    id: '',
+                    name: '',
+                    timeLong: '',
+                },
+                user: {
+                    Ck: 0,
+                    CKMonth: 0,
+                    Cle: 0,
+                    CleMonth: 0,
+                    CalorieMonth: 0,
+                    CalorieTotal: 0,
+                    ClassFinish: 0,
+                    ClassRemain: 0,
+                    ClassTotal: 0,
+                    ExpTime: 0,
+                    Name: '',
+                    Phone: '',
+                    VipType: 0,
+                },
+                ckRs: {
+                    Ck: 0,
+                    CKMonth: 0,
+                    Cle: 0,
+                    CleMonth: 0,
+                },
+                schools: [],
+            }
+        },
+        mounted() {
+            this.getInfo();
+            this.getOrderShopQuery();
+            this.getCalorie()
+        },
+        methods: {
+            // 获得卡路里
+            getCalorie() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                VipUserCleCkSum(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.ckRs = json;
+                    } else {
+                        that.$toast.message(json.Memo);
+                    }
+                })
+            },
+            getOrderShopQuery() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                // OrderShopQuery(postdata).then(res => {
+                MyShopQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.schools = json.Rs;
+                    } else {
+                        that.$toast.message(json.Memo);
+                    }
+                })
+            },
+            logoutBtn() {
+                let that = this;
+                this.$confirm('是否退出账号?', '提示', {
+                    type: 'warning'
+                }).then(({result}) => {
+                    if (result) {
+                        localStorage.token = '';
+                        that.$router.push({path: '/login'});
+                    } else {
+                        that.$toast.message('点击了取消');
+                    }
+                });
+            },
+            getInfo() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    active: this.active
+                };
+                let postdata = qs.stringify(param);
+                VipUserSelfQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.user = json.Rs;
+                    } else {
+                        that.$toast.message(json.Memo);
+                    }
+                })
+            },
+        },
+        filters: {
+            hidePhone: function (val) {
+                var str = String(val)
+                var len = str.length;
+                if (len >= 7) {
+                    var reg = str.slice(-8, -4)
+                    return str.replace(reg, "****")
+                } else if (len < 7 && len >= 6) {
+                    var reg = str.slice(-4, -2)
+                    return str.replace(reg, "**")
+                }
+            },
+            fmtTime: function (value) {
+                if (!value) {
+                    return 0
+                } else {
+                    // js默认使用毫秒
+                    value = value * 1000
+                    let date = new Date(value);
+                    let y = date.getFullYear();
+                    let MM = date.getMonth() + 1;
+                    MM = MM < 10 ? ('0' + MM) : MM;
+                    let d = date.getDate();
+                    d = d < 10 ? ('0' + d) : d;
+                    let h = date.getHours();
+                    h = h < 10 ? ('0' + h) : h;
+                    let m = date.getMinutes();
+                    m = m < 10 ? ('0' + m) : m;
+                    let s = date.getSeconds();
+                    s = s < 10 ? ('0' + s) : s;
+                    return y + '-' + MM + '-' + d;
+                }
+            },
+        },
+        beforeRouteEnter(to, from, next) {
+            next(vm => {
+                //因为当钩子执行前,组件实例还没被创建
+                // vm 就是当前组件的实例相当于上面的 this,所以在 next 方法里你就可以把 vm 当 this 来用了。
+                if (to.name == 'mine') {
+                    vm.getInfo();
+                }
+            });
+        },
+        watch: {
+            'active'() {
+                console.log(123);
+                this.getList();
+            }
+        },
+        components: {
+            bottomTab
         }
         }
-      })
-    },
-    getOrderShopQuery() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      OrderShopQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.schools = json.Rs;
-        } else {
-         that.$toast.message(json.Memo);
+    }
+</script>
+
+<style scoped>
+    .pages {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background: #F2F2F2;
+    }
+
+    .num {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        font-family: "PingFang SC";
+        font-weight: 300;
+        font-size: 14px;
+        text-align: center;
+        color: #909090;
+        padding: 13px 0;
+    }
+
+    .user {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        height: 58px;
+        background: #fff;
+        padding: 17px 3%;
+        margin-bottom: 10px;
+    }
+
+    .user img {
+        width: 26.29px;
+        height: 26.29px;
+        float: left;
+        margin-right: 11px;
+    }
+
+    .user span {
+        font-family: "PingFang SC";
+        font-weight: 500;
+        font-size: 18px;
+        text-align: left;
+        color: #3b3b3b;
+    }
+
+    .user em {
+        font-family: "PingFang SC";
+        font-weight: normal;
+        font-size: 18px;
+        text-align: left;
+        color: #3b3b3b;
+        float: right;
+    }
+
+    .user p {
+        font-family: "PingFang SC";
+        font-weight: normal;
+        font-size: 14px;
+        text-align: left;
+        color: #ffb43c;
+        float: right;
+        padding: 0;
+        margin: 0;
+        margin-left: 3px;
+        line-height: 26px;
+    }
+
+    .value {
+        width: 100%;
+        /*height: 131px;*/
+        background: #fff;
+        padding: 13px 0;
+    }
+
+    .value .vTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        text-align: center;
+
+        font-family: "PingFang SC";
+        font-weight: 300;
+        font-size: 15px;
+    }
+
+    .vTitle i {
+        width: 8px;
+        height: 8px;
+        display: inline-block;
+        border-radius: 250px;
+        margin-right: 3px;
+    }
+
+    .vTitle.year {
+        color: #E75296;
+    }
+
+    .vTitle.year i {
+        background: #e75296;
+    }
+
+    .vTitle.price {
+        color: #FFB43C;
+    }
+
+    .vTitle.price i {
+        background: #FFB43C;
+    }
+
+    .vNum {
+        width: 100%;
+        /*height: 25px;*/
+        overflow: hidden;
+        display: block;
+        margin: 5px auto;
+        margin-bottom: 0;
+    }
+
+    .center {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        text-align: center;
+    }
+
+    .vNum em {
+        position: relative;
+        float: right;
+        bottom: 20px;
+        font-family: "PingFang SC";
+        font-weight: 500;
+        font-size: 12px;
+        color: #c9c9c9;
+        padding-right: 3%;
+    }
+
+    /deep/ .linear-progress {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        border-radius: 250px;
+    }
+
+    .limit {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 8px;
+    }
+
+    .limit em {
+        font-family: "PingFang SC";
+        font-weight: 300;
+        font-size: 12px;
+        text-align: right;
+        color: #e75296;
+        padding-left: 10px;
+    }
+
+    .limit span {
+        font-family: "PingFang SC";
+        font-weight: 300;
+        font-size: 12px;
+        text-align: right;
+        color: #909090;
+        float: right;
+        text-align: right;
+        padding-right: 10px;
+    }
+
+    .dataSum {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background: #fff;
+        margin-top: 10px;
+    }
+
+    .dataSum .row {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding: 2% 0;
+    }
+
+    .dataSum .row em {
+        float: left;
+        font-family: "PingFang SC";
+        font-weight: 300;
+        font-size: 18px;
+        text-align: right;
+        color: #3b3b3b;
+    }
+
+    .dataSum .row span {
+        font-family: "PingFang SC";
+        font-weight: 500;
+        font-size: 18px;
+        text-align: right;
+        color: #3b3b3b;
+        float: right;
+    }
+
+    .row .mid {
+        width: 66%;
+        height: 0px;
+        background: transparent;
+        border: 1px dotted #e0e0e0;
+        float: left;
+        margin-top: 11px;
+        margin-right: 5px;
+        margin-left: 10px;
+    }
+
+    .row .midl {
+        width: 54%;
+        height: 0px;
+    }
+
+    .login_btn {
+        width: 96%;
+        height: 50px;
+        line-height: 50px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+        margin-bottom: 30px;
+        padding-left: 3%;
+        padding-right: 3%;
+        background: #E75296;
+        color: #fff;
+        font-size: 14px;
+        text-align: center;
+        border: none;
+        padding: 0;
+        font-size: 24px;
+    }
+
+    /deep/ .mu-warning-text-color {
+        float: left;
+    }
+
+    .vNum span {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        text-align: center;
+    }
+
+    @media only screen and (max-width: 640px) {
+
+    }
+
+    @media only screen and (max-width: 480px) {
+
+    }
+
+    @media only screen and (max-width: 375px) {
+        .vNum em {
+            padding-right: 0 !important;
         }
         }
-      })
-    },
-    logoutBtn() {
-      let that = this;
-      this.$confirm('是否退出账号?', '提示', {
-        type: 'warning'
-      }).then(({result}) => {
-        if (result) {
-          localStorage.token = '';
-          that.$router.push({path: '/login'});
-        } else {
-          that.$toast.message('点击了取消');
+
+        .row .mid {
+            width: 49%;
         }
         }
-      });
-    },
-    getInfo() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        active: this.active
-      };
-      let postdata = qs.stringify(param);
-      VipUserSelfQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.user = json.Rs;
-        } else {
-          that.$toast.message(json.Memo);
+
+        .row .midl {
+            width: 44%;
+            height: 0px;
         }
         }
-      })
-    },
-  },
-  filters: {
-    hidePhone:function (val){
-      var str = String(val)
-      var len = str.length;
-      if (len >= 7) {
-        var reg = str.slice(-8, -4)
-        return str.replace(reg, "****")
-      } else if (len < 7 && len >= 6) {
-        var reg = str.slice(-4, -2)
-        return str.replace(reg, "**")
-      }
-    },
-    fmtTime: function (value) {
-      if (!value) {
-        return 0
-      } else {
-        // js默认使用毫秒
-        value = value * 1000
-        let date = new Date(value);
-        let y = date.getFullYear();
-        let MM = date.getMonth() + 1;
-        MM = MM < 10 ? ('0' + MM) : MM;
-        let d = date.getDate();
-        d = d < 10 ? ('0' + d) : d;
-        let h = date.getHours();
-        h = h < 10 ? ('0' + h) : h;
-        let m = date.getMinutes();
-        m = m < 10 ? ('0' + m) : m;
-        let s = date.getSeconds();
-        s = s < 10 ? ('0' + s) : s;
-        return y + '-' + MM + '-' + d;
-      }
-    },
-  },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //因为当钩子执行前,组件实例还没被创建
-      // vm 就是当前组件的实例相当于上面的 this,所以在 next 方法里你就可以把 vm 当 this 来用了。
-      if (to.name == 'mine') {
-        vm.getInfo();
-      }
-    });
-  },
-  watch: {
-    'active'() {
-      console.log(123);
-      this.getList();
-    }
-  },
-  components: {
-    bottomTab
-  }
-}
-</script>
+    }
 
 
-<style scoped>
-.pages {
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  background: #F2F2F2;
-}
-
-.num {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  font-family: "PingFang SC";
-  font-weight: 300;
-  font-size: 14px;
-  text-align: center;
-  color: #909090;
-  padding: 13px 0;
-}
-
-.user {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  height: 58px;
-  background: #fff;
-  padding: 17px 3%;
-  margin-bottom: 10px;
-}
-
-.user img {
-  width: 26.29px;
-  height: 26.29px;
-  float: left;
-  margin-right: 11px;
-}
-
-.user span {
-  font-family: "PingFang SC";
-  font-weight: 500;
-  font-size: 18px;
-  text-align: left;
-  color: #3b3b3b;
-}
-
-.user em {
-  font-family: "PingFang SC";
-  font-weight: normal;
-  font-size: 18px;
-  text-align: left;
-  color: #3b3b3b;
-  float: right;
-}
-
-.user p {
-  font-family: "PingFang SC";
-  font-weight: normal;
-  font-size: 14px;
-  text-align: left;
-  color: #ffb43c;
-  float: right;
-  padding: 0;
-  margin: 0;
-  margin-left: 3px;
-  line-height: 26px;
-}
-
-.value {
-  width: 100%;
-  /*height: 131px;*/
-  background: #fff;
-  padding: 13px 0;
-}
-
-.value .vTitle {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  text-align: center;
-
-  font-family: "PingFang SC";
-  font-weight: 300;
-  font-size: 15px;
-}
-
-.vTitle i {
-  width: 8px;
-  height: 8px;
-  display: inline-block;
-  border-radius: 250px;
-  margin-right: 3px;
-}
-
-.vTitle.year {
-  color: #E75296;
-}
-
-.vTitle.year i {
-  background: #e75296;
-}
-
-.vTitle.price {
-  color: #FFB43C;
-}
-
-.vTitle.price i {
-  background: #FFB43C;
-}
-
-.vNum {
-  width: 100%;
-  /*height: 25px;*/
-  overflow: hidden;
-  display: block;
-  margin: 5px auto;
-  margin-bottom: 0;
-}
-
-.center {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  text-align: center;
-}
-
-.vNum em {
-  position: relative;
-  float: right;
-  bottom: 20px;
-  font-family: "PingFang SC";
-  font-weight: 500;
-  font-size: 12px;
-  color: #c9c9c9;
-  padding-right: 3%;
-}
-
-/deep/ .linear-progress {
-  width: 90%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  border-radius: 250px;
-}
-
-.limit {
-  width: 90%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 8px;
-}
-
-.limit em {
-  font-family: "PingFang SC";
-  font-weight: 300;
-  font-size: 12px;
-  text-align: right;
-  color: #e75296;
-  padding-left: 10px;
-}
-
-.limit span {
-  font-family: "PingFang SC";
-  font-weight: 300;
-  font-size: 12px;
-  text-align: right;
-  color: #909090;
-  float: right;
-  text-align: right;
-  padding-right: 10px;
-}
-
-.dataSum {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  background: #fff;
-  margin-top: 10px;
-}
-
-.dataSum .row {
-  width: 90%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  padding: 2% 0;
-}
-
-.dataSum .row em {
-  float: left;
-  font-family: "PingFang SC";
-  font-weight: 300;
-  font-size: 18px;
-  text-align: right;
-  color: #3b3b3b;
-}
-
-.dataSum .row span {
-  font-family: "PingFang SC";
-  font-weight: 500;
-  font-size: 18px;
-  text-align: right;
-  color: #3b3b3b;
-  float: right;
-}
-
-.row .mid {
-  width: 66%;
-  height: 0px;
-  background: transparent;
-  border: 1px dotted #e0e0e0;
-  float: left;
-  margin-top: 11px;
-  margin-right: 5px;
-  margin-left: 10px;
-}
-
-.row .midl {
-  width: 54%;
-  height: 0px;
-}
-
-.login_btn {
-  width: 96%;
-  height: 50px;
-  line-height: 50px;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 10px;
-  margin-bottom: 30px;
-  padding-left: 3%;
-  padding-right: 3%;
-  background: #E75296;
-  color: #fff;
-  font-size: 14px;
-  text-align: center;
-  border: none;
-  padding: 0;
-  font-size: 24px;
-}
-
-/deep/ .mu-warning-text-color {
-  float: left;
-}
-
-.vNum span {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  text-align: center;
-}
-
-@media only screen and (max-width: 640px) {
-
-}
-
-@media only screen and (max-width: 480px) {
-
-}
-
-@media only screen and (max-width: 375px) {
-  .vNum em {
-    padding-right: 0 !important;
-  }
-
-  .row .mid {
-    width: 49%;
-  }
-
-  .row .midl {
-    width: 44%;
-    height: 0px;
-  }
-}
-
-@media only screen and (max-width: 360px) {
-  .vNum em {
-    padding-right: 0 !important;
-  }
-
-  .row .mid {
-    width: 49%;
-  }
-
-  .row .midl {
-    width: 44%;
-    height: 0px;
-  }
-}
-
-@media only screen and (max-width: 320px) {
-
-}
-
-@media only screen and (min-width: 641px) {
-
-}
-</style>
+    @media only screen and (max-width: 360px) {
+        .vNum em {
+            padding-right: 0 !important;
+        }
+
+        .row .mid {
+            width: 49%;
+        }
+
+        .row .midl {
+            width: 44%;
+            height: 0px;
+        }
+    }
+
+    @media only screen and (max-width: 320px) {
+
+    }
+
+    @media only screen and (min-width: 641px) {
+
+    }
+</style>

+ 7 - 0
pc/src/api/getApiRes.js

@@ -850,3 +850,10 @@ export function GetHrSensorsPowerPercent(postdata) {
     let url = headapi + 'v1/HrSensors/GetHrSensorsPowerPercent ';
     let url = headapi + 'v1/HrSensors/GetHrSensorsPowerPercent ';
     return getApiBasic(url, postdata);
     return getApiBasic(url, postdata);
 }
 }
+
+// 2021/01/04
+// 跨店会员用户基本信息查询(排除本店会员)
+export function AcrossUserSimpleQuery(postdata) {
+    let url = headapi + 'v1/User/AcrossUserSimpleQuery ';
+    return getApiBasic(url, postdata);
+}

+ 91 - 0
pc/src/views/courseEdit.vue

@@ -36,6 +36,7 @@
                 <el-button @click="addFinish" type="primary" v-if="FinishClass == 2">确认下课</el-button>
                 <el-button @click="addFinish" type="primary" v-if="FinishClass == 2">确认下课</el-button>
                 <el-button @click="addFinishMember">添加上课会员</el-button>
                 <el-button @click="addFinishMember">添加上课会员</el-button>
                 <el-button @click="addTempMember" type="warning">添加临时会员</el-button>
                 <el-button @click="addTempMember" type="warning">添加临时会员</el-button>
+                <el-button @click="addCrossMember" type="primary">添加跨店会员</el-button>
             </div>
             </div>
         </div>
         </div>
         <div class="table">
         <div class="table">
@@ -278,6 +279,7 @@
                     @current-change="pageChange"
                     @current-change="pageChange"
             ></el-pagination>
             ></el-pagination>
         </div>
         </div>
+        <!--添加上课会员-->
         <el-dialog title="添加上课会员" :visible.sync="dialogVisible" width="720px">
         <el-dialog title="添加上课会员" :visible.sync="dialogVisible" width="720px">
             <div class="dialogContent viplist">
             <div class="dialogContent viplist">
                 <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
                 <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
@@ -293,6 +295,7 @@
                 <el-button size="small" @click="dialogVisible = false">取消</el-button>
                 <el-button size="small" @click="dialogVisible = false">取消</el-button>
             </div>
             </div>
         </el-dialog>
         </el-dialog>
+        <!--添加临时会员-->
         <el-dialog title="添加临时会员" :visible.sync="dialogTempVisible" width="720px">
         <el-dialog title="添加临时会员" :visible.sync="dialogTempVisible" width="720px">
             <div class="dialogContent viplist">
             <div class="dialogContent viplist">
                 <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
                 <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
@@ -308,6 +311,22 @@
                 <el-button size="small" @click="dialogTempVisible = false">取消</el-button>
                 <el-button size="small" @click="dialogTempVisible = false">取消</el-button>
             </div>
             </div>
         </el-dialog>
         </el-dialog>
+        <!--添加跨店会员-->
+        <el-dialog title="添加跨店会员" :visible.sync="dialogAcrossVisible" width="720px">
+            <div class="dialogContent viplist">
+                <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
+                <div>
+                    <el-transfer filterable v-model="dialogAcrossValue" :data="form.dialogAcrossdata"
+                                 :titles="['跨店会员', '已添加会员']"></el-transfer>
+                </div>
+            </div>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small" :disabled="BtnAcrossConfirmMember" :loading="BtnAcrossConfirmMember"
+                           @click="AcrossConfirmMember">确定
+                </el-button>
+                <el-button size="small" @click="dialogAcrossVisible = false">取消</el-button>
+            </div>
+        </el-dialog>
         <el-dialog title="确认下课" :visible.sync="dialogFinishVisible" width="650px">
         <el-dialog title="确认下课" :visible.sync="dialogFinishVisible" width="650px">
             <div class="dialogContent">
             <div class="dialogContent">
                 <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
                 <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
@@ -354,6 +373,7 @@
         ClassOverTmpDetailAdd,
         ClassOverTmpDetailAdd,
         ClassTmpUserOverDetailDel,
         ClassTmpUserOverDetailDel,
         BindHrSensorsToTempUser,
         BindHrSensorsToTempUser,
+        AcrossUserSimpleQuery,
     } from "../api/getApiRes";
     } from "../api/getApiRes";
 
 
     let qs = require('qs');
     let qs = require('qs');
@@ -364,6 +384,7 @@
                 BtnConfirmClassFinish: false,
                 BtnConfirmClassFinish: false,
                 BtnConfirmMember: false,
                 BtnConfirmMember: false,
                 BtnTempConfirmMember: false,
                 BtnTempConfirmMember: false,
+                BtnAcrossConfirmMember: false,
                 BeginState: true,//确认上课
                 BeginState: true,//确认上课
                 tableData: [],
                 tableData: [],
                 title: '',
                 title: '',
@@ -373,6 +394,7 @@
                 FinishClass: 0,//当前上课状态 1已下课 2已上课 3准备上课 FinishClass
                 FinishClass: 0,//当前上课状态 1已下课 2已上课 3准备上课 FinishClass
                 dialogVisible: false,//添加下课会员
                 dialogVisible: false,//添加下课会员
                 dialogTempVisible: false,//添加临时会员
                 dialogTempVisible: false,//添加临时会员
+                dialogAcrossVisible: false,//
                 dialogFinishVisible: false,//确认下课dialog
                 dialogFinishVisible: false,//确认下课dialog
                 dialogLesson: false,//课时调整
                 dialogLesson: false,//课时调整
                 dialogGift: false,//赠送课时调整
                 dialogGift: false,//赠送课时调整
@@ -383,6 +405,7 @@
                 dialogValue: [],
                 dialogValue: [],
                 dialogTempValue: [],
                 dialogTempValue: [],
                 dialogCoachValue: [],
                 dialogCoachValue: [],
+                dialogAcrossValue: [],
                 BeginTime: '',
                 BeginTime: '',
                 ClassName: '',
                 ClassName: '',
                 // panel 配置项目
                 // panel 配置项目
@@ -452,6 +475,7 @@
                     dialogTempdata: [],//穿梭待选
                     dialogTempdata: [],//穿梭待选
                     dialogValue: [],//穿梭已选
                     dialogValue: [],//穿梭已选
                     dialogCoachdata: [],//穿梭已选
                     dialogCoachdata: [],//穿梭已选
+                    dialogAcrossdata: [],//穿梭已选
                 },
                 },
                 memberTypes: [
                 memberTypes: [
                     {value: 1, label: '年会员'},
                     {value: 1, label: '年会员'},
@@ -836,6 +860,24 @@
                     }
                     }
                 })
                 })
             },
             },
+            // 获取跨店会员列表
+            getAcrossUserQuery() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    start: 1,
+                    tableMax: 999,
+                };
+                let postdata = qs.stringify(param);
+                AcrossUserSimpleQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.form.dialogAcrossdata = turnResToOptionBySimViper(json.Rs);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             // 添加临时会员
             // 添加临时会员
             addTempMember() {
             addTempMember() {
                 let that = this;
                 let that = this;
@@ -854,6 +896,21 @@
                 that.dialogTempValue = std;
                 that.dialogTempValue = std;
                 this.dialogTempVisible = true
                 this.dialogTempVisible = true
             },
             },
+            // 添加跨店会员
+            addCrossMember() {
+                let that = this;
+                this.clearForm();
+                this.getAcrossUserQuery();
+                this.dialogAcrossValue = [];
+                let std = [];
+                if (this.tableData) {
+                    this.tableData.map(function (item) {
+                            std.push(item.UserId)
+                    })
+                }
+                that.dialogAcrossValue = std;
+                this.dialogAcrossVisible = true
+            },
             clearForm() {
             clearForm() {
                 // clear
                 // clear
                 this.form.name = '';
                 this.form.name = '';
@@ -947,6 +1004,40 @@
 
 
                 })
                 })
             },
             },
+            // 确认提交跨店会员
+            AcrossConfirmMember() {
+                let that = this;
+                if (that.BtnAcrossConfirmMember == true) return false;
+                that.BtnAcrossConfirmMember = true;
+                // checkNum
+                let userlist = that.dialogAcrossValue.toString();
+                let param = {
+                    token: localStorage.token,
+                    stdId: this.$route.query.StdId,
+                    userlist: userlist
+                };
+                let postdata = qs.stringify(param);
+                // 下课记录详情添加
+                ClassOverDetailAdd(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogAcrossVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '会员添加成功!',
+                            type: 'success'
+                        });
+                        that.BtnAcrossConfirmMember = false;
+                    } else {
+                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
+                        that.BtnAcrossConfirmMember = false;
+                    }
+
+                })
+            },
             pauseRow(row, status) {
             pauseRow(row, status) {
                 let that = this;
                 let that = this;
                 let param = {
                 let param = {