Commit ce352710 authored by 罗超's avatar 罗超

1

parent 6be248dc
<template> <template>
<view class="addressStyle" v-if="!isloading" :style="{ height: contentHeight + 'px'}"> <view
<view style="width: 100%;height: 50px;background: #FFF;padding: 9px 15px;" @click='show=true'> class="addressStyle"
<u-search placeholder="根据相关内容搜索" v-model="val" :show-action="false" :disabled='true' ></u-search> 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> </view>
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" :style="{height:(contentHeight-50)+'px'} "> <scroll-view
<view v-for="(item, index) in list" :key="index" class="addresbox" @click="chosenHandler(item)"> :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"> <view class="addresclo">
<Text>收件人:{{ item.Name }}</Text> <Text>收件人:{{ item.Name }}</Text>
<Text>{{ item.Mobile }}</Text> <Text>{{ item.Mobile }}</Text>
</view> </view>
<Text style="width: 100%;">收货地址:{{ item.DistrictAddress }}{{ item.Address }}</Text> <Text style="width: 100%">收货地址:{{ item.Address }}</Text>
<view style="width: 100%;height: 2rpx;background: #f5f5f5;margin-top: 15rpx;"></view> <view class="addresclo"> 备注:{{ item.Remarks }} </view>
<view
style="
width: 100%;
height: 2rpx;
background: #f5f5f5;
margin-top: 15rpx;
"
></view>
<view class="addresclo"> <view class="addresclo">
<u-checkbox-group @change="isdefault(item)"> <view></view>
<u-checkbox v-model="item.IsDefault == 1 ? true : false" shape="circle" :active-color="mainColor"> <view style="display: flex; align-items: center">
<Text :style="{ color: item.IsDefault == 1 ? mainColor : '#c8c9cc' }">{{ item.IsDefault == 1 ? '已设为默认' : '设为默认' }}</Text> <view
</u-checkbox> style="display: flex; flex-direction: row; align-items: center"
</u-checkbox-group> @click.stop="btn_edit(item)"
<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)">
<u-icon name="edit" color="#c8c9cc" size="40"></u-icon> <u-icon name="edit" color="#c8c9cc" size="40"></u-icon>
<Text style="color:#c8c9cc;">编辑</Text> <Text style="color: #c8c9cc">编辑</Text>
</view> </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> <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> </view>
</view> </view>
<view class="bottom_btn"> <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> <u-icon name="add-o" color="#fff" size="30"></u-icon>
<Text style="color:#fff;margin-left: 10rpx;">手动添加</Text> <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>
</view> </view>
</view> </view>
</scroll-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" /> <u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> <auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
</view> </view>
</template> </template>
<script> <script>
import auth from '../../components/auth/index.vue'; import auth from "../../components/auth/index.vue";
export default { export default {
data() { data() {
return { return {
pageTitle: '收货地址', pageTitle: "退货地址",
loading: true, loading: true,
list: [], list: [],
showAuth: false, showAuth: false,
mainColor: '', mainColor: "",
u: {}, u: {},
contentHeight: 0, contentHeight: 0,
showModal: false, showModal: false,
deleteID: 0, deleteID: 0,
val:'', show: false,
show:false, cHeight: 0,
cHeight:0,
msg: { msg: {
Name: '', pageIndex: 1,
IsDefault: 0, pageSize: 20,
Mobile: '', Name: "",
Address:'',
}, },
source: '',
defaultId: 0,
currentAddress: {},
list: [], list: [],
mc: '',
addressmsg: {
Id: 0,
Name: '',
Mobile: '',
Province: '',
City: '',
District: '',
Address: ''
}
}; };
}, },
components: { components: {
auth auth,
}, },
created() { created() {
this.contentHeight = this.$utils.calcContentHeight(-40) ; this.contentHeight = this.$utils.calcContentHeight(-40);
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.cHeight = this.$uiConfig.is_bang ? 60 : 52; this.cHeight = this.$uiConfig.is_bang ? 60 : 52;
}, },
mounted() { mounted() {
let currentPages = getCurrentPages(); let currentPages = getCurrentPages();
let u = '/' + currentPages[currentPages.length - 1].route; let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync('basedata') ? wx.getStorageSync('basedata').bar_title : []; let pages = wx.getStorageSync("basedata")
pages.forEach(x => { ? wx.getStorageSync("basedata").bar_title
: [];
pages.forEach((x) => {
if (x.value == u) { if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name; this.pageTitle = x.new_name ? x.new_name : x.name;
} }
}); });
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.pageTitle title: this.pageTitle,
}); });
}, },
onLoad(option) { onLoad(option) {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) { if (!this.u) {
this.u = { this.u = {
nickName: '未登录', nickName: "未登录",
avatarUrl: '' avatarUrl: "",
}; };
this.showAuth = true; this.showAuth = true;
} else { } else {
this.init(); this.init();
} }
if (option && option.form) {
(this.source = option.form), (this.defaultId = option.id);
}
}, },
methods: { methods: {
chosenHandler(item) { chosenHandler(item) {
console.log('chosenHandler', item); console.log("chosenHandler", item);
let pages = getCurrentPages(); let pages = getCurrentPages();
let prevPage = pages[pages.length - 2]; let prevPage = pages[pages.length - 2];
prevPage.$vm.formData.address_id = item.Id; prevPage.$vm.formData.address_id = item.Id;
prevPage.$vm.formdata.AddressId = item.Id; prevPage.$vm.formdata.AddressId = item.Id;
prevPage.$vm.adressInfo = item; prevPage.$vm.adressInfo = item;
uni.navigateBack({ 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() { reloadUserinfo() {
this.u = uni.getStorageSync('mall_UserInfo'); this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth = false; // this.showAuth = false;
this.init(); this.init();
}, },
...@@ -195,129 +176,55 @@ export default { ...@@ -195,129 +176,55 @@ export default {
gbAuth() { gbAuth() {
uni.navigateBack(); uni.navigateBack();
}, },
isdefault(item) { // 修改地址
//设置默认地址
uni.showNavigationBarLoading();
this.request2(
{
url: '/api/AppletUser/SetUserShippingAddressDefault',
data: {
AddressId: item.Id
}
},
res => {
this.init();
uni.hideNavigationBarLoading();
}
);
},
btn_edit(item) { btn_edit(item) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/address/AddAddress?AddressId=' + item.Id url: "/pages/MallMange/returnModifyAddress?Id=" + item.ID,
}); });
}, },
btn_delete(item) { // 删除地址
this.deleteID = item.Id; delAddress(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: "正在开发,敬请期待!"
// });
let that = this; let that = this;
if (wx.chooseAddress) { uni.showModal({
wx.chooseAddress({ title: "提示",
success: function(res) { content: "确认删除?",
console.log(res); success: function (res) {
let nameList = [res.provinceName, res.cityName, res.countyName]; if (res.confirm) {
that.addressmsg.Name = res.userName; that.requestAdmin(
that.addressmsg.Mobile = res.telNumber; "/api/MallBase/DelDelivery",
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(
{ {
url: '/api/AppletUser/SetUserShippingAddress', Id: id,
data: this.addressmsg
}, },
res => { (res) => {
uni.showToast({ title: '保存成功', icon: 'none' }); uni.showToast({
this.init(); title: "操作成功",
duration: 2000,
});
that.init();
} }
); );
} }
} },
); });
}, },
ManualAdd() { ManualAdd() {
//手动添加 //手动添加
uni.navigateTo({ uni.navigateTo({
url: '/pages/address/AddAddress' url: "/pages/MallMange/returnModifyAddress",
}); });
}, },
init() {
goreset(){//重置 uni.showNavigationBarLoading();
this.requestAdmin(
this.show=false; "/api/MallBase/GetLogisticsDeliveryPage",
this.msg.Name=''; this.msg,
this.msg.Mobile=''; (res) => {
this.msg.Address=''; uni.hideNavigationBarLoading();
this.list = res.data.pageData;
this.init() }
);
}, },
determine(){//确认
this.show=false
this.init()
}, },
}
}; };
</script> </script>
...@@ -364,20 +271,19 @@ export default { ...@@ -364,20 +271,19 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.addressStyle .popupbox{ .addressStyle .popupbox {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
}
} .addressStyle .popupbox_text {
.addressStyle .popupbox_text{
font-size: 12px; font-size: 12px;
color: #111111; color: #111111;
margin-left: 5%; margin-left: 5%;
} }
.addressStyle .popup_item{ .addressStyle .popup_item {
width: 90%; width: 90%;
height: 35px; height: 35px;
margin-left: 5%; margin-left: 5%;
...@@ -387,12 +293,12 @@ export default { ...@@ -387,12 +293,12 @@ export default {
justify-content: space-between; justify-content: space-between;
padding: 5px; padding: 5px;
margin-top: 10px; margin-top: 10px;
background: #F1F1F1; background: #f1f1f1;
} }
.addressStyle .inputM{ .addressStyle .inputM {
width: 100%; width: 100%;
} }
.addressStyle .popup_b{ .addressStyle .popup_b {
width: 100%; width: 100%;
position: absolute; position: absolute;
left: 0; left: 0;
...@@ -400,10 +306,9 @@ export default { ...@@ -400,10 +306,9 @@ export default {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
color: #FFFFFF; color: #ffffff;
}
} .addressStyle .popup_b_item {
.addressStyle .popup_b_item{
width: 50%; width: 50%;
height: 100%; height: 100%;
display: flex; display: flex;
...@@ -412,5 +317,5 @@ export default { ...@@ -412,5 +317,5 @@ export default {
justify-content: center; justify-content: center;
font-size: 14px; font-size: 14px;
padding-top: 15px; padding-top: 15px;
} }
</style> </style>
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
</scroll-view> </scroll-view>
</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> <u-loading mode="flower" size="48"></u-loading>
<text style="color: #999">加载中...</text> <text style="color: #999">加载中...</text>
</view> </view>
...@@ -230,7 +230,7 @@ export default { ...@@ -230,7 +230,7 @@ export default {
days.push(i); days.push(i);
} }
return { return {
orderType: 2, //1普通订单,2售后订单 orderType: 1, //1普通订单,2售后订单
loading: false, loading: false,
status: "loadmore", status: "loadmore",
loadText: { loadText: {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
/> />
<view class="headImgBox"></view> <view class="headImgBox"></view>
<view class="nameBox" <view class="nameBox"
>饭粒汪 >{{ msg.MallName }}
<u-icon <u-icon
name="edit" name="edit"
style="margin-left: 10rpx" style="margin-left: 10rpx"
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
contentSlot contentSlot
@confirm="showBox1 = false" @confirm="showBox1 = false"
> >
<input type="text" v-model="username" class="nameInput" /> <input type="text" v-model="msg.MallName" class="nameInput" />
</u-modal> </u-modal>
</view> </view>
<view class="boxGroup"> <!-- <view class="boxGroup" style="display: none;">
<view class="boxItem"> <view class="boxItem">
<view class="leftBox flex-center"> <view class="leftBox flex-center">
<image <image
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="boxGroup"> <view class="boxGroup" style="display: none;">
<view class="boxItem"> <view class="boxItem">
<view class="leftBox flex-center"> <view class="leftBox flex-center">
<image <image
...@@ -118,7 +118,142 @@ ...@@ -118,7 +118,142 @@
<u-switch v-model="msg.business"></u-switch> <u-switch v-model="msg.business"></u-switch>
</view> </view>
</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>
<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="boxGroup">
<view class="boxItem"> <view class="boxItem">
<view class="leftBox flex-center"> <view class="leftBox flex-center">
...@@ -129,9 +264,9 @@ ...@@ -129,9 +264,9 @@
/> />
</view> </view>
<view class="rightBox" @click="showBox3 = true"> <view class="rightBox" @click="showBox3 = true">
<view class="name">删除未支付订单限时</view> <view class="name">未支付订单超时时间</view>
<view class="flex-center"> <view class="flex-center">
{{ msg.delOrderTime }} {{ msg.CancelTime }}
<u-icon name="arrow" style="margin-left: 10rpx"></u-icon <u-icon name="arrow" style="margin-left: 10rpx"></u-icon
></view> ></view>
</view> </view>
...@@ -147,7 +282,7 @@ ...@@ -147,7 +282,7 @@
<view class="rightBox" @click="showBox4 = true"> <view class="rightBox" @click="showBox4 = true">
<view class="name">自动确认收货时间</view> <view class="name">自动确认收货时间</view>
<view class="flex-center"> <view class="flex-center">
{{ msg.incomeDay }} {{ msg.AutoReceiving }}
<u-icon name="arrow" style="margin-left: 10rpx"></u-icon <u-icon name="arrow" style="margin-left: 10rpx"></u-icon
></view> ></view>
</view> </view>
...@@ -161,9 +296,9 @@ ...@@ -161,9 +296,9 @@
/> />
</view> </view>
<view class="rightBox" style="border: none" @click="showBox5 = true"> <view class="rightBox" style="border: none" @click="showBox5 = true">
<view class="name">可申请售后时间</view> <view class="name">售后时间</view>
<view class="flex-center"> <view class="flex-center">
{{ msg.afterSaleDay }} {{ msg.AfterTime }}
<u-icon name="arrow" style="margin-left: 10rpx"></u-icon <u-icon name="arrow" style="margin-left: 10rpx"></u-icon
></view> ></view>
</view> </view>
...@@ -171,12 +306,12 @@ ...@@ -171,12 +306,12 @@
<u-modal <u-modal
v-model="showBox3" v-model="showBox3"
:show-cancel-button="true" :show-cancel-button="true"
title="删除未支付订单限时" title="未支付订单超时时间"
contentSlot contentSlot
@confirm="showBox3 = false" @confirm="showBox3 = false"
> >
<view class="modelBox3 flex-center"> <view class="modelBox3 flex-center">
<input type="number" class="input3" v-model="msg.delOrderTime" />分钟 <input type="number" class="input3" v-model="msg.CancelTime" />分钟
</view> </view>
</u-modal> </u-modal>
<u-modal <u-modal
...@@ -187,18 +322,18 @@ ...@@ -187,18 +322,18 @@
@confirm="showBox4 = false" @confirm="showBox4 = false"
> >
<view class="modelBox3 flex-center"> <view class="modelBox3 flex-center">
<input type="number" class="input3" v-model="msg.incomeDay" /> <input type="number" class="input3" v-model="msg.AutoReceiving" />
</view> </view>
</u-modal> </u-modal>
<u-modal <u-modal
v-model="showBox5" v-model="showBox5"
:show-cancel-button="true" :show-cancel-button="true"
title="可申请售后时间" title="售后时间"
contentSlot contentSlot
@confirm="showBox5 = false" @confirm="showBox5 = false"
> >
<view class="modelBox3 flex-center"> <view class="modelBox3 flex-center">
<input type="number" class="input3" v-model="msg.afterSaleDay" /> <input type="number" class="input3" v-model="msg.AfterTime" />
</view> </view>
</u-modal> </u-modal>
</view> </view>
...@@ -256,6 +391,93 @@ ...@@ -256,6 +391,93 @@
</view> </view>
</view> </view>
</u-modal> </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>
<view class="boxGroup"> <view class="boxGroup">
<view class="boxItem"> <view class="boxItem">
...@@ -282,7 +504,11 @@ ...@@ -282,7 +504,11 @@
style="width: 100%" style="width: 100%"
/> />
</view> </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="name">退货地址</view>
<view class="flex-center"> <view class="flex-center">
<view class="weeek">{{ addrStr }}</view> <view class="weeek">{{ addrStr }}</view>
...@@ -411,14 +637,90 @@ export default { ...@@ -411,14 +637,90 @@ export default {
showBox7: false, showBox7: false,
showBox8: false, showBox8: false,
showBox9: false, showBox9: false,
showBox10: false,
// msg: {
// business: false,
// businessTime: 1,
// delOrderTime: 0,
// incomeDay: 1,
// afterSaleDay: 1,
// integral: 0, //积分抵扣
// IntegralRule: "", //积分使用规则
// },
msg: { msg: {
business: false, ID: "",
businessTime: 1, MallName: "饭粒汪", //商城名称
delOrderTime: 0, Indate: "", //有效期
incomeDay: 1, ContactNumber: "", //联系号码
afterSaleDay: 1, OuterServiceLink: "", //外链客服链接
integral: 0, //积分抵扣 Address: "", //详细地址
IntegralRule: "", //积分使用规则 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: [ businessTimeList: [
{ {
...@@ -472,18 +774,21 @@ export default { ...@@ -472,18 +774,21 @@ export default {
timeArr: [], timeArr: [],
payTypeArr: [ payTypeArr: [
{ {
Id: 1,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cloudypay.png", img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cloudypay.png",
name: "线上支付", name: "线上支付",
choose: true, choose: true,
}, },
{ {
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/yuezhifu.png", Id: 2,
name: "余额支付", img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/huodaofukuan.png",
name: "货到付款",
choose: false, choose: false,
}, },
{ {
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/huodaofukuan.png", Id: 3,
name: "货到付款", img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/yuezhifu.png",
name: "余额支付",
choose: false, choose: false,
}, },
], ],
...@@ -491,16 +796,19 @@ export default { ...@@ -491,16 +796,19 @@ export default {
deliveryTypeArr: [ deliveryTypeArr: [
//发货方式 //发货方式
{ {
Id: 1,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cloudypay.png", img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/cloudypay.png",
name: "快递配送", name: "快递配送",
choose: true, choose: true,
}, },
{ {
Id: 2,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/yuezhifu.png", img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/yuezhifu.png",
name: "到店自提", name: "到店自提",
choose: false, choose: false,
}, },
{ {
Id: 3,
img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/huodaofukuan.png", img: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/mallManage/huodaofukuan.png",
name: "同城配送", name: "同城配送",
choose: false, choose: false,
...@@ -508,6 +816,28 @@ export default { ...@@ -508,6 +816,28 @@ export default {
], ],
deliveryTypeStr: "快递配送", deliveryTypeStr: "快递配送",
addrStr: "退货地址", 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: { methods: {
...@@ -543,11 +873,33 @@ export default { ...@@ -543,11 +873,33 @@ export default {
}) })
.map((item) => item.name) .map((item) => item.name)
.join("、"); .join("、");
this.msg.PayWay = this.payTypeArr
.filter((item) => {
return item.choose;
})
.map((item) => item.Id)
.join(",");
if (this.payTypeStr == "") { if (this.payTypeStr == "") {
this.payTypeArr[0].choose = true; this.payTypeArr[0].choose = true;
this.payTypeStr = "线上支付"; 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) { changeDeliveryType(e) {
e.choose = !e.choose; e.choose = !e.choose;
...@@ -562,11 +914,66 @@ export default { ...@@ -562,11 +914,66 @@ export default {
this.deliveryTypeStr = "快递配送"; 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() { onLoad() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "商城设置", title: "商城设置",
}); });
this.getSetup();
}, },
}; };
</script> </script>
...@@ -667,9 +1074,10 @@ export default { ...@@ -667,9 +1074,10 @@ export default {
border-radius: 10rpx; border-radius: 10rpx;
} }
.weeek { .weeek {
max-width: 300rpx; max-width: 260rpx;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow-x: auto;
overflow-y: hidden;
font-size: 28rpx; font-size: 28rpx;
color: #606266; color: #606266;
} }
...@@ -761,4 +1169,11 @@ export default { ...@@ -761,4 +1169,11 @@ export default {
padding: 20rpx; padding: 20rpx;
} }
} }
.colTitle {
line-height: 100rpx;
}
::-webkit-scrollbar {
/*隐藏滚轮*/
display: none;
}
</style> </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