xiaoxin 1 год назад
Родитель
Сommit
62e899d840
6 измененных файлов с 62 добавлено и 19 удалено
  1. 8 8
      common/config.js
  2. 21 0
      my/web/web.vue
  3. 7 0
      pages.json
  4. 26 11
      pages/index/index.vue
  5. BIN
      static/images/index/jifen.png
  6. BIN
      static/images/index/renwu.png

+ 8 - 8
common/config.js

@@ -1,12 +1,12 @@
-// const ROOTPATH = "https://mxys.chuanghai-tech.com/sqx_fast";
-// const ROOTPATH1 = "https://mxys.chuanghai-tech.com/sqx_fast";
-// const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss/websocket/"
-// const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss/ordersChat/"
+const ROOTPATH = "https://mxys.chuanghai-tech.com/sqx_fast";
+const ROOTPATH1 = "https://mxys.chuanghai-tech.com/sqx_fast";
+const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss/websocket/"
+const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss/ordersChat/"
 
-const ROOTPATH = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
-const ROOTPATH1 = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
-const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss-test/websocket/"
-const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss-test/ordersChat/"
+// const ROOTPATH = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
+// const ROOTPATH1 = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
+// const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss-test/websocket/"
+// const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss-test/ordersChat/"
 
 
 module.exports = {

+ 21 - 0
my/web/web.vue

@@ -0,0 +1,21 @@
+<template>
+	<view>
+		<web-view :src="url"></web-view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			url: ''
+		}
+	},
+	onLoad(options) {
+		// console.log(options)
+		this.url = options.url
+	}
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 7 - 0
pages.json

@@ -330,6 +330,13 @@
 						"enablePullDownRefresh": false
 					}
 
+				},
+				{
+					"path": "web/web",
+					"style": {
+						"navigationBarTitleText": "",
+						"navigationStyle": "custom"
+					}
 				}
 			]
 		},

+ 26 - 11
pages/index/index.vue

@@ -22,7 +22,7 @@
 				<view class="padding-top padding-lr">
 					<swiper class="swiper radius" :autoplay="true" interval="2000" duration="500" :circular="true"
 						style="width: 100%;height: 280rpx;">
-						<swiper-item v-for="(item,index) in bannerList" :key='index' @click="goNav(item.url)">
+						<swiper-item v-for="(item,index) in bannerList" :key='index' @click="goNav(item.url,1)">
 							<image :src="item.imageUrl" class="radius" style="width: 100%;height: 280rpx;"></image>
 						</swiper-item>
 					</swiper>
@@ -47,9 +47,9 @@
 				</view>
 			</view>
 			<view class="flex justify-between padding-lr bg-white" v-if="XCXIsSelect == '是'">
-				<image src="../../static/images/index/jifen.png" @click="goNav('/my/integral/index')"
+				<image src="https://mxys.chuanghai-tech.com/wmfile/20250618/9eeeec20031849fe8379536ffa0f28b3.png" @click="goNav('/my/integral/index')"
 					style="width: 338rpx;height: 180rpx;" mode=""></image>
-				<image src="../../static/images/index/renwu.png" @click="goNav('/my/task/index')"
+				<image src="https://mxys.chuanghai-tech.com/wmfile/20250618/ddbb2b42ec9749afab93863bc078614f.png" @click="goNav('/my/task/index')"
 					style="width: 338rpx;height: 180rpx;" mode=""></image>
 			</view>
 
@@ -1125,7 +1125,7 @@
 					uni.hideLoading()
 				})
 			},
-			goNav(url) {
+			goNav(url,type) {
 				console.log(url)
 				if (this.userId) {
 					if (uni.getStorageSync('sendMsg')) {
@@ -1144,9 +1144,16 @@
 							}
 						})
 					}
-					uni.navigateTo({
-						url
-					})
+					if(type ==1&&url){
+						uni.navigateTo({
+							url:`/my/web/web?url=${url}`
+						})
+					}else{
+						uni.navigateTo({
+							url
+						})
+					}
+					
 				} else {
 					uni.navigateTo({
 						url: '/pages/public/login'
@@ -1276,6 +1283,7 @@
 			},
 			// 查看金刚区详情
 			goDetail(item) {
+				console.log(item);
 				if (uni.getStorageSync('sendMsg')) {
 					console.log('授权+1',this.arr)
 					wx.requestSubscribeMessage({
@@ -1315,10 +1323,17 @@
 					})
 					return
 				}
-				uni.navigateTo({
-					url: item.url
-				});
-
+				
+				if(item.url.indexOf('https:')){
+					
+					uni.navigateTo({
+						url: item.url
+					});
+				}else{
+					uni.navigateTo({
+						url:`/my/web/web?url=${item.url}`
+					})
+				}
 			},
 			// 开启订阅消息
 			openMsg() {

BIN
static/images/index/jifen.png


BIN
static/images/index/renwu.png