duanshenglang 1 місяць тому
батько
коміт
955cb34247

+ 80 - 0
lottery/chat.html

@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>领取奖励</title>
+    <!--引入 element-ui 的样式,-->
+    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+    <!-- 必须先引入vue,  后使用element-ui -->
+    <script src="./js/vue.js"></script>
+    <!-- 引入element 的组件库-->
+    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
+	  <script src="https://unpkg.com/vconsole/dist/vconsole.min.js"></script>
+    <!-- <script>
+		  var vConsole = new window.VConsole();
+		</script> -->
+</head>
+<style>
+  body {
+    margin: 0;
+    padding: 0;
+  }
+  .box {
+    width: 100vw;
+    height: 100vh;
+    box-sizing: border-box;
+    background: #FAFAFA;
+  }
+  .page5 {
+    width: 100vw;
+    height: 100vh;
+    box-sizing: border-box;
+    padding: 0 15px;
+  }
+  .chat_list {
+    display: flex;
+    align-items: center;
+    padding: 15px 0;
+  }
+</style>
+<body>
+  <div id="box" class="box">
+    <!-- 聊天页 -->
+    <div class="page5">
+      <div class="chat_list">
+        <div class="custom_msg">
+          <image class="headImg" src="./img/prize-bg.png"></image>
+        </div>
+        <!-- <div class="my_msg"></div> -->
+      </div>
+    </div>
+  </div>
+</body>
+<script>
+  new Vue({
+      el: '#box',
+      data() {
+        return {
+          chatList: []
+        }
+      },
+      created() {
+      },
+      methods: {
+        // 截取url中的数据
+        getQueryParam (paramName) {
+          // 获取当前URL的查询字符串部分  
+          const queryString = window.location.search;
+          // 创建一个URLSearchParams对象  
+          const urlParams = new URLSearchParams(queryString);
+          // 返回指定参数的值,如果不存在则返回null  
+          return urlParams.get(paramName);
+        },
+      }
+  })   
+</script>
+
+</html>

BIN
lottery/img/chatbox_left.png


+ 13 - 13
lottery/index.html

@@ -576,24 +576,24 @@
 					this.bId = this.getQueryParam('bId')
 					this.h5Type = this.getQueryParam('h5Type')
 					if (this.h5Type == 19 || !this.h5Type) {
-						if (this.getQueryParam('openId') || localStorage.getItem('openId')) {
-							if (!this.getQueryParam('externalUserid')) {
-								this.gerQwAuth(this.bId);
-							} else {
-								if (this.getQueryParam('externalUserid') === 'unknown') {
-									this.gerQwCode(this.bId);
-								} else {
+						// if (this.getQueryParam('openId') || localStorage.getItem('openId')) {
+						// 	if (!this.getQueryParam('externalUserid')) {
+						// 		this.gerQwAuth(this.bId);
+						// 	} else {
+						// 		if (this.getQueryParam('externalUserid') === 'unknown') {
+						// 			this.gerQwCode(this.bId);
+						// 		} else {
 									this.raffleInfo();
 									this.raffleRecord()
 									this.getCityLevel()
 									this.getAllCar()
 									this.getQyWxSign()
-								}
-							}
-						} else {
-							// 走授权操作
-							this.getAuth();
-						}
+						// 		}
+						// 	}
+						// } else {
+						// 	// 走授权操作
+						// 	this.getAuth();
+						// }
 					} else if (this.h5Type == 20) {
 						// 宝骏云海送祝福
 						var currentQueryParams = window.location.search;

+ 3 - 3
lottery/live_code.html

@@ -240,7 +240,7 @@
             env: '',
             memberId: null,
             corpId: null,
-            step: 1,
+            step: null,
             qrCode: '',
             salesMan: '',
             form: {
@@ -301,7 +301,7 @@
 							return res.json()
 						}).then(result => {
 							let { data, code, msg } = result
-							if (code === 1) {
+							if (data && data.qrCode) {
 								this.step = 3
                 this.salesMan = data.salesMan
                 this.qrCode = data.qrCode
@@ -329,7 +329,7 @@
 							return res.json()
 						}).then(result => {
 							let { data, code, msg } = result
-							if (data) {
+							if (data && data.qrCode) {
 								this.step = 3
                 this.qrCode = data.qrCode
 							} else {

+ 10 - 3
lottery/money.html

@@ -51,16 +51,16 @@
   .redeem_code_num {
     display: flex;
     align-items: center;
+    justify-content: center;
     font-weight: 400;
     font-size: 14px;
     color: #2885FF;
-    justify-content: end;
     padding-top: 10px;
     padding-bottom: 10px;
   }
   .code_num {
     font-weight: 500;
-    font-size: 20px;
+    font-size: 14px;
     color: #222222;
     padding-right: 15px;
     line-height: 28px;
@@ -103,7 +103,7 @@
         <div class="redeem_code_title">兑换码</div>
         <div class="redeem_code_num">
           <span class="code_num">{{prizeCode}}</span>
-          <span>复制</span>
+          <span @click="handleCopy">复制</span>
         </div>
         <image class="redeem_erCode" :src="urlQrCode"></image>
       </div>
@@ -130,6 +130,13 @@
         this.urlQrCode = this.getQueryParam('urlQrCode')
       },
       methods: {
+        handleCopy () {
+          navigator.clipboard.writeText(this.prizeCode)
+          this.$message({
+            message: "复制成功",
+            type: 'success'
+          })
+        },
         // 截取url中的数据
         getQueryParam (paramName) {
           // 获取当前URL的查询字符串部分  

+ 7 - 3
lottery/prize.html

@@ -209,7 +209,7 @@
             <div class="prize_item_num" v-if="!item.complete">距离下一阶段奖励还差{{item.needNum}}人</div>
           </div>
           <div v-if="item.complete">
-            <div class="prize_item_btn btn_no" @click="handlePrize(item)" v-if="item.accept===1">领取奖励</div>
+            <div class="prize_item_btn btn_no" @click="handlePrize(item)" v-if="!item.accept">领取奖励</div>
             <div class="prize_item_btn btn_ok" v-else>已领取</div>
           </div>
         </div>
@@ -222,7 +222,7 @@
           <el-form-item label="联系方式">
             <el-input v-model="prizeMsg.phone"></el-input>
           </el-form-item>
-          <el-form-item label="活动区域">
+          <el-form-item label="收件地址">
             <el-input type="textarea" v-model="prizeMsg.address"></el-input>
           </el-form-item>
         </el-form>
@@ -284,6 +284,8 @@
             let { data, code, msg } = result
             if (data) {
               this.countData = data
+            } else {
+              this.$message.error(msg)
             }
           })
         },
@@ -314,9 +316,11 @@
             return res.json()
           }).then(result => {
             let { data, code, msg } = result
-            if (data) {
+            if (code === 1) {
               this.showDialog = false
               this.showData()
+            } else {
+              this.$message.error(msg)
             }
           })
         },

+ 121 - 0
lottery/sessionList.html

@@ -0,0 +1,121 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>微分机器人</title>
+    <!--引入 element-ui 的样式,-->
+    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+    <!-- 必须先引入vue,  后使用element-ui -->
+    <script src="./js/vue.js"></script>
+    <!-- 引入element 的组件库-->
+    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
+	  <script src="https://unpkg.com/vconsole/dist/vconsole.min.js"></script>
+    <!-- <script>
+		  var vConsole = new window.VConsole();
+		</script> -->
+</head>
+<style>
+  body {
+    margin: 0;
+    padding: 0;
+  }
+  .box {
+    width: 100vw;
+    height: 100vh;
+    box-sizing: border-box;
+    background: #FAFAFA;
+  }
+  .page5 {
+    width: 100vw;
+    height: 100vh;
+    box-sizing: border-box;
+    padding: 0 15px;
+  }
+  .session_list {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    border-bottom: 1px solid #E2E2E2;
+    padding: 15px 0;
+  }
+  .session_item {
+    display: flex;
+    align-items: center;
+  }
+  .session_head {
+    width: 48px;
+    height: 48px;
+    position: relative;
+  }
+  .head_img {
+    width: 48px;
+    height: 48px;
+    border-radius: 5px;
+  }
+  .on_line {
+    position: absolute;
+    right: 0;
+    bottom: 0;
+    width: 15px;
+    height: 15px;
+    background: #23E580;
+    border: 2px solid #FFFFFF;
+    border-radius: 50%;
+  }
+  .client_name {
+    font-weight: 500;
+    font-size: 14px;
+    color: #222222;
+    padding-left: 10px;
+  }
+  .session_btn {
+    font-weight: 500;
+    font-size: 14px;
+    color: #2885FF;
+  }
+</style>
+<body>
+  <div id="box" class="box">
+    <!-- 会话列表 -->
+    <div class="page5">
+      <div class="session_list" v-for="(item, index) in sessionList" :key="index">
+        <div class="session_item">
+          <div class="session_head">
+            <image class="head_img" src="./img/prize-bg.png"></image>
+            <div class="on_line"></div>
+          </div>
+          <div class="client_name">客户昵称</div>
+        </div>
+        <div class="session_btn" @click="handlePrize(item)">进入聊天</div>
+      </div>
+    </div>
+  </div>
+</body>
+<script>
+  new Vue({
+      el: '#box',
+      data() {
+        return {
+          sessionList: []
+        }
+      },
+      created() {
+      },
+      methods: {
+        // 截取url中的数据
+        getQueryParam (paramName) {
+          // 获取当前URL的查询字符串部分  
+          const queryString = window.location.search;
+          // 创建一个URLSearchParams对象  
+          const urlParams = new URLSearchParams(queryString);
+          // 返回指定参数的值,如果不存在则返回null  
+          return urlParams.get(paramName);
+        },
+      }
+  })   
+</script>
+
+</html>