ccjgmwz преди 3 години
родител
ревизия
b1736de9e2
променени са 4 файла, в които са добавени 81 реда и са изтрити 23 реда
  1. 4 0
      .hbuilderx/launch.json
  2. 21 4
      pageB/contract/contract.vue
  3. 37 2
      pageB/contract/enclosures.vue
  4. 19 17
      pages/user/user.vue

+ 4 - 0
.hbuilderx/launch.json

@@ -2,6 +2,10 @@
   // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
     "version": "0.0",
     "configurations": [{
+     	"app-plus" : 
+     	{
+     		"launchtype" : "remote"
+     	},
      	"default" : 
      	{
      		"launchtype" : "remote"

+ 21 - 4
pageB/contract/contract.vue

@@ -228,10 +228,27 @@
 				}
 			},
 			commit(item) {
-				debugger
-				uni.navigateTo({
-					url: `/pageB/contract/enclosures?id=${item.id}`
-				})
+				console.log(item)
+				var list = item.addressUrl.toString().split(',')
+				if(list.length > 0){
+					uni.downloadFile({
+					  url: list[0],
+					  success: function (res) {
+					    var filePath = res.tempFilePath;
+					    uni.openDocument({
+					      filePath: filePath,
+					      success: function (res) {
+							  uni.hideLoading()
+					        console.log('打开文档成功');
+					      }
+					    });
+					  },
+					})
+				}
+				
+				// uni.navigateTo({
+				// 	url: `/pageB/contract/enclosures?addressUrl=${item.addressUrl}`
+				// })
 			},
 			commit1(item) {
 				uni.navigateTo({

+ 37 - 2
pageB/contract/enclosures.vue

@@ -1,12 +1,47 @@
 <template>
 	<view class="center">
-		<view class="">
-			
+		<view class="c-list">
+			<view class="xinxiup">
+				<view class="c-row b-b">
+					<text class="tit">合同编号:</text>
+					<view class="con-list">
+						<text>{{goods.contractNo}}({{goods.goodsName}})</text>
+					</view>
+				</view>
+				<view class="c-row b-b">
+					<text class="tit">买方名称:</text>
+					<view class="con-list">
+						<text>{{goods.contracter}}</text>
+					</view>
+				</view>
+				<view class="c-row">
+					<text class="tit">累计收发:</text>
+					<view class="con-list">
+						<text style="font-size: 18px">{{sendout}}<text class="hair">发</text>{{collect}}<text
+								class="collect">收</text></text>
+						<!-- <text>{{goods.level}}收</text> -->
+					</view>
+				</view>
+			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	export default {
+			name: "trust",
+			data() {
+				return {
+					list:[]
+				};
+			},
+			onLoad(addressUrl) {
+				if(addressUrl){
+					this.list = addressUrl.toString().split(',')
+					console.log(this.list)
+				}
+			},
+		}
 </script>
 
 <style>

+ 19 - 17
pages/user/user.vue

@@ -225,23 +225,9 @@
 				current: 4
 			}
 		},
-		onShow() {
-			uni.showTabBar()
-			this.loadData()
-		},
+		
 		onLoad() {
-			if(this.userInfo.avatarUrl == "" || this.userInfo.avatarUrl == null){
-					this.headUrl = "../../static/img/myimg/YongHu@3x.png"
-			}else if(this.userInfo.avatarUrl != "" || this.userInfo.avatarUrl != null){
-				this.headUrl = this.userInfo.avatarUrl
-			}
-			this.username = this.userInfo.userName
-			if(	this.username == null || this.username == ""){
-				this.username = "请更改昵称"
-			}
-			if(this.userInfo.phone != null || this.userInfo.phone != ""){
-				this.userphone = this.userInfo.phone
-			}
+			
 		},
 		// #ifndef MP
 		onNavigationBarButtonTap(e) {
@@ -266,6 +252,22 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
+		onShow() {
+			uni.showTabBar()
+			this.loadData()
+			if(this.userInfo.avatarUrl == "" || this.userInfo.avatarUrl == null){
+					this.headUrl = "../../static/img/myimg/YongHu@3x.png"
+			}else if(this.userInfo.avatarUrl != "" || this.userInfo.avatarUrl != null){
+				this.headUrl = this.userInfo.avatarUrl
+			}
+			this.username = this.userInfo.userName
+			if(	this.username == null || this.username == ""){
+				this.username = "请更改昵称"
+			}
+			if(this.userInfo.phone != null || this.userInfo.phone != ""){
+				this.userphone = this.userInfo.phone
+			}
+		},
 		methods: {
 			zhibo() {
 				uni.navigateTo({
@@ -682,7 +684,7 @@
 		
 	   background-color: #F5F6FA;
 	/* 	border-radius: 20px; */
-		margin-top: 60px;
+		margin-top: 60upx;
 
 		.arc {
 			position: absolute;