ソースを参照

fix(cjx): 修复抽卡逻辑和优化页面样式

- 在 cjx 和 lgz 页面中添加 fankaStatu 状态,防止重复翻卡
- 优化卡片翻转逻辑和延迟显示- 调整 winPrize 和 unWinPrize 页面样式- 修复登录页面的 scanCode 获取逻辑
- 更新 pages.json配置
mws 4 ヶ月 前
コミット
e295d9bad2

+ 71 - 0
api/hexiao.js

@@ -185,3 +185,74 @@ export function getYwyByIdDetail(id){
         }
     })
 }
+
+/**
+ * 经销商销售总数查询
+ * @param startDate
+ * @param endDate
+ * @returns {*}
+ */
+export function getSalesTotal(startDate,endDate){
+    return request({
+        url: `/jxs/salesTotal`,
+        method: 'post',
+        params: {
+            startDate:startDate,
+            endDate:endDate
+        }
+    })
+}
+
+/**
+ * 经销商销售趋势统计
+ * @param startDate
+ * @param endDate
+ * @returns {*}
+ */
+export function getSalesTrend(startDate,endDate){
+    return request({
+        url: `/jxs/salesTrend`,
+        method: 'post',
+        params: {
+            startDate:startDate,
+            endDate:endDate
+        }
+    })
+}
+//业务员
+export function getSalesmanSalesTotal(startDate,endDate,ywyId){
+    return request({
+        url: `/jxs/salesmanSalesTotal`,
+        method: 'post',
+        params: {
+            startDate:startDate,
+            endDate:endDate,
+            ywyId:ywyId
+        }
+    })
+}
+
+export function getSalesmanSalesTrend(startDate,endDate,ywyId){
+    return request({
+        url: `/jxs/salesmanSalesTrend`,
+        method: 'post',
+        params: {
+            startDate:startDate,
+            endDate:endDate,
+            ywyId:ywyId
+        }
+    })
+}
+
+export function getSalesmanVisitTrend(startDate,endDate,ywyId){
+    return request({
+        url: `/jxs/salesmanVisitTrend`,
+        method: 'post',
+        params: {
+            startDate:startDate,
+            endDate:endDate,
+            ywyId:ywyId
+        }
+    })
+}
+

+ 8 - 0
pages.json

@@ -266,6 +266,14 @@
 				"navigationBarTitleText" : "",
 				"navigationStyle": "custom"
 			}
+		},
+		{
+			"path" : "pages/cjx/xiaoshou/index",
+			"style" : 
+			{
+				"navigationBarTitleText" : "",
+				"navigationStyle": "custom"
+			}
 		}
 
 	],

+ 5 - 0
pages/cjx/index/index.vue

@@ -251,6 +251,7 @@
 				saveData: {},
 				scanCode: '',
 				saveStatus: true,
+				fankaStatu:false,
 			}
 		},
 		onLoad() {
@@ -332,9 +333,13 @@
 				this.showWin = false
 			},
 			flipCard(idx) {
+				if(this.fankaStatu){
+					return;
+				}
 				if (this.cards[idx].flipped) {
 					return;
 				}
+				this.fankaStatu = true;
 				setTimeout(() => {
 
 					if (this.prizeJson.prizeType == 0 || this.prizeJson.prize_type == 0) {

+ 524 - 0
pages/cjx/xiaoshou/index.vue

@@ -0,0 +1,524 @@
+<template>
+  <view class="container">
+    <view class="title">
+      <view class="title-text">{{title}}</view>
+    </view>
+    <view class="header">
+      <view class="query">
+        <u-row customStyle="margin-bottom: 10px" gutter="20">
+          <u-col span="9">
+            <u--input
+                @focus="timeShow = true"
+                v-model="startTimeXd"
+                placeholder="开始日期 ~ 结束日期"
+                prefixIcon="calendar"
+                prefixIconStyle="font-size: 22px;color: #909399"
+            ></u--input>
+          </u-col>
+          <u-col span="3">
+            <view class="query-btn" @click="show = !show">
+              <view class="query-btn-icon">
+              </view>
+              <view class="query-btn-text">筛选</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="filter">
+        <view class="item-one">
+          <view class="type-icon-hexiao"></view>
+          <view class="type-data">
+            <view class="number">0</view>
+            <view class="text">核销</view>
+          </view>
+        </view>
+        <view class="item-one"  v-show="type == 2">
+          <view class="type-icon-xundian"></view>
+          <view class="type-data">
+            <view class="number">0</view>
+            <view class="text">巡店</view>
+          </view>
+        </view>
+        <view class="item-one">
+          <view class="type-icon-shanghuo"></view>
+          <view class="type-data">
+            <view class="number">0</view>
+            <view class="text">上货</view>
+          </view>
+        </view>
+        <view class="item-one" v-show="type == 3">
+          <view class="type-icon-xiadan"></view>
+          <view class="type-data">
+            <view class="number">0</view>
+            <view class="text">下单</view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="content">
+      <view class="t-one">
+        <view class="t-text">核销和上货趋势统计</view>
+        <view class="charts-box">
+          <qiun-data-charts
+              type="line"
+              :opts="opts"
+              :chartData="chartData"
+          />
+        </view>
+      </view>
+      <view class="t-one" v-show=" type == 2">
+        <view class="t-text">巡店统计</view>
+        <view class="charts-box">
+          <qiun-data-charts
+              type="column"
+              :opts="opts"
+              :chartData="chartDataXd"
+          />
+        </view>
+      </view>
+
+    </view>
+    <u-popup :show="show" mode="bottom"  @close="show = false" >
+      <view class="popup-content">
+        <view class="popup-text">筛选</view>
+        <u-row customStyle="margin-bottom: 10px">
+          <u-col span="3">
+            <view class="explain">选择日期</view>
+          </u-col>
+          <u-col span="9">
+            <u--input
+                v-model="startTimeXd"
+                placeholder="开始日期 ~ 结束日期"
+                prefixIcon="calendar"
+                prefixIconStyle="font-size: 22px;color: #909399"
+                @focus="timeShow = true"
+            ></u--input>
+          </u-col>
+        </u-row>
+        <u-row customStyle="margin-bottom: 10px">
+          <u-col span="3">
+            <view class="explain">门店名称</view>
+          </u-col>
+          <u-col span="9">
+            <u--input
+                placeholder="请输入内容"
+                border="surround"
+            ></u--input>
+          </u-col>
+        </u-row>
+        <u-row customStyle="margin-bottom: 10px">
+          <u-col span="3">
+            <view class="explain">业务员</view>
+          </u-col>
+          <u-col span="9">
+            <u--input
+                placeholder="请输入内容"
+                border="surround"
+            ></u--input>
+          </u-col>
+        </u-row>
+        <u-row customStyle="margin-bottom: 10px">
+          <u-col span="3">
+            <view class="explain">订单编号</view>
+          </u-col>
+          <u-col span="9">
+            <u--input
+                placeholder="请输入内容"
+                border="surround"
+            ></u--input>
+          </u-col>
+        </u-row>
+        <view class="popup-btn">
+          <u-button  class="popup-btn-one">搜索</u-button>
+          <u-button  class="popup-btn-one" type="primary">重置</u-button>
+        </view>
+      </view>
+
+    </u-popup>
+    <u-calendar :show="timeShow" :mode="mode" @confirm="confirm"></u-calendar>
+
+  </view>
+
+</template>
+
+<script>
+import {getSalesTotal,getSalesTrend,getSalesmanSalesTotal,getSalesmanSalesTrend,getSalesmanVisitTrend} from "../../../api/hexiao";
+export default {
+  data() {
+    return {
+      hexiaoNumber: 0,
+      xundianNumber: 0,
+      shangHuoNumber: 0,
+      xiaDanNumber: 0,
+      type: 1,
+      title: '',
+      startTime: '',
+      endTime: '',
+      startTimeXd: '',
+      timeShow: false,
+      mode: 'range',
+      show: false,
+      chartDataXd: {},
+      chartData: {},
+      //您可以通过修改 config-ucharts.js 文件中下标为 ['line'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
+      opts: {
+        height: 210,
+        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
+        padding: [15,10,0,15],
+        enableScroll: false,
+        legend: {},
+        xAxis: {
+          disableGrid: true
+        },
+        yAxis: {
+          gridType: "dash",
+          dashLength: 2
+        },
+        extra: {
+          line: {
+            type: "straight",
+            width: 2,
+            activeType: "hollow"
+          }
+        }
+      }
+    };
+  },
+  onLoad: function(options) {
+	  options.id = 2
+    //门店
+    if (options.id == 1){
+      this.title = '门店销售数据';
+      this.type = 1;
+      this.initMenDian();
+    }
+    //业务员
+    if (options.id == 2){
+      this.title = '业务员销售数据';
+      this.type = 2;
+      this.initYWY(options.ywyId);
+    }
+    //经销商
+    if (options.id == 3){
+      this.title = '经销商销售数据';
+      this.type = 3;
+      this.initJXS();
+    }
+  },
+  onReady() {
+    this.getXdData();
+  },
+  methods: {
+    initMenDian() {
+
+    },
+    initYWY(ywyId) {
+        getSalesmanSalesTotal(this.startTime,this.endTime,ywyId).then(res => {
+          if (res.code === 0){
+            this.hexiaoNumber = res.data.verificationTotal;
+            this.xundianNumber = res.data.visitTotal;
+            this.shangHuoNumber = res.data.activateTotal;
+          }
+        }).catch(err => {
+
+        });
+        getSalesmanSalesTrend(this.startTime,this.endTime,ywyId).then(res => {
+           if (res.code === 0){
+             let apiResponse = res.data;
+             // 提取日期列表并排序
+             let categories = apiResponse.data.map(item => {
+               // 从日期中提取月日,例如 "2025-08-01" -> "08-01" -> "8/1" 或者只显示日 "1"
+               return item.date.split("-")[2]; // 这里提取日期中的日部分
+             });
+
+             // 排序日期
+             categories.sort((a, b) => parseInt(a) - parseInt(b));
+
+             // 按日期排序数据
+             let sortedData = apiResponse.data.sort((a, b) => new Date(a.date) - new Date(b.date));
+
+             // 提取核销数据和上货数据
+             let verificationData = sortedData.map(item => item.verificationCount);
+             let activateData = sortedData.map(item => item.activateCount);
+
+             // 构造图表需要的格式
+             let res = {
+               categories: categories,
+               series: [
+                 {
+                   name: "核销",
+                   data: verificationData
+                 },
+                 {
+                   name: "上货",
+                   data: activateData
+                 }
+               ]
+             };
+
+             this.chartData = JSON.parse(JSON.stringify(res));
+          }
+        }).catch(err => {
+
+        });
+      getSalesmanVisitTrend(this.startTime,this.endTime,ywyId).then(res => {
+        if (res.code === 0){
+          // 处理巡店趋势数据
+          let apiResponse = res.data;
+
+          // 提取日期列表(这里提取日部分)
+          let categories = apiResponse.map(item => {
+            return item.date.split("-")[2]; // 提取日期中的日部分
+          });
+
+          // 按日期排序数据
+          let sortedData = apiResponse.sort((a, b) => new Date(a.date) - new Date(b.date));
+
+          // 提取巡店数据
+          let visitData = sortedData.map(item => item.visitCount || 0);
+
+          // 构造图表需要的格式(与selectedCode中格式一致)
+          let resFormat = {
+            categories: categories,
+            series: [
+              {
+                name: "巡店",
+                data: visitData
+              }
+            ]
+          };
+
+          this.chartDataXd = JSON.parse(JSON.stringify(resFormat));
+        }
+      }).catch(err => {
+        console.error(err);
+      });
+
+    },
+    initJXS() {
+      getSalesTotal(this.startTime,this.endTime).then(res => {
+            if (res.code === 0){
+              this.hexiaoNumber = res.data.verificationTotal;
+              this.xundianNumber = res.data.visitTotal;
+            }
+      }).catch(err => {
+
+      });
+      getSalesTrend(this.startTime,this.endTime).then(res => {
+          if (res.code === 0){
+            let apiResponse = res.data;
+            // 提取日期列表并排序
+            let categories = apiResponse.data.map(item => {
+              // 从日期中提取月日,例如 "2025-08-01" -> "08-01" -> "8/1" 或者只显示日 "1"
+              return item.date.split("-")[2];
+            })
+            categories.sort((a, b) => parseInt(a) - parseInt(b));
+            // 按日期排序数据
+            let sortedData = apiResponse.data.sort((a, b) => new Date(a.date) - new Date(b.date));
+            let verificationData = sortedData.map(item => item.verificationCount);
+            let orderCountData = sortedData.map(item => item.orderCount);
+            let res = {
+              categories: categories,
+              series: [
+                {
+                  name: "核销",
+                  data: verificationData
+                },
+                {
+                  name: "下单",
+                  data: orderCountData
+                }
+              ]
+            };
+            this.chartData = JSON.parse(JSON.stringify(res));
+          }
+      })
+
+    },
+    confirm(e) {
+      this.startTime = e[0];
+      this.endTime = e[1];
+      this.startTimeXd = e[0]+' ~ '+e[1];
+      this.timeShow = false;
+
+    },
+    getXdData() {
+      //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
+      let res = {
+        categories: ["7","8","9","10","11","12"],
+        series: [
+          {
+            name: "巡店",
+            data: [35,8,25,37,4,20]
+          },
+        ]
+      };
+      this.chartDataXd = JSON.parse(JSON.stringify(res));
+    }
+  }
+};
+</script>
+
+<style scoped>
+.container {
+  background-image: url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/bgi_2.png");
+  background-size: 100% 100%;
+  background-position: center;
+  background-repeat: no-repeat;
+  height: 100vh;
+  padding: 0px 10px;
+}
+.title-text{
+  font-weight: bold;
+  font-size: 18px;
+  color: #102A3C;
+  text-align: center;
+  height: 10vh;
+  line-height: 10vh;
+}
+  /* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
+  .charts-box {
+    width: 100%;
+    height: 210px;
+  }
+  .query-btn {
+    background-color: #409eff;
+    color: #fff;
+    padding: 20rpx;
+    border-radius: 10rpx;
+    height: 34rpx;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  .query-btn-icon {
+    height: 32rpx;
+    width: 32rpx;
+    background-image:
+        url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/queryIoc.png");
+    background-size: cover;
+    background-position: center;
+    background-repeat: no-repeat;
+  }
+  .query-btn-text {
+    font-weight: 400;
+    font-size: 30rpx;
+    color: #F5F5F5;
+  }
+  .filter{
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+    height: 160rpx;
+    background: #FFFFFF;
+    box-shadow: 0rpx 10rpx 20rpx 0rpx rgba(168,168,168,0.22);
+    border-radius: 12rpx;
+    border: 2px solid #FFFFFF;
+  }
+  .item-one{
+    display: flex;
+
+  }
+  .type-icon-hexiao {
+    height: 80rpx;
+    width: 80rpx;
+    background-image:
+        url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/hexiaoIoc.png");
+    background-size: cover;
+    background-position: center;
+    background-repeat: no-repeat;
+  }
+  .type-icon-xundian {
+    height: 80rpx;
+    width: 80rpx;
+    background-image:
+        url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/xundianIoc.png");
+    background-size: cover;
+    background-position: center;
+    background-repeat: no-repeat;
+  }
+  .type-icon-shanghuo {
+    height: 80rpx;
+    width: 80rpx;
+    background-image:
+        url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/shanghuoIoc.png");
+    background-size: cover;
+    background-position: center;
+    background-repeat: no-repeat;
+  }
+  .type-icon-xiadan {
+    height: 80rpx;
+    width: 80rpx;
+    background-image:
+        url("https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/cjx/xiadanIoc.png");
+    background-size: cover;
+    background-position: center;
+    background-repeat: no-repeat;
+  }
+  .number{
+    font-weight: bold;
+    font-size: 30rpx;
+    color: #3B3638;
+  }
+  .text{
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #84868A;
+  }
+  .type-data{
+    margin-left: 10rpx;
+  }
+  .t-one{
+    margin-top: 10px;
+    background-color: #fff;
+  }
+  .t-text {
+    position: relative;
+    padding-left: 10px; /* 为竖杠留出空间 */
+    font-size: 30rpx; /* 根据需要调整字体大小 */
+    color: #3B3638; /* 标题颜色 */
+    font-weight: bold;
+  }
+
+  .t-text::before {
+    content: ''; /* 必须设置 content 属性 */
+    position: absolute;
+    left: 0;
+    top: 50%;
+    transform: translateY(-50%); /* 垂直居中 */
+    width: 4px; /* 竖杠宽度 */
+    height: 16px; /* 竖杠高度 */
+    background-color: #1890FF; /* 蓝色 */
+  }
+  ::v-deep .u-input{
+    background-color: #fff;
+  }
+  .popup-content{
+    height: 45vh;
+    padding: 10px;
+  }
+  .popup-text{
+    font-family: PingFang SC;
+    font-weight: bold;
+    font-size: 36rpx;
+    color: #1C1E1D;
+    text-align: center;
+    margin-bottom: 10px;
+  }
+  .popup-btn{
+    display: flex;
+    justify-content: space-around;
+  }
+  .popup-btn-one{
+    width: 275rpx;
+    height: 70rpx;
+    background: linear-gradient(0deg, #6FA4FE, #488CFF);
+    box-shadow: 0rpx 9rpx 16rpx 0rpx rgba(153,153,153,0.35);
+    border-radius: 35rpx;
+  }
+  .explain{
+    font-weight: 400;
+    font-size: 28rpx;
+    color: #3B3638;
+  }
+</style>

+ 224 - 214
pages/lgz/index/index.vue

@@ -6,7 +6,7 @@
 				梅山古镇
 			</view>
 			<view class="head">
-				
+
 				<u-swiper :list="list1"></u-swiper>
 			</view>
 			<view class="text">
@@ -15,8 +15,9 @@
 			</view>
 			<view class="content">
 				<view class="chouka" style="width: 100%;">
-					<view class="" style="margin-bottom: 10px;" >
-						<u-row justify="space-between" customStyle="margin-bottom: 5px;display: flex; align-items: center;">
+					<view class="" style="margin-bottom: 10px;">
+						<u-row justify="space-between"
+							customStyle="margin-bottom: 5px;display: flex; align-items: center;">
 							<u-col span="4">
 							</u-col>
 							<u-col span="4" class="center-col">
@@ -28,35 +29,32 @@
 						</u-row>
 					</view>
 
-          <template>
-            <!-- 卡片区 -->
-            <view class="cards">
-              <view
-                  class="card"
-                  v-for="(item, idx) in cards"
-                  :key="idx"
-                  @click="flipCard(idx)"
-                  :class="{ 'flipping': item.isFlipping, 'flipped': item.flipped }"
-              >
-                <view v-if="item.checkStauts" class="select-tag">
-                  已选
-                </view>
-                <view class="card-inner">
-                  <view class="card-front">
-                    <image class="card-img" :src="item.front" mode="scaleToFill"></image>
-                  </view>
-                  <view class="card-back">
-                    <image class="card-img" :src="item.prizeType == 2 ? item.img : item.back" mode="scaleToFill"></image>
-                    <view class="card-back-text">
-                      <view v-show="item.prizeType == 0" class="card-text">很遗憾</view>
-                      <view v-show="item.prizeType == 1" class="card-text">{{item.money/100}}元红包</view>
-                      <view v-show="item.prizeType == 0" class="card-text">下次继续</view>
-                    </view>
-                  </view>
-                </view>
-              </view>
-            </view>
-          </template>
+					<template>
+						<!-- 卡片区 -->
+						<view class="cards">
+							<view class="card" v-for="(item, idx) in cards" :key="idx" @click="flipCard(idx)"
+								:class="{ 'flipping': item.isFlipping, 'flipped': item.flipped }">
+								<view v-if="item.checkStauts" class="select-tag">
+									已选
+								</view>
+								<view class="card-inner">
+									<view class="card-front">
+										<image class="card-img" :src="item.front" mode="scaleToFill"></image>
+									</view>
+									<view class="card-back">
+										<image class="card-img" :src="item.prizeType == 2 ? item.img : item.back"
+											mode="scaleToFill"></image>
+										<view class="card-back-text">
+											<view v-show="item.prizeType == 0" class="card-text">很遗憾</view>
+											<view v-show="item.prizeType == 1" class="card-text">{{item.money/100}}元红包
+											</view>
+											<view v-show="item.prizeType == 0" class="card-text">下次继续</view>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</template>
 
 				</view>
 
@@ -130,7 +128,8 @@
 <script>
 	import CustomTabbar from '@/components/tabbar.vue';
 	import {
-		addWinDetail,saveCardData
+		addWinDetail,
+		saveCardData
 	} from '@/api/scan'
 	export default {
 		components: {
@@ -138,7 +137,7 @@
 		},
 		data() {
 			return {
-				
+
 				rules: {
 					'userInfo.name': {
 						type: 'string',
@@ -157,7 +156,7 @@
 					userInfo: {
 						name: '',
 						tel: '',
-						qrcodeId:''
+						qrcodeId: ''
 					},
 				},
 				showUnWin: false,
@@ -166,8 +165,8 @@
 					"https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/commodity/1.jpg",
 					"https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/commodity/2.jpg",
 					"https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/commodity/3.jpg",
-          "https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/commodity/4.jpg",
-          "https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/commodity/5.jpg",
+					"https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/commodity/4.jpg",
+					"https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/commodity/5.jpg",
 				],
 				cards: [{
 						front: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/one.png',
@@ -176,10 +175,10 @@
 						prizeName: '',
 						title: '',
 						checkStauts: false,
-						img:'',
-						money:'',
-						prizeType:'',
-            isFlipping: false
+						img: '',
+						money: '',
+						prizeType: '',
+						isFlipping: false
 					},
 					{
 						front: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/two.png',
@@ -188,10 +187,10 @@
 						prizeName: '',
 						title: '',
 						checkStauts: false,
-						img:'',
-						money:'',
-						prizeType:'',
-            isFlipping: false
+						img: '',
+						money: '',
+						prizeType: '',
+						isFlipping: false
 					},
 					{
 						front: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/three.png',
@@ -200,10 +199,10 @@
 						prizeName: '',
 						title: '',
 						checkStauts: false,
-						img:'',
-						money:'',
-						prizeType:'',
-            isFlipping: false
+						img: '',
+						money: '',
+						prizeType: '',
+						isFlipping: false
 					},
 					{
 						front: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/four.png',
@@ -212,10 +211,10 @@
 						prizeName: '',
 						title: '',
 						checkStauts: false,
-						img:'',
-						money:'',
-            prizeType:'',
-            isFlipping: false
+						img: '',
+						money: '',
+						prizeType: '',
+						isFlipping: false
 					},
 					{
 						front: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/five.png',
@@ -224,10 +223,10 @@
 						prizeName: '',
 						title: '',
 						checkStauts: false,
-						img:'',
-						money:'',
-            prizeType:'',
-            isFlipping: false
+						img: '',
+						money: '',
+						prizeType: '',
+						isFlipping: false
 					},
 					{
 						front: 'https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/six.png',
@@ -236,25 +235,26 @@
 						prizeName: '',
 						title: '',
 						checkStauts: false,
-						img:'',
-						money:'',
-            prizeType:'',
-            isFlipping: false
-						
+						img: '',
+						money: '',
+						prizeType: '',
+						isFlipping: false
+
 					}
 				],
 				totalDetail: '',
 				prizeJson: {},
 				saveData: {},
-				scanCode:'',
-        saveStatus: true,
+				scanCode: '',
+				saveStatus: true,
+				fankaStatu:false
 			}
 		},
 		onLoad() {
 			let scanDetail = uni.getStorageSync('scanDetail');
 			this.scanCode = uni.getStorageSync('scanCode');
 			this.model1.userInfo.qrcodeId = this.scanCode;
-			
+
 			this.prizeJson = scanDetail.prizeJson;
 			let planDetail = JSON.parse(scanDetail.planDetail);
 			while (planDetail.length < 5) {
@@ -264,52 +264,54 @@
 				})
 			}
 			this.totalDetail = planDetail;
-      console.log(planDetail);
-			if(scanDetail.result.click){
+			console.log(planDetail);
+			if (scanDetail.result.click) {
 				this.initCardData(scanDetail.clickJson);
 			}
 		},
 		methods: {
-			initCardData(clickJson){
+			initCardData(clickJson) {
 				let list = JSON.parse(clickJson);
 				for (let i = 0; i < this.cards.length; i++) {
-					if(i == list.index){
+					if (i == list.index) {
 						this.cards[i].checkStauts = true
 					}
-					this.cards[i].img = list['card'+i].img;
+					this.cards[i].img = list['card' + i].img;
 					this.cards[i].flipped = true;
-					this.cards[i].prizeType = list['card'+i].prize_type == undefined ?  list['card'+i].prizeType :list['card'+i].prize_type;
-					this.cards[i].money =list['card'+i].money;
-					this.cards[i].prizeName = list['card'+i].prizeName == undefined ?  list['card'+i].prize_name :list['card'+i].prizeName;
+					this.cards[i].prizeType = list['card' + i].prize_type == undefined ? list['card' + i].prizeType : list[
+						'card' + i].prize_type;
+					this.cards[i].money = list['card' + i].money;
+					this.cards[i].prizeName = list['card' + i].prizeName == undefined ? list['card' + i].prize_name : list[
+						'card' + i].prizeName;
 				}
 				this.$forceUpdate();
-				
+
 			},
-			addWinDetail(){
+			addWinDetail() {
 				let that = this;
 				this.$refs.uForm.validate().then(res => {
 					addWinDetail(that.model1.userInfo).then(data => {
 						this.showWin = false;
-						if(data.code == 0){
-              that.saveStatus = false;
+						if (data.code == 0) {
+							that.saveStatus = false;
 							// uni.redirectTo({
 							// 	url: '/pages/lgz/index/claim' // 目标页面路径
 							// })
-              let params = {
-                type: "success",
-                title: "成功主题(带图标)",
-                message: "提交成功",
-                iconUrl: "https://uviewui.com/demo/toast/success.png",
-              }
-              that.$refs.uToast.show({
-                ...params
-              });
-						}else{
-							
+							let params = {
+								type: "success",
+								title: "成功主题(带图标)",
+								message: "提交成功",
+								iconUrl: "https://uviewui.com/demo/toast/success.png",
+							}
+							that.$refs.uToast.show({
+								...params
+							});
+						} else {
+
 						}
 					})
 				}).catch(errors => {
-					
+
 				})
 			},
 			open() {
@@ -319,84 +321,88 @@
 				this.showUnWin = false;
 				this.showWin = false
 			},
-      flipCard(idx) {
-        if (this.cards[idx].flipped) {
-          return;
-        }
-        setTimeout(() => {
-          if (this.prizeJson.prizeType == 0 || this.prizeJson.prize_type == 0) {
-            this.showUnWin = true;
-          }
-
-          if ((this.prizeJson.prizeType == 2 || this.prizeJson.prize_type == 2) && this.saveStatus) {
-            this.showWin = true;
-          }
-        }, 2500);  //弹框延迟3.5秒后显示弹框
-
-        // 标记被点击的卡牌正在翻转
-        this.cards[idx].isFlipping = true;
-        this.cards[idx].checkStauts = true;
-
-        let that = this;
-        // 延迟翻转其他卡牌
-        setTimeout(() => {
-          that.cards[idx].flipped = true;
-          that.cards[idx].isFlipping = false;
-
-          // 其他未翻转的卡牌延迟2秒后同时翻转
-          setTimeout(() => {
-            that.cards.forEach((card, index) => {
-              if (index !== idx && !card.flipped) {
-                card.isFlipping = true;
-                that.$forceUpdate();
-              }
-            });
-            
-            // 所有其他卡牌同时翻转
-            setTimeout(() => {
-              that.cards.forEach((card, index) => {
-                if (index !== idx && !card.flipped) {
-                  card.flipped = true;
-                  card.isFlipping = false;
-                  that.$forceUpdate();
-                }
-              });
-            }, 300); // 与其他卡牌翻转动画保持一致
-          }, 1000); // 延迟2秒翻转其他卡牌
-
-
-          // 处理数据逻辑
-          that.totalDetail.splice(idx, 0, this.prizeJson);
-          that.saveData.index = idx;
-
-          for (let i = 0; i < that.totalDetail.length; i++) {
-            that.saveData['card' + i] = that.totalDetail[i];
-
-            that.cards[i].prizeType = that.totalDetail[i].prize_type == undefined ?
-                that.totalDetail[i].prizeType :
-                that.totalDetail[i].prize_type;
-            that.cards[i].img = that.totalDetail[i].img;
-            that.cards[i].money = that.totalDetail[i].money;
-            that.cards[i].prizeName = that.totalDetail[i].prizeName == undefined ?
-                that.totalDetail[i].prize_name :
-                that.totalDetail[i].prizeName;
-          }
-
-          that.saveAllCardData();
-        }, 100);
-      },
-			saveAllCardData(){
+			flipCard(idx) {
+				if(this.fankaStatu){
+					return;
+				}
+				if (this.cards[idx].flipped) {
+					return;
+				}
+				this.fankaStatu = true;
+				setTimeout(() => {
+					if (this.prizeJson.prizeType == 0 || this.prizeJson.prize_type == 0) {
+						this.showUnWin = true;
+					}
+
+					if ((this.prizeJson.prizeType == 2 || this.prizeJson.prize_type == 2) && this.saveStatus) {
+						this.showWin = true;
+					}
+				}, 2500); //弹框延迟3.5秒后显示弹框
+
+				// 标记被点击的卡牌正在翻转
+				this.cards[idx].isFlipping = true;
+				this.cards[idx].checkStauts = true;
+
+				let that = this;
+				// 延迟翻转其他卡牌
+				setTimeout(() => {
+					that.cards[idx].flipped = true;
+					that.cards[idx].isFlipping = false;
+
+					// 其他未翻转的卡牌延迟2秒后同时翻转
+					setTimeout(() => {
+						that.cards.forEach((card, index) => {
+							if (index !== idx && !card.flipped) {
+								card.isFlipping = true;
+								that.$forceUpdate();
+							}
+						});
+
+						// 所有其他卡牌同时翻转
+						setTimeout(() => {
+							that.cards.forEach((card, index) => {
+								if (index !== idx && !card.flipped) {
+									card.flipped = true;
+									card.isFlipping = false;
+									that.$forceUpdate();
+								}
+							});
+						}, 300); // 与其他卡牌翻转动画保持一致
+					}, 1000); // 延迟2秒翻转其他卡牌
+
+
+					// 处理数据逻辑
+					that.totalDetail.splice(idx, 0, this.prizeJson);
+					that.saveData.index = idx;
+
+					for (let i = 0; i < that.totalDetail.length; i++) {
+						that.saveData['card' + i] = that.totalDetail[i];
+
+						that.cards[i].prizeType = that.totalDetail[i].prize_type == undefined ?
+							that.totalDetail[i].prizeType :
+							that.totalDetail[i].prize_type;
+						that.cards[i].img = that.totalDetail[i].img;
+						that.cards[i].money = that.totalDetail[i].money;
+						that.cards[i].prizeName = that.totalDetail[i].prizeName == undefined ?
+							that.totalDetail[i].prize_name :
+							that.totalDetail[i].prizeName;
+					}
+
+					that.saveAllCardData();
+				}, 100);
+			},
+			saveAllCardData() {
 				let jsonStr = JSON.stringify(this.saveData);
-				saveCardData(this.scanCode,jsonStr).then(res => {
+				saveCardData(this.scanCode, jsonStr).then(res => {
 					console.log(res)
 				})
 			},
-			openDetail(){
+			openDetail() {
 				uni.navigateTo({
 					url: '/pages/lgz/index/rules'
 				});
 			}
-			
+
 		}
 	}
 </script>
@@ -481,56 +487,57 @@
 		width: 100%;
 	}
 
-  .card {
-    width: 100%;
-    height: 250rpx;
-    position: relative;
-    background: none;
-    border-radius: 16rpx;
-    margin: 0;
-    perspective: 1000px;
-  }
-
-  .card-inner {
-    position: relative;
-    width: 100%;
-    height: 100%;
-    transition: transform 0.8s cubic-bezier(0.5, 1.5, 0.5, 1);
-    transform-style: preserve-3d;
-  }
-
-  .card.flipping .card-inner {
-    transform: rotateY(180deg);
-  }
-  
-  .card.flipped .card-inner {
-    transform: rotateY(180deg);
-  }
-
-  .card-front, .card-back {
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    backface-visibility: hidden;
-  }
-
-  .card-back {
-    transform: rotateY(180deg);
-  }
-
-  .card-back-text {
-    position: absolute;
-    top: 50%;
-    left: 0;
-    width: 100%;
-    text-align: center;
-    color: #9A1712;
-    font-weight: bold;
-    font-size: 28rpx;
-    transform: translateY(-50%);
-    z-index: 2;
-    pointer-events: none;
-  }
+	.card {
+		width: 100%;
+		height: 250rpx;
+		position: relative;
+		background: none;
+		border-radius: 16rpx;
+		margin: 0;
+		perspective: 1000px;
+	}
+
+	.card-inner {
+		position: relative;
+		width: 100%;
+		height: 100%;
+		transition: transform 0.8s cubic-bezier(0.5, 1.5, 0.5, 1);
+		transform-style: preserve-3d;
+	}
+
+	.card.flipping .card-inner {
+		transform: rotateY(180deg);
+	}
+
+	.card.flipped .card-inner {
+		transform: rotateY(180deg);
+	}
+
+	.card-front,
+	.card-back {
+		position: absolute;
+		width: 100%;
+		height: 100%;
+		backface-visibility: hidden;
+	}
+
+	.card-back {
+		transform: rotateY(180deg);
+	}
+
+	.card-back-text {
+		position: absolute;
+		top: 50%;
+		left: 0;
+		width: 100%;
+		text-align: center;
+		color: #9A1712;
+		font-weight: bold;
+		font-size: 28rpx;
+		transform: translateY(-50%);
+		z-index: 2;
+		pointer-events: none;
+	}
 
 
 	.card-img {
@@ -668,17 +675,20 @@
 		align-items: center !important;
 		/* 垂直居中 */
 	}
-	.card-img-f{
+
+	.card-img-f {
 		height: 100rpx;
 		width: 100rpx;
 	}
-	.card-text{
+
+	.card-text {
 		font-size: 26rpx;
 	}
-	.select-tag{
+
+	.select-tag {
 		position: absolute;
 		right: 0px;
-	
+
 		font-weight: 400;
 		font-size: 20rpx;
 		color: #FFFFFF;
@@ -688,6 +698,6 @@
 		height: 15px;
 		border-radius: 3px;
 		line-height: 15px;
-    z-index: 5;
+		z-index: 5;
 	}
 </style>

+ 1 - 1
pages/lgz/index/unWinPrize.vue

@@ -128,7 +128,7 @@ export default {
       line-height: 1.8;
       margin: 20rpx 0px;
       text-align: center;
-      font-weight: 500;
+      font-weight: 600;
       color: #9B0000;
     }
 

+ 27 - 27
pages/lgz/index/winPrize.vue

@@ -26,16 +26,18 @@
 		<view class="intro-card">
 			<view class="intro-view">
 				<view class="intro-content">
-            <view>
-              <image src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/prize/winPrize_1.png" mode="heightFix"
-                     class="prize_image_1"></image>
-            </view>
-            <view>
-              <image src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/prize/winPrize_2.png" mode="heightFix"
-                     class="prize_image_2"></image>
-            </view>
-          <view>恭喜你找到爆辣卧底,</view>
-          <view>获得一次抽奖机会!</view>
+					<view>
+						<image
+							src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/prize/winPrize_1.png"
+							mode="heightFix" class="prize_image_1"></image>
+					</view>
+					<view>
+						<image
+							src="https://hyscancode.oss-cn-hangzhou.aliyuncs.com/xiaochengxu/guzhenganzi/prize/winPrize_2.png"
+							mode="heightFix" class="prize_image_2"></image>
+					</view>
+					<view>恭喜你找到爆辣卧底,</view>
+					<view>获得一次抽奖机会!</view>
 				</view>
 
 			</view>
@@ -44,7 +46,7 @@
 
 		<!-- 返回按钮 -->
 		<view class="footer-btn">
-			<view  @click="goBack" class="return-button">立即抽奖</view>
+			<view @click="goBack" class="return-button">立即抽奖</view>
 		</view>
 	</view>
 </template>
@@ -53,9 +55,9 @@
 	export default {
 		methods: {
 			goBack() {
-        uni.redirectTo({
-          url: '/pages/lgz/index/index'
-        })
+				uni.redirectTo({
+					url: '/pages/lgz/index/index'
+				})
 			}
 		}
 	}
@@ -101,22 +103,22 @@
 		}
 	}
 
-  .prize_image_1{
-    height: 140rpx;
-  }
+	.prize_image_1 {
+		height: 140rpx;
+	}
 
-  .prize_image_2{
-    height: 340rpx
-  }
+	.prize_image_2 {
+		height: 340rpx
+	}
 
 
 
-  .intro-card {
+	.intro-card {
 		margin: 0 32rpx;
 		padding: 32rpx 24rpx 24rpx 24rpx;
 		background: rgba(131, 100, 71, 0.5);
 		border-radius: 10rpx;
-		
+
 
 		.intro-view {
 			border: 1px solid #341B10;
@@ -130,9 +132,9 @@
 				color: #5c4322;
 				line-height: 1.8;
 				margin: 20rpx 0px;
-        text-align: center;
-        font-weight: 500;
-        color: #9B0000;
+				text-align: center;
+				color: #9B0000;
+				font-weight: 600;
 			}
 
 			.company-img {
@@ -146,6 +148,4 @@
 		}
 
 	}
-	
-
 </style>

+ 16 - 10
pages/login.vue

@@ -20,8 +20,9 @@
  	export default {
  		data() {
  			return {
- 				scanCode: 'a77af70c72ae74e0',
+ 				scanCode: 'a77ef7cc629d8400',
  				path: '',
+ 				status: false
  			}
  		},
  		onLoad(options) {
@@ -40,6 +41,10 @@
  		methods: {
  			login() {
  				let that = this;
+ 				console.log("111111111111")
+ 				if (this.scanCode == '' || this.scanCode == undefined) {
+ 					this.status = true;
+ 				}
  				wx.login({
  					success(res) {
  						if (res.code) {
@@ -50,6 +55,7 @@
  									if (res.data.isWxAuth == 1) {
  										uni.setStorageSync('Authorization-status', true);
  									}
+ 									that.scanCode = res.data.qrCode;
  									setToken(res.data.sessionId)
  									that.path = res.data.page_path;
  									that.verify();
@@ -67,27 +73,27 @@
  				});
  			},
  			verify() {
-				if(this.scanCode == '' ||this.scanCode == undefined){
-					uni.redirectTo({
-						url: '/pages/cjx/my/my'
-					})
-					return;
-				}
-
  				verifyScanCode(this.scanCode).then(res => {
  					console.log(res);
  					if (res.code === 0) {
-						uni.setStorageSync("scanCode", this.scanCode);
+ 						uni.setStorageSync("scanCode", this.scanCode);
  						if (res.data.url !== null && res.data.url !== undefined && res.data.url !== '') {
  							uni.redirectTo({
  								url: '/pages/' + this.path + '/index/authCode'
  							})
  							return;
  						}
+ 						if (this.status) {
+ 							uni.redirectTo({
+ 								url: '/pages/' + this.path + '/my/my'
+ 							})
+ 							return;
+ 						}
+
  						getScanData(this.scanCode).then(res => {
  							if (res.code === 0) {
  								let url = '/pages/' + this.path + '/index/' + res.data.url;
- 							
+
  								uni.setStorageSync('scanDetail', res.data);
  								uni.redirectTo({
  									url: url