Commit ce352710 authored by 罗超's avatar 罗超

1

parent 6be248dc
<template>
<view class="addressStyle" v-if="!isloading" :style="{ height: contentHeight + 'px'}">
<view style="width: 100%;height: 50px;background: #FFF;padding: 9px 15px;" @click='show=true'>
<u-search placeholder="根据相关内容搜索" v-model="val" :show-action="false" :disabled='true' ></u-search>
<view
class="addressStyle"
v-if="!isloading"
:style="{ height: contentHeight + 'px' }"
>
<view
style="width: 100%; height: 50px; background: #fff; padding: 9px 15px"
@click="show = true"
>
<u-search
placeholder="根据相关内容搜索"
v-model="msg.Name"
:show-action="false"
@search="init"
></u-search>
</view>
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" :style="{height:(contentHeight-50)+'px'} ">
<view v-for="(item, index) in list" :key="index" class="addresbox" @click="chosenHandler(item)">
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
:style="{ height: contentHeight - 50 + 'px' }"
>
<view
v-for="(item, index) in list"
:key="index"
class="addresbox"
@click="chosenHandler(item)"
>
<view class="addresclo">
<Text>收件人:{{ item.Name }}</Text>
<Text>{{ item.Mobile }}</Text>
</view>
<Text style="width: 100%;">收货地址:{{ item.DistrictAddress }}{{ item.Address }}</Text>
<view style="width: 100%;height: 2rpx;background: #f5f5f5;margin-top: 15rpx;"></view>
<Text style="width: 100%">收货地址:{{ item.Address }}</Text>
<view class="addresclo"> 备注:{{ item.Remarks }} </view>
<view
style="
width: 100%;
height: 2rpx;
background: #f5f5f5;
margin-top: 15rpx;
"
></view>
<view class="addresclo">
<u-checkbox-group @change="isdefault(item)">
<u-checkbox v-model="item.IsDefault == 1 ? true : false" shape="circle" :active-color="mainColor">
<Text :style="{ color: item.IsDefault == 1 ? mainColor : '#c8c9cc' }">{{ item.IsDefault == 1 ? '已设为默认' : '设为默认' }}</Text>
</u-checkbox>
</u-checkbox-group>
<view style="display: flex;flex-direction: row;align-items: center;">
<view style="display: flex;flex-direction: row;align-items: center;" @click.stop="btn_edit(item)">
<view></view>
<view style="display: flex; align-items: center">
<view
style="display: flex; flex-direction: row; align-items: center"
@click.stop="btn_edit(item)"
>
<u-icon name="edit" color="#c8c9cc" size="40"></u-icon>
<Text style="color:#c8c9cc;">编辑</Text>
<Text style="color: #c8c9cc">编辑</Text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin: 0 30rpx" @click.stop="btn_delete(item)">
<view
style="
display: flex;
flex-direction: row;
align-items: center;
margin: 0 30rpx;
"
@click.stop="delAddress(item.ID)"
>
<u-icon name="delete" color="#c8c9cc" size="40"></u-icon>
<Text style="color:#c8c9cc;">删除</Text>
<Text style="color: #c8c9cc">删除</Text>
</view>
</view>
</view>
</view>
<view class="bottom_btn">
<view class="bottom_btn_item" :style="{ background: mainColor }" @click="ManualAdd">
<view
class="bottom_btn_item"
:style="{ background: mainColor }"
@click="ManualAdd"
>
<u-icon name="add-o" color="#fff" size="30"></u-icon>
<Text style="color:#fff;margin-left: 10rpx;">手动添加</Text>
</view>
<!-- TODO 自动获取 -->
<view class="bottom_btn_item" style="background: #5CBF39;" @click="automatic">
<u-icon name="location" color="#fff" size="30"></u-icon>
<Text style="color:#fff;margin-left: 10rpx">自动获取</Text>
<Text style="color: #fff; margin-left: 10rpx">手动添加</Text>
</view>
</view>
</scroll-view>
<u-popup v-model="show"
mode="right"
length="70%"
height='100%'
>
<view class="popupbox">
<text class="popupbox_text" style="margin-top: 15px;">收货人</text>
<view class="popup_item">
<input class="uni-input inputM" v-model="msg.Name" />
</view>
<text class="popupbox_text" style="margin-top: 15px;">手机号码</text>
<view class="popup_item">
<input type="number" class="uni-input inputM" v-model="msg.Mobile" />
</view>
<text class="popupbox_text" style="margin-top: 15px;">详细地址</text>
<view class="popup_item">
<input class="uni-input inputM" v-model="msg.Address" />
</view>
<view class="popup_b" :style="{height:cHeight+'px'}">
<view class="popup_b_item" style="background: #FAF8F9;color: #000000;" @click="goreset()">
<text>重置</text>
</view>
<view class="popup_b_item" :style="{background:mainColor }" @click="determine()">
<text>确定</text>
</view>
</view>
</view>
</u-popup>
<!-- 删除的弹框 -->
<u-modal v-model="showModal" content="确实删除收货地址" :show-cancel-button="true" :show-title="false" @confirm="confirm"></u-modal>
<u-modal
v-model="showModal"
content="确实删除收货地址"
:show-cancel-button="true"
:show-title="false"
@confirm="confirm"
></u-modal>
<u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
</view>
</template>
<script>
import auth from '../../components/auth/index.vue';
import auth from "../../components/auth/index.vue";
export default {
data() {
return {
pageTitle: '收货地址',
pageTitle: "退货地址",
loading: true,
list: [],
showAuth: false,
mainColor: '',
mainColor: "",
u: {},
contentHeight: 0,
showModal: false,
deleteID: 0,
val:'',
show:false,
cHeight:0,
show: false,
cHeight: 0,
msg: {
Name: '',
IsDefault: 0,
Mobile: '',
Address:'',
pageIndex: 1,
pageSize: 20,
Name: "",
},
source: '',
defaultId: 0,
currentAddress: {},
list: [],
mc: '',
addressmsg: {
Id: 0,
Name: '',
Mobile: '',
Province: '',
City: '',
District: '',
Address: ''
}
};
},
components: {
auth
auth,
},
created() {
this.contentHeight = this.$utils.calcContentHeight(-40) ;
this.contentHeight = this.$utils.calcContentHeight(-40);
this.mainColor = this.$uiConfig.mainColor;
this.cHeight = this.$uiConfig.is_bang ? 60 : 52;
},
mounted() {
let currentPages = getCurrentPages();
let u = '/' + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync('basedata') ? wx.getStorageSync('basedata').bar_title : [];
pages.forEach(x => {
let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").bar_title
: [];
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle
title: this.pageTitle,
});
},
onLoad(option) {
this.u = uni.getStorageSync('mall_UserInfo');
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: '未登录',
avatarUrl: ''
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
} else {
this.init();
}
if (option && option.form) {
(this.source = option.form), (this.defaultId = option.id);
}
},
methods: {
chosenHandler(item) {
console.log('chosenHandler', item);
console.log("chosenHandler", item);
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2];
prevPage.$vm.formData.address_id = item.Id;
prevPage.$vm.formdata.AddressId = item.Id;
prevPage.$vm.adressInfo = item;
uni.navigateBack({
delta: 1
delta: 1,
});
},
init() {
this.loading = false;
uni.showNavigationBarLoading();
this.request2(
{
url: '/api/AppletUser/GetUserShippingAddressList',
data: this.msg
},
res => {
uni.hideNavigationBarLoading();
if (res.resultCode == 1) {
this.isloading = false;
this.list = res.data;
}
}
);
},
reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo');
this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth = false;
this.init();
},
......@@ -195,129 +176,55 @@ export default {
gbAuth() {
uni.navigateBack();
},
isdefault(item) {
//设置默认地址
uni.showNavigationBarLoading();
this.request2(
{
url: '/api/AppletUser/SetUserShippingAddressDefault',
data: {
AddressId: item.Id
}
},
res => {
this.init();
uni.hideNavigationBarLoading();
}
);
},
// 修改地址
btn_edit(item) {
uni.navigateTo({
url: '/pages/address/AddAddress?AddressId=' + item.Id
url: "/pages/MallMange/returnModifyAddress?Id=" + item.ID,
});
},
btn_delete(item) {
this.deleteID = item.Id;
this.showModal = true;
},
confirm() {
uni.showNavigationBarLoading();
this.request2(
{
url: '/api/AppletUser/DelUserShippingAddress',
data: {
AddressId: this.deleteID
}
},
res => {
this.init();
uni.hideNavigationBarLoading();
}
);
},
automatic() {
// this.$refs.uToast.show({
// title: "正在开发,敬请期待!"
// });
// 删除地址
delAddress(id) {
let that = this;
if (wx.chooseAddress) {
wx.chooseAddress({
success: function(res) {
console.log(res);
let nameList = [res.provinceName, res.cityName, res.countyName];
that.addressmsg.Name = res.userName;
that.addressmsg.Mobile = res.telNumber;
that.addressmsg.Address = res.detailInfo;
that.getDestination(nameList);
},
fail: function(err) {
that.$refs.uToast.show({
title: '授权失败,请重新点击自动获取',
type: 'error'
});
}
});
} else {
that.$refs.uToast.show({
title: '当前微信版本不支持自动获取收货地址',
type: 'error'
});
}
},
getDestination(nameList) {
this.request2(
{
url: '/api/AppletUser/GetDestinationListByNames',
data: {
area: nameList
}
},
res => {
console.log('res', res);
this.addressmsg.Province = res.data[0].ID;
this.addressmsg.City = res.data[1].ID;
this.addressmsg.District = res.data[2].ID;
if (res.data.length > 0) {
this.request2(
uni.showModal({
title: "提示",
content: "确认删除?",
success: function (res) {
if (res.confirm) {
that.requestAdmin(
"/api/MallBase/DelDelivery",
{
url: '/api/AppletUser/SetUserShippingAddress',
data: this.addressmsg
Id: id,
},
res => {
uni.showToast({ title: '保存成功', icon: 'none' });
this.init();
(res) => {
uni.showToast({
title: "操作成功",
duration: 2000,
});
that.init();
}
);
}
}
);
},
});
},
ManualAdd() {
//手动添加
uni.navigateTo({
url: '/pages/address/AddAddress'
url: "/pages/MallMange/returnModifyAddress",
});
},
goreset(){//重置
this.show=false;
this.msg.Name='';
this.msg.Mobile='';
this.msg.Address='';
this.init()
init() {
uni.showNavigationBarLoading();
this.requestAdmin(
"/api/MallBase/GetLogisticsDeliveryPage",
this.msg,
(res) => {
uni.hideNavigationBarLoading();
this.list = res.data.pageData;
}
);
},
determine(){//确认
this.show=false
this.init()
},
}
};
</script>
......@@ -364,20 +271,19 @@ export default {
align-items: center;
justify-content: center;
}
.addressStyle .popupbox{
.addressStyle .popupbox {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
position: relative;
}
.addressStyle .popupbox_text{
}
.addressStyle .popupbox_text {
font-size: 12px;
color: #111111;
margin-left: 5%;
}
.addressStyle .popup_item{
}
.addressStyle .popup_item {
width: 90%;
height: 35px;
margin-left: 5%;
......@@ -387,12 +293,12 @@ export default {
justify-content: space-between;
padding: 5px;
margin-top: 10px;
background: #F1F1F1;
}
.addressStyle .inputM{
background: #f1f1f1;
}
.addressStyle .inputM {
width: 100%;
}
.addressStyle .popup_b{
}
.addressStyle .popup_b {
width: 100%;
position: absolute;
left: 0;
......@@ -400,10 +306,9 @@ export default {
display: flex;
flex-direction: row;
align-items: center;
color: #FFFFFF;
}
.addressStyle .popup_b_item{
color: #ffffff;
}
.addressStyle .popup_b_item {
width: 50%;
height: 100%;
display: flex;
......@@ -412,5 +317,5 @@ export default {
justify-content: center;
font-size: 14px;
padding-top: 15px;
}
}
</style>
......@@ -195,7 +195,7 @@
</scroll-view>
</view>
<!-- 加载中 -->
<view class="flex-center" style="margin-top: 20rpx" v-if="loading">
<view class="flex-center loading" style="margin-top: 20rpx" v-if="loading">
<u-loading mode="flower" size="48"></u-loading>
<text style="color: #999">加载中...</text>
</view>
......@@ -230,7 +230,7 @@ export default {
days.push(i);
}
return {
orderType: 2, //1普通订单,2售后订单
orderType: 1, //1普通订单,2售后订单
loading: false,
status: "loadmore",
loadText: {
......
......@@ -8,7 +8,7 @@
/>
<view class="headImgBox"></view>
<view class="nameBox"
>饭粒汪
>{{ msg.MallName }}
<u-icon
name="edit"
style="margin-left: 10rpx"
......@@ -22,10 +22,10 @@
contentSlot
@confirm="showBox1 = false"
>
<input type="text" v-model="username" class="nameInput" />
<input type="text" v-model="msg.MallName" class="nameInput" />
</u-modal>
</view>
<view class="boxGroup">
<!-- <view class="boxGroup" style="display: none;">
<view class="boxItem">
<view class="leftBox flex-center">
<image
......@@ -104,7 +104,7 @@
</view>
</view>
</view>
<view class="boxGroup">
<view class="boxGroup" style="display: none;">
<view class="boxItem">
<view class="leftBox flex-center">
<image
......@@ -118,7 +118,142 @@
<u-switch v-model="msg.business"></u-switch>
</view>
</view>
</view> -->
<!-- 基本设置 -->
<view class="boxGroup">
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shortmsg.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">联系电话</view>
<input
type="number"
placeholder="联系电话"
style="text-align: right"
v-model="msg.ContactNumber"
/>
</view>
</view>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shortmsg.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">外部客服链接</view>
<input
type="number"
placeholder="外部客服链接"
style="text-align: right"
v-model="msg.OuterServiceLink"
/>
</view>
</view>
<view class="colTitle">一键导航:</view>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shortmsg.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">详细地址</view>
<input
type="number"
placeholder="详细地址"
style="text-align: right"
v-model="msg.Address"
/>
</view>
</view>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shortmsg.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">经纬度</view>
<input
type="number"
placeholder="经纬度"
style="text-align: right"
v-model="msg.LongAndLat"
disabled
/>
</view>
</view>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shortmsg.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">地图</view>
<button
size="mini"
type="primary"
style="float: right; margin: 0"
@click="map"
>
打开地图
</button>
</view>
</view>
<view class="colTitle">跳转小程序:</view>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shortmsg.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">小程序APPID</view>
<input
type="number"
placeholder="小程序APPID"
style="text-align: right"
v-model="msg.MinAppId"
/>
</view>
</view>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shortmsg.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox" style="border: none">
<view class="name">小程序路径</view>
<input
type="number"
placeholder="小程序路径"
style="text-align: right"
v-model="msg.MinUrl"
/>
</view>
</view>
</view>
<!-- 交易设置 -->
<view class="boxGroup">
<view class="boxItem">
<view class="leftBox flex-center">
......@@ -129,9 +264,9 @@
/>
</view>
<view class="rightBox" @click="showBox3 = true">
<view class="name">删除未支付订单限时</view>
<view class="name">未支付订单超时时间</view>
<view class="flex-center">
{{ msg.delOrderTime }}
{{ msg.CancelTime }}
<u-icon name="arrow" style="margin-left: 10rpx"></u-icon
></view>
</view>
......@@ -147,7 +282,7 @@
<view class="rightBox" @click="showBox4 = true">
<view class="name">自动确认收货时间</view>
<view class="flex-center">
{{ msg.incomeDay }}
{{ msg.AutoReceiving }}
<u-icon name="arrow" style="margin-left: 10rpx"></u-icon
></view>
</view>
......@@ -161,9 +296,9 @@
/>
</view>
<view class="rightBox" style="border: none" @click="showBox5 = true">
<view class="name">可申请售后时间</view>
<view class="name">售后时间</view>
<view class="flex-center">
{{ msg.afterSaleDay }}
{{ msg.AfterTime }}
<u-icon name="arrow" style="margin-left: 10rpx"></u-icon
></view>
</view>
......@@ -171,12 +306,12 @@
<u-modal
v-model="showBox3"
:show-cancel-button="true"
title="删除未支付订单限时"
title="未支付订单超时时间"
contentSlot
@confirm="showBox3 = false"
>
<view class="modelBox3 flex-center">
<input type="number" class="input3" v-model="msg.delOrderTime" />分钟
<input type="number" class="input3" v-model="msg.CancelTime" />分钟
</view>
</u-modal>
<u-modal
......@@ -187,18 +322,18 @@
@confirm="showBox4 = false"
>
<view class="modelBox3 flex-center">
<input type="number" class="input3" v-model="msg.incomeDay" />
<input type="number" class="input3" v-model="msg.AutoReceiving" />
</view>
</u-modal>
<u-modal
v-model="showBox5"
:show-cancel-button="true"
title="可申请售后时间"
title="售后时间"
contentSlot
@confirm="showBox5 = false"
>
<view class="modelBox3 flex-center">
<input type="number" class="input3" v-model="msg.afterSaleDay" />
<input type="number" class="input3" v-model="msg.AfterTime" />
</view>
</u-modal>
</view>
......@@ -256,6 +391,93 @@
</view>
</view>
</u-modal>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/Payment.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox" style="border: none" @click="showBox10 = true">
<view class="name">商品面议联系方式</view>
<view class="flex-center">
<view class="weeek">{{ concatTypeStr }}</view>
<u-icon name="arrow" style="margin-left: 10rpx"></u-icon
></view>
</view>
</view>
<u-modal
v-model="showBox10"
:show-cancel-button="true"
title="商品面议联系方式"
contentSlot
@confirm="showBox10 = false"
>
<view class="modelBox6 flex-center">
<view
v-for="(item, index) in contactTypeArr"
:key="index"
class="flex-between modelBox6Item"
:class="item.choose ? 'modelBox6ItemActive' : ''"
@click="changeConcatType(item)"
>
<view class="flex-center">
<image
:src="item.img"
mode="aspectFit"
style="
width: 60rpx;
height: 60rpx;
border-radius: 6rpx;
margin-right: 20rpx;
"
/>
<view class="modelBox6ItemName">{{ item.name }}</view>
</view>
<u-icon
name="success"
color="#446dfc"
size="30"
v-if="item.choose"
></u-icon>
</view>
</view>
</u-modal>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shop.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">余额功能</view>
<u-switch
v-model="msg.BalanceFun"
active-value="1"
inactive-value="0"
></u-switch>
</view>
</view>
<view class="boxItem">
<view class="leftBox flex-center">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/shop.png"
mode="widthFix"
style="width: 100%"
/>
</view>
<view class="rightBox">
<view class="name">储值卡功能</view>
<u-switch
v-model="msg.DepositFun"
active-value="1"
inactive-value="0"
></u-switch>
</view>
</view>
</view>
<view class="boxGroup">
<view class="boxItem">
......@@ -282,7 +504,11 @@
style="width: 100%"
/>
</view>
<view class="rightBox" style="border: none" @click="">
<view
class="rightBox"
style="border: none"
@click="jumpPage(`/pages/MallMange/address`)"
>
<view class="name">退货地址</view>
<view class="flex-center">
<view class="weeek">{{ addrStr }}</view>
......@@ -411,14 +637,90 @@ export default {
showBox7: false,
showBox8: false,
showBox9: false,
showBox10: false,
// msg: {
// business: false,
// businessTime: 1,
// delOrderTime: 0,
// incomeDay: 1,
// afterSaleDay: 1,
// integral: 0, //积分抵扣
// IntegralRule: "", //积分使用规则
// },
msg: {
business: false,
businessTime: 1,
delOrderTime: 0,
incomeDay: 1,
afterSaleDay: 1,
integral: 0, //积分抵扣
IntegralRule: "", //积分使用规则
ID: "",
MallName: "饭粒汪", //商城名称
Indate: "", //有效期
ContactNumber: "", //联系号码
OuterServiceLink: "", //外链客服链接
Address: "", //详细地址
LongAndLat: "", //经纬度
MinAppId: "", //小程序appId
MinUrl: "", //小程序路径
CancelTime: 0, //未支付订单超时时间
AutoReceiving: 0, //自动确认收货时间
AfterTime: 0, //售后时间
PayWay: "", //支付方式
DeliverWay: "", //发货方式
BalanceFun: 0, //余额功能
DepositFun: 0, //储值卡
ConsultWay: "", //商品面议联系方式
MinSwitch: 1, //添加到我的小程序开关
MinBackColor: "#000000", //背影颜色
MinBackClarity: 100, //背影透明度
MinBackCircularBead: 36, //背景框圆角
MinTips: "添加到我的小程序,购买更便捷", //提示文本内容
MinTipsColor: "#FFFFFF", //文本颜色
MinIcoColor: 1, //图标颜色
MinShareTitle: "", //转发标题
MinShareIco: "", //选择图标
BuySwitch: 0, //首页购买记录框开关
CarouselOrder: 0, //轮播订单数
ListShopCar: 0,
ListBuyCount: 1,
ListName: 1,
DetailsComment: 1,
DetailsLineationPrice: 1,
DetailsMemberPrice: 1,
DetailsVipMemberPrice: 1,
DeatilsExpress: 1,
DetailsBuyNum: 1,
DetailsSharePrice: 1,
DetailsVideo: 1,
OtherNoShare: 1,
OtherIndexMoblie: 0,
OtherManualMobile: 1,
OtherTencent: 0,
OtherMemerLevel: 0,
OtherMustAddress: 0,
OtherApplyShare: 0,
SuspendBtn: 0,
BackTopBtn: 1,
CarSuspendBtn: 0,
SellOutIcoSwitch: 1,
SellOutDefaultIco: 0,
GoodsNormalPic: "",
GoodsZoomPic: "",
SuspendStyle: 1,
UnfoldIco: 0,
PackUpIco: "",
OnlineService: 0,
OnlineServiceIco: "",
BackTopNavigation: 0,
BackTopNavigationIco: "",
OneCall: 0,
OneCallIco: "",
ServiceOutLink: 0,
ServiceOutLinkIco: "",
ShortcutNavigation: 0,
ShortcutNavigationIco: "",
TurnMini: 0,
TurnMiniIco: "",
Custom: 0,
TurnLink: "",
TurnIco: 0,
LookWeChatTimes: 0, //每月可查看微信次数
IsOpenGuide: 1, //是否开启引导页
},
businessTimeList: [
{
......@@ -472,18 +774,21 @@ export default {
timeArr: [],
payTypeArr: [
{
Id: 1,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cloudypay.png",
name: "线上支付",
choose: true,
},
{
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/yuezhifu.png",
name: "余额支付",
Id: 2,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/huodaofukuan.png",
name: "货到付款",
choose: false,
},
{
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/huodaofukuan.png",
name: "货到付款",
Id: 3,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/yuezhifu.png",
name: "余额支付",
choose: false,
},
],
......@@ -491,16 +796,19 @@ export default {
deliveryTypeArr: [
//发货方式
{
Id: 1,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cloudypay.png",
name: "快递配送",
choose: true,
},
{
Id: 2,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/yuezhifu.png",
name: "到店自提",
choose: false,
},
{
Id: 3,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/huodaofukuan.png",
name: "同城配送",
choose: false,
......@@ -508,6 +816,28 @@ export default {
],
deliveryTypeStr: "快递配送",
addrStr: "退货地址",
// 商品面议联系方式
contactTypeArr: [
{
Id: 1,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cloudypay.png",
name: "在线客服",
choose: true,
},
{
Id: 2,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/yuezhifu.png",
name: "联系电话",
choose: false,
},
{
Id: 3,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/huodaofukuan.png",
name: "外链客服",
choose: false,
},
],
concatTypeStr: "在线客服",
};
},
methods: {
......@@ -543,11 +873,33 @@ export default {
})
.map((item) => item.name)
.join("、");
this.msg.PayWay = this.payTypeArr
.filter((item) => {
return item.choose;
})
.map((item) => item.Id)
.join(",");
if (this.payTypeStr == "") {
this.payTypeArr[0].choose = true;
this.payTypeStr = "线上支付";
}
},
//商品面议联系方式
changeConcatType(e) {
e.choose = !e.choose;
this.contactTypeStr = this.contactTypeArr
.filter((item) => {
return item.choose;
})
.map((item) => item.name)
.join("、");
this.msg.ConsultWay = this.contactTypeArr
.filter((item) => {
return item.choose;
})
.map((item) => item.Id)
.join(",");
},
//切换发货方式
changeDeliveryType(e) {
e.choose = !e.choose;
......@@ -562,11 +914,66 @@ export default {
this.deliveryTypeStr = "快递配送";
}
},
save() {
this.requestAdmin(
"/api/MallBase/AddOrUpdateMallBase",
this.msg,
(res) => {
console.log(574, res);
}
);
},
map() {
let that = this;
uni.chooseLocation({
success: function (res) {
that.msg.Address = res.address;
that.msg.LongAndLat = res.latitude + "," + res.longitude;
},
});
},
//获取设置数据
getSetup() {
this.requestAdmin("/api/MallBase/GetMallBaseInfo", {}, (res) => {
this.msg = res.data;
//支付方式
this.payTypeArr.forEach((e) => {
e.choose = this.msg.PayWay.split(",").includes(e.Id.toString());
});
this.payTypeStr = this.payTypeArr
.filter((item) => {
return item.choose;
})
.map((item) => item.name)
.join("、");
// 商品面议联系方式
this.contactTypeArr.forEach((e) => {
e.choose = this.msg.ConsultWay.split(",").includes(e.Id.toString());
});
this.concatTypeStr = this.contactTypeArr
.filter((item) => {
return item.choose;
})
.map((item) => item.name)
.join("、");
//发货方式
this.deliveryTypeArr.forEach((e) => {
e.choose = this.msg.DeliverWay.split(",").includes(e.Id.toString());
});
this.deliveryTypeStr = this.deliveryTypeArr
.filter((item) => {
return item.choose;
})
.map((item) => item.name)
.join("、");
});
},
},
onLoad() {
uni.setNavigationBarTitle({
title: "商城设置",
});
this.getSetup();
},
};
</script>
......@@ -667,9 +1074,10 @@ export default {
border-radius: 10rpx;
}
.weeek {
max-width: 300rpx;
max-width: 260rpx;
white-space: nowrap;
overflow: hidden;
overflow-x: auto;
overflow-y: hidden;
font-size: 28rpx;
color: #606266;
}
......@@ -761,4 +1169,11 @@ export default {
padding: 20rpx;
}
}
.colTitle {
line-height: 100rpx;
}
::-webkit-scrollbar {
/*隐藏滚轮*/
display: none;
}
</style>
\ No newline at end of file
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