qxj 2 weken geleden
bovenliggende
commit
d6fce39b40
6 gewijzigde bestanden met toevoegingen van 133 en 481 verwijderingen
  1. 2 2
      App.vue
  2. 1 0
      common/request.js
  3. 16 324
      package-lock.json
  4. 0 1
      pages/user/index.vue
  5. 97 132
      pages_course/living.vue
  6. 17 22
      pages_shopping/live/confirmCreateOrder.vue

+ 2 - 2
App.vue

@@ -6,13 +6,13 @@
 		globalData: {
 			// wsUrl: 'wss://websocket.cdwjyyh.com',
 			wsUrl: '',
-			appId: 'wxedde588767b358b1',
+			appId: 'wx44beed5640bcb1ba',
 		},
 		onLoad: function (){
 			
 		},
 		onLaunch: function() {
-			this.checkUpdate()
+			this.checkUpdate();
 			// uni.hideTabBar({ animation: true })
 			// uni.$TUIKit = TIM.create({
 			// 	SDKAppID: 1400693126

+ 1 - 0
common/request.js

@@ -78,6 +78,7 @@ export default class Request {
 				httpContentType = contentType;
 			}
 			var routers = router;
+			console.log("---qxj request url:"+`${path}${router}`+" params:"+JSON.stringify(data)+" \n AppToken:"+token);
 			// 请求
 			uni.request({
 				header: {

+ 16 - 324
package-lock.json

@@ -1,343 +1,35 @@
 {
   "name": "zhongkmall_user_app",
   "version": "1.0.0",
-  "lockfileVersion": 3,
+  "lockfileVersion": 1,
   "requires": true,
-  "packages": {
-    "": {
-      "name": "zhongkmall_user_app",
-      "version": "1.0.0",
-      "license": "ISC",
-      "dependencies": {
-        "crypto-js": "^4.2.0",
-        "dayjs": "^1.11.13",
-        "uview-ui": "^2.0.38",
-        "vuex": "^4.1.0"
-      }
-    },
-    "node_modules/@babel/helper-string-parser": {
-      "version": "7.27.1",
-      "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
-      "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
-      "license": "MIT",
-      "peer": true,
-      "engines": {
-        "node": ">=6.9.0"
-      }
-    },
-    "node_modules/@babel/helper-validator-identifier": {
-      "version": "7.27.1",
-      "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz",
-      "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==",
-      "license": "MIT",
-      "peer": true,
-      "engines": {
-        "node": ">=6.9.0"
-      }
-    },
-    "node_modules/@babel/parser": {
-      "version": "7.28.0",
-      "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.28.0.tgz",
-      "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==",
-      "license": "MIT",
-      "peer": true,
-      "dependencies": {
-        "@babel/types": "^7.28.0"
-      },
-      "bin": {
-        "parser": "bin/babel-parser.js"
-      },
-      "engines": {
-        "node": ">=6.0.0"
-      }
-    },
-    "node_modules/@babel/types": {
-      "version": "7.28.2",
-      "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.28.2.tgz",
-      "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==",
-      "license": "MIT",
-      "peer": true,
-      "dependencies": {
-        "@babel/helper-string-parser": "^7.27.1",
-        "@babel/helper-validator-identifier": "^7.27.1"
-      },
-      "engines": {
-        "node": ">=6.9.0"
-      }
-    },
-    "node_modules/@jridgewell/sourcemap-codec": {
-      "version": "1.5.4",
-      "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz",
-      "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==",
-      "license": "MIT",
-      "peer": true
-    },
-    "node_modules/@vue/compiler-core": {
-      "version": "3.5.18",
-      "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.18.tgz",
-      "integrity": "sha512-3slwjQrrV1TO8MoXgy3aynDQ7lslj5UqDxuHnrzHtpON5CBinhWjJETciPngpin/T3OuW3tXUf86tEurusnztw==",
-      "license": "MIT",
-      "peer": true,
-      "dependencies": {
-        "@babel/parser": "^7.28.0",
-        "@vue/shared": "3.5.18",
-        "entities": "^4.5.0",
-        "estree-walker": "^2.0.2",
-        "source-map-js": "^1.2.1"
-      }
-    },
-    "node_modules/@vue/compiler-dom": {
-      "version": "3.5.18",
-      "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.5.18.tgz",
-      "integrity": "sha512-RMbU6NTU70++B1JyVJbNbeFkK+A+Q7y9XKE2EM4NLGm2WFR8x9MbAtWxPPLdm0wUkuZv9trpwfSlL6tjdIa1+A==",
-      "license": "MIT",
-      "peer": true,
-      "dependencies": {
-        "@vue/compiler-core": "3.5.18",
-        "@vue/shared": "3.5.18"
-      }
-    },
-    "node_modules/@vue/compiler-sfc": {
-      "version": "3.5.18",
-      "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.5.18.tgz",
-      "integrity": "sha512-5aBjvGqsWs+MoxswZPoTB9nSDb3dhd1x30xrrltKujlCxo48j8HGDNj3QPhF4VIS0VQDUrA1xUfp2hEa+FNyXA==",
-      "license": "MIT",
-      "peer": true,
-      "dependencies": {
-        "@babel/parser": "^7.28.0",
-        "@vue/compiler-core": "3.5.18",
-        "@vue/compiler-dom": "3.5.18",
-        "@vue/compiler-ssr": "3.5.18",
-        "@vue/shared": "3.5.18",
-        "estree-walker": "^2.0.2",
-        "magic-string": "^0.30.17",
-        "postcss": "^8.5.6",
-        "source-map-js": "^1.2.1"
-      }
-    },
-    "node_modules/@vue/compiler-ssr": {
-      "version": "3.5.18",
-      "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.5.18.tgz",
-      "integrity": "sha512-xM16Ak7rSWHkM3m22NlmcdIM+K4BMyFARAfV9hYFl+SFuRzrZ3uGMNW05kA5pmeMa0X9X963Kgou7ufdbpOP9g==",
-      "license": "MIT",
-      "peer": true,
-      "dependencies": {
-        "@vue/compiler-dom": "3.5.18",
-        "@vue/shared": "3.5.18"
-      }
-    },
-    "node_modules/@vue/devtools-api": {
+  "dependencies": {
+    "@vue/devtools-api": {
       "version": "6.6.4",
-      "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz",
+      "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.6.4.tgz",
       "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g=="
     },
-    "node_modules/@vue/reactivity": {
-      "version": "3.5.18",
-      "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.5.18.tgz",
-      "integrity": "sha512-x0vPO5Imw+3sChLM5Y+B6G1zPjwdOri9e8V21NnTnlEvkxatHEH5B5KEAJcjuzQ7BsjGrKtfzuQ5eQwXh8HXBg==",
-      "license": "MIT",
-      "peer": true,
-      "dependencies": {
-        "@vue/shared": "3.5.18"
-      }
-    },
-    "node_modules/@vue/runtime-core": {
-      "version": "3.5.18",
-      "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.5.18.tgz",
-      "integrity": "sha512-DUpHa1HpeOQEt6+3nheUfqVXRog2kivkXHUhoqJiKR33SO4x+a5uNOMkV487WPerQkL0vUuRvq/7JhRgLW3S+w==",
-      "license": "MIT",
-      "peer": true,
-      "dependencies": {
-        "@vue/reactivity": "3.5.18",
-        "@vue/shared": "3.5.18"
-      }
-    },
-    "node_modules/@vue/runtime-dom": {
-      "version": "3.5.18",
-      "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.5.18.tgz",
-      "integrity": "sha512-YwDj71iV05j4RnzZnZtGaXwPoUWeRsqinblgVJwR8XTXYZ9D5PbahHQgsbmzUvCWNF6x7siQ89HgnX5eWkr3mw==",
-      "license": "MIT",
-      "peer": true,
-      "dependencies": {
-        "@vue/reactivity": "3.5.18",
-        "@vue/runtime-core": "3.5.18",
-        "@vue/shared": "3.5.18",
-        "csstype": "^3.1.3"
-      }
-    },
-    "node_modules/@vue/server-renderer": {
-      "version": "3.5.18",
-      "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.5.18.tgz",
-      "integrity": "sha512-PvIHLUoWgSbDG7zLHqSqaCoZvHi6NNmfVFOqO+OnwvqMz/tqQr3FuGWS8ufluNddk7ZLBJYMrjcw1c6XzR12mA==",
-      "license": "MIT",
-      "peer": true,
-      "dependencies": {
-        "@vue/compiler-ssr": "3.5.18",
-        "@vue/shared": "3.5.18"
-      },
-      "peerDependencies": {
-        "vue": "3.5.18"
-      }
-    },
-    "node_modules/@vue/shared": {
-      "version": "3.5.18",
-      "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.18.tgz",
-      "integrity": "sha512-cZy8Dq+uuIXbxCZpuLd2GJdeSO/lIzIspC2WtkqIpje5QyFbvLaI5wZtdUjLHjGZrlVX6GilejatWwVYYRc8tA==",
-      "license": "MIT",
-      "peer": true
-    },
-    "node_modules/crypto-js": {
+    "crypto-js": {
       "version": "4.2.0",
-      "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
+      "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
       "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
     },
-    "node_modules/csstype": {
-      "version": "3.1.3",
-      "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz",
-      "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
-      "license": "MIT",
-      "peer": true
-    },
-    "node_modules/dayjs": {
-      "version": "1.11.13",
-      "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
-      "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==",
-      "license": "MIT"
-    },
-    "node_modules/entities": {
-      "version": "4.5.0",
-      "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz",
-      "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
-      "license": "BSD-2-Clause",
-      "peer": true,
-      "engines": {
-        "node": ">=0.12"
-      },
-      "funding": {
-        "url": "https://github.com/fb55/entities?sponsor=1"
-      }
-    },
-    "node_modules/estree-walker": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
-      "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
-      "license": "MIT",
-      "peer": true
-    },
-    "node_modules/magic-string": {
-      "version": "0.30.17",
-      "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.17.tgz",
-      "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==",
-      "license": "MIT",
-      "peer": true,
-      "dependencies": {
-        "@jridgewell/sourcemap-codec": "^1.5.0"
-      }
-    },
-    "node_modules/nanoid": {
-      "version": "3.3.11",
-      "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.11.tgz",
-      "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/ai"
-        }
-      ],
-      "license": "MIT",
-      "peer": true,
-      "bin": {
-        "nanoid": "bin/nanoid.cjs"
-      },
-      "engines": {
-        "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
-      }
-    },
-    "node_modules/picocolors": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz",
-      "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
-      "license": "ISC",
-      "peer": true
-    },
-    "node_modules/postcss": {
-      "version": "8.5.6",
-      "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.6.tgz",
-      "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/postcss/"
-        },
-        {
-          "type": "tidelift",
-          "url": "https://tidelift.com/funding/github/npm/postcss"
-        },
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/ai"
-        }
-      ],
-      "license": "MIT",
-      "peer": true,
-      "dependencies": {
-        "nanoid": "^3.3.11",
-        "picocolors": "^1.1.1",
-        "source-map-js": "^1.2.1"
-      },
-      "engines": {
-        "node": "^10 || ^12 || >=14"
-      }
+    "dayjs": {
+      "version": "1.11.19",
+      "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.19.tgz",
+      "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw=="
     },
-    "node_modules/source-map-js": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",
-      "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
-      "license": "BSD-3-Clause",
-      "peer": true,
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/uview-ui": {
+    "uview-ui": {
       "version": "2.0.38",
-      "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.38.tgz",
-      "integrity": "sha512-6egHDf9lXHKpG3hEjRE0vMx4+VWwKk/ReTf5x18KrIKqdvdPRqO3+B8Unh7vYYwrIxzAWIlmhZ9RJpKI/4UqPQ==",
-      "engines": {
-        "HBuilderX": "^3.1.0"
-      }
-    },
-    "node_modules/vue": {
-      "version": "3.5.18",
-      "resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.18.tgz",
-      "integrity": "sha512-7W4Y4ZbMiQ3SEo+m9lnoNpV9xG7QVMLa+/0RFwwiAVkeYoyGXqWE85jabU4pllJNUzqfLShJ5YLptewhCWUgNA==",
-      "license": "MIT",
-      "peer": true,
-      "dependencies": {
-        "@vue/compiler-dom": "3.5.18",
-        "@vue/compiler-sfc": "3.5.18",
-        "@vue/runtime-dom": "3.5.18",
-        "@vue/server-renderer": "3.5.18",
-        "@vue/shared": "3.5.18"
-      },
-      "peerDependencies": {
-        "typescript": "*"
-      },
-      "peerDependenciesMeta": {
-        "typescript": {
-          "optional": true
-        }
-      }
+      "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.38.tgz",
+      "integrity": "sha512-6egHDf9lXHKpG3hEjRE0vMx4+VWwKk/ReTf5x18KrIKqdvdPRqO3+B8Unh7vYYwrIxzAWIlmhZ9RJpKI/4UqPQ=="
     },
-    "node_modules/vuex": {
+    "vuex": {
       "version": "4.1.0",
-      "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz",
+      "resolved": "https://registry.npmmirror.com/vuex/-/vuex-4.1.0.tgz",
       "integrity": "sha512-hmV6UerDrPcgbSy9ORAtNXDr9M4wlNP4pEFKye4ujJF8oqgFFuxDCdOLS3eNoRTtq5O3hoBDh9Doj1bQMYHRbQ==",
-      "dependencies": {
+      "requires": {
         "@vue/devtools-api": "^6.0.0-beta.11"
-      },
-      "peerDependencies": {
-        "vue": "^3.2.0"
       }
     }
   }

+ 0 - 1
pages/user/index.vue

@@ -179,7 +179,6 @@
 								<text class="text">隐私保护</text>
 							</view> -->
 
-
 							<!-- 测试用下面的 -->
 							<view class="item no-marin-bottom align-top" @click="navgetTo('/pages_course/livingList')">
 								<image

+ 97 - 132
pages_course/living.vue

@@ -57,10 +57,8 @@
 				<!-- 顶部信息栏 -->
 				<view class="top-info-bar" :class="liveItem.showType == 1 ? 'horizontal-top' : ''">
 					<view class="user-info-section">
-						<image v-if="!scene&&liveItem.showType==2" @click="goBack" class="back-icon mr4"
+						<image v-if="!scene" @click="goBack" class="back-icon mr4"
 							src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/return3.png" />
-						<image v-if="!scene&&liveItem.showType==1" @click="goBack" class="w42 h42 mr4"
-							src="/static/images/return_black.png" />
 						<view class="user-avatar-container">
 							<u-avatar
 								:src="liveItem.liveImgUrl || 'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/avatar.png'"
@@ -75,11 +73,11 @@
 					<!-- @click="toggleViewerList" -->
 					<view v-if="Array.isArray(filteredViewers)" class="viewers-section">
 						<view v-for="(item, index) in (filteredViewers ||[])" :key="index">
-							<image v-if="item" class="viewer-avatar mr4" :src="item" />
-							<!-- <view v-else class="viewer-avatar-placeholder mr4"
+							<image v-if="item.avatar" class="viewer-avatar mr4" :src="item.avatar" />
+							<view v-else class="viewer-avatar-placeholder mr4"
 								:style="{ backgroundColor: getUserRandomColor(item.userId) }">
 								<text class="avatar-initial">{{ getNicknameInitial(item.nickName) }}</text>
-							</view> -->
+							</view>
 						</view>
 						<view class="viewer-count ">{{formattedWatchCount || 0 }}</view>
 					</view>
@@ -162,7 +160,7 @@
 						</view>
 						<scroll-view id="msgScroll" v-if="Array.isArray(talklist)" enable-flex scroll-y="true"
 							:enhanced="true" :bounces="false" :show-scrollbar="false" :fast-deceleration="false"
-							:enable-back-to-top="false" class="message-scroll-view"  :class="liveItem.status == 1 ? 'message-scroll2' : ''" :scroll-top="scrollTop"
+							:enable-back-to-top="false" class="message-scroll-view" :scroll-top="scrollTop"
 							:scroll-into-view="scrollIntoView" @scroll="onScroll" ref="scrollView">
 							<view class="message-list" v-for="(item, talkIndex) in (talklist || [])"
 								:key="item.uniqueId " :id="`list_${item.uniqueId }`" v-show="item.cmd != 'red' ">
@@ -196,8 +194,7 @@
 								:class="{ 'input-focused': isFocus }" @focus="inputFocus" @blur="inputBlur"
 								cursor-spacing="100" :adjust-position="false" :disabled="isEnd" />
 							<!-- v-if="isFocus&&!isIOS" -->
-							<view class="send-button" :class="liveItem.showType == 1 ? 'send2' : ''" @click="sendMsg()">
-								发送</view>
+							<view class="send-button" :class="liveItem.showType == 1 ? 'send2' : ''" @click="sendMsg()">发送</view>
 						</view>
 						<!--  :class="{ 'action-buttons-hidden': isFocus }" -->
 						<view class="action-buttons" v-if="!isFocus">
@@ -557,16 +554,16 @@
 							<input placeholder="请搜索商品" v-model="inputInfo" @input="handleSearchInput" />
 						</view>
 						<view class="x-f">
-							<view class="shopping-action-button mr30" @click="navgetTo('/pages_shopping/live/order')">
-								<image class="action-button-icon"
-									src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/carts.png" />
-								<view class="action-button-label">订单</view>
-							</view>
-							<view class="shopping-action-button" @click="(isMore = true), (shopping = false)">
-								<image class="action-button-icon"
-									src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/search2.png" />
-								<view class="action-button-label">更多</view>
-							</view>
+						<view class="shopping-action-button mr30" @click="navgetTo('/pages_shopping/live/order')">
+							<image class="action-button-icon"
+								src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/carts.png" />
+							<view class="action-button-label">订单</view>
+						</view>
+						<view class="shopping-action-button" @click="(isMore = true), (shopping = false)">
+							<image class="action-button-icon"
+								src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/search2.png" />
+							<view class="action-button-label">更多</view>
+						</view>
 						</view>
 					</view>
 
@@ -689,12 +686,6 @@
 		},
 		data() {
 			return {
-				isNow: false,
-				fakeAvatar: Array.from({
-						length: 11
-					}, (_, i) =>
-					`https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/avatar${i + 1}.jpg`),
-				virtualHuman: null,
 				userlogo: false,
 				listTabs: [{
 					name: '讨论',
@@ -930,6 +921,7 @@
 					}
 				} else {
 					console.log("手机型号是>>>>", this.systemInfo.model)
+					console.log("手机高度是>>>>", this.systemInfo.model)
 					// Android处理保持原有逻辑
 					if (res.height > 0) {
 						this.isKeyboardShow = true;
@@ -956,7 +948,7 @@
 		},
 		onPullDownRefresh() {
 			this.getLiveMsg(this.liveItem);
-			// this.getliveUser();
+			this.getliveUser();
 			setTimeout(() => {
 				uni.stopPullDownRefresh();
 			}, 1000);
@@ -1038,9 +1030,6 @@
 				this.totalTraffic = 0;
 			}
 			this.startTimer();
-			if (!this.isNow) {
-				this.userlogo = true
-			}
 		},
 
 		//分享给好友
@@ -1070,43 +1059,16 @@
 			},
 			// 观看人数
 			formattedWatchCount() {
-				return this.formatNumber(this.virtualHuman || 0);
+				return this.formatNumber(this.liveUserTotal || 0);
 			},
 			//点赞人数
 			formattedLikeCount() {
 				return this.formatNumber(this.liveViewData.like || 0);
 			},
 			filteredViewers() {
-				// 获取3个随机假头像,而不是显示真实观众
-				const avatarCount = 3; // 需要显示的假头像数量
-
-				// 如果fakeAvatar数组为空或不存在,返回空数组
-				if (!this.fakeAvatar || !Array.isArray(this.fakeAvatar) || this.fakeAvatar.length === 0) {
-					return [];
-				}
-
-				// 从fakeAvatar中随机选择3个不同的头像
-				const randomAvatars = [];
-				const availableAvatars = [...this.fakeAvatar]; // 创建副本避免修改原数组
-
-				// 确保有足够的头像可选
-				if (availableAvatars.length < avatarCount) {
-					// 如果头像数量不足,可以重复使用
-					for (let i = 0; i < avatarCount; i++) {
-						const randomIndex = Math.floor(Math.random() * availableAvatars.length);
-						randomAvatars.push(availableAvatars[randomIndex]);
-					}
-				} else {
-					// 随机选择不重复的头像
-					for (let i = 0; i < avatarCount; i++) {
-						const randomIndex = Math.floor(Math.random() * availableAvatars.length);
-						randomAvatars.push(availableAvatars[randomIndex]);
-						availableAvatars.splice(randomIndex, 1); // 移除已选的头像,避免重复
-					}
-				}
-
-				console.log("随机选择的头像:", randomAvatars);
-				return randomAvatars;
+				const safeLiveViewers = Array.isArray(this.liveViewersData) ? this.liveViewersData : [];
+				// 截取前3项
+				return safeLiveViewers.slice(0, 3);
 			},
 			isCurrentUserWon() {
 				if (!Array.isArray(this.prizeInfo) || !this.userInfo?.userId) {
@@ -1129,10 +1091,10 @@
 				return userPrize ? userPrize.productId : null;
 			},
 			getCurrentUserPrizeRecordId() {
-				// console.log('=== getCurrentUserPrizeRecordId 调试信息 ===');
-				// console.log('this.prizeInfo:', this.prizeInfo);
-				// console.log('this.userInfo:', this.userInfo);
-				// console.log('this.userInfo.userId:', this.userInfo?.userId);
+				console.log('=== getCurrentUserPrizeRecordId 调试信息 ===');
+				console.log('this.prizeInfo:', this.prizeInfo);
+				console.log('this.userInfo:', this.userInfo);
+				console.log('this.userInfo.userId:', this.userInfo?.userId);
 
 				if (!Array.isArray(this.prizeInfo) || !this.userInfo?.userId) {
 					console.log('条件不满足,返回null');
@@ -1150,8 +1112,8 @@
 					return match;
 				});
 
-				// console.log('找到的用户奖品:', userPrize);
-				// console.log('最终返回的recordId:', userPrize ? userPrize.recordId : null);
+				console.log('找到的用户奖品:', userPrize);
+				console.log('最终返回的recordId:', userPrize ? userPrize.recordId : null);
 
 				return userPrize ? userPrize.recordId : null;
 			},
@@ -1315,10 +1277,8 @@
 			},
 			async haveLogin() {
 				this.userInfo = uni.getStorageSync('userInfo');
-				if (this.userInfo) {
-					await this.getUserInfo();
-				}
-
+				// this.userData = uni.getStorageSync('userData');
+				await this.getUserInfo();
 				// this.initTime();
 				if (this.liveId) {
 					// 先获取直播间信息
@@ -1344,7 +1304,7 @@
 			// 		await this.getUserInfo();
 			// 	}
 			// },
-
+			
 			// 静默登录
 			goLogin(data) {
 				let provider = 'weixin'
@@ -1651,9 +1611,9 @@
 					this.talklist = this.talklist.slice(-50);
 				}
 				// 清理观众数据
-				// if (this.liveViewersData.length > 100) {
-				// 	this.liveViewersData = this.liveViewersData.slice(-100);
-				// }
+				if (this.liveViewersData.length > 100) {
+					this.liveViewersData = this.liveViewersData.slice(-100);
+				}
 
 				// 清理虚拟数据
 				if (this.liveViewers.length > 100) {
@@ -1681,7 +1641,7 @@
 
 			// 强制滚动到底部(备用方案)
 			forceScrollToBottom() {
-				// console.log('执行强制滚动到底部');
+				console.log('执行强制滚动到底部');
 
 				// 方案1:直接设置一个很大的scrollTop值
 				this.scrollTop = 999999;
@@ -1758,7 +1718,7 @@
 
 			// 强制滚动到底部(用于发送消息,绕过防抖限制)
 			forceScrollToBottomOnSend() {
-				// console.log('执行强制滚动到底部(发送消息专用)');
+				console.log('执行强制滚动到底部(发送消息专用)');
 
 				// 清理之前的定时器
 				if (this.scrollTimer) {
@@ -2122,6 +2082,7 @@
 				const now = Date.now();
 				// 防抖检查:如果距离上次滚动时间太短,则忽略
 				if (now - this.lastScrollTime < this.scrollDebounceDelay) {
+					console.log('滚动防抖:忽略频繁调用');
 					return;
 				}
 				this.lastScrollTime = now;
@@ -2261,7 +2222,6 @@
 					(res) => {
 						if (res.code == 200) {
 							this.userInfo = res.user;
-							this.isNow = dayjs(this.userInfo.updateTime).isSame(dayjs(), 'day')
 						} else {
 							uni.showToast({
 								icon: 'none',
@@ -2987,8 +2947,10 @@
 							this.isShowLottery = this.lotteryInfo && this.lotteryInfo.lotteryStatus == 1;
 
 							if (this.notice.msg) {
+								console.log("有》》》》")
 								this.noticeTimer = setInterval(() => {
 									const noticeCountdown = this.handleTime(this.notice.endTime, 0);
+									console.log("出现1>>>", noticeCountdown)
 									if (!noticeCountdown) {
 										this.isShowNotice = false;
 										clearInterval(this.noticeTimer);
@@ -3113,6 +3075,7 @@
 			},
 
 			pauseVideo() {
+				console.log("暂停了")
 				if (!this.liveItem) return;
 
 				try {
@@ -3246,48 +3209,48 @@
 			},
 
 			// 获取直播间用户
-			// async getliveUser(isLoadMore = false) {
-			// 	this.viewLoading = true;
-
-			// 	try {
-			// 		const res = await watchUserList(this.liveId, this.viewPageSize, this.viewPageNum, false);
-			// 		console.log("getliveUser", res);
-			// 		if (res.code === 200) {
-			// 			const userRows = Array.isArray(res.rows) ? res.rows : [];
-
-			// 			let array = userRows.map((item) => ({
-			// 				avatar: item.avatar || '',
-			// 				userId: item.userId || '',
-			// 				nickName: item.nickName || '未命名'
-			// 			}));
-
-			// 			// 虚拟数据
-			// 			let virtualData = [];
-			// 			let virtualTotal = res.total * 10;
-			// 			this.liveUserTotal = virtualTotal;
-			// 			for (let i = 0; i < virtualTotal; i++) {
-			// 				let data = {
-			// 					avatar: '',
-			// 					userId: '8565' + i,
-			// 					nickName: '微信用户'
-			// 				};
-			// 				virtualData.push(data);
-			// 			}
-			// 			this.liveViewersData = [...array, ...virtualData];
-
-			// 			const newRows = Array.isArray(res.rows) ? res.rows : [];
-			// 			const currentViewers = Array.isArray(this.liveViewers) ? this.liveViewers : [];
-
-			// 			let viewlist = isLoadMore ? [...currentViewers, ...newRows] : newRows;
-			// 			this.liveViewers = [...viewlist, ...virtualData];
-			// 			this.viewPageNum++;
-			// 		}
-			// 	} catch (error) {
-			// 		console.error('获取观众列表失败:', error);
-			// 	} finally {
-			// 		this.viewLoading = false;
-			// 	}
-			// },
+			async getliveUser(isLoadMore = false) {
+				this.viewLoading = true;
+				
+				try {
+					const res = await watchUserList(this.liveId, this.viewPageSize, this.viewPageNum, false);
+					console.log("getliveUser",res);
+					if (res.code === 200) {
+						const userRows = Array.isArray(res.rows) ? res.rows : [];
+
+						let array = userRows.map((item) => ({
+							avatar: item.avatar || '',
+							userId: item.userId || '',
+							nickName: item.nickName || '未命名'
+						}));
+
+						// 虚拟数据
+						let virtualData = [];
+						let virtualTotal = res.total * 10;
+						this.liveUserTotal = virtualTotal;
+						for (let i = 0; i < virtualTotal; i++) {
+							let data = {
+								avatar: '',
+								userId: '8565' + i,
+								nickName: '微信用户'
+							};
+							virtualData.push(data);
+						}
+						this.liveViewersData = [...array, ...virtualData];
+
+						const newRows = Array.isArray(res.rows) ? res.rows : [];
+						const currentViewers = Array.isArray(this.liveViewers) ? this.liveViewers : [];
+
+						let viewlist = isLoadMore ? [...currentViewers, ...newRows] : newRows;
+						this.liveViewers = [...viewlist, ...virtualData];
+						this.viewPageNum++;
+					}
+				} catch (error) {
+					console.error('获取观众列表失败:', error);
+				} finally {
+					this.viewLoading = false;
+				}
+			},
 
 			//小黄车搜索商品
 			handleSearchInput() {
@@ -3642,6 +3605,7 @@
 				this.createWebSocketConnection();
 			},
 			createWebSocketConnection() {
+				
 				// 校验必要参数
 				if (!this.liveId) {
 					console.error('缺失直播间ID,无法初始化WebSocket');
@@ -3662,6 +3626,10 @@
 				// 清除之前的重连定时器
 				this.resetReconnectState();
 
+				setTimeout(() => {
+					this.getliveUser(false);
+				}, 1000);
+
 				const now = new Date();
 				this.timestamp = now.getTime(); // 生成签名
 				const signature = CryptoJS.HmacSHA256(
@@ -3682,7 +3650,7 @@
 						wsUrl += this.qrFrom;
 					}
 					// if(this.address){
-					// console.log("this.address是什么>>>", this.address)
+					console.log("this.address是什么>>>", this.address)
 					wsUrl += `&location=${this.address}`;
 					// wsUrl += `&location=${encodeURIComponent(liveWatchUser)}`;
 					// }
@@ -3984,17 +3952,21 @@
 							}
 						} else if (socketMessage.cmd == 'globalVisible' || socketMessage.cmd == 'singleVisible') {
 							//  status = 1的时候,用户消息自可见,其他消息丢失}
+							console.log("可见性>>>>>", socketMessage)
 							if (socketMessage.status == 1) {
+								console.log("不可见性")
 								this.myselfFlag = true;
 							} else {
 								this.myselfFlag = false;
 							}
 
 						} else if (socketMessage.cmd == 'sendPopMsg') {
+							console.log("弹窗消息>>>>", socketMessage)
 							this.popMsg = socketMessage.msg
 							this.isShowPopMsg = true
 						} else if (socketMessage.cmd == 'sendTopMsg') {
 							clearInterval(this.noticeTimer);
+							console.log("公告消息>>>>", socketMessage)
 							const noticeData = socketMessage.data ? JSON.parse(socketMessage.data) : {};
 							this.notice = noticeData || {};
 							this.isShowNotice = true
@@ -4011,6 +3983,7 @@
 						} else if (socketMessage.cmd == 'entry') {
 							try {
 								if (!this.liveUserCalled) {
+									await this.getliveUser(false);
 									this.liveUserCalled = true;
 								}
 								const userIdToEntry = socketMessage.userId;
@@ -4067,6 +4040,7 @@
 								this.showWelcomeMessage = false;
 							}, 3000);
 						} else if (socketMessage.cmd == 'live_start' || socketMessage.cmd == 'live_end') {
+							console.log("直播关闭在这里>>>>>>关闭")
 							// 开始直播,关闭直播
 							if (this.liveStartTimer) {
 								clearInterval(this.liveStartTimer);
@@ -4085,10 +4059,6 @@
 								msg: socketMessage.msg,
 								status: true
 							};
-						} else if (socketMessage.cmd == 'userCount') {
-							// 广播在线人数
-							this.virtualHuman = socketMessage.data * 10
-
 						} else if (socketMessage.cmd == 'deleteMsg') {
 							const index = this.talklist.findIndex(item => item.msgId == socketMessage.msg);
 							if (index !== -1) {
@@ -4601,7 +4571,6 @@
 				transform: translateZ(0);
 				will-change: transform;
 				backface-visibility: hidden;
-
 				&.chat-area-container2 {
 					flex: 1;
 					min-height: 0; // 重要:允许收缩到0
@@ -4613,7 +4582,7 @@
 				}
 
 				&.chat-area-container3 {
-
+					
 					max-height: 40%;
 					flex: 1;
 					min-height: 0; // 重要:允许收缩到0
@@ -4645,7 +4614,7 @@
 					position: relative;
 
 					&.chat-content-focused {
-						height: 100rpx;
+						height: 64rpx;
 					}
 
 					.notice-message {
@@ -4674,9 +4643,6 @@
 						flex: 1;
 						flex-direction: column;
 						-webkit-overflow-scrolling: touch;
-						&.message-scroll2{
-							height: 368rpx;
-						}
 					}
 
 					.message-list {
@@ -4786,13 +4752,12 @@
 							min-width: 80rpx;
 							text-align: center;
 							flex-shrink: 0;
-
 							&.send2 {
 								background-color: #2fa9f1;
 								color: #ffffff;
 							}
 						}
-
+						
 					}
 
 					.action-buttons {

+ 17 - 22
pages_shopping/live/confirmCreateOrder.vue

@@ -155,7 +155,7 @@
 		data() {
 			return {
 				orderData: {
-					totalPrice: null
+					totalPrice:null
 				},
 				cityId: null,
 				address: null,
@@ -195,17 +195,21 @@
 			if (options.type == 'win') {
 				this.getKey()
 			}
-		},
-		onShow() {
-			this.openCoupon()
+			
 			if (this.type == 'win') {
 				this.computedRewardOrder()
 			} else {
-				this.computedOrder()
+				this.computedOrder();
 			}
+		},
+		onShow() {
+			this.openCoupon()
+			
 			if(!this.cityId){
-				this.getUserAddr()
+				this.getUserAddr();
 			}
+			
+		
 			// this.getUserAddr()
 			uni.$on('updateAddress', (e) => {
 				this.address = e;
@@ -215,10 +219,7 @@
 			});
 		},
 		mounted() {
-			// uni.$on('updateAddress', (e) => {
-			// 	this.address = e;
-			// 	this.addressId = e.addressId;
-			// });
+			
 		},
 		onUnload() {
 			uni.$off('updateAddress', this.handleAddressUpdate);
@@ -289,10 +290,9 @@
 					couponUserId: this.couponUserId || '',
 					attrValueId:this.productValueSelect
 				}
-
 				computed(data).then(res => {
 						if (res.code == 200) {
-							console.log("查询创建订单信息>>>>", res.data)
+							console.log("qxj computedOrder订单信息>>>>", res.data)
 							this.orderData = res.data
 						} else {
 							uni.showToast({
@@ -316,7 +316,7 @@
 				computedReward(data).then(res => {
 						if (res.code == 200) {
 							console.log("查询创建订单信息>>>>", res.data)
-							this.orderData = res.data || {}
+							this.orderData = res.data;
 						} else {
 							uni.showToast({
 								title: res.msg,
@@ -328,16 +328,15 @@
 				);
 			},
 
-
 			// 创建订单
 			createLiveOrder() {
-
+                console.log("qxj orderData",this.orderData);
 				let data = {
 					cityId: this.cityId,
 					liveId: this.liveId,
 					orderKey: this.orderKey,
 					userName: this.address.realName,
-					remark:this.orderData.remark||'',
+					remark:this.orderData.remark ||'',
 					userPhone: this.address.phone,
 					userAddress: this.address.province + ' ' + this.address.city + ' ' + this.address.district + ' ' +this.address.detail,
 					cartId: "5",
@@ -345,7 +344,6 @@
 					totalNum: this.totalNum,
 					couponUserId: this.couponUserId,
 					attrValueId:this.productValueSelect
-
 				}
 
 				return createliveOrder(data).then(res => {
@@ -372,7 +370,7 @@
 					userAddress: this.address.province + ' ' + this.address.city + ' ' + this.address.district + ' ' +
 						this.address.detail,
 					cartId: "5",
-					remark:this.orderData.remark||'',
+					remark:this.orderData.remark || '',
 					productId: this.productId,
 					totalNum: 1,
 					couponUserId: this.couponUserId,
@@ -401,7 +399,6 @@
 				} else {
 					this.computedOrder()
 				}
-
 			},
 			// 自动选择最大优惠券
 			autoSelectMaxCoupon() {
@@ -450,7 +447,7 @@
 			openAddress() {
 				uni.navigateTo({
 					url: '/pages_user/user/address'
-				})
+				});
 			},
 			// 提交订单
 			async submitOrder() {
@@ -511,11 +508,9 @@
 
 			.left {
 				width: 92%;
-
 				.name-box {
 					display: flex;
 					align-items: center;
-
 					.text {
 						font-size: 32rpx;
 						font-family: PingFang SC;