Browse Source

Merge branch 'fine_music_score' into online

lex 2 years ago
parent
commit
d268dae705

+ 3 - 17
src/components/MPayment.vue

@@ -1,19 +1,7 @@
 <template>
   <div class="mpayment">
-    <van-popup
-      v-model="isShow"
-      :close-on-click-overlay="false"
-      close-icon-position="top-left"
-      position="bottom"
-      round
-      :closeOnPopstate="true"
-      :safe-area-inset-bottom="true"
-      :style="{ minHeight: '30%' }"
-    >
-      <i
-        @click="onClose"
-        class="van-icon van-icon-cross van-popup__close-icon van-popup__close-icon--top-left"
-      ></i>
+    <van-popup v-model="isShow" :close-on-click-overlay="false" close-icon-position="top-left" position="bottom" round :closeOnPopstate="true" :safe-area-inset-bottom="true" :style="{ minHeight: '30%' }">
+      <i @click="onClose" class="van-icon van-icon-cross van-popup__close-icon van-popup__close-icon--top-left"></i>
       <div class="title van-hairline--bottom">选择支付方式</div>
       <div class="payAmount">
         <p>应付金额</p>
@@ -142,9 +130,7 @@ export default {
       } else {
         url += `/#/payResult`;
       }
-      url += `?payType=${this.pay_channel}&payment=${JSON.stringify(
-        this.paymentObject
-      )}&platform=teacher`;
+      url += `?payType=${this.pay_channel}&payment=${JSON.stringify(this.paymentObject)}&platform=teacher`;
       this.$emit("onChangeStatus", false); // 初始化弹窗状态
       window.location.href = url;
     },

+ 279 - 278
src/views/app/PeriodExchange.vue

@@ -1,316 +1,317 @@
 <template>
-    <div class="periodExchange">
-        <m-header v-if="headerStatus" />
+  <div class="periodExchange">
+    <m-header v-if="headerStatus" />
 
-        <van-cell-group>
-            <van-cell :center="true">
-                <template slot="icon">
-                    <img class="logo" v-if="userInfo.avatar" :src="userInfo.avatar" alt="">
-                    <img class="logo" v-else src="@/assets/images/icon_student.png" alt="">
-                </template>
-                <template slot="title">
-                    <p class="exchangeText">{{ userInfo.realName }}</p>
-                </template>
-                <template slot="label">
-                    <p class="info">剩余时长:{{ availableMinutes }}</p>
-                </template>
-            </van-cell>
-        </van-cell-group>
+    <van-cell-group>
+      <van-cell :center="true">
+        <template slot="icon">
+          <img class="logo" v-if="userInfo.avatar" :src="userInfo.avatar" alt="" />
+          <img class="logo" v-else src="@/assets/images/icon_student.png" alt="" />
+        </template>
+        <template slot="title">
+          <p class="exchangeText">{{ userInfo.realName }}</p>
+        </template>
+        <template slot="label">
+          <p class="info">剩余时长:{{ availableMinutes }}</p>
+        </template>
+      </van-cell>
+    </van-cell-group>
 
-        <div class="activeList" v-if="dataShow">
-            <h2>优惠活动:</h2>
+    <div class="activeList" v-if="dataShow">
+      <h2>优惠活动:</h2>
 
-            <div class="active" @click="onPayOrder(item)" v-for="(item, index) in dataList" :key="index">
-                <van-icon name="question-o" v-if="imageStatus" @click.stop="onMore(item)" class="icon_question" />
-                <!-- <img :src="item.coverImg" alt=""> -->
-                <van-image :src="item.coverImg" @load="onImageLoad">
-                    <template v-slot:loading>
-                        <van-loading type="spinner" size="20" />
-                    </template>
-                </van-image>
-            </div>
-        </div>
-        <div class="activeList" v-else>
-            <h2>优惠活动:</h2>
-            <m-empty class="empty" msg="暂无优惠活动"  key="data" />
-        </div>
+      <div class="active" @click="onPayOrder(item)" v-for="(item, index) in dataList" :key="index">
+        <van-icon name="question-o" v-if="imageStatus" @click.stop="onMore(item)" class="icon_question" />
+        <!-- <img :src="item.coverImg" alt=""> -->
+        <van-image :src="item.coverImg" @load="onImageLoad">
+          <template v-slot:loading>
+            <van-loading type="spinner" size="20" />
+          </template>
+        </van-image>
+      </div>
+    </div>
+    <div class="activeList" v-else>
+      <h2>优惠活动:</h2>
+      <m-empty class="empty" msg="暂无优惠活动" key="data" />
+    </div>
 
-        <!-- <div class="pay_btn" >确认兑换</div> -->
-        <van-popup v-model="popupShow" closeable position="bottom"
-        :style="{ minHeight: '30%', maxHeight: '60%' }" >
-            <div class="popupContent" v-html="popupContent"></div>
-        </van-popup>
+    <!-- <div class="pay_btn" >确认兑换</div> -->
+    <van-popup v-model="popupShow" closeable position="bottom" :style="{ minHeight: '30%', maxHeight: '60%' }">
+      <div class="popupContent" v-html="popupContent"></div>
+    </van-popup>
 
-        <m-payment :closeStatus="isStatus" :amount="payMoney" :payment="payment" @onChangeStatus="onChangeStatus" />
-    </div>
+    <m-payment :closeStatus="isStatus" :amount="payMoney" :payment="payment" @onChangeStatus="onChangeStatus" />
+  </div>
 </template>
 <script>
 /* eslint-disable */
-import MHeader from '@/components/MHeader'
-import MEmpty from '@/components/MEmpty'
-import MPayment from '@/components/MPayment'
-import { browser, calcMinute }  from '@/common/common'
-import { tenantEntryActivitesList, queryUserInfo, sysTenantAccountGet, createOrder } from '@/api/app'
+import MHeader from "@/components/MHeader";
+import MEmpty from "@/components/MEmpty";
+import MPayment from "@/components/MPayment";
+import { browser, calcMinute } from "@/common/common";
+import { tenantEntryActivitesList, queryUserInfo, sysTenantAccountGet, createOrder } from "@/api/app";
 
 export default {
-    name: 'courseApply',
-    components: { MHeader, MEmpty, MPayment },
-    data() {
-        return {
-            userInfo: {},
-            availableMinutes: 0,
-            headerStatus: true,
-            result: {}, // 生成订单的数据
-            dataList: [],
-            isClick: false,
-            popupShow: false,
-            popupContent: null,
-            dataShow: true, // 是否有数据
-            imageStatus: false,
-            isStatus: false,
-            payment: {}, // 支付对象
-            payMoney: 0,
-        }
-    },
-    mounted() {
-        let params = this.$route.query
-        if(params.Authorization) {
-            localStorage.setItem('Authorization', decodeURI(params.Authorization))
-            localStorage.setItem('userInfo', decodeURI(params.Authorization))
+  name: "courseApply",
+  components: { MHeader, MEmpty, MPayment },
+  data() {
+    return {
+      userInfo: {},
+      availableMinutes: 0,
+      headerStatus: true,
+      result: {}, // 生成订单的数据
+      dataList: [],
+      isClick: false,
+      popupShow: false,
+      popupContent: null,
+      dataShow: true, // 是否有数据
+      imageStatus: false,
+      isStatus: false,
+      payment: {}, // 支付对象
+      payMoney: 0,
+    };
+  },
+  mounted() {
+    let params = this.$route.query;
+    if (params.Authorization) {
+      localStorage.setItem("Authorization", decodeURI(params.Authorization));
+      localStorage.setItem("userInfo", decodeURI(params.Authorization));
+    }
+
+    document.title = "课时兑换";
+    if (browser().android || browser().iPhone) {
+      this.headerStatus = false;
+    }
+
+    this.__init();
+  },
+  methods: {
+    async __init() {
+      let loadingStatus = true;
+      this.$toast.loading({
+        duration: 0,
+        message: "加载中...",
+        forbidClick: true,
+        loadingType: "spinner",
+      });
+      await queryUserInfo().then((res) => {
+        let result = res.data;
+        if (result) {
+          this.userInfo = result;
         }
+      });
 
-        document.title = '课时兑换'
-        if(browser().android || browser().iPhone) {
-            this.headerStatus = false
+      await sysTenantAccountGet().then((res) => {
+        let result = res.data;
+        if (result.code == 200) {
+          let tempResult = result.data;
+          if (tempResult) {
+            this.availableMinutes = calcMinute(tempResult.availableMinutes ? tempResult.availableMinutes : 0);
+          }
+        } else {
+          loadingStatus = false;
+          this.$toast(result.msg);
         }
+      });
 
-        this.__init()
+      await tenantEntryActivitesList().then((res) => {
+        let result = res.data;
+        if (result.code == 200) {
+          this.dataList = result.data.rows ? result.data.rows : [];
+        } else {
+          loadingStatus = false;
+          this.$toast(result.msg);
+        }
+        if (this.dataList.length <= 0) {
+          this.dataShow = false;
+        }
+      });
+      if (loadingStatus) {
+        this.$toast.clear();
+      }
     },
-    methods: {
-        async __init() {
-            let loadingStatus = true
-            this.$toast.loading({
-                duration: 0,
-                message: '加载中...',
-                forbidClick: true,
-                loadingType: 'spinner'
-            })
-            await queryUserInfo().then(res => {
-                let result = res.data
-                if(result) {
-                    this.userInfo = result
-                }
-            })
-
-            await sysTenantAccountGet().then(res => {
-                let result = res.data
-                if(result.code == 200) {
-                    let tempResult = result.data
-                    if(tempResult) {
-                        this.availableMinutes = calcMinute(tempResult.availableMinutes ? tempResult.availableMinutes : 0)
-                    }
-                } else {
-                    loadingStatus = false
-                    this.$toast(result.msg)
-                }
-            })
-
-            await tenantEntryActivitesList().then(res => {
-                let result = res.data
-                if(result.code == 200) {
-                    this.dataList = result.data.rows ? result.data.rows :  []
-                } else {
-                    loadingStatus = false
-                    this.$toast(result.msg)
-                }
-                if(this.dataList.length <= 0) {
-                    this.dataShow = false
-                }
+    onImageLoad() {
+      this.imageStatus = true;
+    },
+    onPayOrder(item) {
+      // activitiesId
+      if (this.isClick) {
+        return;
+      }
+      this.$toast.loading({
+        duration: 0,
+        message: "加载中...",
+        forbidClick: true,
+        loadingType: "spinner",
+      });
+      this.isClick = true;
+      createOrder({ activitiesId: item.id }).then((res) => {
+        let result = res.data;
+        this.$toast.clear();
+        this.isClick = false;
+        if (result.code == 200) {
+          this.result = result.data;
+          this.onSubmit();
+        } else if (result.code == 100) {
+          this.$dialog
+            .confirm({
+              // title: '提示',
+              message: result.data,
+              confirmButtonColor: "#269a93",
+              cancelButtonText: "取消",
+              confirmButtonText: "继续付款",
             })
-            if(loadingStatus) {
-                this.$toast.clear()
-            }
-        },
-        onImageLoad() {
-            this.imageStatus = true
-        },
-        onPayOrder(item) {
-            // activitiesId
-            if(this.isClick) {
-                return
-            }
-            this.$toast.loading({
+            .then(() => {
+              this.$toast.loading({
                 duration: 0,
-                message: '加载中...',
+                message: "加载中...",
                 forbidClick: true,
-                loadingType: 'spinner'
-            })
-            this.isClick = true
-            createOrder({ activitiesId: item.id }).then(res => {
-                let result = res.data
-                this.$toast.clear()
-                this.isClick = false
-                if(result.code == 200) {
-                    this.result = result.data
-                    this.onSubmit()
-                } else if(result.code == 100) {
-                    this.$dialog.confirm({
-                        // title: '提示',
-                        message: result.data,
-                        confirmButtonColor: '#269a93',
-                        cancelButtonText: '取消',
-                        confirmButtonText: '继续付款'
-                    }).then(() => {
-                        this.$toast.loading({
-                            duration: 0,
-                            message: '加载中...',
-                            forbidClick: true,
-                            loadingType: 'spinner'
-                        })
-                        // 继续支付
-                        createOrder({ activitiesId: item.id, isContinuePay: true }).then(res => {
-                            let result = res.data
-                            this.$toast.clear()
-                            if(result.code == 200) {
-                                this.result = result.data
-                                this.onSubmit()
-                            } else {
-                                this.$toast(result.msg)
-                            }
-                        })
-                    })
+                loadingType: "spinner",
+              });
+              // 继续支付
+              createOrder({ activitiesId: item.id, isContinuePay: true }).then((res) => {
+                let result = res.data;
+                this.$toast.clear();
+                if (result.code == 200) {
+                  this.result = result.data;
+                  this.onSubmit();
                 } else {
-                    this.$toast(result.msg)
+                  this.$toast(result.msg);
                 }
-            })
-        },
-        onChangeStatus(val) {
-            this.isStatus = val
-        },
-        onSubmit() {
-            // submit 提交
-            let result = this.result
-            let f = result.payMap
-            this.payMoney = Number(f.amount)
-            if(result.type == "YQPAY") {
-                document.querySelector('#onSubmit').action = f.host
-                document.querySelector('#apiContent').value = f.apiContent
-                document.querySelector('#merNo').value = f.merNo
-                document.querySelector('#notifyUrl').value = f.notifyUrl
-                document.querySelector('#sign').value = f.sign
-                document.querySelector('#signType').value = f.signType
-                document.querySelector('#timestamp').value = f.timestamp
-                document.querySelector('#version').value = f.version
-                document.querySelector('#onSubmit').submit()
-            } else if(result.type == "ADAPAY") {
-                // 汇付天下
-				this.payment = result
-				// 开始支付窗口
-				this.isStatus = true
-            }
-        },
-        onMore(item) {
-            this.popupContent = item.detail
-            this.popupShow = true
+              });
+            });
+        } else {
+          this.$toast(result.msg);
         }
-    }
-}
+      });
+    },
+    onChangeStatus(val) {
+      this.isStatus = val;
+    },
+    onSubmit() {
+      // submit 提交
+      let result = this.result;
+      let f = result.payMap;
+      this.payMoney = Number(f.amount);
+      if (result.type == "YQPAY") {
+        document.querySelector("#onSubmit").action = f.host;
+        document.querySelector("#apiContent").value = f.apiContent;
+        document.querySelector("#merNo").value = f.merNo;
+        document.querySelector("#notifyUrl").value = f.notifyUrl;
+        document.querySelector("#sign").value = f.sign;
+        document.querySelector("#signType").value = f.signType;
+        document.querySelector("#timestamp").value = f.timestamp;
+        document.querySelector("#version").value = f.version;
+        document.querySelector("#onSubmit").submit();
+      } else if (result.type == "ADAPAY" || result.type == "YEEPAY") {
+        // 汇付天下
+        this.payment = result;
+        // 开始支付窗口
+        this.isStatus = true;
+      }
+    },
+    onMore(item) {
+      this.popupContent = item.detail;
+      this.popupShow = true;
+    },
+  },
+};
 </script>
-<style lang='less' scoped>
+<style lang="less" scoped>
 @import url("../../assets/commonLess/variable.less");
 .periodExchange {
-    min-height: 100vh;
-    position: relative;
-    background: #fff;
-    .logo {
-        width: .5rem;
-        height: .5rem;
-        border-radius: 50%;
-        overflow: hidden;
-        margin-right: .13rem;
-    }
-    /deep/.van-cell {
-        margin-top: -1px;
-        padding: .26rem .16rem .15rem;
-        // background: #14928A;
-        line-height: .24rem;
-    }
-    .exchangeText {
-        font-size: .21rem;
-        color: #1A1A1A;
-        font-weight: 500;
-    }
-    .info {
-        font-size: .14rem;
-        color: #808080;
-    }
-    [class*='van-hairline']{
-         &::after{
-             border: 0 solid #fff;
-         }
+  min-height: 100vh;
+  position: relative;
+  background: #fff;
+  .logo {
+    width: 0.5rem;
+    height: 0.5rem;
+    border-radius: 50%;
+    overflow: hidden;
+    margin-right: 0.13rem;
+  }
+  /deep/.van-cell {
+    margin-top: -1px;
+    padding: 0.26rem 0.16rem 0.15rem;
+    // background: #14928A;
+    line-height: 0.24rem;
+  }
+  .exchangeText {
+    font-size: 0.21rem;
+    color: #1a1a1a;
+    font-weight: 500;
+  }
+  .info {
+    font-size: 0.14rem;
+    color: #808080;
+  }
+  [class*="van-hairline"] {
+    &::after {
+      border: 0 solid #fff;
     }
+  }
 }
 .activeList {
-    padding: .15rem .16rem 0;
-    // margin-top: -.6rem;
+  padding: 0.15rem 0.16rem 0;
+  // margin-top: -.6rem;
+  position: relative;
+  z-index: 49;
+  h2 {
+    font-size: 0.16rem;
+    color: #444;
+    padding-left: 0.15rem;
+    padding-bottom: 0.15rem;
     position: relative;
-    z-index: 49;
-    h2 {
-        font-size: .16rem;
-        color: #444;
-        padding-left: .15rem;
-        padding-bottom: .15rem;
-        position: relative;
-        &::before {
-            content: ' ';
-            width: .04rem;
-            height: .15rem;
-            background:@mColor;
-            border-radius: .02rem;
-            position: absolute;
-            left: .02rem;
-            top: .04rem;
-        }
-        span {
-            float: right;
-        }
+    &::before {
+      content: " ";
+      width: 0.04rem;
+      height: 0.15rem;
+      background: @mColor;
+      border-radius: 0.02rem;
+      position: absolute;
+      left: 0.02rem;
+      top: 0.04rem;
     }
-    .active {
-        position: relative;
-        margin-bottom: .15rem;
-        line-height: 0;
-        // box-shadow:0px 0px 16px 0px rgba(155,145,41,0.19);
-    }
-    img {
-        width: 100%;
-    }
-    .icon_question {
-        position: absolute;
-        z-index: 10;
-        bottom: .06rem;
-        right: .12rem;
-        color: #E94A47;
-        font-size: .18rem;
+    span {
+      float: right;
     }
+  }
+  .active {
+    position: relative;
+    margin-bottom: 0.15rem;
+    line-height: 0;
+    // box-shadow:0px 0px 16px 0px rgba(155,145,41,0.19);
+  }
+  img {
+    width: 100%;
+  }
+  .icon_question {
+    position: absolute;
+    z-index: 10;
+    bottom: 0.06rem;
+    right: 0.12rem;
+    color: #e94a47;
+    font-size: 0.18rem;
+  }
 }
 .popupContent {
-    padding: .4rem .16rem .1rem;
+  padding: 0.4rem 0.16rem 0.1rem;
 }
 .van-image {
-    display: block;
-    width: 100%;
-    min-width: 1rem;
+  display: block;
+  width: 100%;
+  min-width: 1rem;
 }
 .pay_btn {
-    background: @mColor;
-    line-height: 0.45rem;
-    color: #fff;
-    font-size: 0.18rem;
-    border-radius: 0.5rem;
-    text-align: center;
-    position: absolute;
-    width: 90%;
-    margin-left: 5%;
-    bottom: .2rem;
+  background: @mColor;
+  line-height: 0.45rem;
+  color: #fff;
+  font-size: 0.18rem;
+  border-radius: 0.5rem;
+  text-align: center;
+  position: absolute;
+  width: 90%;
+  margin-left: 5%;
+  bottom: 0.2rem;
 }
-</style>
+</style>

+ 19 - 120
src/views/service/GoodsOrder.vue

@@ -1,50 +1,16 @@
 <template>
   <div class="goodsOrder">
     <m-header :backUrl="backUrl" />
-    <van-tabs
-      color="#01C1B5"
-      title-active-color="#000"
-      @change="onTabChange"
-      title-inactive-color="#808080"
-      v-model="activeTab"
-    >
+    <van-tabs color="#01C1B5" title-active-color="#000" @change="onTabChange" title-inactive-color="#808080" v-model="activeTab">
       <van-tab title="待支付" name="ING">
-        <search
-          @onSearch="onSearch"
-          placeholder="请输入学生姓名或手机号"
-          style="margin-bottom: 0.15rem"
-        />
-        <van-list
-          v-model="loading"
-          v-if="dataShow"
-          key="ing"
-          :finished="finished"
-          :immediate-check="false"
-          finished-text=" "
-          @load="getGoodsList()"
-        >
-          <van-cell-group
-            class="order-section"
-            :border="false"
-            v-for="(list, index) in dataList"
-            :key="index"
-            @click="onGoodDetail(list)"
-          >
+        <search @onSearch="onSearch" placeholder="请输入学生姓名或手机号" style="margin-bottom: 0.15rem" />
+        <van-list v-model="loading" v-if="dataShow" key="ing" :finished="finished" :immediate-check="false" finished-text=" " @load="getGoodsList()">
+          <van-cell-group class="order-section" :border="false" v-for="(list, index) in dataList" :key="index" @click="onGoodDetail(list)">
             <van-cell title-class="order-title" value-class="order-status">
               <template #title>学生姓名:{{ list.userName }}</template>
               <template>待支付</template>
             </van-cell>
-            <van-cell
-              v-for="(item, i) in list.goodsJson"
-              :border="i == list.goodsJson.length - 1 ? true : false"
-              :key="i"
-              :class="[
-                i != list.goodsJson.length - 1 ? 'input-bottom' : null,
-                'input-cell',
-              ]"
-              class="input-cell"
-              :center="true"
-            >
+            <van-cell v-for="(item, i) in list.goodsJson" :border="i == list.goodsJson.length - 1 ? true : false" :key="i" :class="[i != list.goodsJson.length - 1 ? 'input-bottom' : null, 'input-cell']" class="input-cell" :center="true">
               <template slot="icon">
                 <van-image :src="item.image" class="logo">
                   <template v-slot:loading>
@@ -58,24 +24,12 @@
               </template>
               <template #default> x {{ item.goodsNum }} </template>
             </van-cell>
-            <van-cell
-              title-class="order-money"
-              title-style="flex: auto 1"
-              style="align-items: center"
-              class="van-hairline--top"
-            >
+            <van-cell title-class="order-money" title-style="flex: auto 1" style="align-items: center" class="van-hairline--top">
               <template #title>
                 订单金额:<span>¥{{ list.totalAmount | moneyFormat }}</span>
               </template>
               <template>
-                <van-button
-                  size="small"
-                  round
-                  class="van-small__btn"
-                  @click.stop="onRePay(list)"
-                  type="default"
-                  >继续支付</van-button
-                >
+                <van-button size="small" round class="van-small__btn" @click.stop="onRePay(list)" type="default">继续支付</van-button>
               </template>
             </van-cell>
           </van-cell-group>
@@ -83,51 +37,14 @@
         <m-empty v-else msg="暂无订单" />
       </van-tab>
       <van-tab title="已支付" name="SUCCESS">
-        <search
-          @onSearch="onSearch2"
-          placeholder="请输入学生姓名或手机号"
-          style="margin-bottom: 0.15rem"
-        />
-        <van-list
-          v-model="loading2"
-          v-if="dataShow2"
-          key="success"
-          :immediate-check="false"
-          :finished="finished2"
-          finished-text=" "
-          @load="getGoodsList2()"
-        >
-          <van-cell-group
-            class="order-section"
-            :border="false"
-            v-for="(list, index) in dataList2"
-            :key="index"
-            @click="onGoodDetail(list)"
-          >
-            <van-cell
-              title-class="order-title"
-              value-class="order-status success"
-            >
-              <template #title
-                >学生姓名:{{ list.userName }}
-                <span
-                  style="padding-left: 0.1rem"
-                  v-if="list.authorUser != operationId"
-                  >学员自建</span
-                ></template
-              >
+        <search @onSearch="onSearch2" placeholder="请输入学生姓名或手机号" style="margin-bottom: 0.15rem" />
+        <van-list v-model="loading2" v-if="dataShow2" key="success" :immediate-check="false" :finished="finished2" finished-text=" " @load="getGoodsList2()">
+          <van-cell-group class="order-section" :border="false" v-for="(list, index) in dataList2" :key="index" @click="onGoodDetail(list)">
+            <van-cell title-class="order-title" value-class="order-status success">
+              <template #title>学生姓名:{{ list.userName }} <span style="padding-left: 0.1rem" v-if="list.authorUser != operationId">学员自建</span></template>
               <template>支付成功</template>
             </van-cell>
-            <van-cell
-              v-for="(item, i) in list.goodsJson"
-              :border="i == list.goodsJson.length - 1 ? true : false"
-              :key="i"
-              :class="[
-                i != list.goodsJson.length - 1 ? 'input-bottom' : null,
-                'input-cell',
-              ]"
-              :center="true"
-            >
+            <van-cell v-for="(item, i) in list.goodsJson" :border="i == list.goodsJson.length - 1 ? true : false" :key="i" :class="[i != list.goodsJson.length - 1 ? 'input-bottom' : null, 'input-cell']" :center="true">
               <template slot="icon">
                 <van-image :src="item.image" class="logo">
                   <template v-slot:loading>
@@ -141,28 +58,15 @@
               </template>
               <template #default> x {{ item.goodsNum }} </template>
             </van-cell>
-            <van-cell
-              title-class="order-money"
-              class="van-hairline--top order-payment"
-              title=" "
-            >
+            <van-cell title-class="order-money" class="van-hairline--top order-payment" title=" ">
               <template #title>
                 订单金额:<span>¥{{ list.totalAmount | moneyFormat }}</span>
               </template>
               <template>
                 <div>
-                  <div
-                    class="order-money-get"
-                    v-if="list.receiveStatus == 'NO_RECEIVE'"
-                  >
-                    未确认
-                  </div>
-                  <div v-if="list.receiveStatus == 'AUTO_RECEIVE'">
-                    自动确认收货
-                  </div>
-                  <div v-if="list.receiveStatus == 'MANUAL_RECEIVE'">
-                    手动确认收货
-                  </div>
+                  <div class="order-money-get" v-if="list.receiveStatus == 'NO_RECEIVE'">未确认</div>
+                  <div v-if="list.receiveStatus == 'AUTO_RECEIVE'">自动确认收货</div>
+                  <div v-if="list.receiveStatus == 'MANUAL_RECEIVE'">手动确认收货</div>
                 </div>
               </template>
             </van-cell>
@@ -172,12 +76,7 @@
       </van-tab>
     </van-tabs>
 
-    <m-payment
-      :closeStatus="isStatus"
-      :amount="payMoney"
-      :payment="payment"
-      @onChangeStatus="onChangeStatus"
-    />
+    <m-payment :closeStatus="isStatus" :amount="payMoney" :payment="payment" @onChangeStatus="onChangeStatus" />
   </div>
 </template>
 
@@ -411,7 +310,7 @@ export default {
             balance: result.totalPrice,
           },
         });
-      } else if (result.type == "ADAPAY") {
+      } else if (result.type == "ADAPAY" || result.type == "YEEPAY") {
         this.payment = result;
         this.payMoney = result.payMap.amount;
         // 开始支付窗口

+ 36 - 199
src/views/service/GoodsSale.vue

@@ -4,30 +4,11 @@
       <m-header />
 
       <van-cell-group>
-        <van-field
-          readonly
-          clickable
-          label="订单类型"
-          :value="orderText"
-          input-align="right"
-          placeholder="选择类型"
-          @click="showPicker = true"
-        />
+        <van-field readonly clickable label="订单类型" :value="orderText" input-align="right" placeholder="选择类型" @click="showPicker = true" />
         <van-popup v-model="showPicker" round position="bottom">
-          <van-picker
-            show-toolbar
-            :columns="columns"
-            @cancel="showPicker = false"
-            @confirm="onConfirm"
-          />
+          <van-picker show-toolbar :columns="columns" @cancel="showPicker = false" @confirm="onConfirm" />
         </van-popup>
-        <van-field
-          :readonly="true"
-          label="学生姓名"
-          v-model="studentName"
-          placeholder="请输入学生姓名"
-          input-align="right"
-        />
+        <van-field :readonly="true" label="学生姓名" v-model="studentName" placeholder="请输入学生姓名" input-align="right" />
         <van-field
           label="选择商品"
           :readonly="true"
@@ -41,12 +22,7 @@
           placeholder="选择商品"
           input-align="right"
         />
-        <van-cell
-          v-for="(item, index) in goodsList"
-          :key="index"
-          class="input-cell"
-          :center="true"
-        >
+        <van-cell v-for="(item, index) in goodsList" :key="index" class="input-cell" :center="true">
           <template slot="icon">
             <van-image :src="item.image" class="logo">
               <template v-slot:loading>
@@ -57,151 +33,58 @@
           <template slot="title">
             <div>{{ item.goodsName }}</div>
             <div class="price-section detail">
-              <span class="money"
-                ><i>现价:¥</i>{{ item.discountPrice | moneyFormat }}</span
-              >
+              <span class="money"><i>现价:¥</i>{{ item.discountPrice | moneyFormat }}</span>
               <p class="groupPrice">
-                <span class="groupTitle">团购价:</span
-                ><span class="groupMoney"
-                  >¥{{ item.groupPurchasePrice | moneyFormat }}</span
-                >
+                <span class="groupTitle">团购价:</span><span class="groupMoney">¥{{ item.groupPurchasePrice | moneyFormat }}</span>
               </p>
             </div>
 
             <div style="position: absolute; right: 0.16rem; bottom: 0.1rem">
-              <van-stepper
-                @change="calcPrice"
-                :disable-input="true"
-                v-model="item.goodsNum"
-                button-size="22"
-              />
+              <van-stepper @change="calcPrice" :disable-input="true" v-model="item.goodsNum" button-size="22" />
             </div>
-            <van-icon
-              class="icon_close"
-              name="cross"
-              @click="onGoodDel(goodsList, item)"
-            />
+            <van-icon class="icon_close" name="cross" @click="onGoodDel(goodsList, item)" />
           </template>
         </van-cell>
       </van-cell-group>
 
       <!-- 是否用余额支付 支付金额大于0时才会显示是否用余额支付 -->
       <van-cell-group class="pay-section">
-        <van-cell
-          :disabled="false"
-          title="总价格"
-          title-class="pay-name"
-          value-class="pay-value"
-          :center="true"
-        >
+        <van-cell :disabled="false" title="总价格" title-class="pay-name" value-class="pay-value" :center="true">
           <template #default> ¥{{ payCountMoney | moneyFormat }} </template>
         </van-cell>
-        <van-field
-          label="减免金额"
-          @input="setNoMore"
-          v-model="marketAmount"
-          type="number"
-          ref="marketInput"
-          placeholder="请输入减免金额"
-          input-align="right"
-        />
+        <van-field label="减免金额" @input="setNoMore" v-model="marketAmount" type="number" ref="marketInput" placeholder="请输入减免金额" input-align="right" />
       </van-cell-group>
 
-      <protocol
-        v-model="agreeStatus"
-        :userId="studentId.toString()"
-        style="padding-top: 0.08rem"
-      />
+      <protocol v-model="agreeStatus" :userId="studentId.toString()" style="padding-top: 0.08rem" />
 
       <div class="button-group">
-        <van-button
-          class="btn-sure"
-          type="primary"
-          @click="onRefundSure(obj)"
-          round
-          size="large"
-          >确认</van-button
-        >
+        <van-button class="btn-sure" type="primary" @click="onRefundSure(obj)" round size="large">确认</van-button>
       </div>
     </div>
 
-    <van-popup
-      class="popup-qrcode"
-      v-model="qrCodeStatus"
-      closeable
-      close-icon="cross"
-      @close="onClose"
-    >
+    <van-popup class="popup-qrcode" v-model="qrCodeStatus" closeable close-icon="cross" @close="onClose">
       <div id="qrcode">
-        <vue-qr
-          :logoSrc="config.imagePath"
-          :text="config.value"
-          :margin="10"
-          :size="220"
-        ></vue-qr>
+        <vue-qr :logoSrc="config.imagePath" :text="config.value" :margin="10" :size="220"></vue-qr>
       </div>
-      <a
-        id="tt"
-        ref="download"
-        v-show="false"
-        :href="downloadUrl"
-        :download="downloadfilename"
-      ></a>
+      <a id="tt" ref="download" v-show="false" :href="downloadUrl" :download="downloadfilename"></a>
       <!-- <p>点击图片进行下载</p> -->
-      <van-button
-        v-if="!headerStatus"
-        color="#01C1B5"
-        :disabled="downloadStatus"
-        type="primary"
-        @click="createPoster"
-        round
-        >下载二维码</van-button
-      >
+      <van-button v-if="!headerStatus" color="#01C1B5" :disabled="downloadStatus" type="primary" @click="createPoster" round>下载二维码</van-button>
     </van-popup>
 
-    <van-popup
-      v-model="goodsStatus"
-      :lock-scroll="true"
-      position="bottom"
-      :style="{ height: '100%', borderRadius: '0', overflowY: 'auto' }"
-    >
+    <van-popup v-model="goodsStatus" :lock-scroll="true" position="bottom" :style="{ height: '100%', borderRadius: '0', overflowY: 'auto' }">
       <van-sticky offset-top="0">
         <m-header :backUrl="backUrl2" name="商品列表" :isFixed="false" />
         <search @onSearch="onSearch" placeholder="请输入商品名称" />
         <van-dropdown-menu active-color="#01C1B5">
-          <van-dropdown-item
-            :title="valueText1"
-            v-model="value1"
-            :options="option1"
-            @change="onOptionChange"
-          />
-          <van-dropdown-item
-            :title="valueText2"
-            v-model="value2"
-            :options="option2"
-            @change="onOptionChange"
-          />
+          <van-dropdown-item :title="valueText1" v-model="value1" :options="option1" @change="onOptionChange" />
+          <van-dropdown-item :title="valueText2" v-model="value2" :options="option2" @change="onOptionChange" />
         </van-dropdown-menu>
       </van-sticky>
 
       <div>
-        <van-list
-          v-model="loading"
-          class="studentContainer"
-          v-if="dataShow"
-          key="data"
-          :finished="finished"
-          finished-text=""
-          @load="getGoodsList"
-        >
+        <van-list v-model="loading" class="studentContainer" v-if="dataShow" key="data" :finished="finished" finished-text="" @load="getGoodsList">
           <van-cell-group>
-            <van-cell
-              v-for="(item, index) in dataList"
-              :key="index"
-              class="input-cell"
-              @click="onChoiceGood(item)"
-              :center="true"
-            >
+            <van-cell v-for="(item, index) in dataList" :key="index" class="input-cell" @click="onChoiceGood(item)" :center="true">
               <template slot="icon">
                 <van-image :src="item.image" class="logo">
                   <template v-slot:loading>
@@ -211,18 +94,11 @@
               </template>
               <template slot="title">
                 <div>{{ item.name }}</div>
-                <van-tag plain color="#C2A076" style="margin: 0.04rem 0"
-                  >品牌:{{ item.brand }}</van-tag
-                >
+                <van-tag plain color="#C2A076" style="margin: 0.04rem 0">品牌:{{ item.brand }}</van-tag>
                 <div class="price-section">
-                  <span class="money"
-                    ><i>现价:¥</i>{{ item.discountPrice | moneyFormat }}</span
-                  >
+                  <span class="money"><i>现价:¥</i>{{ item.discountPrice | moneyFormat }}</span>
                   <p class="groupPrice">
-                    <span class="groupTitle">团购价:</span
-                    ><span class="groupMoney"
-                      >¥{{ item.groupPurchasePrice | moneyFormat }}</span
-                    >
+                    <span class="groupTitle">团购价:</span><span class="groupMoney">¥{{ item.groupPurchasePrice | moneyFormat }}</span>
                   </p>
                 </div>
                 <div class="price-section">
@@ -238,29 +114,14 @@
 
     <!-- 协议 -->
     <van-popup id="protocolPopup" v-model="popupStatus" position="bottom">
-      <m-protocol
-        :protocolHTML="protocolHTML"
-        @onClose="popupStatus = !popupStatus"
-        @onPopupSure="popupStatus = !popupStatus"
-      />
+      <m-protocol :protocolHTML="protocolHTML" @onClose="popupStatus = !popupStatus" @onPopupSure="popupStatus = !popupStatus" />
     </van-popup>
 
     <van-popup v-model="refundStatus" position="bottom" v-if="refundStatus">
-      <m-refund
-        @onClose="refundStatus = !refundStatus"
-        @onPopupSure="onRefundSure"
-        :ids="[1, 2]"
-        :buyList="buyList"
-        :balance="this.orderType == 1 ? balance : 0"
-      />
+      <m-refund @onClose="refundStatus = !refundStatus" @onPopupSure="onRefundSure" :ids="[1, 2]" :buyList="buyList" :balance="this.orderType == 1 ? balance : 0" />
     </van-popup>
 
-    <m-payment
-      :closeStatus="isStatus"
-      :amount="payMoney"
-      :payment="payment"
-      @onChangeStatus="onChangeStatus"
-    />
+    <m-payment :closeStatus="isStatus" :amount="payMoney" :payment="payment" @onChangeStatus="onChangeStatus" />
   </div>
 </template>
 <script>
@@ -271,12 +132,7 @@ import MRefund from "@/components/MRefund";
 import MEmpty from "@/components/MEmpty";
 import Search from "@/components/Search";
 import qs from "query-string";
-import {
-  addGoodsSellOrder,
-  queryGoodsPage,
-  queryGoodsCategoryPage,
-  getUserCashAccount,
-} from "./api";
+import { addGoodsSellOrder, queryGoodsPage, queryGoodsCategoryPage, getUserCashAccount } from "./api";
 import { browser, validStudentUrl } from "@/common/util";
 import setLoading from "@/common/loading";
 import VueQr from "vue-qr";
@@ -606,12 +462,7 @@ export default {
       let formCheckChange = false;
       let tempForm = this.tempForm;
       // 判断是否修改过内容
-      if (
-        form.studentId == tempForm.studentId &&
-        form.goodsList == tempForm.goodsList &&
-        form.marketAmount == tempForm.marketAmount &&
-        JSON.stringify(form.couponList) == JSON.stringify(tempForm.couponList)
-      ) {
+      if (form.studentId == tempForm.studentId && form.goodsList == tempForm.goodsList && form.marketAmount == tempForm.marketAmount && JSON.stringify(form.couponList) == JSON.stringify(tempForm.couponList)) {
         formCheckChange = true;
       }
 
@@ -650,12 +501,7 @@ export default {
     onPosterCode(goodsId) {
       this.$refs.goodsOrder.style.filter = "blur(3px)";
       this.qrCodeStatus = true;
-      let url =
-        validStudentUrl() +
-        "/#/goodsOrderBuy?id=" +
-        goodsId +
-        "&studentId=" +
-        this.studentId;
+      let url = validStudentUrl() + "/#/goodsOrderBuy?id=" + goodsId + "&studentId=" + this.studentId;
       // console.log(url)
       this.config.value = url;
       // 可以点击下载按钮了
@@ -762,17 +608,13 @@ export default {
         return false;
       }
       if (this.marketAmount) {
-        let reg =
-          /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
+        let reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
         if (!reg.test(this.marketAmount)) {
           this.$toast("请选输入正确的减免金额");
           return false;
         }
       }
-      if (
-        (this.payCountMoney - Number(this.marketAmount)).toFixed(2) <
-        this.groupPrice
-      ) {
+      if ((this.payCountMoney - Number(this.marketAmount)).toFixed(2) < this.groupPrice) {
         this.$toast("减免后支付金额不能低于团购价");
         return false;
       }
@@ -809,7 +651,7 @@ export default {
             balance: result.totalPrice,
           },
         });
-      } else if (result.type == "ADAPAY") {
+      } else if (result.type == "ADAPAY" || result.type == "YEEPAY") {
         this.payment = result;
         this.payMoney = result.payMap.amount;
         // 开始支付窗口
@@ -851,18 +693,13 @@ export default {
       // console.log(this.goodsList, "goodsList");
       goodsList.forEach((item) => {
         this.buyList.push({
-          name:
-            item.goodsNum > 1
-              ? `${item.goodsName} * ${item.goodsNum}`
-              : item.goodsName,
+          name: item.goodsNum > 1 ? `${item.goodsName} * ${item.goodsNum}` : item.goodsName,
           type: "购买",
           price: Number((item.goodsNum * item.discountPrice).toFixed(2)),
           couponType: this.couponObj[item.type],
         });
         tempPrice += Number((item.goodsNum * item.discountPrice).toFixed(2));
-        this.groupPrice += Number(
-          (item.goodsNum * item.groupPurchasePrice).toFixed(2)
-        );
+        this.groupPrice += Number((item.goodsNum * item.groupPurchasePrice).toFixed(2));
       });
       const couponType = {
         FULL_REDUCTION: "满减",
@@ -921,7 +758,7 @@ export default {
     window.removeEventListener("hashchange", this.onHash, false);
     this.$toast.clear();
     this.qrCodeStatus = false;
-  }
+  },
 };
 </script>
 <style lang="less" scoped>

+ 21 - 133
src/views/shopMall/GoodsOrder.vue

@@ -1,50 +1,16 @@
 <template>
   <div class="goodsOrder">
     <m-header :backUrl="backUrl" />
-    <van-tabs
-      color="#01C1B5"
-      title-active-color="#000"
-      @change="onTabChange"
-      title-inactive-color="#808080"
-      v-model="activeTab"
-    >
+    <van-tabs color="#01C1B5" title-active-color="#000" @change="onTabChange" title-inactive-color="#808080" v-model="activeTab">
       <van-tab title="待支付" name="ING">
-        <search
-          @onSearch="onSearch"
-          placeholder="请输入学生姓名或手机号"
-          style="margin-bottom: 0.15rem"
-        />
-        <van-list
-          v-model="loading"
-          v-if="dataShow"
-          key="ing"
-          :finished="finished"
-          :immediate-check="false"
-          finished-text=" "
-          @load="getGoodsList()"
-        >
-          <van-cell-group
-            class="order-section"
-            :border="false"
-            v-for="(list, index) in dataList"
-            :key="index"
-            @click="onGoodDetail(list)"
-          >
+        <search @onSearch="onSearch" placeholder="请输入学生姓名或手机号" style="margin-bottom: 0.15rem" />
+        <van-list v-model="loading" v-if="dataShow" key="ing" :finished="finished" :immediate-check="false" finished-text=" " @load="getGoodsList()">
+          <van-cell-group class="order-section" :border="false" v-for="(list, index) in dataList" :key="index" @click="onGoodDetail(list)">
             <van-cell title-class="order-title" value-class="order-status">
               <template #title>学生姓名:{{ list.userName }}</template>
               <template>待支付</template>
             </van-cell>
-            <van-cell
-              v-for="(item, i) in list.goodsJson"
-              :border="i == list.goodsJson.length - 1 ? true : false"
-              :key="i"
-              :class="[
-                i != list.goodsJson.length - 1 ? 'input-bottom' : null,
-                'input-cell',
-              ]"
-              class="input-cell"
-              :center="true"
-            >
+            <van-cell v-for="(item, i) in list.goodsJson" :border="i == list.goodsJson.length - 1 ? true : false" :key="i" :class="[i != list.goodsJson.length - 1 ? 'input-bottom' : null, 'input-cell']" class="input-cell" :center="true">
               <template #icon>
                 <van-image :src="item.productPic" class="logo">
                   <template v-slot:loading>
@@ -58,29 +24,12 @@
               </template>
               <template #default> x {{ item.productQuantity }} </template>
             </van-cell>
-            <van-cell
-              title-class="order-money"
-              title-style="flex: auto 1"
-              style="align-items: center"
-              class="van-hairline--top"
-            >
+            <van-cell title-class="order-money" title-style="flex: auto 1" style="align-items: center" class="van-hairline--top">
               <template #title>
-                订单金额:<span
-                  >¥{{
-                    (list.actualAmount + list.balancePaymentAmount)
-                      | moneyFormat
-                  }}</span
-                >
+                订单金额:<span>¥{{ (list.actualAmount + list.balancePaymentAmount) | moneyFormat }}</span>
               </template>
               <template>
-                <van-button
-                  size="small"
-                  round
-                  class="van-small__btn"
-                  @click.stop="onRePay(list)"
-                  type="default"
-                  >继续支付</van-button
-                >
+                <van-button size="small" round class="van-small__btn" @click.stop="onRePay(list)" type="default">继续支付</van-button>
               </template>
             </van-cell>
           </van-cell-group>
@@ -88,51 +37,14 @@
         <m-empty v-else key="ing" msg="暂无订单" />
       </van-tab>
       <van-tab title="已支付" name="SUCCESS">
-        <search
-          @onSearch="onSearch2"
-          placeholder="请输入学生姓名或手机号"
-          style="margin-bottom: 0.15rem"
-        />
-        <van-list
-          v-model="loading2"
-          v-if="dataShow2"
-          key="success"
-          :immediate-check="false"
-          :finished="finished2"
-          finished-text=" "
-          @load="getGoodsList2()"
-        >
-          <van-cell-group
-            class="order-section"
-            :border="false"
-            v-for="(list, index) in dataList2"
-            :key="index"
-            @click="onGoodDetail(list)"
-          >
-            <van-cell
-              title-class="order-title"
-              value-class="order-status success"
-            >
-              <template #title
-                >学生姓名:{{ list.userName }}
-                <span
-                  style="padding-left: 0.1rem"
-                  v-if="list.authorUser != operationId"
-                  >学员自建</span
-                ></template
-              >
+        <search @onSearch="onSearch2" placeholder="请输入学生姓名或手机号" style="margin-bottom: 0.15rem" />
+        <van-list v-model="loading2" v-if="dataShow2" key="success" :immediate-check="false" :finished="finished2" finished-text=" " @load="getGoodsList2()">
+          <van-cell-group class="order-section" :border="false" v-for="(list, index) in dataList2" :key="index" @click="onGoodDetail(list)">
+            <van-cell title-class="order-title" value-class="order-status success">
+              <template #title>学生姓名:{{ list.userName }} <span style="padding-left: 0.1rem" v-if="list.authorUser != operationId">学员自建</span></template>
               <template>支付成功</template>
             </van-cell>
-            <van-cell
-              v-for="(item, i) in list.goodsJson"
-              :border="i == list.goodsJson.length - 1 ? true : false"
-              :key="i"
-              :class="[
-                i != list.goodsJson.length - 1 ? 'input-bottom' : null,
-                'input-cell',
-              ]"
-              :center="true"
-            >
+            <van-cell v-for="(item, i) in list.goodsJson" :border="i == list.goodsJson.length - 1 ? true : false" :key="i" :class="[i != list.goodsJson.length - 1 ? 'input-bottom' : null, 'input-cell']" :center="true">
               <template #icon>
                 <van-image :src="item.productPic" class="logo">
                   <template v-slot:loading>
@@ -146,33 +58,15 @@
               </template>
               <template #default> x {{ item.productQuantity }} </template>
             </van-cell>
-            <van-cell
-              title-class="order-money"
-              class="van-hairline--top order-payment"
-              title=" "
-            >
+            <van-cell title-class="order-money" class="van-hairline--top order-payment" title=" ">
               <template #title>
-                订单金额:<span
-                  >¥{{
-                    (list.actualAmount + list.balancePaymentAmount)
-                      | moneyFormat
-                  }}</span
-                >
+                订单金额:<span>¥{{ (list.actualAmount + list.balancePaymentAmount) | moneyFormat }}</span>
               </template>
               <template>
                 <div>
-                  <div
-                    class="order-money-get"
-                    v-if="list.receiveStatus == 'NO_RECEIVE'"
-                  >
-                    未确认
-                  </div>
-                  <div v-if="list.receiveStatus == 'AUTO_RECEIVE'">
-                    自动确认收货
-                  </div>
-                  <div v-if="list.receiveStatus == 'MANUAL_RECEIVE'">
-                    手动确认收货
-                  </div>
+                  <div class="order-money-get" v-if="list.receiveStatus == 'NO_RECEIVE'">未确认</div>
+                  <div v-if="list.receiveStatus == 'AUTO_RECEIVE'">自动确认收货</div>
+                  <div v-if="list.receiveStatus == 'MANUAL_RECEIVE'">手动确认收货</div>
                 </div>
               </template>
             </van-cell>
@@ -181,13 +75,7 @@
         <m-empty v-else key="success" msg="暂无订单" />
       </van-tab>
     </van-tabs>
-    <m-payment
-      :closeStatus="isStatus"
-      :amount="payMoney"
-      :payment="payment"
-      :showCoupon="false"
-      @onChangeStatus="onChangeStatus"
-    />
+    <m-payment :closeStatus="isStatus" :amount="payMoney" :payment="payment" :showCoupon="false" @onChangeStatus="onChangeStatus" />
   </div>
 </template>
 
@@ -421,7 +309,7 @@ export default {
             balance: result.totalPrice,
           },
         });
-      } else if (result.type == "ADAPAY") {
+      } else if (result.type == "ADAPAY" || result.type == "YEEPAY") {
         this.payment = result;
         this.payMoney = result.payMap.amount;
         // 开始支付窗口

+ 29 - 166
src/views/shopMall/GoodsSale.vue

@@ -4,30 +4,11 @@
       <m-header :backUrl="backUrl" />
 
       <van-cell-group>
-        <van-field
-          readonly
-          clickable
-          label="订单类型"
-          :value="orderText"
-          input-align="right"
-          placeholder="选择类型"
-          @click="showPicker = true"
-        />
+        <van-field readonly clickable label="订单类型" :value="orderText" input-align="right" placeholder="选择类型" @click="showPicker = true" />
         <van-popup v-model="showPicker" round position="bottom">
-          <van-picker
-            show-toolbar
-            :columns="columns"
-            @cancel="showPicker = false"
-            @confirm="onConfirm"
-          />
+          <van-picker show-toolbar :columns="columns" @cancel="showPicker = false" @confirm="onConfirm" />
         </van-popup>
-        <van-field
-          :readonly="true"
-          label="学生姓名"
-          v-model="studentName"
-          placeholder="请输入学生姓名"
-          input-align="right"
-        />
+        <van-field :readonly="true" label="学生姓名" v-model="studentName" placeholder="请输入学生姓名" input-align="right" />
         <van-field
           label="选择商品"
           :readonly="true"
@@ -42,50 +23,25 @@
           input-align="right"
         />
         <div class="studentContainer">
-          <van-cell
-            v-for="(item, index) in goodsList"
-            :key="index"
-            class="input-cell"
-            :center="true"
-          >
+          <van-cell v-for="(item, index) in goodsList" :key="index" class="input-cell" :center="true">
             <template slot="icon">
               <van-image class="logo" :src="item.pic" alt="" />
             </template>
             <template slot="title">
               <div class="content">
                 <div class="name">
-                  <span style="vertical-align: middle; line-height: 0.16rem">{{
-                    item.name
-                  }}</span>
-                  <van-tag
-                    plain
-                    color="#C2A076"
-                    style="
-                      margin-left: 0;
-                      padding: 0.01rem 0.03rem;
-                      margin-right: 0.05rem;
-                    "
-                    >品牌:{{ item.brandName }}</van-tag
-                  >
-                </div>
-                <div class="operation" @click="onGoodDel(goodsList, item)">
-                  <i class="icon_del"></i>删除
+                  <span style="vertical-align: middle; line-height: 0.16rem">{{ item.name }}</span>
+                  <van-tag plain color="#C2A076" style="margin-left: 0; padding: 0.01rem 0.03rem; margin-right: 0.05rem">品牌:{{ item.brandName }}</van-tag>
                 </div>
+                <div class="operation" @click="onGoodDel(goodsList, item)"><i class="icon_del"></i>删除</div>
               </div>
-              <p style="padding: 0.02rem 0; font-size: 0.14rem; color: #808080">
-                型号:{{ item.productSn }}
-              </p>
+              <p style="padding: 0.02rem 0; font-size: 0.14rem; color: #808080">型号:{{ item.productSn }}</p>
               <div class="price-section">
                 <div>
-                  <span class="money"
-                    ><span style="font-weight: 400; font-size: 0.14rem"
-                      >现价:</span
-                    ><i>¥</i>{{ item.price | moneyFormat }}</span
+                  <span class="money"><span style="font-weight: 400; font-size: 0.14rem">现价:</span><i>¥</i>{{ item.price | moneyFormat }}</span
                   ><del>原价:¥{{ item.originalPrice | moneyFormat }}</del>
                 </div>
-                <div style="font-size: 0.14rem; color: #808080">
-                  ×{{ item.goodsNum }}
-                </div>
+                <div style="font-size: 0.14rem; color: #808080">×{{ item.goodsNum }}</div>
               </div>
             </template>
           </van-cell>
@@ -100,34 +56,19 @@
           <div v-if="addressInfo.id">
             <span class="userName">{{ addressInfo.name }}</span>
             <span class="phone">
-              {{
-                addressInfo.phoneNumber &&
-                addressInfo.phoneNumber.replace(
-                  /^(\d{3})\d{4}(\d+)/,
-                  "$1****$2"
-                )
-              }}
+              {{ addressInfo.phoneNumber && addressInfo.phoneNumber.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2") }}
             </span>
           </div>
           <div class="emtry" v-else>请选择收货地址</div>
         </template>
         <template #label v-if="addressInfo.id">
-          <span class="addressInfo"
-            >{{ addressInfo.province }} {{ addressInfo.city }}
-            {{ addressInfo.region }} {{ addressInfo.detailAddress }}</span
-          >
+          <span class="addressInfo">{{ addressInfo.province }} {{ addressInfo.city }} {{ addressInfo.region }} {{ addressInfo.detailAddress }}</span>
         </template>
       </van-cell>
 
       <!-- 是否用余额支付 支付金额大于0时才会显示是否用余额支付 -->
       <van-cell-group class="pay-section">
-        <van-cell
-          :disabled="false"
-          title="总价格"
-          title-class="pay-name"
-          value-class="pay-value"
-          :center="true"
-        >
+        <van-cell :disabled="false" title="总价格" title-class="pay-name" value-class="pay-value" :center="true">
           <template #default> ¥{{ payCountMoney | moneyFormat }} </template>
         </van-cell>
         <!-- <van-field
@@ -141,74 +82,29 @@
         /> -->
       </van-cell-group>
 
-      <protocol
-        v-model="agreeStatus"
-        :userId="studentId + ''"
-        style="padding-top: 0.08rem"
-      />
+      <protocol v-model="agreeStatus" :userId="studentId + ''" style="padding-top: 0.08rem" />
 
       <div class="button-group">
-        <van-button
-          class="btn-sure"
-          type="primary"
-          @click="onRefundSure(obj)"
-          round
-          size="large"
-          >确认</van-button
-        >
+        <van-button class="btn-sure" type="primary" @click="onRefundSure(obj)" round size="large">确认</van-button>
       </div>
     </div>
 
-    <van-popup
-      class="popup-qrcode"
-      v-model="qrCodeStatus"
-      closeable
-      close-icon="cross"
-      @close="onClose"
-    >
+    <van-popup class="popup-qrcode" v-model="qrCodeStatus" closeable close-icon="cross" @close="onClose">
       <div id="qrcode">
-        <vue-qr
-          :logoSrc="config.imagePath"
-          :text="config.value"
-          :margin="10"
-          :size="220"
-        ></vue-qr>
+        <vue-qr :logoSrc="config.imagePath" :text="config.value" :margin="10" :size="220"></vue-qr>
       </div>
-      <a
-        id="tt"
-        ref="download"
-        v-show="false"
-        :href="downloadUrl"
-        :download="downloadfilename"
-      ></a>
+      <a id="tt" ref="download" v-show="false" :href="downloadUrl" :download="downloadfilename"></a>
       <!-- <p>点击图片进行下载</p> -->
-      <van-button
-        v-if="!headerStatus"
-        color="#01C1B5"
-        :disabled="downloadStatus"
-        type="primary"
-        @click="createPoster"
-        round
-        >下载二维码</van-button
-      >
+      <van-button v-if="!headerStatus" color="#01C1B5" :disabled="downloadStatus" type="primary" @click="createPoster" round>下载二维码</van-button>
     </van-popup>
 
     <!-- 商品 -->
-    <van-popup
-      v-model="goodsStatus"
-      :lock-scroll="true"
-      position="bottom"
-      :style="{ height: '100%', borderRadius: '0', overflowY: 'auto' }"
-    >
+    <van-popup v-model="goodsStatus" :lock-scroll="true" position="bottom" :style="{ height: '100%', borderRadius: '0', overflowY: 'auto' }">
       <GoodsList v-model="goodsStatus" @getChoiceGood="getChoiceGood" />
     </van-popup>
 
     <!-- 选择地址 -->
-    <van-action-sheet
-      v-model="addressStatus"
-      title="选择地址"
-      :style="{ height: '60%' }"
-    >
+    <van-action-sheet v-model="addressStatus" title="选择地址" :style="{ height: '60%' }">
       <AddAddress
         v-model="addressStatus"
         :addressInfo="addressInfo"
@@ -222,43 +118,16 @@
     </van-action-sheet>
 
     <!-- 协议 -->
-    <van-popup
-      id="protocolPopup"
-      v-model="popupStatus"
-      position="bottom"
-      style="border-radius: 0 !important"
-    >
-      <m-protocol
-        :protocolHTML="protocolHTML"
-        @onClose="popupStatus = !popupStatus"
-        @onPopupSure="popupStatus = !popupStatus"
-      />
+    <van-popup id="protocolPopup" v-model="popupStatus" position="bottom" style="border-radius: 0 !important">
+      <m-protocol :protocolHTML="protocolHTML" @onClose="popupStatus = !popupStatus" @onPopupSure="popupStatus = !popupStatus" />
     </van-popup>
 
-    <van-popup
-      v-model="refundStatus"
-      position="bottom"
-      v-if="refundStatus"
-      style="border-radius: 0 !important"
-      get-container="#app"
-    >
-      <m-refund
-        @onClose="refundStatus = !refundStatus"
-        @onPopupSure="onRefundSure"
-        useSystem="MALL"
-        :ids="[1]"
-        :buyList="buyList"
-        :balance="balance"
-      />
+    <van-popup v-model="refundStatus" position="bottom" v-if="refundStatus" style="border-radius: 0 !important" get-container="#app">
+      <m-refund @onClose="refundStatus = !refundStatus" @onPopupSure="onRefundSure" useSystem="MALL" :ids="[1]" :buyList="buyList" :balance="balance" />
       <!-- :balance="this.orderType == 1 ? balance : 0" -->
     </van-popup>
 
-    <m-payment
-      :closeStatus="isStatus"
-      :amount="payMoney"
-      :payment="payment"
-      @onChangeStatus="onChangeStatus"
-    />
+    <m-payment :closeStatus="isStatus" :amount="payMoney" :payment="payment" @onChangeStatus="onChangeStatus" />
   </div>
 </template>
 <script>
@@ -505,12 +374,7 @@ export default {
     onPosterCode(goodsId) {
       this.$refs.goodsOrder.style.filter = "blur(3px)";
       this.qrCodeStatus = true;
-      let url =
-        validStudentUrl() +
-        "/#/goodsOrderBuyMall?id=" +
-        goodsId +
-        "&studentId=" +
-        this.studentId;
+      let url = validStudentUrl() + "/#/goodsOrderBuyMall?id=" + goodsId + "&studentId=" + this.studentId;
       // console.log(url);
       this.config.value = url;
       // 可以点击下载按钮了
@@ -680,7 +544,7 @@ export default {
             balance: result.totalPrice,
           },
         });
-      } else if (result.type == "ADAPAY") {
+      } else if (result.type == "ADAPAY" || result.type == "YEEPAY") {
         this.payment = result;
         this.payMoney = result.payMap.amount;
         // 开始支付窗口
@@ -715,8 +579,7 @@ export default {
       goodsList.forEach((item) => {
         const price = Number((item.goodsNum * item.price).toFixed(2));
         this.buyList.push({
-          name:
-            item.goodsNum > 1 ? `${item.name} * ${item.goodsNum}` : item.name,
+          name: item.goodsNum > 1 ? `${item.name} * ${item.goodsNum}` : item.name,
           type: "购买",
           price: price,
           couponType: "MALLCOUPON",