|
|
@@ -1,6 +1,7 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
<image :src="actionImg" mode="widthFix" class="action-img"></image>
|
|
|
+
|
|
|
<view class="action-wrap">
|
|
|
<image src="../../static/image/action-top.png" mode="" class="action-top"></image>
|
|
|
<view class="">
|
|
|
@@ -12,15 +13,24 @@
|
|
|
上传照片
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="notice-item">
|
|
|
+ <view class="" v-html="content">
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
import { upload } from '@/api/order.js'
|
|
|
+ import { details,joinAction } from '@/api/index.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ content: '',
|
|
|
upimg: '',
|
|
|
- loading:false
|
|
|
+ loading:false,
|
|
|
+ id: ''
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -29,7 +39,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
|
-
|
|
|
+ if(opt.id ) {
|
|
|
+ this.id = opt.id
|
|
|
+ this.details(opt.id)
|
|
|
+ }
|
|
|
},
|
|
|
onShow() {
|
|
|
|
|
|
@@ -38,6 +51,15 @@ export default {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ details(id) {
|
|
|
+ details({},id).then(res => {
|
|
|
+ console.log(res);
|
|
|
+ this.content = res.data.content
|
|
|
+ if(this.content != null){
|
|
|
+ this.content = this.content.replace(/<img/g,"<img style='max-width:100%;height:auto;'");
|
|
|
+ }//小程序商品详情图超出屏幕问题
|
|
|
+ })
|
|
|
+ },
|
|
|
upActionImg() {
|
|
|
upload().then(res => {
|
|
|
this.upimg = res[0].url
|
|
|
@@ -48,11 +70,12 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
if(this.upimg == '') {
|
|
|
- this.$api.msg('请上传合影照片')
|
|
|
+ return this.$api.msg('请上传合影照片')
|
|
|
}
|
|
|
this.loading = true
|
|
|
joinAction({
|
|
|
- img: this.upimg
|
|
|
+ aid: this.id,
|
|
|
+ up_file: this.upimg
|
|
|
}).then(res => {
|
|
|
this.loading = false
|
|
|
uni.showToast({
|
|
|
@@ -80,7 +103,7 @@ export default {
|
|
|
}
|
|
|
.action-wrap {
|
|
|
width: 690rpx;
|
|
|
- margin:50rpx auto 0;
|
|
|
+ margin:50rpx auto 20rpx;
|
|
|
// height: 560rpx;
|
|
|
background-color: #dcf4ef;
|
|
|
border-radius: 20rpx;
|
|
|
@@ -119,5 +142,10 @@ export default {
|
|
|
margin: auto;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+.notice-item {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ padding: 35rpx 35rpx;
|
|
|
+ padding-bottom: 30rpx;
|
|
|
+}
|
|
|
</style>
|