Przeglądaj źródła

文件上传接口增加token

htc 5 dni temu
rodzic
commit
2a4ca99860
3 zmienionych plików z 8 dodań i 1 usunięć
  1. 1 1
      pages/role.vue
  2. 4 0
      pagesMy/feedback.vue
  3. 3 0
      pagesRole/addRole.vue

+ 1 - 1
pages/role.vue

@@ -42,7 +42,7 @@
 			</template>
 		<cus-tabbar :tabbarIndex="1"></cus-tabbar>
 		<bind-device ref="bdRef"></bind-device>
-		<u-picker :itemHeight="88" title="已绑设备" :show="show" :columns="deviceList" keyName="board"
+		<u-picker :itemHeight="88" title="设备" :show="show" :columns="deviceList" keyName="board"
 			@cancel="show=false" @confirm="confirm" :immediateChange="true" style="height: 500rpx;">
 		</u-picker>
 	</view>

+ 4 - 0
pagesMy/feedback.vue

@@ -64,6 +64,7 @@
 		methods:{
 			changeType(type){
 				this.tidx = type;
+				this.dto.type = type;
 			},
 			// 删除图片
 			deletePic(event) {
@@ -102,6 +103,9 @@
 					url: baseApi.BaseApi + '/sys/oss/uploadFile',
 					filePath: url,
 					name: "file",
+					header:{
+						token: uni.getStorageSync('token')	
+					},
 					success: (res) => {
 						let data = JSON.parse(res.data);
 						if(data){

+ 3 - 0
pagesRole/addRole.vue

@@ -129,6 +129,9 @@
 					url: baseApi.BaseApi + '/sys/oss/uploadFile',
 					filePath: url,
 					name: "file",
+					header:{
+						token: uni.getStorageSync('token')	
+					},
 					success: (res) => {
 						let data = JSON.parse(res.data);
 						if(data){