tianyi 2 days ago
parent
commit
7b1a281e5b
  1. 8
      pages/index/index.vue
  2. 6
      pages/login/login.vue
  3. 115
      pages/myCenter/shopDetail.vue
  4. 4
      pages/shop/shopReturnOrder.vue

8
pages/index/index.vue

@ -225,7 +225,6 @@
}, },
onShow() { onShow() {
this.indexInit() this.indexInit()
this.getData()
}, },
onLoad() { onLoad() {
@ -238,6 +237,7 @@
that.width = info.screenWidth * 2; that.width = info.screenWidth * 2;
} }
}); });
this.getData()
this.getBusinessStatus() this.getBusinessStatus()
if(!uni.getStorageSync('area')){ if(!uni.getStorageSync('area')){
this.checkArea() this.checkArea()
@ -264,7 +264,8 @@
}, false, 'GET', 'application/x-www-form-urlencoded').then((res) => { }, false, 'GET', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.shop = res.result this.shop = res.result
this.shop.shopIcon = uni.getStorageSync('shopIcon') this.shop.shopIcon = JSON.parse(uni.getStorageSync('area')).shop.shopIcon
this.shop.shopName = JSON.parse(uni.getStorageSync('area')).shop.shopName
this.businessStatus = res.result.status this.businessStatus = res.result.status
} else { } else {
uni.showToast({ uni.showToast({
@ -276,7 +277,10 @@
}).catch((res) => {}) }).catch((res) => {})
}, },
onClickArea(item){ onClickArea(item){
console.log('好的好的',item)
uni.setStorageSync('area',JSON.stringify(item)) uni.setStorageSync('area',JSON.stringify(item))
this.getBusinessStatus()
this.getData()
// this.searchForm.regionId = item.id // this.searchForm.regionId = item.id
// this.getDelivery(); // this.getDelivery();
// this.getShopArea(); // this.getShopArea();

6
pages/login/login.vue

@ -36,9 +36,9 @@
</view> </view>
</block> </block>
<view class="small-btn"> <view class="small-btn">
<!-- <view class="reg-btn" @click="loginType = !loginType"> <view class="reg-btn" @click="loginType = !loginType">
切换登录方式 切换登录方式
</view> --> </view>
<!-- <navigator v-if="loginType == false" class="forget-pass" url="/pages/login/regist?type=3"> <!-- <navigator v-if="loginType == false" class="forget-pass" url="/pages/login/regist?type=3">
{{i18n.login.forgetPass}} {{i18n.login.forgetPass}}
</navigator> --> </navigator> -->
@ -75,7 +75,7 @@
wayValue:0, wayValue:0,
captchaImg:'', captchaImg:'',
top: 0, top: 0,
loginType: true, loginType: false,
codetimes: '获取验证码', codetimes: '获取验证码',
timer: null, timer: null,
canshowcode: false, canshowcode: false,

115
pages/myCenter/shopDetail.vue

@ -6,7 +6,8 @@
门头图 门头图
</view> </view>
<view class="list-right" @tap="pictureAdd('mentou')"> <view class="list-right" @tap="pictureAdd('mentou')">
<view class="upload-img" v-if="shop.shopIcon ==''" style="background: #eee;text-align: center;line-height: 100rpx;"> <view class="upload-img" v-if="shop.shopIcon ==''"
style="background: #eee;text-align: center;line-height: 100rpx;">
<uni-icons type="camera" size="28" color="#777"></uni-icons> <uni-icons type="camera" size="28" color="#777"></uni-icons>
</view> </view>
<image :src="shop.shopIcon" v-if="shop.shopIcon !=''" mode="" class="upload-img"></image> <image :src="shop.shopIcon" v-if="shop.shopIcon !=''" mode="" class="upload-img"></image>
@ -25,7 +26,8 @@
副标题 副标题
</view> </view>
<view class="list-right"> <view class="list-right">
<input type="text" placeholder="请输入副标题" v-model="shop.subtitle" style="height: 100rpx;line-height: 100rpx;" /> <input type="text" placeholder="请输入副标题" v-model="shop.subtitle"
style="height: 100rpx;line-height: 100rpx;" />
</view> </view>
</view> </view>
<view class="list-1"> <view class="list-1">
@ -73,7 +75,8 @@
支付宝账号 支付宝账号
</view> </view>
<view class="list-right"> <view class="list-right">
<input type="text" placeholder="请输入支付宝账号" v-model="shop.aliAccount" style="height: 100rpx;line-height: 100rpx;" /> <input type="text" placeholder="请输入支付宝账号" v-model="shop.aliAccount"
style="height: 100rpx;line-height: 100rpx;" />
</view> </view>
</view> </view>
<view class="list-1"> <view class="list-1">
@ -81,7 +84,8 @@
支付宝实名 支付宝实名
</view> </view>
<view class="list-right"> <view class="list-right">
<input type="text" placeholder="请输入支付宝账号" v-model="shop.aliName" style="height: 100rpx;line-height: 100rpx;" /> <input type="text" placeholder="请输入支付宝账号" v-model="shop.aliName"
style="height: 100rpx;line-height: 100rpx;" />
</view> </view>
</view> </view>
</view> </view>
@ -97,30 +101,31 @@
export default { export default {
data() { data() {
return { return {
shop:{}, shop: {},
shopImages:[], shopImages: [],
huanjing:'' huanjing: ''
} }
}, },
onLoad() { onLoad() {
this.shop = JSON.parse(uni.getStorageSync('shop')); this.shop = JSON.parse(uni.getStorageSync('area')).shop;
console.log('好的好的',this.shop)
this.shopImages = this.shop.shopImages.split('@@') this.shopImages = this.shop.shopImages.split('@@')
this.huanjing = JSON.parse(this.shopImages[3])[0] this.huanjing = JSON.parse(this.shopImages[3])[0]
for (let key in this.shop) { for (let key in this.shop) {
if (this.shop[key] === null) { if (this.shop[key] === null) {
delete this.shop[key]; delete this.shop[key];
} }
} }
}, },
methods: { methods: {
navigatorTo(e){ navigatorTo(e) {
let url = "" let url = ""
if(e=='addgoods'){ if (e == 'addgoods') {
url = '/package1/myCenter/addGoods' url = '/package1/myCenter/addGoods'
}else if(e=='merchant'){ } else if (e == 'merchant') {
url = '/package1/myCenter/myMerchant' url = '/package1/myCenter/myMerchant'
}else if(e == 'xiugaixinxi'){ } else if (e == 'xiugaixinxi') {
url = '/pages/myCenter/shopDetail' url = '/pages/myCenter/shopDetail'
} }
uni.navigateTo({ uni.navigateTo({
@ -130,7 +135,7 @@
pictureAdd(type) { pictureAdd(type) {
let that = this let that = this
uni.chooseMedia({ uni.chooseMedia({
count: type == 'qita'?9:1, count: type == 'qita' ? 9 : 1,
mediaType: ['image'], mediaType: ['image'],
sourceType: ['album', 'camera'], sourceType: ['album', 'camera'],
success(res) { success(res) {
@ -139,13 +144,13 @@
mask: true mask: true
}) })
for (let i = 0; i < res.tempFiles.length; i++) { for (let i = 0; i < res.tempFiles.length; i++) {
that.upLoadFile(res.tempFiles[i].tempFilePath,type) that.upLoadFile(res.tempFiles[i].tempFilePath, type)
} }
} }
}) })
}, },
async upLoadFile(path,type) { async upLoadFile(path, type) {
let that = this; let that = this;
let hiver_token = uni.getStorageSync("hiver_token") let hiver_token = uni.getStorageSync("hiver_token")
await uni.uploadFile({ await uni.uploadFile({
@ -160,7 +165,7 @@
success: (uploadFileRes) => { success: (uploadFileRes) => {
let pathData = JSON.parse(uploadFileRes.data) let pathData = JSON.parse(uploadFileRes.data)
that.shop.shopIcon = pathData.result that.shop.shopIcon = pathData.result
that.$forceUpdate() that.$forceUpdate()
}, },
fail: (err) => { fail: (err) => {
@ -175,84 +180,94 @@
uni.hideLoading(); uni.hideLoading();
}, 1000) }, 1000)
}, },
submit(){ submit() {
console.log(this.shop) console.log(this.shop)
console.log(typeof(this.shop)) console.log(typeof(this.shop))
this.NB.sendRequest('/app/shop/edit', this.shop, false, 'PUT', 'application/x-www-form-urlencoded').then(res => { this.NB.sendRequest('/app/shop/edit', this.shop, false, 'PUT', 'application/x-www-form-urlencoded').then(
res => {
if (res.code == 200) {
uni.showModal({ if (res.code == 200) {
title: '提示', uni.showModal({
content: '更新信息成功', title: '提示',
showCancel:false, content: '更新信息成功',
success: function (res) { showCancel: false,
uni.setStorageSync('shop',this.shop) success: function(res) {
if (res.confirm) { uni.setStorageSync('shop', this.shop)
uni.navigateBack() if (res.confirm) {
uni.navigateBack()
}
} }
} });
}); } else {
} else { uni.showToast(res.message)
uni.showToast(res.message) }
} })
})
} }
} }
} }
</script> </script>
<style> <style>
page,.page1{ page,
.page1 {
width: 100%; width: 100%;
height: 100%; height: 100%;
font-size: 28rpx; font-size: 28rpx;
background: #eee; background: #eee;
} }
.list-box{
.list-box {
width: 100%; width: 100%;
height: auto; height: auto;
background: #fff; background: #fff;
margin-top: 20rpx; margin-top: 20rpx;
} }
.list-1{
.list-1 {
display: flex; display: flex;
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
line-height: 100rpx; line-height: 100rpx;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
.list-2{
.list-2 {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
line-height: 100rpx; line-height: 100rpx;
text-align: center; text-align: center;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
.list-icon{
.list-icon {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
text-align: center; text-align: center;
} }
.list-name{
.list-name {
flex: 1; flex: 1;
padding-left: 20rpx; padding-left: 20rpx;
} }
.list-right{
.list-right {
flex: 1; flex: 1;
height: 100rpx; height: 100rpx;
text-align: right; text-align: right;
padding-right: 20rpx; padding-right: 20rpx;
overflow: hidden; overflow: hidden;
} }
.upload-img{
width:60rpx; .upload-img {
width: 60rpx;
height: 60rpx; height: 60rpx;
background-size: 100%; background-size: 100%;
margin-top: 20rpx; margin-top: 20rpx;
} }
.list-2{
.list-2 {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
line-height: 100rpx; line-height: 100rpx;

4
pages/shop/shopReturnOrder.vue

@ -314,7 +314,7 @@
}else{ }else{
this.searchCountForm.linkId = uni.getStorageSync('shopId') this.searchCountForm.linkId = uni.getStorageSync('shopId')
} }
this.NB.sendRequest("/mall/refund/page", {}, false, 'POST', 'application/json').then((res) => { this.NB.sendRequest("/mall/refund/page", this.searchCountForm, false, 'POST', 'application/json').then((res) => {
if (res.code == 200) { if (res.code == 200) {
that.returnCount = res.result.records.length; that.returnCount = res.result.records.length;
that.returnData = res.result.records that.returnData = res.result.records
@ -389,7 +389,7 @@
this.returnFormData.refundTypeStatus = item.refundTypeStatus; this.returnFormData.refundTypeStatus = item.refundTypeStatus;
let that = this let that = this
this.NB.sendRequest("/mall/refund/allowOrReject", {}, false, 'POST', 'application/json').then((res) => { this.NB.sendRequest("/mall/refund/allowOrReject", this.returnFormData, false, 'POST', 'application/json').then((res) => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,

Loading…
Cancel
Save