From 08e9a67dd679f311e79a27b04cd0c53a30b4bccf Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 04 六月 2026 18:33:22 +0800
Subject: [PATCH] aaa

---
 company_admin/src/views/business/pageConfiguration.vue |  182 ++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 177 insertions(+), 5 deletions(-)

diff --git a/company_admin/src/views/business/pageConfiguration.vue b/company_admin/src/views/business/pageConfiguration.vue
index 3f519c6..340777a 100644
--- a/company_admin/src/views/business/pageConfiguration.vue
+++ b/company_admin/src/views/business/pageConfiguration.vue
@@ -242,7 +242,32 @@
 
     </div>
     <div class="setting">
-      <div class="pz_head">淇℃伅</div>
+      <div class="pz_head pz_head--with-switch">
+        <span>涓绘挱绔〉闈㈤厤缃� <span class="version-tag">V2</span></span>
+        <span
+          class="version-switch version-switch--v2"
+          :class="{ 'version-switch--active': useThisVersion }"
+        >
+          <span class="version-switch__icon"><i class="el-icon-mobile-phone" /></span>
+          <span class="version-switch__body">
+            <span class="version-switch__label">绔嬪嵆浣跨敤璇ョ増鏈�</span>
+            <span class="version-switch__status">{{ useThisVersion ? '宸插惎鐢� 路 涓绘挱绔綋鍓嶇増鏈�' : '鐐瑰嚮鎸夐挳鍚庝富鎾灏嗗垏鎹㈣嚦鏈増鏈�' }}</span>
+          </span>
+          <span v-if="useThisVersion" class="version-switch__badge">
+            <i class="el-icon-success" /> 褰撳墠鐗堟湰
+          </span>
+          <el-button
+            v-else
+            type="primary"
+            size="medium"
+            :loading="versionSwitchLoading"
+            class="version-switch__btn version-switch__btn--v2"
+            @click="onUseThisVersion"
+          >
+            绔嬪嵆鐢熸晥
+          </el-button>
+        </span>
+      </div>
       <el-form ref="form" :model="form" label-width="130px" label-suffix="锛�">
         <el-form-item label="鍐呭鑼冨洿灏哄" props="rangeSize">
           <el-input v-model="form.rangeSize" type="number" style="width: 200px;" placeholder="鏀寔750px-1200px"></el-input>
@@ -493,7 +518,7 @@
 </template>
 
 <script>
-import { getByLoginNew, renewUpdate } from '@/api/business/page.js'
+import { getByLoginNew, renewUpdate, updateAnchorPageVersion } from '@/api/business/page.js'
 import UploadAvatarImage from '@/components/common/UploadAvatarImage.vue'
 import { upload } from '@/api/system/common'
 export default {
@@ -643,16 +668,34 @@
     getDesc() {
       getByLoginNew()
           .then(res => {
-            if (res.newParam) {
+            if (res && res.newParam) {
               var param= JSON.parse(res.newParam)
               for (const key in this.form) {
                 if(param[key]){
                   this.form[key] = param[key]
                 }
               }
-              // this.form = JSON.parse(res.newParam)
             }
+            this.anchorPageVersion = (res && res.anchorPageVersion) || 'v2'
+            this.useThisVersion = this.anchorPageVersion === 'v2'
           })
+    },
+
+    onUseThisVersion () {
+      if (this.useThisVersion || this.versionSwitchLoading) return
+      this.versionSwitchLoading = true
+      updateAnchorPageVersion({ anchorPageVersion: 'v2' })
+        .then(() => {
+          this.anchorPageVersion = 'v2'
+          this.useThisVersion = true
+          this.$message.success('宸插惎鐢� V2 閰嶇疆')
+        })
+        .catch(e => {
+          this.$tip.apiFailed(e)
+        })
+        .finally(() => {
+          this.versionSwitchLoading = false
+        })
     },
 
     submit() {
@@ -664,7 +707,10 @@
         this.$message.warning({ message: '灏哄蹇呴』灏忎簬1200' })
         return
       }
-      renewUpdate({ newParam: JSON.stringify(this.form) })
+      renewUpdate({
+        newParam: JSON.stringify(this.form),
+        anchorPageVersion: this.anchorPageVersion
+      })
           .then(res => {
             this.$message.success({ message: '淇濆瓨鎴愬姛' })
           })
@@ -674,6 +720,9 @@
   data() {
     return {
       isUploading: false,
+      useThisVersion: false,
+      versionSwitchLoading: false,
+      anchorPageVersion: 'v2',
       type: '0', // 0銆佷富鐣岄潰 1銆丳K鏁堟灉 2銆佹悳绱㈡晥鏋�
       shopList: [
         { categoryImgurl: '', categoryName: '娲楄。鏈�', brandName: '娴峰皵', ppShow: false, ppData: ['CLOMO', '娴峰皵', '鏍煎叞浠�', '涓夋槦'], name: 'EG100MATE35S', xhShow: false, xhData: ['EG100MATE35S', 'DG100MATE35S', 'FG100MATE35S'], zdPrice: '1899', price: '1899' },
@@ -1485,6 +1534,129 @@
 
   }
 
+  .pz_head--with-switch {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    gap: 16px;
+    flex-wrap: wrap;
+  }
+
+  .version-tag {
+    display: inline-block;
+    margin-left: 8px;
+    padding: 3px 10px;
+    border-radius: 4px;
+    font-size: 13px;
+    font-weight: 700;
+    color: #409eff;
+    background: #ecf5ff;
+    border: 1px solid #b3d8ff;
+    vertical-align: middle;
+  }
+
+  .version-switch {
+    display: inline-flex;
+    align-items: center;
+    gap: 14px;
+    padding: 12px 20px;
+    border-radius: 10px;
+    border: 2px solid #409eff;
+    background: linear-gradient(135deg, #ecf5ff 0%, #f5faff 100%);
+    box-shadow: 0 4px 14px rgba(64, 158, 255, 0.22);
+    transition: all 0.25s ease;
+    cursor: default;
+
+    &--active {
+      border-color: #409eff;
+      background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
+      box-shadow: 0 6px 20px rgba(64, 158, 255, 0.4);
+
+      .version-switch__icon {
+        background: rgba(255, 255, 255, 0.25);
+        color: #fff;
+      }
+
+      .version-switch__label {
+        color: #fff;
+      }
+
+      .version-switch__status {
+        color: rgba(255, 255, 255, 0.88);
+      }
+    }
+
+    &__icon {
+      flex-shrink: 0;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      width: 40px;
+      height: 40px;
+      border-radius: 50%;
+      background: rgba(64, 158, 255, 0.15);
+      color: #409eff;
+      font-size: 20px;
+    }
+
+    &__body {
+      display: flex;
+      flex-direction: column;
+      gap: 2px;
+      min-width: 0;
+    }
+
+    &__label {
+      font-size: 15px;
+      font-weight: 700;
+      color: #409eff;
+      white-space: nowrap;
+      line-height: 1.3;
+    }
+
+    &__status {
+      font-size: 12px;
+      color: #909399;
+      white-space: nowrap;
+      line-height: 1.3;
+    }
+
+    &__badge {
+      flex-shrink: 0;
+      display: inline-flex;
+      align-items: center;
+      gap: 6px;
+      padding: 8px 16px;
+      border-radius: 20px;
+      font-size: 14px;
+      font-weight: 600;
+      color: #fff;
+      background: rgba(255, 255, 255, 0.25);
+      white-space: nowrap;
+    }
+
+    &__btn {
+      flex-shrink: 0;
+      padding: 10px 22px;
+      font-size: 14px;
+      font-weight: 700;
+      border-radius: 20px;
+      border: none;
+      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
+
+      &--v2 {
+        background: #fff;
+        color: #409eff;
+
+        &:hover,
+        &:focus {
+          background: #f5faff;
+          color: #409eff;
+        }
+      }
+    }
+  }
+
   .pz_item {
     // width: 750px;
     display: flex;

--
Gitblit v1.9.3