1
This commit is contained in:
parent
4a89a7451a
commit
8c711250b9
@ -210,6 +210,12 @@
|
||||
title: "请输入付款金额"
|
||||
})
|
||||
}
|
||||
if (!this.merchantInfo || this.merchantInfo.length == 0) {
|
||||
return this.$util.Tips({
|
||||
title: "该商家当前价格下,无对应商品!"
|
||||
})
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
if (that.merchantInfo && that.merchantInfo.length > 0) {
|
||||
// 循环加入购物车
|
||||
@ -257,7 +263,7 @@
|
||||
money: that.cartForm.total_amount
|
||||
}).then(res => {
|
||||
this.loading = false;
|
||||
if (!that.cartForm.total_amount) {
|
||||
if (!that.cartForm.total_amount && !this.mer_name) {
|
||||
this.mer_name = res.data.merchant;
|
||||
} else {
|
||||
that.merchantInfo = res.data.list;
|
||||
|
@ -5,7 +5,8 @@
|
||||
|
||||
<view class="head-menu">
|
||||
<view class="iconfont icon-xiangzuo" @click="goback" style="color: #fff;"></view>
|
||||
<navigator :url="'/pages/store/list/index?mer_id='+id" hover-class="none" class="search iconfont icon-xiangyou">
|
||||
<navigator :url="'/pages/store/list/index?mer_id='+id" hover-class="none"
|
||||
class="search iconfont icon-xiangyou">
|
||||
<text class="iconfont icon-sousuo"></text>
|
||||
<text class="search-txt">搜索商品名称</text>
|
||||
<text class="search-btn">搜索</text>
|
||||
@ -31,7 +32,8 @@
|
||||
<view class="star">
|
||||
<u-rate readonly count="5" :value="score.star" size="12" activeColor="#FFBC21"
|
||||
inactiveColor="transparent"></u-rate>
|
||||
<text style="color:#FFBC21;font-size: 12px;margin: 0 10rpx 0 4rpx;">{{ score.number.toFixed(1) }}</text>
|
||||
<text
|
||||
style="color:#FFBC21;font-size: 12px;margin: 0 10rpx 0 4rpx;">{{ score.number.toFixed(1) }}</text>
|
||||
</view>
|
||||
<view class="shop-info-sale">月销{{store.sales}}+</view>
|
||||
<view v-if="store.services_type == 0" class="iconfont icon-kefu3" @click="goService"></view>
|
||||
@ -39,7 +41,8 @@
|
||||
<view v-else class="iconfont icon-kefu3" @click="call(0)"> </view>
|
||||
</view>
|
||||
<view class="shop-info-runtime" v-if="store.mer_info&&store.mer_info.mer_take_time">营业时间 :
|
||||
{{ store.mer_info.mer_take_time[0] + ' - ' + store.mer_info.mer_take_time[1] }}</view>
|
||||
{{ store.mer_info.mer_take_time[0] + ' - ' + store.mer_info.mer_take_time[1] }}
|
||||
</view>
|
||||
<view class="shop-info-runtime" v-else>营业时间 : {{ '00:00 - 00:00' }}</view>
|
||||
<view class="shop-info-addr iconfont iconfont-xiangyou" @click="showMaoLocation">
|
||||
<text>{{store.mer_address}}</text>
|
||||
@ -97,7 +100,8 @@
|
||||
<!-- #ifdef H5 -->
|
||||
<view v-for="(item, index) in styleConfig" :key="index">
|
||||
<block v-if="item.name != 'headerSerch' && item.name != 'tabNav'">
|
||||
<component :is="item.name" :index="index" :dataConfig="item" :merId="id" @detail="goGoodsDetail">
|
||||
<component :is="item.name" :index="index" :dataConfig="item" :merId="id"
|
||||
@detail="goGoodsDetail">
|
||||
</component>
|
||||
</block>
|
||||
</block>
|
||||
@ -113,7 +117,8 @@
|
||||
<combination v-if="item.name == 'combination'" :merId="id" :dataConfig="item"></combination>
|
||||
<topic v-if="item.name == 'topic'" :merId="id" :dataConfig="item"></topic>
|
||||
<coupon v-if="item.name == 'coupon'" :merId="id" :dataConfig="item"></coupon>
|
||||
<goodList v-if="item.name == 'goodList'" :merId="id" :dataConfig="item" @detail="goGoodsDetail">
|
||||
<goodList v-if="item.name == 'goodList'" :merId="id" :dataConfig="item"
|
||||
@detail="goGoodsDetail">
|
||||
</goodList>
|
||||
<guide v-if="item.name == 'guide'" :merId="id" :dataConfig="item"></guide>
|
||||
<liveBroadcast v-if="item.name == 'liveBroadcast'" :merId="id" :dataConfig="item">
|
||||
@ -132,11 +137,13 @@
|
||||
</view>
|
||||
|
||||
<!-- 首页 -->
|
||||
<view v-show="(tabActive == 3 || tabActive == 7 || diyActive == 1 || diyActive == 2) && tabActive != 5 && tabActive != 2">
|
||||
<view
|
||||
v-show="(tabActive == 3 || tabActive == 7 || diyActive == 1 || diyActive == 2) && tabActive != 5 && tabActive != 2">
|
||||
<!-- 商品 -->
|
||||
<view v-if="goods.length" class="goods-wrap" id="goods" @touchmove="onTouchmove">
|
||||
<view v-if="isColumn" class="goods column">
|
||||
<view v-for="item in goods" :key="item.product_id" class="item" @click="goGoodsDetail(item)">
|
||||
<view v-for="item in goods" :key="item.product_id" class="item"
|
||||
@click="goGoodsDetail(item)">
|
||||
<view class="image" style="width: 180rpx;height: 180rpx;">
|
||||
<image style="width: 100%;height: 100%;" :src="item.image" lazy-load></image>
|
||||
<view v-if="item.stock == 0" class="sell_out">已售罄</view>
|
||||
@ -161,7 +168,8 @@
|
||||
|
||||
<view class="price">
|
||||
<view class="price-num">
|
||||
<text class="unit-price">¥{{ item.price }}</text><text class="unit-name">/份</text>
|
||||
<text class="unit-price">¥{{ item.price }}</text><text
|
||||
class="unit-name">/份</text>
|
||||
</view>
|
||||
<view class="price-icon iconfont icon-gouwuche"></view>
|
||||
</view>
|
||||
@ -558,8 +566,7 @@
|
||||
value: 4,
|
||||
}],
|
||||
// 底部菜单
|
||||
tabs3: [
|
||||
{
|
||||
tabs3: [{
|
||||
icon: 'icon-yizhan_o',
|
||||
name: '云商品',
|
||||
value: 7,
|
||||
|
@ -192,7 +192,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item" v-if="nature_business==1">
|
||||
<!-- <view class="item" v-if="nature_business==1">
|
||||
<view class="acea-row row-middle">
|
||||
<text class="item-name">对公账号</text>
|
||||
<input type="number" placeholder="请输入对公账号" v-model="merchantData.bank_code"
|
||||
@ -243,7 +243,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="item">
|
||||
<view class="acea-row row-middle">
|
||||
@ -266,8 +266,8 @@
|
||||
<view class="item" v-if="isShowCode">
|
||||
<view class="acea-row row-middle">
|
||||
<text class="item-name">验证码</text>
|
||||
<input type="number" maxlength="4" placeholder="请输入验证码" class="codeIput" v-model="codeVal"
|
||||
@input="validateBtn" placeholder-class='placeholder' />
|
||||
<input type="number" maxlength="4" placeholder="请输入验证码" class="codeIput"
|
||||
v-model="codeVal" @input="validateBtn" placeholder-class='placeholder' />
|
||||
<view class="imageCode" @click="again">
|
||||
<image :src="codeUrl" />
|
||||
</view>
|
||||
@ -699,12 +699,12 @@
|
||||
this.street_id = resData.street_id
|
||||
this.village_id = resData.village_id;
|
||||
|
||||
const bankInfo = resData.financial_bank ? JSON.parse(resData.financial_bank) : '';
|
||||
this.$set(this.merchantData, 'bank_code', bankInfo.bank_code);
|
||||
this.$set(this.merchantData, 'bank_username', bankInfo.bank);
|
||||
this.$set(this.merchantData, 'bank_opening', bankInfo.bank_branch);
|
||||
this.$set(this.merchantData, 'bank_card_username', bankInfo.name);
|
||||
this.bank_front = bankInfo.bank_front[0] ? bankInfo.bank_front[0] : '';
|
||||
// const bankInfo = resData.financial_bank ? JSON.parse(resData.financial_bank) : '';
|
||||
// this.$set(this.merchantData, 'bank_code', bankInfo.bank_code);
|
||||
// this.$set(this.merchantData, 'bank_username', bankInfo.bank);
|
||||
// this.$set(this.merchantData, 'bank_opening', bankInfo.bank_branch);
|
||||
// this.$set(this.merchantData, 'bank_card_username', bankInfo.name);
|
||||
// this.bank_front = bankInfo.bank_front[0] ? bankInfo.bank_front[0] : '';
|
||||
|
||||
this.nature_business = resData.is_company == 1 ? 1 : 2;
|
||||
|
||||
@ -1001,15 +1001,15 @@
|
||||
village_id: this.village_id,
|
||||
is_nmsc: this.isnum,
|
||||
images: [this.business_license, ...that.pics],
|
||||
financial_bank: {
|
||||
// 开户信息
|
||||
bank_code: this.merchantData.bank_code,
|
||||
bank: this.merchantData.bank_username,
|
||||
bank_branch: this.merchantData.bank_opening,
|
||||
name: this.nature_business == 1 ? that.merchantData.company_name : this.merchantData
|
||||
.bank_card_username,
|
||||
bank_front: [this.bank_front]
|
||||
}
|
||||
// financial_bank: {
|
||||
// // 开户信息
|
||||
// bank_code: this.merchantData.bank_code,
|
||||
// bank: this.merchantData.bank_username,
|
||||
// bank_branch: this.merchantData.bank_opening,
|
||||
// name: this.nature_business == 1 ? that.merchantData.company_name : this.merchantData
|
||||
// .bank_card_username,
|
||||
// bank_front: [this.bank_front]
|
||||
// }
|
||||
}
|
||||
|
||||
that.validate = false;
|
||||
@ -1138,35 +1138,35 @@
|
||||
});
|
||||
|
||||
|
||||
if (this.nature_business == 1 && !this.merchantData.bank_code) {
|
||||
return that.$util.Tips({
|
||||
title: '请输入对公账号'
|
||||
});
|
||||
}
|
||||
// if (this.nature_business == 1 && !this.merchantData.bank_code) {
|
||||
// return that.$util.Tips({
|
||||
// title: '请输入对公账号'
|
||||
// });
|
||||
// }
|
||||
|
||||
if (this.nature_business != 1 && !this.merchantData.bank_code) {
|
||||
return that.$util.Tips({
|
||||
title: '请输入银行卡号'
|
||||
});
|
||||
}
|
||||
// if (this.nature_business != 1 && !this.merchantData.bank_code) {
|
||||
// return that.$util.Tips({
|
||||
// title: '请输入银行卡号'
|
||||
// });
|
||||
// }
|
||||
|
||||
if (!this.merchantData.bank_username) {
|
||||
return that.$util.Tips({
|
||||
title: '请输入开户银行'
|
||||
});
|
||||
}
|
||||
// if (!this.merchantData.bank_username) {
|
||||
// return that.$util.Tips({
|
||||
// title: '请输入开户银行'
|
||||
// });
|
||||
// }
|
||||
|
||||
if (!this.merchantData.bank_opening) {
|
||||
return that.$util.Tips({
|
||||
title: '请输入开户网点'
|
||||
});
|
||||
}
|
||||
// if (!this.merchantData.bank_opening) {
|
||||
// return that.$util.Tips({
|
||||
// title: '请输入开户网点'
|
||||
// });
|
||||
// }
|
||||
|
||||
if (this.nature_business == 0 && !this.merchantData.bank_card_username) {
|
||||
return that.$util.Tips({
|
||||
title: '请输入持卡人姓名'
|
||||
});
|
||||
}
|
||||
// if (this.nature_business == 0 && !this.merchantData.bank_card_username) {
|
||||
// return that.$util.Tips({
|
||||
// title: '请输入持卡人姓名'
|
||||
// });
|
||||
// }
|
||||
|
||||
that.validate = true;
|
||||
return true;
|
||||
|
@ -173,7 +173,7 @@
|
||||
}).catch((err) => {
|
||||
that.$util.Tips({
|
||||
title: err,
|
||||
icon: 'success'
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
} else { // 登录密码
|
||||
@ -191,7 +191,8 @@
|
||||
});
|
||||
}).catch(err => {
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
title: err,
|
||||
icon: "none"
|
||||
});
|
||||
})
|
||||
}
|
||||
|
@ -7,6 +7,16 @@ import {
|
||||
export const initEvent = () => {
|
||||
mp.onUniMPEventReceive(async (ret) => {
|
||||
console.log('小程序事件: ', ret);
|
||||
|
||||
// 用户如果没有注册商户 从小程序返回 入驻页面
|
||||
if (ret.event == 'closeAppToOpenShop') {
|
||||
mp.closeUniMP(ret.fromAppid, (ret) => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/store/settled/index"
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
if (ret.event == 'closeApp') {
|
||||
mp.closeUniMP(ret.fromAppid, (ret) => {
|
||||
console.log('closeUniMP: ' + JSON.stringify(ret));
|
||||
@ -33,7 +43,9 @@ export const initEvent = () => {
|
||||
// }, {provider:'gps'});
|
||||
mp.sendUniMPEvent(
|
||||
ret.fromAppid,
|
||||
'getLocation', {...res},
|
||||
'getLocation', {
|
||||
...res
|
||||
},
|
||||
(ret) => {
|
||||
console.log('Host sendEvent: ' + JSON.stringify(ret));
|
||||
});
|
||||
@ -45,7 +57,10 @@ export const initEvent = () => {
|
||||
console.log('测试');
|
||||
mp.sendUniMPEvent(
|
||||
ret.fromAppid,
|
||||
'test', { 'key': 'value', 'name': 'data' },
|
||||
'test', {
|
||||
'key': 'value',
|
||||
'name': 'data'
|
||||
},
|
||||
(ret) => {
|
||||
console.log('Host sendEvent: ' + JSON.stringify(ret));
|
||||
});
|
||||
@ -64,7 +79,8 @@ export const initEvent = () => {
|
||||
// console.log('closeUniMP: ' + JSON.stringify(ret));
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url:'/pages/goods_details/index?id='+arr1.app_goods_id
|
||||
url: '/pages/goods_details/index?id=' + arr1
|
||||
.app_goods_id
|
||||
}, 1000)
|
||||
})
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user