Merge branch 'master' of https://gitee.com/qtvbidt/mrr.sj.front
This commit is contained in:
commit
fcf1a4ed5e
|
|
@ -2,12 +2,13 @@
|
|||
"version" : "1.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"customPlaygroundType" : "local",
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-ios"
|
||||
},
|
||||
{
|
||||
"customPlaygroundType" : "device",
|
||||
"playground" : "standard",
|
||||
"customPlaygroundType" : "local",
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-android"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name" : "美融融商家",
|
||||
"appid" : "__UNI__BBE6285",
|
||||
"description" : "同城便捷到家美业“技术外卖”服务、同城预约到店服务平台美融融为同城爱美人群提供更优质的更全面的服务。",
|
||||
"versionName" : "1.0.05",
|
||||
"versionName" : "1.0.06",
|
||||
"versionCode" : 1005,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
|
|
@ -197,6 +197,7 @@
|
|||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx17eef65c270b4869",
|
||||
"appid" : "wx17eef65c270b4869",
|
||||
"privacy" : {
|
||||
"requiredPrivateInfos" : [ "getBackgroundFetchData" ]
|
||||
|
|
|
|||
|
|
@ -391,9 +391,9 @@
|
|||
}
|
||||
// 判断是否显示上门提醒弹窗
|
||||
const notShow = uni.getStorageSync('addServiceReminderNotShow');
|
||||
if (!notShow) {
|
||||
this.showReminderPopup = true;
|
||||
}
|
||||
// if (!notShow) {
|
||||
// this.showReminderPopup = true;
|
||||
// }
|
||||
this.getUserInfo();
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -868,6 +868,16 @@
|
|||
} else {
|
||||
url = "/user/serverupdate";
|
||||
}
|
||||
console.log(this.formData, '-0-0-0-0-0-');
|
||||
delete this.formData.shop_business_time
|
||||
delete this.formData.shop_head_photo
|
||||
delete this.formData.shop_address
|
||||
delete this.formData.shop_dependency
|
||||
delete this.formData.shop_class
|
||||
delete this.formData.team_buy
|
||||
|
||||
|
||||
|
||||
request.post(url, this.formData).then((res) => {
|
||||
if (res.state == 1) {
|
||||
const pages = getCurrentPages();
|
||||
|
|
|
|||
|
|
@ -226,10 +226,11 @@
|
|||
console.log("wechatpayfor", wechatpayfor);
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
if (systemInfo.platform === "ios") {
|
||||
let appId = wechatpayfor.data.appid;
|
||||
delete wechatpayfor.data.appid;
|
||||
let appId = wechatpayfor.data.appId;
|
||||
// delete wechatpayfor.data.appid;
|
||||
wechatpayfor.data["appId"] = appId;
|
||||
console.log("wechatpayfor2", wechatpayfor);
|
||||
console.log(that.orderInfo, 'that.orderInfothat.orderInfo');
|
||||
}
|
||||
console.log("================================");
|
||||
uni.hideLoading();
|
||||
|
|
@ -267,6 +268,7 @@
|
|||
});
|
||||
},
|
||||
fail: function(err) {
|
||||
console.log(err,'erererererer');
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "该订单未成功支付",
|
||||
|
|
|
|||
|
|
@ -232,14 +232,35 @@
|
|||
async submitPhoto() {
|
||||
// 1. 防连点核心逻辑:如果正在提交中,直接return阻止后续执行
|
||||
if (this.isSubmitting) return;
|
||||
|
||||
console.log(this.formData,'this.formData');
|
||||
// 2. 表单必填项校验:校验图片和名称是否填写
|
||||
if (!this.formData.url) {
|
||||
if(this.formData.type==1){
|
||||
if(this.formData.class_type==1){
|
||||
uni.showToast({
|
||||
title: '请先上传店铺主图',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}else if(this.formData.class_type==2){
|
||||
uni.showToast({
|
||||
title: '请先上传环境图片',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}else if(this.formData.class_type==3){
|
||||
uni.showToast({
|
||||
title: '请先上传作品图片',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
uni.showToast({
|
||||
title: '请先上传图片/视频',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return
|
||||
}
|
||||
if (!this.formData.name || this.formData.name.trim() === '') {
|
||||
|
|
@ -369,6 +390,7 @@
|
|||
uni.showLoading({
|
||||
title: '上传中'
|
||||
})
|
||||
console.log(this.formData,'=============================');
|
||||
if (this.formData.type == 1) {
|
||||
res = await uploadImage.handleUpload(this.userInfo.id, 3);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="container">
|
||||
<custom-navbar title="店铺图片" :leftImg="'/static/images/back.png'" :showUser="true" backgroundColor="#fff"
|
||||
<custom-navbar title="店铺视频" :leftImg="'/static/images/back.png'" :showUser="true" backgroundColor="#fff"
|
||||
titleColor="#000" borderBottom="none"></custom-navbar>
|
||||
<view class="container-titles flex-row-center-between">
|
||||
<view class="titles-left">
|
||||
|
|
@ -9,13 +9,14 @@
|
|||
</view>
|
||||
<view class="titles-right">
|
||||
<text class="titles-text">展示位置及拍摄技巧</text>
|
||||
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/b153e8d5-37b1-4205-a4a1-9f6603f30c2a.png" mode="widthFix" style="width: 24rpx;margin-top: 2rpx;margin-left: 6rpx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="container-card" v-for="(item,index) in cardList[type]" :key="index">
|
||||
<view class="card-header flex-row-center-between">
|
||||
<text class="card-title">{{ item.title }}</text>
|
||||
<view class="card-header-right" @click="goList(item.id)">
|
||||
<text class="card-header-right-text">查看详情</text>
|
||||
<text class="card-header-right-text">查看全部</text>
|
||||
<image class="card-header-right-img" src="/static/images/icons/right_gray14.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -142,6 +143,7 @@
|
|||
return obj
|
||||
},
|
||||
goList(id) {
|
||||
console.log(id,'ididididididi');
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/photoAlbum/videoList?id=${id}&type=${this.type}`
|
||||
});
|
||||
|
|
@ -156,7 +158,7 @@
|
|||
},
|
||||
goAdd(id, item) {
|
||||
if (this.type == 1) {
|
||||
if ( this.imgVideoList[id] && this.imgVideoList[id].length >= 20) {
|
||||
if ( this.imgVideoList[id] && this.imgVideoList[id].length >= 21) {
|
||||
uni.showToast({
|
||||
title: '最多上传20张图片',
|
||||
icon: 'none',
|
||||
|
|
@ -255,6 +257,7 @@
|
|||
}
|
||||
|
||||
.titles-right {
|
||||
display: flex;
|
||||
.titles-text {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="container">
|
||||
<custom-navbar title="店铺图片" :leftImg="'/static/images/back.png'" :showUser="true" backgroundColor="#fff"
|
||||
<custom-navbar :title="pagestitle" :leftImg="'/static/images/back.png'" :showUser="true" backgroundColor="#fff"
|
||||
titleColor="#000" borderBottom="none">
|
||||
<template #right>
|
||||
<text class="custom-right" @click="toggleManage">{{ isManage ? '取消' : '管理' }}</text>
|
||||
|
|
@ -8,13 +8,13 @@
|
|||
</custom-navbar>
|
||||
<view class="review">
|
||||
<view class="review-title">
|
||||
<text class="review-title-text">添加环境图片,吸引更多顾客到店消费</text>
|
||||
<text class="review-title-text">添加{{pagestitle}},吸引更多顾客到店消费</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="container-card">
|
||||
|
||||
<view class="card-content flex-row-center" v-if="type==1">
|
||||
<view class="card-content-page">{{ imgVideoList.length }}/20张</view>
|
||||
<view class="card-content-page" v-if="class_type!=1 ">{{ imgVideoList.length }}/20张</view>
|
||||
<view class="content-default" @click="goAdd(class_type)"
|
||||
v-if="!(class_type == 1 && imgVideoList && imgVideoList.length)">
|
||||
<image class="content-default-img" src="/static/images/icons/addPhoto.png"></image>
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="card-content flex-row-center" v-else>
|
||||
<view class="card-content-page">{{ imgVideoList.length }}/10张</view>
|
||||
<view class="card-content-page" v-if="class_type!=1">{{ imgVideoList.length }}/10张</view>
|
||||
<view class="content-default content-default2" @click="goAdd(class_type)"
|
||||
v-if="!(class_type == 1 && imgVideoList && imgVideoList.length)">
|
||||
<image class="content-default-img" src="/static/images/icons/addPhoto.png"></image>
|
||||
|
|
@ -84,18 +84,39 @@
|
|||
type: 2, //1图片 2视频
|
||||
class_type: 4, //1主(图片/视频) 2环境(图片/视频) 3作品(图片/视频) 4其它(图片/视频)
|
||||
isManage: false, // 管理模式状态
|
||||
selectedItems: [] // 选中的项索引数组
|
||||
selectedItems: [], // 选中的项索引数组
|
||||
pagestitle: "店铺图片"
|
||||
}
|
||||
},
|
||||
async onShow() {
|
||||
await this.getList()
|
||||
},
|
||||
async onLoad(options) {
|
||||
console.log(options, '查看option');
|
||||
if (options.type) {
|
||||
this.type = options.type
|
||||
}
|
||||
if (options.id) {
|
||||
this.class_type = options.id
|
||||
|
||||
}
|
||||
if (this.type == 2) {
|
||||
if (this.class_type == 1) {
|
||||
this.pagestitle = "店铺主视频"
|
||||
} else if (this.class_type == 4) {
|
||||
this.pagestitle = "其它视频"
|
||||
}
|
||||
console.log('123123123');
|
||||
} else if (this.type == 1) {
|
||||
if (this.class_type == 2) {
|
||||
this.pagestitle = "环境图片"
|
||||
} else if (this.class_type == 3) {
|
||||
this.pagestitle = "作品图片"
|
||||
} else if (this.class_type == 4) {
|
||||
this.pagestitle = "其它图片"
|
||||
} else {
|
||||
this.pagestitle = "店铺图片"
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -210,8 +231,7 @@
|
|||
});
|
||||
// 核心修复:逐层可选链保护 + 兜底空数组,彻底避免属性访问错误
|
||||
this.imgVideoList = res.code === 200 ?
|
||||
res.data?.list?.[this.type]?.[this.class_type] || [] :
|
||||
[];
|
||||
res.data?.list?.[this.type]?.[this.class_type] || [] : [];
|
||||
} catch (err) {
|
||||
// 网络错误、接口报错等所有异常的兜底处理
|
||||
console.error("获取媒体列表失败:", err);
|
||||
|
|
|
|||
|
|
@ -173,10 +173,10 @@ const uploadFile = async (file, userId, type, uploadType) => {
|
|||
let imageType;
|
||||
if (uploadType == 'image') {
|
||||
//imageType = file.path.split('.')
|
||||
imageType = file.name.split('.')
|
||||
imageType = file.path.split('.')
|
||||
} else if (uploadType == 'video') {
|
||||
// #ifdef H5
|
||||
imageType = file.name.split('.')
|
||||
imageType = file.url.split('.')
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || MP-WEIXIN
|
||||
imageType = file.tempFilePath.split('.')
|
||||
|
|
@ -252,7 +252,9 @@ const uploadToOss = (file, ossConfig, name, uploadType) => {
|
|||
if (uploadType == 'image') {
|
||||
path = file.path
|
||||
// 获取文件扩展名并设置 Content-Type
|
||||
console.log('111111');
|
||||
const ext = file.path.split('.').pop().toLowerCase()
|
||||
console.log('33333333');
|
||||
const mimeTypes = {
|
||||
jpg: 'image/jpeg',
|
||||
jpeg: 'image/jpeg',
|
||||
|
|
|
|||
Loading…
Reference in New Issue