Commit 967e44e1 authored by 李超鹏's avatar 李超鹏

update:update

scope:self-support
body:删除云开发相关代码
parent 4be9741b
const db = uniCloud.database({
spaceId: 'tcb-nikbzhlwnpd5n913e1c5e-50f4bbo'
})
let cloudRulesApiFun = function(vm){
/* 查询所有产品 废弃*/
let getAllProduct = async () => await db.collection("product").get();
/* 查询产品下的品牌 {product_code:"P0001"} 废弃*/
let getBrand = async (params = {}) => await db.collection("brand").where(params).get();
/* 查询规范项目 {product_code:"P0001"} 废弃*/
let getstandard = async (params = {}) => await db.collection("standard").where(params).get();
/* 查询分组规范项目 废弃*/
let getGroupStandard = async (params = {}) => await uniCloud.callFunction({name: 'getGroupStandard', data: params});
/* 查询类别数据 */
let getClassifyDictionary = async () => await db.collection("dictionary").where({"type":"classify"}).get()
/* 查询有数据的系统 或者 品牌 数据 {"classify_id":"","system_id":"","field":"system_id|brand_id"}*/
let getRelationDictionary = async (params = {}) => await uniCloud.callFunction({name: 'getRelationDictionary', data: params});
let getRelationDictionaryV2 = async () => await uniCloud.callFunction({name: 'getRelationDictionaryV2'});
/* 查询规范 根据 分类、系统、品牌 {"token":"", "classify_id":"","system_id":"","brand_id":""} */
let getGroupStandardV2 = async (params = {}) => await uniCloud.callFunction({name: 'getGroupStandardV2', data: params});
/* 保存图片 {"token":"", "standardId":"", "url":""} */
let saveImage = async (params = {}) => await uniCloud.callFunction({name: 'saveImage', data: params});
/* 获取用户水印,首次返回默认水印 {"token":"", "systemId":""} */
let getUserWatermark = async (params = {}) => await uniCloud.callFunction({name: 'getUserWatermark', data: params});
/* 保存用户水印配置 {"token":"", "watermark": getUserWatemark返回的数据} */
let saveUserWatermark = async (params = {}) => await uniCloud.callFunction({name: 'saveUserWatermark', data: params});
const rulesApi = {
getAllProduct,
getBrand,
getstandard,
getGroupStandard,
// 新接口
getClassifyDictionary,
getRelationDictionary,
getRelationDictionaryV2,
getGroupStandardV2,
saveImage,
getUserWatermark,
saveUserWatermark
}
return rulesApi
}
module.exports = {
cloudRulesApiFun
}
\ No newline at end of file
import {
cloudRulesApiFun
} from "@/common/api/cloud_rules.js"
import { import {
commonApiFun commonApiFun
} from '@/common/api/common.js'; } from '@/common/api/common.js';
...@@ -14,7 +11,6 @@ import {certApiFun} from"@/common/api/cert.js" ...@@ -14,7 +11,6 @@ import {certApiFun} from"@/common/api/cert.js"
let apiFun = function(vm) { let apiFun = function(vm) {
let commonApi = commonApiFun(vm); let commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm) let settledApi = settledApiFun(vm)
let cloudApi = cloudRulesApiFun(vm)
let learnApi=learnApiFun(vm) let learnApi=learnApiFun(vm)
let assessmentApi = assessmentApiFun(vm) let assessmentApi = assessmentApiFun(vm)
let orderApi=orderApiFun(vm) let orderApi=orderApiFun(vm)
...@@ -22,7 +18,6 @@ let apiFun = function(vm) { ...@@ -22,7 +18,6 @@ let apiFun = function(vm) {
let apiUrl = { let apiUrl = {
...commonApi, ...commonApi,
...settledApi, ...settledApi,
...cloudApi,
...learnApi, ...learnApi,
...orderApi, ...orderApi,
...assessmentApi, ...assessmentApi,
......
import {apiFun} from '@/common/api/index.js'; import {apiFun} from '@/common/api/index.js';
import {
cloudRulesApiFun
} from "@/common/api/cloud_rules.js"
const install = (Vue, vm) => { const install = (Vue, vm) => {
let apiUrls = apiFun(vm) let apiUrls = apiFun(vm)
...@@ -9,10 +7,6 @@ const install = (Vue, vm) => { ...@@ -9,10 +7,6 @@ const install = (Vue, vm) => {
vm.$u.api = { vm.$u.api = {
...apiUrls, ...apiUrls,
}; };
let cloudRules = cloudRulesApiFun(vm)
vm.$u.cloudApi = {
...cloudRules
}
} }
export default { export default {
......
<template> <template>
<view class="backView"> <view class="backView">
<view class="ph-pr-arr" v-for="(dataItem, index) in list" :key="index"> <view class="ph-pr-arr" v-for="(dataItem, index) in list" :key="index">
<template v-if="dataItem.data.length > 0"> <template v-if="dataItem.data.length > 0">
<view class="topTitle"><text>{{ dataItem.title }}</text></view> <view class="topTitle"><text>{{ dataItem.title }}</text></view>
<view class="ph-pr-content"> <view class="ph-pr-content">
<view v-for="(item,ikey) in dataItem.data" <view v-for="(item,ikey) in dataItem.data"
:class="param[dataItem.type] === item.id ? 'select-item-view' : 'item-view'" :class="param[dataItem.type] === item.id ? 'select-item-view' : 'item-view'"
@click="itemClick(dataItem.type, item, ikey)" :key="item.id"> @click="itemClick(dataItem.type, item, ikey)" :key="item.id">
<text class="itemTitle">{{item.name}}</text> <text class="itemTitle">{{item.name}}</text>
</view> </view>
</view> </view>
</template> </template>
</view> </view>
<u-button class="ph-pr-button" type="primary" shape="circle" @click="handleClick" <u-button class="ph-pr-button" type="primary" shape="circle" @click="handleClick"
:hover-class="selectedAll ? '' : 'none'" :custom-style="buttonStyle">下一步</u-button> :hover-class="selectedAll ? '' : 'none'" :custom-style="buttonStyle">下一步</u-button>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
classifyList: [], classifyList: [],
systemList: [], systemList: [],
brandList: [], brandList: [],
param: { param: {
classifyId: '', classifyId: '',
systemId: '', systemId: '',
brandId: '', brandId: '',
}, },
brandName: '', brandName: '',
selectedAll: false, selectedAll: false,
} }
}, },
computed: { computed: {
list() { list() {
return [{ return [{
title: '请选择类别', title: '请选择类别',
type: 'classifyId', type: 'classifyId',
data: this.classifyList data: this.classifyList
}, },
{ {
title: '请选择系统', title: '请选择系统',
type: 'systemId', type: 'systemId',
data: this.systemList data: this.systemList
}, },
{ {
title: '请选择品牌', title: '请选择品牌',
type: 'brandId', type: 'brandId',
data: this.brandList data: this.brandList
} }
] ]
}, },
buttonStyle() { buttonStyle() {
return this.selectedAll ? { return this.selectedAll ? {
'color': '#FFFFFF', 'color': '#FFFFFF',
'background-color': '#2272FF;', 'background-color': '#2272FF;',
'width': '600rpx', 'width': '600rpx',
'height': '104rpx' 'height': '104rpx'
} : { } : {
'color': '#FFFFFF', 'color': '#FFFFFF',
'background-color': '#D1D4D4;', 'background-color': '#D1D4D4;',
'width': '600rpx', 'width': '600rpx',
'height': '104rpx' 'height': '104rpx'
} }
} }
}, },
onLoad(e) { onLoad(e) {
getApp().trackPage('选择产品页') getApp().trackPage('选择产品页')
this.getRelationDictionaryV2() this.getRelationDictionaryV2()
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
let shareObj = { let shareObj = {
title: '', title: '',
path: '/pages/photo/product', path: '/pages/photo/product',
imageUrl: '', imageUrl: '',
success() {}, success() {},
fail() {} fail() {}
} }
return shareObj return shareObj
}, },
methods: { methods: {
getRelationDictionaryV2: function() { //选择 点击
this.$u.cloudApi.getRelationDictionaryV2().then(res => { itemClick: function(type, item, ikey) {
if (res && res.result) {
this.classifyList = res.result switch (type) {
this.param.classifyId = res.result[0].id case 'classifyId':
this.systemList = res.result[0].child this.param = {
} classifyId: item.id,
}) systemId: '',
}, brandId: ''
}
//选择 点击 this.selectedAll = false
itemClick: function(type, item, ikey) { this.systemList = this.classifyList[ikey].child
this.brandList = []
switch (type) { break
case 'classifyId': case 'systemId':
this.param = { this.param = {
classifyId: item.id, classifyId: this.param.classifyId,
systemId: '', systemId: item.id,
brandId: '' brandId: ''
} }
this.selectedAll = false
this.systemList = this.classifyList[ikey].child this.selectedAll = false
this.brandList = [] this.brandList = this.systemList[ikey].child
break
case 'systemId': break
this.param = { case 'brandId':
classifyId: this.param.classifyId, this.param.brandId = item.id
systemId: item.id, this.selectedAll = true
brandId: '' this.brandName = item.name
} break
default:
this.selectedAll = false break
this.brandList = this.systemList[ikey].child }
},
break
case 'brandId': // 点击下一步
this.param.brandId = item.id handleClick() {
this.selectedAll = true // 点击下一步设置全局拍照品牌品类
this.brandName = item.name if (!this.selectedAll) {
break return
default: }
break const globalData = getApp().globalData
} // if (!globalData.token) {
}, // uni.navigateTo({
// url: '/pages/login/wxlogin'
// 点击下一步 // })
handleClick() { // return
// 点击下一步设置全局拍照品牌品类 // }
if (!this.selectedAll) { let keys = ['brandId', 'brandName', 'classifyId', 'systemId']
return keys.map(key => {
} globalData.photo.product[key] = this[key] || this.param[key]
const globalData = getApp().globalData
// if (!globalData.token) {
// uni.navigateTo({
// url: '/pages/login/wxlogin'
// })
// return
// }
let keys = ['brandId', 'brandName', 'classifyId', 'systemId']
keys.map(key => {
globalData.photo.product[key] = this[key] || this.param[key]
}) })
uni.navigateTo({ uni.navigateTo({
url: '/pages/photo/list' + url: '/pages/photo/list' +
'?brandId=' + this.param.brandId + '?brandId=' + this.param.brandId +
'&brand=' + this.brandName + '&brand=' + this.brandName +
'&classifyId=' + this.param.classifyId + '&classifyId=' + this.param.classifyId +
'&systemId=' + this.param.systemId, '&systemId=' + this.param.systemId,
}) })
} }
} }
} }
</script> </script>
<style> <style>
.backView { .backView {
background-color: #F4f5f7; background-color: #F4f5f7;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
height: 100%; height: 100%;
} }
.topTitle { .topTitle {
margin-top: 50rpx; margin-top: 50rpx;
padding-left: 30rpx; padding-left: 30rpx;
font-size: 36rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
} }
.ph-pr-content { .ph-pr-content {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
width: 100%; width: 100%;
padding: 22rpx 22rpx; padding: 22rpx 22rpx;
} }
.ph-pr-arr { .ph-pr-arr {
width: 100%; width: 100%;
} }
.item-view { .item-view {
background-color: #FFFFFF; background-color: #FFFFFF;
/* width: 548rpx; */ /* width: 548rpx; */
margin: 0rpx 8rpx 24rpx 8rpx; margin: 0rpx 8rpx 24rpx 8rpx;
/* flex: 1 1 0%; /* flex: 1 1 0%;
max-width: 33%; */ max-width: 33%; */
width: 222rpx; width: 222rpx;
height: 76rpx; height: 76rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-style: solid; border-style: solid;
box-shadow: 0px 2px 7px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 7px 0px rgba(0, 0, 0, 0.05);
border-width: 0rpx; border-width: 0rpx;
border-radius: 12rpx; border-radius: 12rpx;
font-size: 26rpx; font-size: 26rpx;
color: #666666; color: #666666;
} }
.select-item-view { .select-item-view {
background-color: #2272FF; background-color: #2272FF;
margin: 0rpx 8rpx 24rpx 8rpx; margin: 0rpx 8rpx 24rpx 8rpx;
/* flex: 1 1 0%; /* flex: 1 1 0%;
max-width: 33%; */ max-width: 33%; */
width: 222rpx; width: 222rpx;
height: 76rpx; height: 76rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-style: solid; border-style: solid;
box-shadow: 0px 2px 7px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 7px 0px rgba(0, 0, 0, 0.05);
border-width: 0rpx; border-width: 0rpx;
border-radius: 12rpx; border-radius: 12rpx;
font-size: 26rpx; font-size: 26rpx;
color: #FFFFFF; color: #FFFFFF;
} }
.ph-pr-button { .ph-pr-button {
position: absolute; position: absolute;
bottom: 76rpx; bottom: 76rpx;
font-size: 32rpx; font-size: 32rpx;
} }
</style> </style>
...@@ -144,27 +144,6 @@ ...@@ -144,27 +144,6 @@
} }
}, },
methods: { methods: {
getListData: function() {
this.loading = true
let that = this
this.$u.cloudApi.getGroupStandardV2({
'token': this.vuex_token,
'classify_id': this.classifyId,
'system_id': this.systemId,
'brand_id': this.brandId
}).then(res => {
this.loading = false
if (res && res.result) {
if (res.result.error_code) {
uni.showToast({
title: res.result.error_msg
})
} else {
that.handleData(res.result)
}
}
})
},
getListDataNew() { getListDataNew() {
this.loading = true this.loading = true
let self = this let self = this
...@@ -251,17 +230,6 @@ ...@@ -251,17 +230,6 @@
url: '/pages/photo/take' url: '/pages/photo/take'
}) })
}, },
// 清除图片
handleClickSure: function() {
this.$u.cloudApi.cleanImage({
'token': this.vuex_token,
}).then(res => {
this.isPopShow = false
if (res && res.result) {
this.getListData()
}
})
},
take(item,ikey) { take(item,ikey) {
this.currentItemDate = item this.currentItemDate = item
......
<template> <template>
<view> <view>
<view class="contentView"> <view class="contentView">
<u-image class="pic" :src="files[0]" bg-color="transparent" @click="showPreviewFn"></u-image> <u-image class="pic" :src="files[0]" bg-color="transparent" @click="showPreviewFn"></u-image>
<!-- <image class="pic" :src="files[0]" v-lazy mode="aspectFit"></image> --> <!-- <image class="pic" :src="files[0]" v-lazy mode="aspectFit"></image> -->
</view> </view>
<view class="bottomView"> <view class="bottomView">
<image class="btn" :src="btn_remake" @click="$u.throttle(remakePhoto, 3000)"></image> <image class="btn" :src="btn_remake" @click="$u.throttle(remakePhoto, 3000)"></image>
<image class="btn" :src="btn_continue" @click="$u.throttle(continuePhoto, 3000)"></image> <image class="btn" :src="btn_continue" @click="$u.throttle(continuePhoto, 3000)"></image>
</view> </view>
<image class="btn finish" src="/static/photo/finish.png" @click="$u.throttle(finishPhoto, 3000)"></image> <image class="btn finish" src="/static/photo/finish.png" @click="$u.throttle(finishPhoto, 3000)"></image>
</view> </view>
</template> </template>
<script> <script>
import qiniup from '@/components/upload/qiniup'; import qiniup from '@/components/upload/qiniup';
const app = getApp() const app = getApp()
export default { export default {
mixins: [qiniup], mixins: [qiniup],
data() { data() {
return { return {
protocolContent: '', protocolContent: '',
btn_remake: 'https://qn-static.banshouhui.com/take_order/photo/remake.png', btn_remake: 'https://qn-static.banshouhui.com/take_order/photo/remake.png',
btn_continue: '/static/photo/continue.png', btn_continue: '/static/photo/continue.png',
standardId: '', standardId: '',
images: [], images: [],
files: [], files: [],
fileMaps: [], fileMaps: [],
keys: [], keys: [],
token: '', token: '',
product: '', product: '',
} }
}, },
onLoad(e) { onLoad(e) {
// 获取照片选项对象 // 获取照片选项对象
const product = app.globalData.photo.product const product = app.globalData.photo.product
this.product = `?brandId=${product.brandId}&brand=${product.brandName}&classifyId=${product.classifyId}&systemId=${product.systemId}` this.product = `?brandId=${product.brandId}&brand=${product.brandName}&classifyId=${product.classifyId}&systemId=${product.systemId}`
if(app.globalData.photo.currentItem) { if(app.globalData.photo.currentItem) {
// 获取规格Id // 获取规格Id
this.standardId = app.globalData.photo.currentItem._id this.standardId = app.globalData.photo.currentItem._id
} }
getApp().trackPage('照片预览页') getApp().trackPage('照片预览页')
const globalTempPath = getApp().globalData.photo.tempPath const globalTempPath = getApp().globalData.photo.tempPath
if(globalTempPath && globalTempPath.mixWater){ if(globalTempPath && globalTempPath.mixWater){
this.files = [globalTempPath.mixWater] this.files = [globalTempPath.mixWater]
} }
if(e.standardId) { if(e.standardId) {
this.standardId = e.standardId this.standardId = e.standardId
} }
this.token = this.vuex_token this.token = this.vuex_token
}, },
methods: { methods: {
// 保存照片到本地 // 保存照片到本地
async saveTempToLocal(tempImagePath) { async saveTempToLocal(tempImagePath) {
//has_origin //是否保存原图 //has_origin //是否保存原图
let that = this let that = this
const photo = getApp().globalData.photo const photo = getApp().globalData.photo
if(!photo.tempPath){ if(!photo.tempPath){
return return
} }
let path = '' let path = ''
if(photo.tempPath.origin && photo.waterSetting && photo.waterSetting.has_origin){ if(photo.tempPath.origin && photo.waterSetting && photo.waterSetting.has_origin){
// 保存原图到本地 // 保存原图到本地
path = photo.tempPath.origin path = photo.tempPath.origin
let result = await this.saveLocal(path) let result = await this.saveLocal(path)
if(result){ if(result){
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '已将照片原图保存到本地相册' title: '已将照片原图保存到本地相册'
}) })
} }
} }
if(photo.currentItem){ if(photo.currentItem){
photo.currentItem.imageList.unshift(photo.tempPath.mixWater) photo.currentItem.imageList.unshift(photo.tempPath.mixWater)
} }
// if(photo.productList && photo.productList[photo.topIndex]){ // if(photo.productList && photo.productList[photo.topIndex]){
// const topArr = photo.productList[photo.topIndex] // const topArr = photo.productList[photo.topIndex]
// if(topArr[photo.itemIndex]){ // if(topArr[photo.itemIndex]){
// topArr[photo.itemIndex].imageList.push(photo.tempPath.mixWater) // topArr[photo.itemIndex].imageList.push(photo.tempPath.mixWater)
// } // }
// } // }
// photo. // photo.
if(photo.tempPath.mixWater){ if(photo.tempPath.mixWater){
// 保存水印处理图片到本地 // 保存水印处理图片到本地
path = photo.tempPath.mixWater path = photo.tempPath.mixWater
let result1 = await this.saveLocal(path) let result1 = await this.saveLocal(path)
if(result1){ if(result1){
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '已将水印图片保存到本地相册' title: '已将水印图片保存到本地相册'
}) })
} }
} }
}, },
saveLocal(path){ saveLocal(path){
return new Promise((resolve,reject)=>{ return new Promise((resolve,reject)=>{
uni.saveImageToPhotosAlbum({ uni.saveImageToPhotosAlbum({
filePath: path, filePath: path,
success() { success() {
resolve(true) resolve(true)
}, },
fail() { fail() {
reject('保存失败') reject('保存失败')
} }
}) })
}) })
}, },
showPreviewFn(img) { showPreviewFn(img) {
uni.previewImage({ uni.previewImage({
current: 0, current: 0,
urls: this.files urls: this.files
}); });
}, },
// 重拍图片 // 重拍图片
remakePhoto() { remakePhoto() {
uni.navigateBack({ uni.navigateBack({
delta:1 delta:1
}) })
}, },
finishPhoto(){ finishPhoto(){
const photo = getApp().globalData.photo const photo = getApp().globalData.photo
photo.currentItemLength = 10 photo.currentItemLength = 10
this.continuePhoto() this.continuePhoto()
// 完成本项 // 完成本项
// uni.navigateBack({ // uni.navigateBack({
// delta:2 // delta:2
// }) // })
}, },
// 确认图片 // 确认图片
continuePhoto() { continuePhoto() {
let self = this let self = this
uni.showLoading({ uni.showLoading({
title:'图片保存中…' title:'图片保存中…'
}) })
self.saveTempToLocal() self.saveTempToLocal()
self.confirmUpload(true) self.confirmUpload(true)
}, },
submitFile() { downloadImages() {
let self = this let self = this;
for (let url of this.images) {
if(self.keys.length) { uni.downloadFile({
for (let s of self.keys) { url: url, //仅为示例,并非真实的资源
self.$u.cloudApi.saveImage({ success(res) {
"token": self.token, // 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容
"standardId": self.standardId, if (res.statusCode === 200) {
"url": s, self.files.push(res.tempFilePath)
}).then(async res =>{ }
console.log(res, "云服务保存图片"); },
if(res.result.code) { fail(e) {
// TODO 参数是否要来回传递 }
const photo = getApp().globalData.photo })
photo.currentItemLength = photo.currentItemLength + 1 }
uni.hideLoading() },
// 当前项的图片显示
// 拍照项张数目增加 等于10张 }
if(photo.currentItemLength<10){ }
uni.navigateBack({ </script>
delta:1
}) <style lang="scss">
}else{ .contentView {
uni.navigateBack({ background-color: #333333;
delta:2 /* padding-top: 120rpx; */
}) padding-bottom:228rpx;
} height: 100vh;
// let timer = setTimeout(()=>{ display: flex;
// if(photo.currentItemLength<10){ flex-direction: column;
// uni.navigateBack({ }
// delta:1 /deep/ .u-image{
// }) height:100vh !important;
// }else{ }
// uni.navigateBack({ /deep/ .u-image__loading{
// delta:2 background-color: transparent!important;
// }) }
// } /deep/ .u-image__error{
// },2000) background-color: transparent!important;
} else { }
uni.showToast({ .pic {
title:'图片上传失败 '+ res.result.msg flex:1;
}) width: 100%;
}
}) /* height:auto */
} /* height: 760rpx; */
} }
},
downloadImages() { .bottomView {
let self = this; box-shadow: 0 0 1rpx 6rpx rgba(255,255,255,0.05);
for (let url of this.images) { background-color: #333333;
uni.downloadFile({ width: 100%;
url: url, //仅为示例,并非真实的资源 padding:70rpx 0;
success(res) { position: fixed;
// 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容 bottom: 0;
if (res.statusCode === 200) { display: flex;
self.files.push(res.tempFilePath) justify-content: space-around;
} align-items: center;
}, .btn{
fail(e) { display: block;
} width: 200rpx;
}) height: 88rpx;
} }
}, }
.btn{
} display: block;
} width: 232rpx;
</script> height: 80rpx;
&.finish{
<style lang="scss"> position: fixed;
.contentView { top:30rpx;
background-color: #333333; right:30rpx;
/* padding-top: 120rpx; */ }
padding-bottom:228rpx; }
height: 100vh; </style>
display: flex;
flex-direction: column;
}
/deep/ .u-image{
height:100vh !important;
}
/deep/ .u-image__loading{
background-color: transparent!important;
}
/deep/ .u-image__error{
background-color: transparent!important;
}
.pic {
flex:1;
width: 100%;
/* height:auto */
/* height: 760rpx; */
}
.bottomView {
box-shadow: 0 0 1rpx 6rpx rgba(255,255,255,0.05);
background-color: #333333;
width: 100%;
padding:70rpx 0;
position: fixed;
bottom: 0;
display: flex;
justify-content: space-around;
align-items: center;
.btn{
display: block;
width: 200rpx;
height: 88rpx;
}
}
.btn{
display: block;
width: 232rpx;
height: 80rpx;
&.finish{
position: fixed;
top:30rpx;
right:30rpx;
}
}
</style>
...@@ -122,46 +122,8 @@ ...@@ -122,46 +122,8 @@
const globalData = getApp().globalData const globalData = getApp().globalData
this.icon_close_new = globalData.icon_close_new this.icon_close_new = globalData.icon_close_new
this.systemId = globalData.photo.product.systemId this.systemId = globalData.photo.product.systemId
this.getItemList()
}, },
methods: { methods: {
getItemList: function() {
// this.systemId = '79550af260555cc20afb34156c94b32c' // 测试数据
this.loading = true
this.$u.cloudApi.getUserWatermark({
'token': this.vuex_token,
'system_id': this.systemId
}).then(res => {
if (res && res.result) {
if(res.result.error_code){
uni.showToast({title: res.result.error_msg})
}else{
this.result = res.result
}
}else{
uni.showToast({title: '网络异常'})
}
this.loading = false
})
},
saveUserWatermark: function() {
this.loading = true
this.$u.cloudApi.saveUserWatermark({
'token': this.vuex_token,
'watermark': this.result
}).then(res => {
if (res.result.code == true) {
const photo = getApp().globalData.photo
photo.waterSetting = this.result
}else{
uni.showToast({title: res.result.msg})
}
this.loading = false
})
},
//保存原图 开关 //保存原图 开关
handleOrigineChange: function(e) { handleOrigineChange: function(e) {
this.result['hasOrigin'] = !this.result['hasOrigin'] this.result['hasOrigin'] = !this.result['hasOrigin']
......
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