Bläddra i källkod

多规格不显示

谢杰标 2 år sedan
förälder
incheckning
94a1340144
3 ändrade filer med 79 tillägg och 19 borttagningar
  1. 59 0
      common/config.js
  2. 1 1
      manifest.json
  3. 19 18
      pages3/course/detail.vue

+ 59 - 0
common/config.js

@@ -0,0 +1,59 @@
+const index = 0 // 祥粤云学堂
+// const index = 1 // 祥粤学堂
+// const index = 2 // 勘设云学堂
+// const index = 3 // 中正学堂
+// const index = 4 // 测试环境
+const set = [
+    // 祥粤云学堂
+    {
+        BASE_URL: 'https://api.xyyxt.net',
+        BASE_IMG_URL: 'https://file.xyyxt.net/',
+        WEBVIEW_URL: 'https://m.xyyxt.net/',
+        domain: 'h.xyyxt.net',
+        tenantId: '867735392558919680',
+        appid: 'wxd3c8ae80cf43a305',
+        version: '1.0.2'
+    },
+    // 祥粤学堂
+    {
+        BASE_URL: 'https://api.xyyxt.net',
+        BASE_IMG_URL: 'https://file.xyyxt.net/',
+        WEBVIEW_URL: 'https://cm.xyyxt.net/',
+        domain: '',
+        tenantId: '667735392758919630',
+        appid: 'wx871153afc95f55f4',
+        version: '1.0.2'
+    },
+    // 勘设云学堂
+    {
+        BASE_URL: 'https://api.xyyxt.net',
+        BASE_IMG_URL: 'https://file.xyyxt.net/',
+        WEBVIEW_URL: 'https://zstcm.xyyxt.net/',
+        domain: '',
+        tenantId: '567735392758918520',
+        appid: 'wx29d0ad81e625ad81',
+        version: '1.0.2'
+    },
+    // 中正学堂
+    {
+        BASE_URL: 'https://h.gdzzkj.net',
+        BASE_IMG_URL: 'https://file.xyyxt.net/',
+        WEBVIEW_URL: 'https://live.gdzzkj.net/',
+        domain: 'h.gdzzkj.net',
+        tenantId: '141250585240548145',
+        appid: 'wx5872ef563d13dabf',
+        version: '1.0.2'
+    },
+    // test 测试环境
+    {
+        BASE_URL: 'http://120.79.166.78:19012',
+        BASE_IMG_URL: 'https://file-dev.xyyxt.net/',
+        WEBVIEW_URL: 'http://120.79.166.78:18001/',
+        domain: 'h.xyyxt.net',
+        tenantId: '867735392558919680',
+        appid: 'wxd3c8ae80cf43a305',
+        version: '1.0.2'
+    }
+]
+export default set[index]
+

+ 1 - 1
manifest.json

@@ -75,7 +75,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wxd3c8ae80cf43a305", // 祥粤云学堂:wxd3c8ae80cf43a305, 祥粤学堂-wx871153afc95f55f4 , 中正学堂-wx5872ef563d13dabf,中建云学堂-wx47d33eb64f9f2a0d
+        "appid" : "wxd3c8ae80cf43a305", // 祥粤云学堂:wxd3c8ae80cf43a305, 祥粤学堂-wx871153afc95f55f4 , 中正学堂-wx5872ef563d13dabf,勘设云学堂-wx29d0ad81e625ad81
         "setting" : {
             "urlCheck" : false,
             "postcss" : true,

+ 19 - 18
pages3/course/detail.vue

@@ -346,25 +346,27 @@
               <view v-if="index == 1 || specList.length == 1" class="check_box">
                 <u-checkbox-group>
                   <view
-                    class="check_box_item"
-                    :class="spec.check ? 'selected' : ''"
                     v-for="spec in item.specAttrList"
                     :key="spec.specAttributeId"
                   >
-                    <u-checkbox
-                      @change="checkboxChange"
-                      v-model="spec.check"
-                      :name="spec.specAttributeId"
+                    <view
+                      class="check_box_item"
+                      v-if="spec.goodsId"
+                      :class="spec.check ? 'selected' : ''"
                     >
-                      <view class="price_box">
-                        <view class="check_box_item_titme">{{
-                          spec.name
-                        }}</view>
-                        <view class="price" v-if="spec.goodsId"
-                          >¥{{ spec.standPrice }}</view
-                        >
-                      </view>
-                    </u-checkbox>
+                      <u-checkbox
+                        @change="checkboxChange"
+                        v-model="spec.check"
+                        :name="spec.specAttributeId"
+                      >
+                        <view class="price_box">
+                          <view class="check_box_item_titme">{{
+                            spec.name
+                          }}</view>
+                          <view class="price">¥{{ spec.standPrice }}</view>
+                        </view>
+                      </u-checkbox>
+                    </view>
                   </view>
                 </u-checkbox-group>
               </view>
@@ -985,6 +987,8 @@ export default {
         if (item) {
           e.standPrice = item.standPrice;
           e.goodsId = item.goodsId;
+        } else {
+          e.goodsId = null;
         }
       });
       // data.forEach((item, index) => {
@@ -1180,9 +1184,6 @@ export default {
       });
     },
     rightNowBuy() {
-      if (!this.goodsIds.some((e) => e)) {
-        return this.$u.toast("无法购买,请先配置商品");
-      }
       let goodsIds = [...new Set(this.goodsIds)];
       this.$api.checkGoodsStatus({ goodsIds }).then((res) => {
         if (res.data.code == 500) {