Przeglądaj źródła

fix:接口请求问题

storeBelieveInLight 1 rok temu
rodzic
commit
366b2de748

+ 17 - 14
commit/order.js

@@ -1,6 +1,9 @@
1 1
 import {
2 2
     myRequest
3 3
 } from './request.js'
4
+import {
5
+    myRequestPhp
6
+} from './requestPhp.js'
4 7
 // 正向订单状态数
5 8
 export function getOrderStstusAmount(data) {
6 9
     return myRequest({
@@ -29,7 +32,7 @@ const pre = ""
29 32
 const apiType = "php"
30 33
 // 订单状态数
31 34
 export function getOrderStatusNumber(data) {
32
-    return myRequest({
35
+    return myRequestPhp({
33 36
         url: `${pre}mer/store/order/chart`,
34 37
         method: 'GET',
35 38
         data,
@@ -39,7 +42,7 @@ export function getOrderStatusNumber(data) {
39 42
 
40 43
 // 订单列表
41 44
 export function getOrderList(data) {
42
-    return myRequest({
45
+    return myRequestPhp({
43 46
         url: `${pre}mer/store/order/lst`,
44 47
         method: 'GET',
45 48
         data,
@@ -63,7 +66,7 @@ export function getOrderListProduct(order_sn) {
63 66
         ylj_status: "",
64 67
         paid: "",
65 68
     }
66
-    return myRequest({
69
+    return myRequestPhp({
67 70
         url: `${pre}mer/store/order/lst`,
68 71
         method: 'GET',
69 72
         data,
@@ -72,7 +75,7 @@ export function getOrderListProduct(order_sn) {
72 75
 }
73 76
 // filtter
74 77
 export function getOrderListFiltter(data) {
75
-    return myRequest({
78
+    return myRequestPhp({
76 79
         url: `${pre}mer/store/order/filtter`,
77 80
         method: 'GET',
78 81
         data,
@@ -85,7 +88,7 @@ export function getOrderListFiltter(data) {
85 88
  */
86 89
 
87 90
 export function orderDeliveryRuleApi(id) {
88
-    return myRequest({
91
+    return myRequestPhp({
89 92
         url: `${pre}mer/store/order/delivery/${id}/form`,
90 93
         method: 'GET',
91 94
         apiType
@@ -96,7 +99,7 @@ export function orderDeliveryRuleApi(id) {
96 99
  */
97 100
 
98 101
 export function orderDeliveryApi(id, data) {
99
-    return myRequest({
102
+    return myRequestPhp({
100 103
         url: `${pre}/mer/store/order/delivery/${id}.html`,
101 104
         method: 'POST',
102 105
         data,
@@ -110,7 +113,7 @@ export function orderDeliveryApi(id, data) {
110 113
  */
111 114
 
112 115
 export function orderDetailApi(id) {
113
-    return myRequest({
116
+    return myRequestPhp({
114 117
         url: `${pre}mer/store/order/detail/${id}`,
115 118
         method: 'GET',
116 119
         apiType
@@ -120,7 +123,7 @@ export function orderDetailApi(id) {
120 123
  * @description 获取物流信息
121 124
  */
122 125
 export function getExpress(id) {
123
-    return myRequest({
126
+    return myRequestPhp({
124 127
         url: `${pre}mer/store/order/express/${id}`,
125 128
         method: 'GET',
126 129
         apiType
@@ -130,7 +133,7 @@ export function getExpress(id) {
130 133
 /**售后列表 */
131 134
 
132 135
 export function getAfterSaleList(data) {
133
-    return myRequest({
136
+    return myRequestPhp({
134 137
         url: `${pre}mer/store/refundorder/lst`,
135 138
         method: 'GET',
136 139
         data,
@@ -141,7 +144,7 @@ export function getAfterSaleList(data) {
141 144
  * @description 退款单获取物流信息
142 145
  */
143 146
 export function refundorderExpressApi(id) {
144
-    return myRequest({
147
+    return myRequestPhp({
145 148
         url: `${pre}mer/store/refundorder/express/${id}`,
146 149
         method: 'GET',
147 150
         apiType
@@ -151,7 +154,7 @@ export function refundorderExpressApi(id) {
151 154
  * @description 自提
152 155
  */
153 156
 export function takeProductApi(id, data) {
154
-    return myRequest({
157
+    return myRequestPhp({
155 158
         url: `${pre}mer/store/order/carry/${id}`,
156 159
         method: 'GET',
157 160
         data,
@@ -163,7 +166,7 @@ export function takeProductApi(id, data) {
163 166
  * @description 退款订单 -- 详情
164 167
  */
165 168
 export function refundorderDetailApi(id) {
166
-    return myRequest({
169
+    return myRequestPhp({
167 170
         url: `${pre}mer/store/refundorder/detail/${id}`,
168 171
         method: 'GET',
169 172
         apiType
@@ -174,7 +177,7 @@ export function refundorderDetailApi(id) {
174 177
  * @description 退款订单
175 178
  */
176 179
 export function confirmRefundOrderApi(id, data) {
177
-     return myRequest({
180
+     return myRequestPhp({
178 181
          url: `${pre}mer/store/refundorder/status/${id}`,
179 182
          data,
180 183
          method: 'POST',
@@ -185,7 +188,7 @@ export function confirmRefundOrderApi(id, data) {
185 188
  * @description 退款订单 -- 确认收货
186 189
  */
187 190
 export function confirmReceiptApi(id, data) {
188
-     return myRequest({
191
+     return myRequestPhp({
189 192
          url: `${pre}mer/store/refundorder/refund/${id}`,
190 193
          data,
191 194
          method: 'POST',

+ 4 - 4
commit/product.js

@@ -1,7 +1,7 @@
1 1
 
2 2
 import {
3
-    myRequest
4
-} from './request.js'
3
+    myRequestPhp
4
+} from './requestPhp.js'
5 5
 
6 6
 
7 7
 const pre = ""
@@ -10,7 +10,7 @@ const apiType = "php"
10 10
  * 获取供应链tab
11 11
  */
12 12
 export function getSupplyChainTab(data) {
13
-    return myRequest({
13
+    return myRequestPhp({
14 14
         url: `${pre}mer/store/product/gong_lst_filter`,
15 15
          method: 'GET',
16 16
              data,
@@ -22,7 +22,7 @@ export function getSupplyChainTab(data) {
22 22
  * 获取供应链tab
23 23
  */
24 24
 export function getSupplyChainTab(data) {
25
-    return myRequest({
25
+    return myRequestPhp({
26 26
         url: `${pre}mer/store/product/gong_lst_filter`,
27 27
         method: 'GET',
28 28
         data,

+ 5 - 12
commit/request.js

@@ -5,8 +5,8 @@ var baseURL = 'https://api.hxxfb.com/gateway/' // API访问的地址
5 5
  }else if(is==2){
6 6
 	 // baseURL = 'https://api.hebeiyhc.com/gateway/'; //生产环境
7 7
 	 // baseURL = 'https://api.hebeiyhc.com/gateway/'; //生产环境
8
-	   baseURL = 'https://testapi.hxxfb.com/gateway/'; //预生产环境
9
-	   // baseURL = '/gateway/'; //预生产环境
8
+	   // baseURL = 'https://testapi.hxxfb.com/gateway/'; //预生产环境
9
+	   baseURL = '/gateway/'; //预生产环境
10 10
 	
11 11
  }else{
12 12
 	  baseURL = 'https://api.hxxfb.com/gateway/'; //预生产环境
@@ -29,23 +29,16 @@ let bas = Base64.encode(jmi + "," + Fzitem)
29 29
  
30 30
 export const myRequest = (options) => {
31 31
 	return new Promise((resolve, reject) => {
32
-		 if(options.apiType === 'php'){
33
-			baseURL = '/api/'
34
-			// baseURL = '/'
35
-			console.log('url = ',baseURL + options.url,"PHP")
36
-		 }
37 32
 		uni.request({
38 33
 			url: baseURL + options.url, //接口地址:前缀+方法中传入的地址 
39 34
 			method: options.method || 'GET', //请求方法:传入的方法或者默认是“GET” 
40 35
 			data: options.data || {}, //传递参数:传入的参数或者默认传递空集合 
41 36
 			header: {
42 37
 				// 'Content-Type': 'application/x-www-form-urlencoded',
43
-				"Content-Type":"application/json; charset=utf-8",
38
+				// "Content-Type":"application/json; charset=utf-8",
44 39
 				'X-token': uni.getStorageSync('authorization'), //请求头信息
45
-				// "Access-Control-Allow-Methods":"GET,POST,PATCH,PUT,DELETE,OPTIONS,DELETE",
46
-				// "Access-Control-Allow-Headers":"	X-Token, user-token, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With",
47
-				// 'X-token':'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcGkuaHh4ZmIuY29tIiwiYXVkIjoiYXBpLmh4eGZiLmNvbSIsImlhdCI6MTczOTk2NDIxMiwibmJmIjoxNzM5OTY0MjEyLCJleHAiOjE3NTA3NjQyMTIsImp0aSI6WzM1OSwibWVyIl19.IX8wt8Fc05VgshXbUFTusGag4KD__teryi13L-QrJQM',
48
-				'volunteerdes': bas // DES+B64加密 
40
+				'volunteerdes': bas, // DES+B64加密 
41
+				// responseType:'json'
49 42
 			},
50 43
 
51 44
 			success: (res) => {

+ 62 - 0
commit/requestPhp.js

@@ -0,0 +1,62 @@
1
+
2
+let baseURL = 'https://shop.hxxfb.com/'
3
+// 请求超出时间
4
+const timeout = 5000
5
+
6
+// 需要修改token,和根据实际修改请求头
7
+export function myRequestPhp(options) {
8
+	let url = options.url;
9
+	let method = options.method || "get";
10
+	let data = options.data || {};
11
+	let header = {
12
+		'Content-Type': 'application/json;charset=UTF-8',
13
+		'X-token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcGkuaHh4ZmIuY29tIiwiYXVkIjoiYXBpLmh4eGZiLmNvbSIsImlhdCI6MTc0MDM3MTM1NSwibmJmIjoxNzQwMzcxMzU1LCJleHAiOjE3NTExNzEzNTUsImp0aSI6WzI5OCwibWVyIl19.j2f8VwdwWY4zBpcijHntzUZ9YUms2SxChaVsYf7KnPs',
14
+		'Accept': '*/*',
15
+		...options.header
16
+	}
17
+	return new Promise((resolve, reject) => {
18
+		uni.request({
19
+			url: baseURL + url,
20
+			method: method,
21
+			header: header,
22
+			data: data,
23
+			timeout,
24
+			success(response) {
25
+				const res = response
26
+				if (res.data.status == 200) { //接口返回200走一下操作
27
+					resolve(res)
28
+				} else if (res.data.status == 500) { //接口返回500走一下操作
29
+					return uni.showToast({
30
+						title: res.data.error,
31
+						icon: 'none'
32
+					})
33
+				} else { //除了500都会走以下操作
34
+					return uni.showToast({
35
+						title: res.data.message,
36
+						icon: 'none'
37
+					})
38
+				}
39
+			},
40
+			fail(err) {
41
+				console.log(err)
42
+				if (err.errMsg.indexOf('request:fail') !== -1) {
43
+					uni.showToast({
44
+						title: '网络异常',
45
+						icon: "error",
46
+						duration: 2000
47
+					})
48
+				} else {
49
+					uni.showToast({
50
+						title: '未知异常',
51
+						duration: 2000
52
+					})
53
+				}
54
+				reject(err);
55
+
56
+			},
57
+			complete() {
58
+				uni.hideToast();
59
+			}
60
+		});
61
+	}).catch(() => {});
62
+};

+ 119 - 128
manifest.json

@@ -1,136 +1,127 @@
1 1
 {
2
-    "name" : "yhc-merchantapplet1",
3
-    "appid" : "__UNI__3E9B1DB",
4
-    "description" : "",
5
-    "versionName" : "1.0.0",
6
-    "versionCode" : 309,
7
-    "transformPx" : false,
8
-    /* 5+App特有相关 */
9
-    "app-plus" : {
10
-        "usingComponents" : true,
11
-        "nvueStyleCompiler" : "uni-app",
12
-        "compilerVersion" : 3,
13
-        "splashscreen" : {
14
-            "alwaysShowBeforeRender" : true,
15
-            "waiting" : true,
16
-            "autoclose" : true,
17
-            "delay" : 0
18
-        },
19
-        /* 模块配置 */
20
-        "modules" : {
21
-            "Payment" : {}
22
-        },
23
-        /* 应用发布信息 */
24
-        "distribute" : {
25
-            /* android打包配置 */
26
-            "android" : {
27
-                "permissions" : [
28
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
29
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
30
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
31
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
32
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
33
-                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
34
-                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
35
-                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
36
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
37
-                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
38
-                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
39
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
40
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
41
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
42
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
43
-                ]
44
-            },
45
-            /* ios打包配置 */
46
-            "ios" : {},
47
-            /* SDK配置 */
48
-            "sdkConfigs" : {
49
-                "payment" : {
50
-                    "weixin" : {
51
-                        "__platform__" : [ "ios", "android" ],
52
-                        "appid" : "wx9a3e4ab07f8a9ba2",
53
-                        "UniversalLinks" : ""
54
-                    }
55
-                }
56
-            }
57
-        }
58
-    },
59
-    /* 快应用特有相关 */
60
-    "quickapp" : {},
61
-    /* 小程序特有相关 */
62
-    "mp-weixin" : {
63
-        "appid" : "wxf0e56f6522030c66",
64
-        "__usePrivacyCheck__" : true,
65
-        "setting" : {
66
-            "urlCheck" : false
67
-        },
68
-        "usingComponents" : true,
69
-        "optimization" : {
70
-            "subPackages" : true
71
-        }
72
-    },
73
-    "mp-alipay" : {
74
-        "usingComponents" : true
2
+  "name": "yhc-merchantapplet1",
3
+  "appid": "__UNI__3E9B1DB",
4
+  "description": "",
5
+  "versionName": "1.0.0",
6
+  "versionCode": 309,
7
+  "transformPx": false,
8
+  /* 5+App特有相关 */
9
+  "app-plus": {
10
+    "usingComponents": true,
11
+    "nvueStyleCompiler": "uni-app",
12
+    "compilerVersion": 3,
13
+    "splashscreen": {
14
+      "alwaysShowBeforeRender": true,
15
+      "waiting": true,
16
+      "autoclose": true,
17
+      "delay": 0
75 18
     },
76
-    "mp-baidu" : {
77
-        "usingComponents" : true
19
+    /* 模块配置 */
20
+    "modules": {
21
+      "Payment": {}
78 22
     },
79
-    "mp-toutiao" : {
80
-        "usingComponents" : true
81
-    },
82
-    "uniStatistics" : {
83
-        "enable" : false
23
+    /* 应用发布信息 */
24
+    "distribute": {
25
+      /* android打包配置 */
26
+      "android": {
27
+        "permissions": [
28
+          "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
29
+          "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
30
+          "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
31
+          "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
32
+          "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
33
+          "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
34
+          "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
35
+          "<uses-permission android:name=\"android.permission.CAMERA\"/>",
36
+          "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
37
+          "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
38
+          "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
39
+          "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
40
+          "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
41
+          "<uses-feature android:name=\"android.hardware.camera\"/>",
42
+          "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
43
+        ]
44
+      },
45
+      /* ios打包配置 */
46
+      "ios": {},
47
+      /* SDK配置 */
48
+      "sdkConfigs": {
49
+        "payment": {
50
+          "weixin": {
51
+            "__platform__": ["ios", "android"],
52
+            "appid": "wx9a3e4ab07f8a9ba2",
53
+            "UniversalLinks": ""
54
+          }
55
+        }
56
+      }
57
+    }
58
+  },
59
+  /* 快应用特有相关 */
60
+  "quickapp": {},
61
+  /* 小程序特有相关 */
62
+  "mp-weixin": {
63
+    "appid": "wxf0e56f6522030c66",
64
+    "__usePrivacyCheck__": true,
65
+    "setting": {
66
+      "urlCheck": false
84 67
     },
85
-    "vueVersion" : "2",
86
-    "h5" : {
87
-        "devServer" : {
88
-            "https" : false,
89
-            "proxy" : {
90
-              // 自行修改下方的 /web
91
-              "/gateway": {
92
-                // "secure": false,
93
-                "target": "https://testapi.hxxfb.com",
94
-                "pathRewirte": {
95
-                  //路径重写
96
-                  "^/gateway": "/gateway"
97
-                }
98
-              },
99
-              // "target" : "https://api.hebeiyhc.com"
100
-              // "target": "http://8.141.0.149:9000",
101
-              // "target": "https://app.bjtdba.com"
102
-              // "pathRewrite": {
103
-              // 	//路径重写
104
-              // 	"^/gateway": ""
105
-              // }
106
-              // 自行修改下方的 /api
107
-    //           "/api": {
108
-    //             "target": "http://shop.hxxfb.com/",
109
-				// "changeOrigin": true,
110
-    //             "pathRewirte": {
111
-    //               //路径重写
112
-    //               "^/api": "/"
113
-    //             }
114
-    //           },
115
-			  "/api":{
116
-				  "target": "http://testshop.hxxfb.com/",
117
-				  "changeOrigin": true,
118
-				  "pathRewirte": {
119
-				    //路径重写
120
-				    "^/api": "/"
121
-				  }
122
-			  },
123
-              "/gateway/api": {
124
-                "target": "http://testapi.hxxfb.com",
125
-                "pathRewirte": {
126
-                  //路径重写
127
-                  "^/api": "/"
128
-                }
129
-              }
130
-            }
68
+    "usingComponents": true,
69
+    "optimization": {
70
+      "subPackages": true
71
+    }
72
+  },
73
+  "mp-alipay": {
74
+    "usingComponents": true
75
+  },
76
+  "mp-baidu": {
77
+    "usingComponents": true
78
+  },
79
+  "mp-toutiao": {
80
+    "usingComponents": true
81
+  },
82
+  "uniStatistics": {
83
+    "enable": false
84
+  },
85
+  "vueVersion": "2",
86
+  "h5": {
87
+    "devServer": {
88
+      "https": false,
89
+      "proxy": {
90
+        // 自行修改下方的 /web
91
+        "/gateway": {
92
+          // "secure": false,
93
+          "target": "https://api.hxxfb.com",
94
+          "pathRewirte": {
95
+            //路径重写
96
+            "^/gateway": "/gateway"
97
+          }
98
+        },
99
+        // "target" : "https://api.hebeiyhc.com"
100
+        // "target": "http://8.141.0.149:9000",
101
+        // "target": "https://app.bjtdba.com"
102
+        // "pathRewrite": {
103
+        // 	//路径重写
104
+        // 	"^/gateway": ""
105
+        // }
106
+        // 自行修改下方的 /api
107
+        "/api": {
108
+          "target": "http://testshop.hxxfb.com/",
109
+          "pathRewirte": {
110
+            //路径重写
111
+            "^/api": ""
112
+          }
131 113
         },
132
-        "router" : {
133
-            "base" : "./"
114
+        "/gateway/api": {
115
+          "target": "http://api.hxxfb.com",
116
+          "pathRewirte": {
117
+            //路径重写
118
+            "^/api": "/"
119
+          }
134 120
         }
121
+      }
122
+    },
123
+    "router": {
124
+      "base": "./"
135 125
     }
126
+  }
136 127
 }

+ 240 - 0
pages/supplychainon/ProductCard.vue

@@ -0,0 +1,240 @@
1
+<!-- components/ProductCard.vue -->
2
+<template>
3
+  <view class="product-card">
4
+    <!-- 图片容器增加背景和阴影 -->
5
+    <!-- <view class="image-container">
6
+      <image
7
+        class="product-image"
8
+        :src="data.image"
9
+        mode="aspectFill"
10
+        :style="{ background: '#f5f5f5' }"
11
+      />
12
+      <view v-if="data.activity" class="activity-badge">
13
+        {{ data.activity }}
14
+      </view>
15
+    </view> -->
16
+
17
+    <!-- 信息内容区域 -->
18
+    <view class="content">
19
+      <!-- 标题与状态开关 -->
20
+      <view class="header">
21
+        <text class="title">{{ data.name }}</text>
22
+        <switch
23
+          :checked="data.status"
24
+          @change="$emit('status-change', $event.detail.value)"
25
+          class="status-switch"
26
+        />
27
+      </view>
28
+
29
+      <!-- 核心数据展示 -->
30
+      <view class="data-grid">
31
+        <view class="data-item">
32
+          <text class="label">售价</text>
33
+          <text class="value highlight">¥1000</text>
34
+        </view>
35
+        <view class="data-item">
36
+          <text class="label">利润</text>
37
+          <text class="value profit">¥33333</text>
38
+        </view>
39
+      </view>
40
+
41
+      <!-- 辅助信息 -->
42
+      <view class="meta-info">
43
+        <view class="meta-item">
44
+          <uni-icons type="shop-filled" size="30" color="#666" />
45
+
46
+          <text class="kucun">销量 555453</text>
47
+        </view>
48
+        <view class="meta-item">
49
+          <uni-icons type="shop" size="30" color="#666" />
50
+          <text :class="{ warn: data.stock < 100 }" class="kucun"
51
+            >库存 45345454</text
52
+          >
53
+        </view>
54
+      </view>
55
+
56
+      <!-- 操作按钮 -->
57
+      <view class="action-bar">
58
+        <button class="action-btn edit-price" @click="$emit('edit-price')">
59
+          改价
60
+        </button>
61
+        <button class="action-btn set-activity" @click="$emit('edit-activity')">
62
+          活动
63
+        </button>
64
+      </view>
65
+    </view>
66
+  </view>
67
+</template>
68
+<script>
69
+export default {
70
+  props: {
71
+    data: {
72
+      type: Object,
73
+      default: () => {
74
+        return {
75
+          image: "",
76
+          name: "zfgsdg",
77
+          price: 1110,
78
+          sales: 11110,
79
+          stock: 1110,
80
+          status: true,
81
+          profit: 0,
82
+          activity: "",
83
+        };
84
+      },
85
+    },
86
+  },
87
+};
88
+</script>
89
+
90
+<style lang="scss" scoped>
91
+.product-card {
92
+  background: #fff;
93
+  border-radius: 24rpx;
94
+  margin: 24rpx 32rpx;
95
+  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.06);
96
+  overflow: hidden;
97
+  display: flex;
98
+  flex-direction: column; // 改为纵向布局
99
+
100
+  .image-container {
101
+    position: relative;
102
+    height: 320rpx; // 固定图片容器高度
103
+    background: #f8f8f8;
104
+
105
+    .product-image {
106
+      width: 100%;
107
+      height: 100%;
108
+      object-fit: cover;
109
+    }
110
+
111
+    .activity-badge {
112
+      position: absolute;
113
+      top: 16rpx;
114
+      right: 16rpx;
115
+      background: rgba(255, 77, 79, 0.9);
116
+      color: white;
117
+      padding: 8rpx 16rpx;
118
+      border-radius: 8rpx;
119
+      font-size: 24rpx;
120
+    }
121
+  }
122
+
123
+  .content {
124
+    padding: 24rpx;
125
+
126
+    .header {
127
+      display: flex;
128
+      justify-content: space-between;
129
+      margin-bottom: 24rpx;
130
+
131
+      .title {
132
+        font-size: 32rpx;
133
+        color: #333;
134
+        font-weight: 500;
135
+        flex: 1;
136
+        overflow: hidden;
137
+        text-overflow: ellipsis;
138
+        display: -webkit-box;
139
+        -webkit-line-clamp: 3;
140
+        -webkit-box-orient: vertical;
141
+        line-height: 1.4;
142
+      }
143
+
144
+      .status-switch {
145
+        transform: scale(0.9);
146
+        margin-left: 16rpx;
147
+      }
148
+    }
149
+
150
+    .data-grid {
151
+      display: grid;
152
+      grid-template-columns: repeat(2, 1fr);
153
+      gap: 24rpx;
154
+      margin-bottom: 24rpx;
155
+
156
+      .data-item {
157
+        .label {
158
+          font-size: 28rpx;
159
+          color: #999;
160
+          margin-bottom: 8rpx;
161
+          padding-right: 10rpx;
162
+        }
163
+
164
+        .value {
165
+          font-size: 32rpx;
166
+          font-weight: 500;
167
+
168
+          &.highlight {
169
+            color: #ff4d4f;
170
+          }
171
+
172
+          &.profit {
173
+            color: #07c160;
174
+          }
175
+        }
176
+      }
177
+    }
178
+
179
+    .meta-info {
180
+      display: flex;
181
+      gap: 32rpx;
182
+      margin-bottom: 24rpx;
183
+
184
+      .meta-item {
185
+        display: flex;
186
+        align-items: center;
187
+        font-size: 24rpx;
188
+        color: #666;
189
+        flex: 1;
190
+        flex-shrink: 0;
191
+
192
+        text-align: left;
193
+        text {
194
+          margin-right: 8rpx;
195
+
196
+          &.kucun {
197
+            font-size: 26rpx;
198
+            color: #333;
199
+          }
200
+          &.warn {
201
+            color: #faad14;
202
+          }
203
+        }
204
+      }
205
+    }
206
+
207
+    .action-bar {
208
+      display: flex;
209
+      gap: 16rpx;
210
+      border-top: 1rpx solid #eee;
211
+      padding-top: 24rpx;
212
+
213
+      .action-btn {
214
+        flex: 1;
215
+        height: 72rpx;
216
+        line-height: 72rpx;
217
+        border-radius: 12rpx;
218
+        font-size: 28rpx;
219
+        transition: all 0.2s;
220
+
221
+        &.edit-price {
222
+          background: #fff;
223
+          color: #007aff;
224
+          border: 1rpx solid #007aff;
225
+        }
226
+
227
+        &.set-activity {
228
+          background: #007aff;
229
+          color: white;
230
+        }
231
+
232
+        &:active {
233
+          opacity: 0.8;
234
+          transform: scale(0.98);
235
+        }
236
+      }
237
+    }
238
+  }
239
+}
240
+</style>

+ 72 - 49
pages/supplychainon/supplychainon.vue

@@ -1,64 +1,75 @@
1 1
 <template>
2 2
   <view class="supplychainon-wrapper">
3
-	 <headerCom headerTitle="供应链列表" @headerJump="headerJump"></headerCom>
3
+    <headerCom headerTitle="供应链列表" @headerJump="headerJump"></headerCom>
4 4
     <view class="headers-box">
5
-      <searchVue  placeholder="请输入商品名称" @search="onHandleSearch"></searchVue>
6
-      <tablist :category="category"></tablist>
5
+      <searchVue
6
+        placeholder="请输入商品名称"
7
+        @search="onHandleSearch"
8
+      ></searchVue>
9
+      <tablist
10
+        class="mt"
11
+        :category="category"
12
+        :curruntActive="curruntActive"
13
+      ></tablist>
7 14
     </view>
8
-	<view class="content-wrapper">
9
-
10
-	</view>
15
+    <view class="content-wrapper">
16
+      <ProductCard class="mrb" />
17
+      <ProductCard class="mrb" />
18
+      <ProductCard class="mrb" />
19
+      <ProductCard class="mrb" />
20
+      <ProductCard class="mrb" />
21
+      <ProductCard class="mrb" />
22
+        <view
23
+      class=""
24
+      style="margin: 60rpx 0 30rpx 0; color: #999999; font-size: 26rpx"
25
+    >
26
+      —— 已经到最底部了哦 ——
27
+    </view>
28
+    </view>
29
+  
11 30
   </view>
12 31
 </template>
13 32
 
14 33
 <script>
15 34
 import headerCom from "../../shop/components/headers/headers.vue";
16 35
 import searchVue from "./search/search.vue";
17
-import tablist from './tablist.vue'
36
+import tablist from "./tablist.vue";
37
+import ProductCard from "./ProductCard.vue";
18 38
 export default {
19 39
   components: {
20 40
     headerCom,
21 41
     searchVue,
22
-	tablist
42
+    tablist,
43
+    ProductCard,
23 44
   },
24 45
   data() {
25 46
     return {
26
-		category:[
27
-    {
28
-        "type": 1,
29
-        "name": "出售中商品",
30
-        "count": 0
31
-    },
32
-    {
33
-        "type": 2,
34
-        "name": "仓库中商品",
35
-        "count": 0
36
-    },
37
-	 {
38
-        "type": 2,
39
-        "name": "仓库中商品",
40
-        "count": 0
41
-    },
42
-	 {
43
-        "type": 2,
44
-        "name": "仓库中商品",
45
-        "count": 0
46
-    },
47
-	 {
48
-        "type": 2,
49
-        "name": "仓库中商品",
50
-        "count": 0
51
-    }
52
-],	
53
-	};
47
+      productData: {},
48
+      curruntActive: 0,
49
+      category: [
50
+        {
51
+          type: 1,
52
+          name: "出售中商品",
53
+          count: 0,
54
+        },
55
+        {
56
+          type: 2,
57
+          name: "仓库中商品",
58
+          count: 0,
59
+        },
60
+      ],
61
+    };
62
+  },
63
+  onLoad(options) {
64
+    this.curruntActive = options.indexs || "0";
54 65
   },
55 66
   methods: {
56 67
     headerJump() {
57 68
       uni.switchTab({ url: "/shop/productManagementModule/index" });
58 69
     },
59
-	onHandleSearch(val) {
60
-		console.log(val)
61
-	}
70
+    onHandleSearch(val) {
71
+      console.log(val);
72
+    },
62 73
   },
63 74
 };
64 75
 </script>
@@ -70,15 +81,27 @@ page {
70 81
 </style>
71 82
 <style lang="scss" scoped>
72 83
 .supplychainon-wrapper {
73
-	.headers-box{
74
-		position: fixed;
75
-		top: 88rpx;
76
-		left: 0;
77
-		width: 100%;
78
-		// z-index: 999;
79
-	}
80
-	.content-wrapper{
81
-
82
-	}
84
+  .headers-box {
85
+    position: fixed;
86
+    top: 88rpx;
87
+    left: 0;
88
+    width: 100%;
89
+    z-index: 33;
90
+  }
91
+  .content-wrapper {
92
+     width: 100%;
93
+    height: 100%;
94
+    display: flex;
95
+    flex-direction: column;
96
+    align-items: center;
97
+    margin: 340rpx 0rpx 0rpx;
98
+    padding-bottom: 60rpx;
99
+  }
100
+}
101
+.mt {
102
+  margin-top: 0rpx;
103
+}
104
+.mrb {
105
+  margin-bottom: 26rpx;
83 106
 }
84 107
 </style>

+ 10 - 2
shop/productManagementModule/index.vue

@@ -14,6 +14,7 @@
14 14
         headerTitle="供应链"
15 15
         class="mb-t1"
16 16
         :cardData="onlineData"
17
+         @custom-handle-click="onGongyingliang"
17 18
       ></listCardInfo>
18 19
       <!-- <listCardInfo headerTitle="在线选品" class="mb-t1"></listCardInfo> -->
19 20
       <!-- <listCardInfo headerTitle="商品分类" class="mb-t1" :fullSreen="true" fullSreenTitle="商品分类列表" ></listCardInfo> -->
@@ -114,8 +115,8 @@ export default {
114 115
     // });
115 116
 
116 117
     await readAppInfo();
117
-
118
-    let jurisdiction = uni.getStorageSync("jurisdiction");
118
+return
119
+    let jurisdiction = uni.getStorageSync("jurisdiction") || [];
119 120
     console.log("jurisdiction", jurisdiction);
120 121
     let mnuList = this.mnu;
121 122
     if (jurisdiction) {
@@ -304,6 +305,13 @@ export default {
304 305
       uni.redirectTo({
305 306
         url: "./productevaluation",
306 307
       });
308
+    },
309
+    //供应链
310
+    onGongyingliang(item,index){
311
+      // console.log('供应链',item,index)
312
+      uni.redirectTo({
313
+        url: `/pages/supplychainon/supplychainon?indexs=${index}`
314
+      })
307 315
     }
308 316
   },
309 317
 };