|
|
@@ -3,13 +3,23 @@
|
|
|
<view class="img_box">
|
|
|
<image :src="imgUrl" class="img_url"></image>
|
|
|
</view>
|
|
|
- <view style="margin:50upx 0 0 30upx;font-size:30upx;">保存图片到手机,可分享或打印张贴</view>
|
|
|
+ <view style="margin:0 auto;width:50vw;font-size:30upx;font-weight:bold;text-align:center;">花束</view>
|
|
|
<div class="confirm-btn">
|
|
|
- <button class="admin-button-com big blue" @click="downloadImg">保存图片</button>
|
|
|
+ <button class="admin-button-com big blue" style="width:50vw;" @click="downloadImg(imgUrl)">保存图片</button>
|
|
|
</div>
|
|
|
- <view style="margin:50upx 0 0 30upx;font-size:30upx;">打开直接分享给客户</view>
|
|
|
<div class="confirm-btn1">
|
|
|
- <button class="admin-button-com big blue" @click="goToMallPt()">打开商城</button>
|
|
|
+ <button class="admin-button-com big blue" style="width:50vw;" @click="goToMallPt('pages/home/category')">直接打开</button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <view class="img_box">
|
|
|
+ <image :src="flowerImgUrl" class="img_url"></image>
|
|
|
+ </view>
|
|
|
+ <view style="margin:0 auto;width:50vw;font-size:30upx;font-weight:bold;text-align:center;">鲜花</view>
|
|
|
+ <div class="confirm-btn">
|
|
|
+ <button class="admin-button-com big blue" style="width:50vw;" @click="downloadImg(flowerImgUrl)">保存图片</button>
|
|
|
+ </div>
|
|
|
+ <div class="confirm-btn1">
|
|
|
+ <button class="admin-button-com big blue" style="width:50vw;" @click="goToMallPt('pages/item/item')">直接打开</button>
|
|
|
</div>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -17,11 +27,11 @@
|
|
|
import { mainGetMallPoster } from '@/api/main/index'
|
|
|
import { getWeixinId } from "@/api/invite/index";
|
|
|
import { mapGetters } from "vuex";
|
|
|
-import { CURRENT_ENV } from '@/config'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
imgUrl: '',
|
|
|
+ flowerImgUrl:'',
|
|
|
getappIdList: {}
|
|
|
}
|
|
|
},
|
|
|
@@ -35,16 +45,14 @@ export default {
|
|
|
this.getappIdList = res.data
|
|
|
});
|
|
|
},
|
|
|
- downloadImg(){
|
|
|
+ downloadImg(url){
|
|
|
uni.downloadFile({
|
|
|
- url: this.imgUrl,
|
|
|
+ url: url,
|
|
|
success: (res) => {
|
|
|
if (res.statusCode === 200) {
|
|
|
- console.log(res)
|
|
|
uni.saveImageToPhotosAlbum({
|
|
|
filePath: res.tempFilePath,
|
|
|
success: function (data) {
|
|
|
- console.log(data)
|
|
|
uni.showToast({title:'下载成功!'})
|
|
|
}
|
|
|
});
|
|
|
@@ -54,13 +62,12 @@ export default {
|
|
|
},
|
|
|
getImg() {
|
|
|
mainGetMallPoster().then(res => {
|
|
|
- console.log(res)
|
|
|
this.imgUrl = res.data.imgUrl
|
|
|
+ this.flowerImgUrl = res.data.flowerImgUrl
|
|
|
}).catch(err => {})
|
|
|
},
|
|
|
- goToMallPt () {
|
|
|
+ goToMallPt (url) {
|
|
|
// #ifdef MP-WEIXIN
|
|
|
- let url = 'pages/home/index'
|
|
|
let self = this
|
|
|
console.log(url + '?account=' + self.loginInfo.shopId)
|
|
|
uni.navigateToMiniProgram({
|
|
|
@@ -91,7 +98,7 @@ export default {
|
|
|
console.log(miniOriginalId)
|
|
|
sweixin.launchMiniProgram({
|
|
|
id: miniOriginalId,
|
|
|
- path: '/pages/home/index?account='+that.loginInfo.shopId,
|
|
|
+ path: '/'+url+'?account='+that.loginInfo.shopId,
|
|
|
type: 0
|
|
|
});
|
|
|
} else {
|
|
|
@@ -119,18 +126,19 @@ export default {
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.img_box{
|
|
|
- height: 450upx;
|
|
|
+ height: 310upx;
|
|
|
box-sizing: border-box;
|
|
|
&>.img_url{
|
|
|
- height: 450upx;
|
|
|
- width: 450upx;
|
|
|
- margin: 100upx auto;
|
|
|
+ height: 300upx;
|
|
|
+ width: 300upx;
|
|
|
+ margin: 20upx auto;
|
|
|
}
|
|
|
}
|
|
|
// 按钮
|
|
|
.confirm-btn {
|
|
|
width: calc(100% - 60upx);
|
|
|
margin: 30upx 30upx 20upx;
|
|
|
+ text-align:center;
|
|
|
.admin-button-com {
|
|
|
width: 100%;
|
|
|
}
|
|
|
@@ -139,6 +147,7 @@ export default {
|
|
|
.confirm-btn1 {
|
|
|
width: calc(100% - 60upx);
|
|
|
margin: 30upx 30upx 20upx;
|
|
|
+ text-align:center;
|
|
|
.admin-button-com {
|
|
|
width: 100%;
|
|
|
}
|