Commit 15df9d8e by huahua

提交

parent 07b36978
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
}, },
methods: { methods: {
bgColorAssembly(item){ bgColorAssembly(item){
//console.log("item.color=点击")
this.$emit('bgColorAssembly',item.color) this.$emit('bgColorAssembly',item.color)
}, },
g(e){ g(e){
......
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
<view :style="{ height: height + 'px', background:background}" style="position: fixed; z-index: 9999;"> <view :style="{ height: height + 'px', background:background}" style="position: fixed; z-index: 9999;">
<view class="head" :style="{ height: height + 'px', background:background}"> <view class="head" :style="{ height: height + 'px', background:background}">
<view class="back" @click="back" v-if="backShow" :style="{ top: top + 'px', color:color }"> <view class="back" @click="back" v-if="backShow" :style="{ top: top + 'px', color:color }">
<image src="../../../static/recommend/icon_back_black.png" mode="aspectFit" <image v-if="worksid > 0" mode="aspectFit"style="width: 39upx; height: 39upx; margin-top: calc((32px - 39upx)/2);
style="width: 40upx; height: 40upx; margin-top: 17upx;margin-left: auto; margin-right: auto;"> margin-left: auto;
</image> margin-right: auto;"/>
<!-- <image v-if="worksid == 0" src="../../../static/recommend/icon_back_black.png" mode="aspectFit" style="width: 39upx; height: 39upx; margin-top: calc((32px - 39upx)/2);margin-left: auto; margin-right: auto;"></image> -->
<image v-else src="../../../static/recommend/icon_back_black.png" mode="aspectFit" style="width: 39upx; height: 39upx; margin-top: calc((32px - 39upx)/2);margin-left: auto; margin-right: auto;"></image>
</view> </view>
<view class="title" v-if="titleShow" :style="{ top: top + 'px', color:color, 'font-size': size + 'rpx' }"> <view class="title" v-if="titleShow" :style="{ top: top + 'px', color:color, 'font-size': size + 'rpx' }">{{title}}</view>
{{title}}</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -15,6 +16,10 @@ ...@@ -15,6 +16,10 @@
<script> <script>
export default { export default {
props: { props: {
worksid:{
type: Number,
default: null
},
title: { title: {
type: String, type: String,
default: '自定义标题' default: '自定义标题'
...@@ -63,13 +68,24 @@ ...@@ -63,13 +68,24 @@
}, },
methods: { methods: {
back() { back() {
if (!this.isBack) { if(this.worksid > 0){
}else{
if(this.worksid == -100211){
uni.redirectTo({ url: '../index/mall' })
}else{
uni.navigateBack();
}
}
/* if (!this.isBack) {
uni.navigateBack(); uni.navigateBack();
} else { } else {
uni.reLaunch({ if(this.worksid == -100211){
url: '../index/mall' uni.redirectTo({ url: '../index/mall' })
}) }else{
uni.navigateBack();
} }
} */
} }
}, },
onLoad(options) { onLoad(options) {
......
...@@ -271,6 +271,8 @@ ...@@ -271,6 +271,8 @@
</view> </view>
</view> </view>
<!-- 1、增加在线定制站、正在休息-》体验中; <!-- 1、增加在线定制站、正在休息-》体验中;
2、关闭官方图库,要同时关掉:贴图素材、智能推荐; 2、关闭官方图库,要同时关掉:贴图素材、智能推荐;
3、关闭上传相片,要同时关掉:上传相片、添加文字、添加涂鸦 3、关闭上传相片,要同时关掉:上传相片、添加文字、添加涂鸦
...@@ -282,37 +284,37 @@ ...@@ -282,37 +284,37 @@
<image class="tool_li_img" src="../../static/img/icon_history_image.png" mode=""></image> <image class="tool_li_img" src="../../static/img/icon_history_image.png" mode=""></image>
<view class="tool_li_text">历史作品</view> <view class="tool_li_text">历史作品</view>
</view> </view>
<view class="tool_li" @click="showPopup(2)" v-if=" is_public == 1"> <view class="tool_li" @click="showPopup(2)" v-if=" is_authority == 1">
<image class="tool_li_img" src="../../static/icon/icon_stickers.png" mode=""></image> <image class="tool_li_img" src="../../static/icon/icon_stickers.png" mode=""></image>
<view class="tool_li_text">贴图素材</view> <view class="tool_li_text">贴图素材</view>
</view> </view>
<view class="tool_li" @click="showPopup(24)" v-if="surface_type != 1 "> <view class="tool_li" @click="showPopup(24)" v-if="is_authority != 1 ">
<image class="tool_li_img" src="../../static/icon_make_diy_uplaod_image.png" mode=""></image> <image class="tool_li_img" src="../../static/icon_make_diy_uplaod_image.png" mode=""></image>
<view class="tool_li_text">背景底色</view> <view class="tool_li_text">背景底色</view>
</view> </view>
<view class="tool_li" @click="showone = !showone" v-if=" diy_upload_menu == 1"> <view class="tool_li" @click="showone = !showone" v-if=" is_photo == 1">
<image @click="cancel('share')" class="tool_li_img" <image @click="cancel('share')" class="tool_li_img"
src="../../static/icon_make_diy_back_color.png" mode=""></image> src="../../static/icon_make_diy_back_color.png" mode=""></image>
<view @click="cancel()" class="tool_li_text">上传相片</view> <view @click="cancel()" class="tool_li_text">上传相片</view>
</view> </view>
<view class="tool_li" @click="showPopup(3)" v-if="diy_upload_menu == 1"> <view class="tool_li" @click="showPopup(3)" v-if="is_photo == 1">
<image class="tool_li_img" src="../../static/icon_diy_typeface.png" <image class="tool_li_img" src="../../static/icon_diy_typeface.png"
style="width: 45upx; height: 40upx;" mode=""></image> style="width: 45upx; height: 40upx;" mode=""></image>
<view @click="cancel()" class="tool_li_text">添加文字</view> <view @click="cancel()" class="tool_li_text">添加文字</view>
</view> </view>
<view class="tool_li" @click="ontuya()" v-if="diy_upload_menu == 1"> <view class="tool_li" @click="ontuya()" v-if="is_photo == 1">
<image class="tool_li_img" style="width: 62upx; height: 55upx;" src="../../static/icon_tuya.png" <image class="tool_li_img" style="width: 62upx; height: 55upx;" src="../../static/icon_tuya.png"
mode=""></image> mode=""></image>
<view class="tool_li_text">添加涂鸦</view> <view class="tool_li_text">添加涂鸦</view>
</view> </view>
<view class="tool_li" @click="showAiChange()" style="height: 100upx;" v-if="system_config.baking_diy.value == 1"> <view class="tool_li" @click="showAiChange()" style="height: 100upx;" v-if="is_recommend== 1">
<image class="tool_li_img" style="width: 55upx; height: 45upx;" <image class="tool_li_img" style="width: 55upx; height: 45upx;"
src="../../static/icon_diy_ai.png" mode="aspectFit"></image> src="../../static/icon_diy_ai.png" mode="aspectFit"></image>
<view class="tool_li_text":style="{color: font_color}">AI图像</view> <view class="tool_li_text":style="{color: font_color}">AI图像</view>
</view> </view>
<view class="tool_li" @click="openAiMakePicture()"v-if="system_config.baking_diy.value == 1" > <view class="tool_li" @click="openAiMakePicture()"v-if="is_recommend == 1" >
<image class="tool_li_img" style="width: 44upx; height: 43upx;" <image class="tool_li_img" style="width: 44upx; height: 43upx;"
src="../../static/icon_diy_draw_designs.png" mode=""></image> src="../../static/icon_diy_draw_designs.png" mode=""></image>
<view class="tool_li_text":style="{color: font_color}">AI画图</view> <view class="tool_li_text":style="{color: font_color}">AI画图</view>
...@@ -394,7 +396,7 @@ ...@@ -394,7 +396,7 @@
<!-- 替换选项 --> <!-- 替换选项 -->
<!-- 字体 --> <!-- 字体 -->
<uni-popup ref="textsettingsshare" type="bottom" @change="change" style="position: fixed; z-index: 99999;"> <uni-popup ref="textsettingsshare" type="bottom" @change="change" style="position: fixed; z-index: 9999;">
<view class="uni-share" style="width: 100%; height: 600upx;background: #292933;" <view class="uni-share" style="width: 100%; height: 600upx;background: #292933;"
v-if="e_active == 3 || e_active == 4"> v-if="e_active == 3 || e_active == 4">
<textsettings @textInput='textInput' @cancel="cancel" @workcolor="workcolor" <textsettings @textInput='textInput' @cancel="cancel" @workcolor="workcolor"
...@@ -406,14 +408,14 @@ ...@@ -406,14 +408,14 @@
<!-- 文本,贴图,相框 1模板 2贴图 3字体 4编辑 22添加相框 --> <!-- 文本,贴图,相框 1模板 2贴图 3字体 4编辑 22添加相框 -->
<uni-popup ref="showshare" :type="type" @change="change" <uni-popup ref="showshare" :type="type" @change="change"
style="position: relative; z-index: 99999; width: 100%;" :style="{height: data.windowHeight +'px'}"> style="position: relative; z-index: 9999; width: 100%;" :style="{height: data.windowHeight +'px'}">
<!-- 文本 --> <!-- 文本 -->
<view class="uni-share full-width" :style="{height: data.windowHeight +'px'}" <view class="uni-share full-width" :style="{height: data.windowHeight +'px'}"
v-if="e_active == 3 || e_active == 4"> v-if="e_active == 3 || e_active == 4">
<view <view
style="position: fixed; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 99999; opacity: 0.8;" style="position: fixed; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 9995; opacity: 0.8;"
@click="cancel('share')"></view> @click="cancel('share')"></view>
<view style="position: fixed; bottom: 0; left: 0; width: 100%; height: 25%; z-index: 99999;"> <view style="position: fixed; bottom: 0; left: 0; width: 100%; height: 25%; z-index: 9996;">
<textsettings @textInput='textInput' @cancel="cancel" @workcolor="workcolor" <textsettings @textInput='textInput' @cancel="cancel" @workcolor="workcolor"
@workweight="workweight" @bgtextcolor="bgtextcolor" @typefaceClick="typefaceClick" @workweight="workweight" @bgtextcolor="bgtextcolor" @typefaceClick="typefaceClick"
@typefaceshow="typefaceshow" ref="textsettings"> @typefaceshow="typefaceshow" ref="textsettings">
...@@ -426,11 +428,11 @@ ...@@ -426,11 +428,11 @@
class="uni-share full-width" :style="{height: data.windowHeight +'px'}"> class="uni-share full-width" :style="{height: data.windowHeight +'px'}">
<!-- 遮罩 --> <!-- 遮罩 -->
<view class="full-width" <view class="full-width"
style="position: absolute; bottom: 0; left: 0; height: 100%; z-index: 99999; opacity: 0.8;" style="position: absolute; bottom: 0; left: 0; height: 100%; z-index: 99; opacity: 0.8;"
@click="cancel('share')"></view> @click="cancel('share')"></view>
<!-- 正文 --> <!-- 正文 -->
<view <view
style="position: absolute; bottom: 0upx; left: 0; height: 100%; width: 120upx; z-index: 99999; background: #1A1D33; overflow: hidden;"> style="position: absolute; bottom: 0upx; left: 0; height: 100%; width: 120upx; z-index: 9999; background: #1A1D33; overflow: hidden;">
<view style="width: 120upx; height: 188upx;"></view> <view style="width: 120upx; height: 188upx;"></view>
<view style="width: 120upx;" :style="{height: (data.windowHeight - 188 * data.pixelRate) +'px'}" <view style="width: 120upx;" :style="{height: (data.windowHeight - 188 * data.pixelRate) +'px'}"
v-if="e_active == 2 || e_active == 23 || e_active == 99 "> v-if="e_active == 2 || e_active == 23 || e_active == 99 ">
...@@ -845,7 +847,11 @@ ...@@ -845,7 +847,11 @@
radioGroup: ['现代风', '卡通风', '铅笔画风'], radioGroup: ['现代风', '卡通风', '铅笔画风'],
upLoadImageUrl: "", //上传图片地址 upLoadImageUrl: "", //上传图片地址
diy_upload_menu: 0, //diy_upload_menu为1是显示, diy_upload_menu为0时就不显示 diy_upload_menu: 0, //diy_upload_menu为1是显示, diy_upload_menu为0时就不显示
is_public:0 is_public:0,
is_authority:0,
is_photo:0,
is_recommend:0,
is_home:0
}; };
}, },
...@@ -2486,6 +2492,7 @@ ...@@ -2486,6 +2492,7 @@
bgColorAssembly(bg) { bgColorAssembly(bg) {
this.background_color = bg this.background_color = bg
console.log("颜色:"+this.background_color)
this.$refs['showshare'].close() this.$refs['showshare'].close()
}, },
...@@ -4171,12 +4178,12 @@ ...@@ -4171,12 +4178,12 @@
} }
var newScale = Math.max(e.scale * item.lastScale, .01); var newScale = Math.max(e.scale * item.lastScale, .01);
newScale || (newScale = item.lastScale); newScale || (newScale = item.lastScale);
// 角度 //角度
item.rotate += e.angle; item.rotate += e.angle;
item.angle = item.rotate; item.angle = item.rotate;
// 缩放 //缩放
item.scale = newScale; item.scale = newScale;
// //图片放大响应的右下角按钮同比缩小 //图片放大响应的右下角按钮同比缩小
item.oScale = 1 / item.scale; item.oScale = 1 / item.scale;
item.active = false //辅助线 item.active = false //辅助线
item.activeguide = true //开启辅助线 item.activeguide = true //开启辅助线
...@@ -4206,18 +4213,20 @@ ...@@ -4206,18 +4213,20 @@
that.machine_id = options.machine_id || null // 设备id that.machine_id = options.machine_id || null // 设备id
homeservice.WorksList({ homeservice.WorksList({
s: 'machine.detail', s: 'machine.detail',
//s: 'machine.newDetail',
machine_id: that.machine_id machine_id: that.machine_id
}).then(res => { }).then(res => {
console.log(res) console.log(res)
that.machine_item = res that.machine_item = res
that.is_authority = res.is_authority
that.is_photo = res.is_photo
that.is_recommend = res.is_recommend
that.is_home = res.is_home
that.diy_upload_menu = res.diy_upload_menu that.diy_upload_menu = res.diy_upload_menu
if (res.delivery == 1 && res.machine_category_id == "64") { if (res.delivery == 1 && res.machine_category_id == "64") {
that.isComeDelivery = true; that.isComeDelivery = true;
} }
that.support_pay = res.support_pay //单机版是否支付 that.support_pay = res.support_pay //单机版是否支付
that.is_public = res.is_public that.is_public = res.is_public
console.log(that.is_public)
}).catch(err => {}); }).catch(err => {});
that.queryPage.machine_id = options.machine_id || null // 设备id that.queryPage.machine_id = options.machine_id || null // 设备id
that.key = 2 that.key = 2
......
...@@ -30,9 +30,7 @@ ...@@ -30,9 +30,7 @@
background: linear-gradient(92deg, #E6B01A, #F29F3D); background: linear-gradient(92deg, #E6B01A, #F29F3D);
box-shadow: 0px 19px 48px 1px rgba(20, 31, 62, 0.35); box-shadow: 0px 19px 48px 1px rgba(20, 31, 62, 0.35);
border-radius: 40px;"> border-radius: 40px;">
<view <view style=" text-align: center; line-height: 100upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;"> 立即定制</view>
style=" text-align: center; line-height: 100upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;">
立即定制</view>
</view> </view>
<!-- <view @click="toProxyApplet()" v-if="list.is_open_manage == 1" <!-- <view @click="toProxyApplet()" v-if="list.is_open_manage == 1"
style="position: fixed; bottom: 35upx; text-align: center;left: 0; right: 0;font-size: 32upx; margin: auto; color: #fff;"> style="position: fixed; bottom: 35upx; text-align: center;left: 0; right: 0;font-size: 32upx; margin: auto; color: #fff;">
...@@ -79,7 +77,6 @@ ...@@ -79,7 +77,6 @@
</view> </view>
</view> </view>
<switchGoods ref="switchGoods" @selectGoodItem="selectGoodItem" @toCustomSize="toCustomSize"></switchGoods> <switchGoods ref="switchGoods" @selectGoodItem="selectGoodItem" @toCustomSize="toCustomSize"></switchGoods>
<!--//商品弹框 --> <!--//商品弹框 -->
</view> </view>
...@@ -123,7 +120,6 @@ ...@@ -123,7 +120,6 @@
methods: { methods: {
//调转代理小程序 //调转代理小程序
toProxyApplet() { toProxyApplet() {
var url = Env.getBaseURL(); var url = Env.getBaseURL();
...@@ -142,22 +138,6 @@ ...@@ -142,22 +138,6 @@
}, },
//调转代理小程序
// toProxyApplet() {
// var url = Env.getBaseURL();
// var envVersionName = "trial";
// if (url.indexOf("colorpark") != -1) {
// envVersionName = "release";
// }
// wx.navigateToMiniProgram({
// appId: 'wx9cd3934f286f3d71',
// envVersion: envVersionName,
// success(res) {
// }
// })
// },
//首次进来检查是否 //首次进来检查是否
toFirstCheck() { toFirstCheck() {
let that = this; let that = this;
...@@ -214,12 +194,9 @@ ...@@ -214,12 +194,9 @@
//立即定制 //立即定制
Customize_now() { Customize_now() {
if (!this.$AppContext.checkLogin()) { if (!this.$AppContext.checkLogin()) {
this.tologo(1) this.tologo(1)
} else { } else {
let isShowCustomizeData = this.list.customize_size == 1 ? true : false let isShowCustomizeData = this.list.customize_size == 1 ? true : false
this.$refs['switchGoods'].open(this.machine_id, isShowCustomizeData); this.$refs['switchGoods'].open(this.machine_id, isShowCustomizeData);
} }
...@@ -249,7 +226,7 @@ ...@@ -249,7 +226,7 @@
//授权登录 //授权登录
tologo(type) { tologo(type) {
// 先登陆 //先登陆
let that = this; let that = this;
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
...@@ -261,7 +238,6 @@ ...@@ -261,7 +238,6 @@
if (type == 1) { if (type == 1) {
let isShowCustomizeData = that.list.customize_size == 1 ? true : false let isShowCustomizeData = that.list.customize_size == 1 ? true : false
that.$refs['switchGoods'].open(that.machine_id, isShowCustomizeData); that.$refs['switchGoods'].open(that.machine_id, isShowCustomizeData);
//that.$refs['switchGoods'].open(that.machine_id);
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '../mall/lineUp?machine_id=' + that.machine_id + url: '../mall/lineUp?machine_id=' + that.machine_id +
...@@ -294,11 +270,18 @@ ...@@ -294,11 +270,18 @@
}) })
homeservice.WorksList({ homeservice.WorksList({
machine_id: this.machine_id, machine_id: this.machine_id,
s: 'machine.newDetail' s: 'machine.detail'
}).then(res => { }).then(res => {
//console.log(res)
this.statusloading = 1; this.statusloading = 1;
if (res) { if (res) {
this.list = res; this.list = res
if(this.list.is_home == 1){
this.worksid = -100211
}else{
this.worksid = 100211
}
console.log("worksid="+this.worksid)
this.toFirstCheck(); this.toFirstCheck();
this.myheadtext = this.machine_id //头部标题栏 this.myheadtext = this.machine_id //头部标题栏
} }
...@@ -352,7 +335,9 @@ ...@@ -352,7 +335,9 @@
path: '/pages/mall/machineDetail?machine_id=' + this.machine_id, // 默认是当前页面,必须是以‘/’开头的完整路径 path: '/pages/mall/machineDetail?machine_id=' + this.machine_id, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '', //转发时显示的图片路径,支持网络和本地,不传则使用当前页默认截图。 imageUrl: '', //转发时显示的图片路径,支持网络和本地,不传则使用当前页默认截图。
success: function(res) { // 转发成功之后的回调      success: function(res) { // 转发成功之后的回调     
if (res.errMsg == 'shareAppMessage:ok') {} if (res.errMsg == 'shareAppMessage:ok') {
}
} }
}; };
return shareObj; return shareObj;
...@@ -365,8 +350,8 @@ ...@@ -365,8 +350,8 @@
this.myheadtext = this.machine_id; this.myheadtext = this.machine_id;
this.$base.machine_id = this.machine_id this.$base.machine_id = this.machine_id
this.statusloading = 1; this.statusloading = 1;
this.Adlist() // 轮播图 this.Adlist()
//this.getDetail(); //轮播图
}, },
onShow() { onShow() {
...@@ -382,6 +367,7 @@ ...@@ -382,6 +367,7 @@
<style lang="scss"> <style lang="scss">
@import "../index/css/main.css"; @import "../index/css/main.css";
/* height: calc(100% - 400upx); /* height: calc(100% - 400upx);
width: 100%; width: 100%;
position: absolute; position: absolute;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment