Compare commits

...

5 Commits

Author SHA1 Message Date
jia
623dee9859 直播 2023-10-28 16:54:59 +08:00
jia
ace704210b 代码更新 2023-10-07 19:26:33 +08:00
jia
23e0d533d4 极光推送配置 以及新增协议弹窗 等功能 2023-09-27 22:56:06 +08:00
jia
232f7710bd Merge remote-tracking branch 'remotes/origin/old' 2023-09-26 08:55:36 +08:00
mkm
bb6a3b207b Merge pull request 'old' (#1) from old into master
Reviewed-on: #1
2023-09-25 14:25:44 +08:00
82 changed files with 11978 additions and 5493 deletions

View File

@ -161,7 +161,7 @@
jpushModule.initJPushService() jpushModule.initJPushService()
jpushModule.addConnectEventListener(result => { jpushModule.addConnectEventListener(result => {
let connectEnable = result.connectEnable let connectEnable = result.connectEnable
// console.log("jpush", connectEnable) console.log("jpush连接", connectEnable)
}) })
@ -222,7 +222,8 @@
}, },
onShow() { onShow() {
let that = this let that = this
// H5 // H5
if (this.$store.state.app.token) { if (this.$store.state.app.token) {
@ -443,6 +444,7 @@
@import 'static/iconfont/iconfont.css'; @import 'static/iconfont/iconfont.css';
@import 'static/iconfont/iconlihai.css'; @import 'static/iconfont/iconlihai.css';
@import 'static/iconfont/icontan.css'; @import 'static/iconfont/icontan.css';
@import 'static/iconfont/demo.css';
@import 'static/css/style.scss'; @import 'static/css/style.scss';

View File

@ -5,7 +5,7 @@ import request from "@/utils/request.js";
* *
*/ */
export function cloudWarehouse(data) { export function cloudWarehouse(data) {
return request.get("store/product/cloudWarehouse", data); return request.get("store/product/cloudWarehouse", data, { noAuth: true });
} }
/** /**
* 获取云仓分类 * 获取云仓分类

View File

@ -7,7 +7,7 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import request from "@/utils/request.js"; import request from "@/utils/requesta.js";
/** 获取话题分类*/ /** 获取话题分类*/
export function getTopicList() { export function getTopicList() {
@ -83,7 +83,9 @@ export function videoList(data) {
} }
/**自己的视频列表*/ /**自己的视频列表*/
export function deoList(id) { export function deoList(id) {
return request.get(`community/show/${id}`); return request.get(`community/show/${id}`, {
noAuth: true
});
} }
export function myVideoList(id,data) { export function myVideoList(id,data) {

144
api/live.js Normal file
View File

@ -0,0 +1,144 @@
import request from "@/utils/requestc.js";
import requesta from "@/utils/request.js";
/**
* 直播列表
*/
export function live(data) {
return request.get("zhibo/live" ,data);
}
/**
* 直播详情
*/
export function liveDetail(data) {
return request.get("zhibo/liveDetail" ,data);
}
/**
* 获取直播详情接口
*/
/**
* 创建直播间
*/
export function createPushLive(data) {
return request.post("zhibo/createPushLive", data);
}
/**
* 关闭直播间
*/
export function stopPushLive(data) {
return request.post("zhibo/stopPushLive", data);
}
/**
* 绑定用户client客户
*/
export function bindUser(data) {
return request.post("zhibo/bindUser", data);
}
/**
* 加入直播间聊天室
*/
export function joinChatRoom(data) {
return request.post("zhibo/joinChatRoom", data);
}
/**
* 直播间聊天室发言
*/
export function sendGroupMessage(data) {
return request.post("zhibo/sendGroupMessage", data);
}
//商品列表
export function good(data) {
return requesta.get("product/spu/lst", data);
}
/**
* 获取用户信息
*
*/
export function getUserInfo() {
return request.get('user');
}
//关注
export function getfans(id,data) {
return requesta.post('community/fans/'+id,data);
}
//我关注的人
export function getfocuslst(data) {
return requesta.post('community/focus/lst',data);
}
//关注我的人
export function getfanslst(data) {
return requesta.post('community/fans/lst',data);
}
//用户送礼
export function reward(data) {
return request.post('zhibo/reward',data);
}
//获取礼物
export function rewardList(data) {
return requesta.get('zhibo/rewardList',data);
}
//获取礼物
export function giftList(data) {
return request.get('zhibo/giftList',data);
}
//获取房间人数
export function liveAudience(data) {
return request.get('zhibo/liveAudience',data);
}
//获取用户余额
export function getuser(data) {
return requesta.get('user',data);
}
//送礼
export function sendGift(data) {
return request.post('zhibo/sendGift',data);
}
/**
* 充值金额选择
*/
export function getRechargeApi() {
return requesta.get("common/recharge_quota");
}
//历史直播记录
export function playbackList(data) {
return request.get("zhibo/playbackList",data);
}
//获取直播回放详情
export function playbackDetail(data) {
return request.get("zhibo/playbackDetail",data);
}
//获取观众关注主播状态
export function getAjuser(id) {
return requesta.get(`community/user/info/${id}`);
}

View File

@ -1,4 +1,5 @@
import request from "@/utils/request.js"; import request from "@/utils/request.js";
import requestb from "@/utils/requestb.js";
/** /**
* 扫码查询商品 * 扫码查询商品
@ -578,8 +579,7 @@ export function vicinityStoreApi(data) {
商家入驻 -- 获取商户入驻申请协议内容 商家入驻 -- 获取商户入驻申请协议内容
*/ */
export function agreeiness(data) { export function agreeiness(data) {
return request.get(`business/agree`, data, { noAuth: true }); return request.get(`business/agree`, data, {
} noAuth: true
});
}

View File

@ -16,3 +16,12 @@ export function getGXconfig(data) {
return request.get("global/config", data); return request.get("global/config", data);
} }
/**
* 获取商城小程序信息
*/
export function miniapp(data) {
return request.get("miniapp/version?version=1", data);
}

View File

@ -0,0 +1,168 @@
<template>
<view class="men-ban box " v-if ='isShow' @touchmove.stop.prevent="">
<view class="box_next">
<view class="box_next_title">
<text class="box_next_title_z">{{title}}</text>
</view>
<slot></slot>
<view class="box_next_but_d" v-if="isBut">
<view @click='show' class="box_next_but_d_but">
<text class="box_next_but_d_but_text">{{nName}}</text>
</view>
</view>
<view class="box_next_but_s" v-else>
<view class="box_next_but_s_lbut" @click="lEvent">
<text class="box_next_but_d_but_text">{{lName}}</text>
</view>
<view @click="rEvent" class="box_next_but_s_rbut" hover-class="zcolor-while1">
<text class="box_next_but_d_but_text">{{rName}}</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
title: {
type: String,
default: "温馨提示"
},
isShow: {
type: Boolean,
default: true
},
nName: String,
lName: String,
rName: String,
isBut: {
type: Boolean,
default: true
}
},
methods: {
show() {
this.$emit('show');
},
lEvent() {
this.$emit('lEvent');
},
rEvent() {
this.$emit('rEvent');
},
}
}
</script>
<style scoped>
.men-ban {
position: fixed;
bottom: 0;
right: 0;
left: 0;
top: 0;
z-index: 999999;
background-color: rgba(0, 0, 0, 0);
}
.box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
}
.box_next {
background-color: #ffffff;
width: 550rpx;
border-radius: 30rpx;
}
.box_next_title {
padding: 30rpx 30rpx 0 30rpx;
}
.box_next_title_z {
font-size: 31rpx;
font-weight: bold;
}
.box_next_but_d {
width: 550rpx;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
height: 130rpx;
}
.box_next_but_d_but {
width: 500rpx;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
height: 80rpx;
border-radius: 50rpx;
background-color: #fee610;
}
.box_next_but_d_but_text {
font-size: 30rpx;
font-weight: bold;
}
.box_next_but_s {
width: 550rpx;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: space-around;
align-items: center;
height: 130rpx;
}
.box_next_but_s_lbut {
width: 200rpx;
background-color: #f1f1f1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
height: 80rpx;
border-radius: 50rpx;
}
.box_next_but_s_rbut {
width: 200rpx;
background-color: #fee610;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
height: 80rpx;
border-radius: 50rpx;
}
</style>

View File

@ -2,7 +2,7 @@
<view class="orderGoods" :style="viewColor"> <view class="orderGoods" :style="viewColor">
<view class='goodWrapper' :class="'item'+orderData.order_type"> <view class='goodWrapper' :class="'item'+orderData.order_type">
<view v-if="orderData.order_type == 1" class="title acea-row row-between-wrapper"> <view v-if="orderData.order_type == 1" class="title acea-row row-between-wrapper">
<view class="item-status" :class="'status'+evaluate">{{evaluate == 0 ? '待核销' : '已核销'}}</view> <view class="item-status" :class="'status'+evaluate">{{evaluate == 7 ? '待核销' : '已核销'}}</view>
<view v-if="evaluate != 0 && orderData.verify_time" class="item-date">{{orderData.verify_time}}</view> <view v-if="evaluate != 0 && orderData.verify_time" class="item-date">{{orderData.verify_time}}</view>
</view> </view>
<view v-for="(item,index) in cartInfo" :key="index"> <view v-for="(item,index) in cartInfo" :key="index">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -6,10 +6,11 @@ let openPlantGrass = '-openPlantGrass-'
let httpApi let httpApi
let httpApiTwo let httpApiTwo
let httpApiThree let httpApiThree
let httpApiFour
// 在打包之前请检查当前环境是否正确 // 在打包之前请检查当前环境是否正确
// const env = 'dev'; // 开发 const env = 'dev'; // 开发
const env = 'prod'; // 生产 // const env = 'prod'; // 生产
// const env = 'prew'; // 预上线 // const env = 'prew'; // 预上线
switch (env) { switch (env) {

View File

@ -130,6 +130,7 @@ export function Modal(title = '提示', content = '这是一个模态弹窗!', o
}) { }) {
return new Promise((reslove, reject) => { return new Promise((reslove, reject) => {
uni.showModal({ uni.showModal({
...obj,
title: title, title: title,
content: content, content: content,
success: (res) => { success: (res) => {

View File

@ -2,8 +2,10 @@
"name" : "惠农生活", "name" : "惠农生活",
"appid" : "__UNI__3A527D1", "appid" : "__UNI__3A527D1",
"description" : "", "description" : "",
"versionName" : "1.4.4", "versionName" : "1.4.7",
"versionCode" : 144, "versionCode" : 147,
"versionName" : "1.4.7",
"versionCode" : 147,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
@ -31,7 +33,8 @@
"UniMP" : { "UniMP" : {
"description" : "uni小程序" "description" : "uni小程序"
}, },
"Maps" : {} "Maps" : {},
"Push" : {}
}, },
"safearea" : { "safearea" : {
"bottom" : { "bottom" : {
@ -103,13 +106,13 @@
"weixin" : { "weixin" : {
"__platform__" : [ "ios", "android" ], "__platform__" : [ "ios", "android" ],
"appid" : "wx9d68c92b550ddd1e", "appid" : "wx9d68c92b550ddd1e",
"UniversalLinks" : "https://mer.crmeb.net/" "UniversalLinks" : "https://shop.lihaink.cn/"
} }
}, },
"share" : { "share" : {
"weixin" : { "weixin" : {
"appid" : "wx9d68c92b550ddd1e", "appid" : "wx9d68c92b550ddd1e",
"UniversalLinks" : "https://mer.crmeb.net/" "UniversalLinks" : "https://shop.lihaink.cn/"
} }
}, },
"geolocation" : { "geolocation" : {
@ -120,7 +123,8 @@
} }
}, },
"oauth" : {}, "oauth" : {},
"ad" : {} "ad" : {},
"push" : {}
}, },
"icons" : { "icons" : {
"android" : { "android" : {
@ -160,8 +164,8 @@
}, },
"nativePlugins" : { "nativePlugins" : {
"JG-JCore" : { "JG-JCore" : {
"JPUSH_APPKEY_IOS" : "b5f679f4357018605ea6fd2e", "JPUSH_APPKEY_IOS" : "8a5efd65cda14fafa6e64ad3",
"JPUSH_CHANNEL_IOS" : "", "JPUSH_CHANNEL_IOS" : "8a5efd65cda14fafa6e64ad3",
"JPUSH_APPKEY_ANDROID" : "b5f679f4357018605ea6fd2e", "JPUSH_APPKEY_ANDROID" : "b5f679f4357018605ea6fd2e",
"JPUSH_CHANNEL_ANDROID" : "", "JPUSH_CHANNEL_ANDROID" : "",
"__plugin_info__" : { "__plugin_info__" : {
@ -178,7 +182,7 @@
"JPUSH_APPKEY_IOS" : { "JPUSH_APPKEY_IOS" : {
"des" : "[iOS]极光portal配置应用信息时分配的AppKey", "des" : "[iOS]极光portal配置应用信息时分配的AppKey",
"key" : "JCore:APP_KEY", "key" : "JCore:APP_KEY",
"value" : "7869a2f94b120cfb4431b96f" "value" : "daebe19b547c43128796a078"
}, },
"JPUSH_CHANNEL_IOS" : { "JPUSH_CHANNEL_IOS" : {
"des" : "[iOS]用于统计分发渠道不需要可填默认值developer-default", "des" : "[iOS]用于统计分发渠道不需要可填默认值developer-default",
@ -199,9 +203,9 @@
} }
}, },
"JG-JPush" : { "JG-JPush" : {
"JPUSH_ISPRODUCTION_IOS" : "", "JPUSH_ISPRODUCTION_IOS" : "true",
"JPUSH_ADVERTISINGID_IOS" : "", "JPUSH_ADVERTISINGID_IOS" : "",
"JPUSH_DEFAULTINITJPUSH_IOS" : "", "JPUSH_DEFAULTINITJPUSH_IOS" : "true",
"JPUSH_OPPO_APPKEY" : "", "JPUSH_OPPO_APPKEY" : "",
"JPUSH_OPPO_APPID" : "", "JPUSH_OPPO_APPID" : "",
"JPUSH_OPPO_APPSECRET" : "", "JPUSH_OPPO_APPSECRET" : "",

View File

@ -125,6 +125,7 @@
"path": "pages/moreProject/moreProject", "path": "pages/moreProject/moreProject",
"style": { "style": {
"navigationBarTitleText": "商户平台", "navigationBarTitleText": "商户平台",
"navigationStyle": "custom",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -150,7 +151,7 @@
"path" : "pages/margin/margin", "path" : "pages/margin/margin",
"style" : "style" :
{ {
"navigationBarTitleText": "", "navigationBarTitleText":"缴纳保证金",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -838,7 +839,7 @@
}, { }, {
"path": "payment/payment", "path": "payment/payment",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "支付",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -990,6 +991,8 @@
{ {
"path": "settled/index", "path": "settled/index",
"style": { "style": {
"navigationStyle": "custom",
"navigationBarTitleText": "商家入驻" "navigationBarTitleText": "商家入驻"
} }
}, { }, {

View File

@ -91,6 +91,7 @@
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import emptyPage from '@/components/emptyPage.vue' import emptyPage from '@/components/emptyPage.vue'
import { configMap } from '@/utils'; import { configMap } from '@/utils';
import { navigateBack } from '../../../libs/uniApi';
const app = getApp(); const app = getApp();
export default { export default {
components: { components: {
@ -198,6 +199,14 @@
that.$util.Tips({ that.$util.Tips({
title: res.message title: res.message
}); });
if(res.status==200){
// uni.redirectTo({
// url:'/admin/orderList/index?types=4&merId='+that.mer_id
// })
uni.navigateBack({
delta:2
})
}
that.getOrderData(); that.getOrderData();
}) })
.catch(res => { .catch(res => {

View File

@ -146,7 +146,7 @@
</view> </view>
</view> </view>
<view style="height:120upx;"></view> <view style="height:120upx;"></view>
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'" style="margin-bottom: var(--status-bar-height);"> <view class="footer acea-row row-right row-middle" v-if="goname != 'looks'" style="padding-bottom: var(--status-bar-height);">
<view class="more"></view> <view class="more"></view>
<view class="bnt cancel" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12" @click="tongyi(order_id,1)"> <view class="bnt cancel" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12" @click="tongyi(order_id,1)">
同意 同意
@ -376,8 +376,11 @@
/*核销订单*/ /*核销订单*/
goCancellation() { goCancellation() {
let that = this; let that = this;
// uni.navigateTo({
// url: '/pages/admin/cancellate_result/index?mer_id='+that.mer_id+'&code='+that.orderInfo.verify_code,
// })
uni.navigateTo({ uni.navigateTo({
url: '/pages/admin/cancellate_result/index?mer_id='+that.mer_id+'&code='+that.orderInfo.verify_code, url: `/pages/admin/order_cancellation/index?mer_id=${that.mer_id}`
}) })
// uni.showModal({ // uni.showModal({
// title: '', // title: '',

View File

@ -293,6 +293,9 @@
this.merId = option.merId; this.merId = option.merId;
this.getIndex(); this.getIndex();
}, },
onShow(){
this.getIndex();
},
methods: { methods: {
// //
popUpClose() { popUpClose() {
@ -553,6 +556,7 @@
uni.navigateTo({ uni.navigateTo({
url: `/pages/admin/orderDetail/index?id=${item.order_id}&mer_id=${item.mer_id}` url: `/pages/admin/orderDetail/index?id=${item.order_id}&mer_id=${item.mer_id}`
}) })
}, },
toRefundDetail(item) { toRefundDetail(item) {
uni.navigateTo({ uni.navigateTo({

View File

@ -134,11 +134,15 @@
}) })
} }
} }
let params = { let params = {
status: that.status, status: that.status,
fail_message: that.fail_message fail_message: that.fail_message
} }
if(that.orderInfo.refund_type == 2){
if(that.orderInfo.refund_type == 2 && that.status != -1){
if (!that.refundInfo.mer_delivery_user) { if (!that.refundInfo.mer_delivery_user) {
return that.$util.Tips({ return that.$util.Tips({
title: '请填写收货人姓名' title: '请填写收货人姓名'

View File

@ -122,6 +122,7 @@
}, },
// //
scanCode() { scanCode() {
var self = this; var self = this;
// #ifdef MP || APP-PLUS // #ifdef MP || APP-PLUS
wx.scanCode({ wx.scanCode({
@ -129,11 +130,14 @@
success(res) { success(res) {
self.verify_code = res.result self.verify_code = res.result
// console.log(self.verify_code); // console.log(self.verify_code);
console.log('111',self.mer_id,self.verify_code)
verifierOrder(self.mer_id,self.verify_code) verifierOrder(self.mer_id,self.verify_code)
.then(res => { .then(res => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/admin/cancellate_result/index?code='+self.verify_code+'&mer_id='+self.mer_id url: '/pages/admin/orderList/index?types=2'+'&mer_id='+self.mer_id
}); });
}) })
.catch(res => { .catch(res => {
self.verify_code = '' self.verify_code = ''
@ -161,9 +165,11 @@
scanType: ["qrCode", "barCode"] scanType: ["qrCode", "barCode"]
}).then(res=>{ }).then(res=>{
this.verify_code = res.resultStr this.verify_code = res.resultStr
uni.navigateTo({ uni.navigateTo({
url: '/pages/admin/cancellate_result/index?code='+self.verify_code+'&mer_id='+self.mer_id url: '/pages/admin/orderList/index?types=2'+'&mer_id='+self.mer_id
}); });
// this.codeChange(); // this.codeChange();
}).catch(res => { }).catch(res => {
this.$util.Tips({ this.$util.Tips({

View File

@ -53,7 +53,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <div class="broadcast_details_tit">
{{val.product.cart_info.product.store_name}}</div> {{val.product.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic"> <div class="broadcast_details_pic">
{{ item.refundOrder.refund_price }} {{ item.refundOrder.refund_price }}
</div> </div>
@ -89,7 +90,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <div class="broadcast_details_tit">
{{val.cart_info.product.store_name}}</div> {{val.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic"> <div class="broadcast_details_pic">
{{ item.orderInfo.pay_price }} {{ item.orderInfo.pay_price }}
</div> </div>
@ -114,7 +116,8 @@
{{ item.product.price }} {{ item.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.product.store_name}}</div> {{item.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -135,7 +138,8 @@
{{ item.presell.price }} {{ item.presell.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.presell.store_name}}</div> {{item.presell.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -143,7 +147,7 @@
<!--拼团商品链接--> <!--拼团商品链接-->
<div class="conter acea-row row-middle" <div class="conter acea-row row-middle"
v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product"> v-if="item.msn_type === 8 && item.productGroup && item.productGroup.product">
<div class=" noPad"> <div class="noPad">
<navigator class="acea-row row-column-around noPad" <navigator class="acea-row row-column-around noPad"
v-if="item.productGroup.product_group_id" v-if="item.productGroup.product_group_id"
:url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`" :url="`/pages/activity/combination_details/index?id=${item.productGroup.product_group_id}`"
@ -156,7 +160,8 @@
{{ item.productGroup.product.price }} {{ item.productGroup.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.productGroup.product.store_name}}</div> {{item.productGroup.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -207,7 +212,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <div class="broadcast_details_tit">
{{val.product.cart_info.product.store_name}}</div> {{val.product.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic"> <div class="broadcast_details_pic">
{{ item.refundOrder.refund_price }} {{ item.refundOrder.refund_price }}
</div> </div>
@ -216,6 +222,7 @@
</div> </div>
</div> </div>
</navigator> </navigator>
<!--订单链接--> <!--订单链接-->
<div v-if="item.msn_type === 5 && item.orderInfo.order_id"> <div v-if="item.msn_type === 5 && item.orderInfo.order_id">
<div class="broadcast-details_num acea-row row-middle"> <div class="broadcast-details_num acea-row row-middle">
@ -243,7 +250,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <div class="broadcast_details_tit">
{{val.cart_info.product.store_name}}</div> {{val.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic"> <div class="broadcast_details_pic">
{{ item.orderInfo.pay_price }} {{ item.orderInfo.pay_price }}
</div> </div>
@ -267,7 +275,8 @@
{{ item.product.price }} {{ item.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.product.store_name}}</div> {{item.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -288,7 +297,8 @@
{{ item.presell.price }} {{ item.presell.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.presell.store_name}}</div> {{item.presell.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -309,7 +319,8 @@
{{ item.productGroup.product.price }} {{ item.productGroup.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.productGroup.product.store_name}}</div> {{item.productGroup.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -358,6 +369,7 @@
<block v-for="(items,index) in history" v-if="userId == 0" :key="items.time"> <block v-for="(items,index) in history" v-if="userId == 0" :key="items.time">
<div class="create_time">{{items.time}}</div> <div class="create_time">{{items.time}}</div>
<block v-for="(item,j) in items.children" :key="item.service_log_id"> <block v-for="(item,j) in items.children" :key="item.service_log_id">
<!-- 左边 --> <!-- 左边 -->
<div class="item acea-row row-top" v-if="item.send_type == 1"> <div class="item acea-row row-top" v-if="item.send_type == 1">
<div v-if="item.msn_type !== 100" class="pictrue"> <div v-if="item.msn_type !== 100" class="pictrue">
@ -388,7 +400,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <div class="broadcast_details_tit">
{{val.product.cart_info.product.store_name}}</div> {{val.product.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic"> <div class="broadcast_details_pic">
{{ val.product.cart_info.productAttr.price }} {{ val.product.cart_info.productAttr.price }}
</div> </div>
@ -425,7 +438,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <div class="broadcast_details_tit">
{{val.cart_info.product.store_name}}</div> {{val.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic"> <div class="broadcast_details_pic">
{{ item.orderInfo.pay_price }} {{ item.orderInfo.pay_price }}
</div> </div>
@ -450,7 +464,8 @@
{{ item.product.price }} {{ item.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.product.store_name}}</div> {{item.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -471,7 +486,8 @@
{{ item.presell.price }} {{ item.presell.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.presell.store_name}}</div> {{item.presell.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -492,7 +508,8 @@
{{ item.productGroup.product.price }} {{ item.productGroup.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.productGroup.product.store_name}}</div> {{item.productGroup.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -534,7 +551,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <div class="broadcast_details_tit">
{{val.product.cart_info.product.store_name}}</div> {{val.product.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic"> <div class="broadcast_details_pic">
{{item.refundOrder.refund_num}}件商品 {{item.refundOrder.refund_num}}件商品
合计 {{ item.refundOrder.refund_price }} 合计 {{ item.refundOrder.refund_price }}
@ -571,7 +589,8 @@
</div> </div>
<div class="broadcast_details_picBox noPad"> <div class="broadcast_details_picBox noPad">
<div class="broadcast_details_tit"> <div class="broadcast_details_tit">
{{val.cart_info.product.store_name}}</div> {{val.cart_info.product.store_name}}
</div>
<div class="broadcast_details_pic"> <div class="broadcast_details_pic">
{{ item.orderInfo.pay_price }} {{ item.orderInfo.pay_price }}
</div> </div>
@ -596,7 +615,8 @@
{{ item.product.price }} {{ item.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.product.store_name}}</div> {{item.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -617,7 +637,8 @@
{{ item.presell.price }} {{ item.presell.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.presell.store_name}}</div> {{item.presell.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -638,7 +659,8 @@
{{ item.productGroup.product.price }} {{ item.productGroup.product.price }}
</div> </div>
<div class="broadcast_details_tit_no line1"> <div class="broadcast_details_tit_no line1">
{{item.productGroup.product.store_name}}</div> {{item.productGroup.product.store_name}}
</div>
</div> </div>
</navigator> </navigator>
</div> </div>
@ -778,7 +800,7 @@
</view> </view>
</div> </div>
</form> </form>
<div class="banner slider-banner"> <div class="banner slider-banner" >
<swiper class="swiper-wrapper" :autoplay="autoplay" :circular="circular" :interval="interval" <swiper class="swiper-wrapper" :autoplay="autoplay" :circular="circular" :interval="interval"
:duration="duration" v-if="emojiGroup.length > 0"> :duration="duration" v-if="emojiGroup.length > 0">
<block v-for="(emojiList, index) in emojiGroup" :key="index"> <block v-for="(emojiList, index) in emojiGroup" :key="index">
@ -786,10 +808,12 @@
<i class="em" :class="emoji" :style="'background-image:url('+ httpUrl +')'" <i class="em" :class="emoji" :style="'background-image:url('+ httpUrl +')'"
v-for="emoji in emojiList" :key="emoji" @click="addEmoji(emoji)"></i> v-for="emoji in emojiList" :key="emoji" @click="addEmoji(emoji)"></i>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
</div> </div>
</div> </div>
<div class="recording" v-if="recording"> <div class="recording" v-if="recording">
<image src="/static/images/recording.png" /> <image src="/static/images/recording.png" />
@ -1212,8 +1236,7 @@
let self = this let self = this
self.$util.uploadImageOne('upload/image', function(res) { self.$util.uploadImageOne('upload/image', function(res) {
if (res.status == 200) { if (res.status == 200) {
self.sendMsg(res.data.path, 3 self.sendMsg(res.data.path, 3)
)
} }
}); });
}, },
@ -1603,7 +1626,7 @@
margin-top: 20rpx; margin-top: 20rpx;
width: 710rpx; width: 710rpx;
position: fixed; position: fixed;
bottom: 120rpx; bottom: 160rpx;
left: 20rpx; left: 20rpx;
.broadcast-details_box, .broadcast-details_box,
@ -1790,6 +1813,7 @@
.broadcast-details .chat .item .text { .broadcast-details .chat .item .text {
margin-left: 20rpx; margin-left: 20rpx;
} }
.broadcast-details .chat .item .text.textR { .broadcast-details .chat .item .text.textR {
@ -1943,19 +1967,23 @@
transition: all 0.005s cubic-bezier(0.25, 0.5, 0.5, 0.9); transition: all 0.005s cubic-bezier(0.25, 0.5, 0.5, 0.9);
background-color: #fff; background-color: #fff;
position: fixed; position: fixed;
bottom: 0; bottom:var(--status-bar-height);
left: 0; left: 0;
margin-bottom: var(--status-bar-height);;
} }
.broadcast-details .footerCon.on { .broadcast-details .footerCon.on {
position: relative; position: relative;
top: -300rpx; top: -360rpx;
transform: translate3d(0, 0, 0) !important; transform: translate3d(0, 0, 0) !important;
} }
.broadcast-details .footerCon .banner { .broadcast-details .footerCon .banner {
background: #fff; background: #fff;
padding-top: var(--status-bar-height);
} }
.broadcast-details .footerCon .banner .swiper-slide { .broadcast-details .footerCon .banner .swiper-slide {
@ -1971,7 +1999,7 @@
display: block; display: block;
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
margin: 40rpx 0 0 50rpx; margin: 20rpx 0 0 40rpx;
} }
.broadcast-details .footerCon .banner .swiper-container-horizontal>.swiper-pagination-bullets { .broadcast-details .footerCon .banner .swiper-container-horizontal>.swiper-pagination-bullets {
@ -1980,6 +2008,10 @@
.broadcast-details .footerCon .slider-banner .swiper-pagination-bullet-active { .broadcast-details .footerCon .slider-banner .swiper-pagination-bullet-active {
background-color: #999; background-color: #999;
} }
.broadcast-details .recording { .broadcast-details .recording {
@ -2036,6 +2068,8 @@
padding: 0 80rpx 0 30rpx; padding: 0 80rpx 0 30rpx;
height: 76rpx; height: 76rpx;
position: relative; position: relative;
} }
.broadcast-details .footer .placeholder { .broadcast-details .footer .placeholder {
@ -2064,7 +2098,9 @@
display: inline-block; display: inline-block;
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
margin: 40rpx 0 0 50rpx;
margin: 20rpx 0 0 40rpx;
} }
.emoji-outer { .emoji-outer {

View File

@ -62,6 +62,9 @@
serviceList, serviceList,
serviceUserList serviceUserList
} from "@/api/user"; } from "@/api/user";
import {
getUserInfo
} from '@/api/user.js';
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
export default { export default {
name: "CustomerList", name: "CustomerList",
@ -88,13 +91,9 @@
computed: mapGetters(['isLogin','viewColor']), computed: mapGetters(['isLogin','viewColor']),
onLoad(optios) { onLoad(optios) {
this.type = optios.type; this.type = optios.type;
this.mer_id = optios.mer_id;
if(this.isLogin){
this.getList(this.mer_id) this.getindex()
} else {
this.isAuto = true;
this.isShowAuth = true
}
}, },
onShow(option) { onShow(option) {
if(this.isLogin){ if(this.isLogin){
@ -119,6 +118,21 @@
this.clear = true; this.clear = true;
}, },
methods: { methods: {
//
getindex(){
getUserInfo().then(res => {
this.mer_id = res.data.service.mer_id;
if(this.isLogin){
this.getList(this.mer_id)
} else {
this.isAuto = true;
this.isShowAuth = true
}
// this.getList(this.mer_id)
// this.getList(res.data.service.mer_id, true);
});
},
onLoadFun() { onLoadFun() {
this.isShowAuth = false; this.isShowAuth = false;
this.getList(this.mer_id); this.getList(this.mer_id);
@ -217,7 +231,7 @@
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.CustomerList { .CustomerList {
.spin { .spin {
display: block; display: block;

View File

@ -5,9 +5,10 @@
<view class="back" @click='set_where(1)'> <view class="back" @click='set_where(1)'>
<view class="iconfont icon-xiangzuo"></view> <view class="iconfont icon-xiangzuo"></view>
</view> </view>
<view class='input acea-row row-between-wrapper'><text class='iconfont icon-sousuo'></text> <view class='input acea-row row-between-wrapper'>
<input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search" <text class='iconfont icon-sousuo'></text>
:value='where.keyword' @confirm="searchSubmit" @input="inputChange"></input> <input placeholder='搜索商品名称' placeholder-class='placeholder' confirm-type='search' name="search"
:value='where.keyword' @confirm="searchSubmit" @input="inputChange">
</view> </view>
<view style="text-align: right;" v-if="tabIndex==1" class='iconfont' <view style="text-align: right;" v-if="tabIndex==1" class='iconfont'
:class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view> :class='is_switch==true?"icon-pailie":"icon-tupianpailie"' @click='Changswitch'></view>

View File

@ -109,8 +109,8 @@
</view> </view>
<view class="content_bootm"> <view class="content_bootm">
<view class="content_bootm_txt"> <view class="content_bootm_txt" v-if="objinfo.product_list.length>0">
查看TA提到的宝贝(2) 查看TA提到的宝贝({{objinfo.product_list.length}})
</view> </view>
@ -124,7 +124,7 @@
</view> </view>
</view> </view>
<button class="release_btn button" v-if="objinfo.mer_status==1&&type==1" @click="submit(objinfo)">发布</button> <!-- <button class="release_btn button" v-if="objinfo.mer_status==1&&type==1" @click="submit(objinfo)">发布</button> -->
</view> </view>
</template> </template>

View File

@ -227,6 +227,7 @@
import emptyPage from '@/components/emptyPage.vue'; import emptyPage from '@/components/emptyPage.vue';
import { import {
entrustlist, entrustlist,
addEntrustCart,
finishchain, finishchain,
checkchain checkchain
} from '@/api/sale.js' } from '@/api/sale.js'
@ -365,9 +366,25 @@
}, },
// //
order(item) { order(item) {
uni.navigateTo({ // uni.navigateTo({
url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id + '&type=1' // url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id + '&type=1'
}) // })
addEntrustCart({
community_id: item.community_id
}).then(res => {
if (res.status == 200) {
this.$util.Tips({
title: res.message,
icon: 'success'
})
uni.navigateTo({
url: '/pages/users/order_confirm/index?cartId=' + res.data.cart_id.toString()
})
}
})
}, },
// //
deteragrss(item) { deteragrss(item) {

View File

@ -1,11 +1,9 @@
<template> <template>
<view class="gather"> <view class="gather">
<view v-if="isFshow"> <view v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{ 'opacity': backColor,}" @click="selectLocation"> <view class="site-box flex_a_c_j_sb" :style="{ opacity: backColor }" @click="selectLocation">
<view :class="['place_wrapper', 'flex_a_c', isFshow ? 'sitebox' : '']" @click="selectLocation"> <view :class="['place_wrapper', 'flex_a_c', isFshow ? 'sitebox' : '']" @click="selectLocation">
<view :class="['iconfont', 'icon-weizhi', isFshow ? 'sitebox' : '']" style=" margin-left: 20rpx"> <view :class="['iconfont', 'icon-weizhi', isFshow ? 'sitebox' : '']" style="margin-left: 20rpx">
</view> </view>
<view class="town_name">{{ street }}</view> <view class="town_name">{{ street }}</view>
</view> </view>
@ -13,24 +11,20 @@
<view :class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']"></view> <view :class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']"></view>
</navigator> </navigator>
</view> </view>
</view> </view>
<view class="" v-if="!isFshow"> <view class="" v-if="!isFshow">
<view class="site-box1 flex_a_c_j_sb"> <view class="site-box1 flex_a_c_j_sb">
<view class="place_wrapper flex_a_c" @click="selectLocation"> <view class="place_wrapper flex_a_c" @click="selectLocation">
<view class="iconfont icon-weizhi"></view> <view class="iconfont icon-weizhi"></view>
<view class="town_name">{{street}}</view> <view class="town_name">{{ street }}</view>
</view> </view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none"> <navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view class="iconfont icon-xiaoxi" style="color:#fff;"> </view> <view class="iconfont icon-xiaoxi" style="color: #fff"> </view>
</navigator> </navigator>
</view> </view>
</view> </view>
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" :town="street"></zbpSwiper>
<zbpSwiper :isSelectPlace="true" :location_Arr="locationArr" :town="street" ></zbpSwiper>
<u-empty :show="jurisdiction" mode="permission" :text="emptyText" <u-empty :show="jurisdiction" mode="permission" :text="emptyText"
icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty> icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty>
<view class="business com special_work" v-if="jurisdiction == false"> <view class="business com special_work" v-if="jurisdiction == false">
@ -64,8 +58,7 @@
<view class="content"> <view class="content">
<u-transition v-for="(item, index) in AllMenuList" :key="item.name" show> <u-transition v-for="(item, index) in AllMenuList" :key="item.name" show>
<view class="examine" @click="pushMenu(item)"> <view class="examine" @click="pushMenu(item)">
<image class="icon_img" :src="item.icon" mode="aspectFit"> <image class="icon_img" :src="item.icon" mode="aspectFit"> </image>
</image>
<u-icon class="icon" name="plus-circle-fill"></u-icon> <u-icon class="icon" name="plus-circle-fill"></u-icon>
<text class="text">{{ item.name }}</text> <text class="text">{{ item.name }}</text>
</view> </view>
@ -73,8 +66,7 @@
</view> </view>
</view> </view>
<u-picker :defaultIndex="[0, 0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
<u-picker :defaultIndex="[0,0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker> @cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
<!-- <m-tabbar native> <!-- <m-tabbar native>
<template v-slot:tabbar_index_2> <template v-slot:tabbar_index_2>
@ -126,7 +118,7 @@
components: { components: {
mTabbar, mTabbar,
zbpSwiper zbpSwiper
}, },
data() { data() {
return { return {
@ -149,7 +141,8 @@
AllMenuList: [{ AllMenuList: [{
name: '商户平台', name: '商户平台',
icon: '/static/applet/shop_app.png', icon: '/static/applet/shop_app.png',
data: '/pages/moreProject/moreProject', data: "__UNI__1EE148C",
type: 2, type: 2,
}, },
{ {
@ -158,21 +151,66 @@
data: '__UNI__B5B1EDD', data: '__UNI__B5B1EDD',
type: 1, type: 1,
}, },
{ {
name: '农业咨询', name: '农业咨询',
icon: '/static/applet/ny.png', icon: '/static/applet/ny.png',
data: { data: {
id: '__UNI__9620511', id: '__UNI__9620511',
url: '/static/wgt/__UNI__9620511.wgt', url: 'https://ceshi-worker-task.lihaink.cn/api/common/getMiniProgramInfo?name=nongye',
}, },
type: 1, type: 3,
} },
{
name: '教育咨询',
icon: '/static/applet/jy.png',
data: {
id: '__UNI__7AA205C',
url: 'https://ceshi-worker-task.lihaink.cn/api/common/getMiniProgramInfo?name=jiaoyu',
},
type: 3,
},
{
name: '法律咨询',
icon: '/static/applet/fl.png',
data: {
id: '__UNI__358D505',
url: 'https://ceshi-worker-task.lihaink.cn/api/common/getMiniProgramInfo?name=falv',
},
type: 3,
},
{
name: '情感咨询',
icon: '/static/applet/qg.png',
data: {
id: '__UNI__8080F14',
url: 'https://ceshi-worker-task.lihaink.cn/api/common/getMiniProgramInfo?name=qinggan',
},
type: 3,
},
{
name: '种植分析',
icon: '/static/applet/zz.png',
data: {
id: '__UNI__9EDFE40',
url: 'https://ceshi-worker-task.lihaink.cn/api/common/getMiniProgramInfo?name=zhongzhi',
},
type: 3,
},
{
name: '养殖分析',
icon: '/static/applet/yz.png',
data: {
id: '__UNI__EEA7DC9',
url: 'https://ceshi-worker-task.lihaink.cn/api/common/getMiniProgramInfo?name=yangzhi',
},
type: 3,
}
], ],
nowMenuList: [], nowMenuList: [],
street: '', street: '',
showPicker: false, showPicker: false,
columnData: [], columnData: [],
isFshow: false, isFshow: false,
backColor: 'rgba(252, 252, 252, 0)' backColor: 'rgba(252, 252, 252, 0)'
}; };
@ -292,14 +330,7 @@
} }
}, },
clickMenu(e, data) { clickMenu(e, data) {
switch (e) { this.getUniMp(e, data);
case 1:
this.getUniMp(data);
break;
case 2:
this.navigator(data);
break;
}
}, },
// //
pushMenu(data) { pushMenu(data) {
@ -320,19 +351,37 @@
this.editFlag = false; this.editFlag = false;
uni.setStorageSync('gatherNowMenuList', JSON.stringify(this.nowMenuList)); uni.setStorageSync('gatherNowMenuList', JSON.stringify(this.nowMenuList));
}, },
getUniMp(data) { getUniMp(type, data) {
// #ifdef APP-PLUS // #ifdef APP-PLUS
console.log(data, typeof data == 'string'); switch (type) {
if(typeof data == 'string') uniMP.loadMP(data); case 1:
else uniMP.loadMPurl(data); uniMP.loadMP(data);
// uniMP.loadMPurl(data); break;
// uniMP.open(data.id); // case 2: uniMP.loadMPx(data); break;
case 2:
// this.navigator(data);
uniMP.loadMPx(data);
break;
case 3:
uniMP.loadMPurl(data);
break;
}
return; return;
// #endif // #endif
uni.showToast({ // #ifdef H5
icon: 'none',
title: 'H5不支持打开小程序' // if (type == 2) {
}) // this.navigator(`/pages/moreProject/moreProject`);
// } else {
uni.showToast({
icon: 'none',
title: 'H5不支持打开小程序'
})
// }
// #endif
}, },
changeHandler(e) { changeHandler(e) {
const { const {
@ -427,6 +476,7 @@
let that = this; let that = this;
getUserInfo().then(res => { getUserInfo().then(res => {
that.userInfoData = res.data; that.userInfoData = res.data;
that.$store.commit('SET_USERINFO', res.data);
// console.log(res.data.service); // console.log(res.data.service);
if (res.data.service == null) { if (res.data.service == null) {
// console.log('123'); // console.log('123');
@ -467,7 +517,8 @@
opacity: 1; opacity: 1;
} }
} }
.site-box1 {
.site-box1 {
width: 706rpx; width: 706rpx;
/* #ifdef MP || APP-PLUS */ /* #ifdef MP || APP-PLUS */
height: 160rpx; height: 160rpx;
@ -479,25 +530,26 @@
position: absolute; position: absolute;
top: 45rpx; top: 45rpx;
left: 20rpx; left: 20rpx;
z-index: 999; z-index: 999;
// //
.place_wrapper { .place_wrapper {
color: #fff; color: #fff;
margin-right: 0rpx; margin-right: 0rpx;
font-size: 30rpx; font-size: 30rpx;
.town_name { .town_name {
margin-left: 21rpx; margin-left: 21rpx;
} }
} }
.iconfont { .iconfont {
font-size: 35.09rpx; font-size: 35.09rpx;
} }
} }
.site-box { .site-box {
width: 100%; width: 100%;
/* #ifdef MP || APP-PLUS */ /* #ifdef MP || APP-PLUS */
@ -518,7 +570,7 @@
padding-top: 25rpx; padding-top: 25rpx;
/* #endif */ /* #endif */
// background-color: #e5e5e5; // background-color: #e5e5e5;
background: url('@/static/images/bg2.png') no-repeat; background: url("@/static/images/bg2.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
padding-right: 20rpx; padding-right: 20rpx;

View File

@ -287,11 +287,11 @@
v-html="description.content.replace(/<br\/>/ig, '')"></view> v-html="description.content.replace(/<br\/>/ig, '')"></view>
<!-- #endif --> <!-- #endif -->
<view v-else class="product_content"> <view v-else class="product_content">
<view v-if="description.content && description.content.title" class="title"> <view v-if="description.content && description.content.title" class="product_content_title">
{{description.content.title}} {{description.content.title}}
</view> </view>
<view v-if="description.content && description.content.image" class="pictures"> <view v-if="description.content && description.content.image" class="pictures" style="background-color: #fff;">
<image v-for="(item,index) in description.content.image" :key="index" :src="item"> <image v-for="(item,index) in description.content.image" :key="index" :src="item" mode="aspectFit">
</image> </image>
</view> </view>
</view> </view>
@ -704,11 +704,6 @@
that.getConfig(); that.getConfig();
uni.hideLoading(); uni.hideLoading();
}, },
onHide() {
this.CartCount = 0
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
@ -2525,4 +2520,20 @@
} }
} }
} }
.product_content{
background-color: #fff;
&_title{
width: 100%;
height: auto;
line-height: 50rpx;
padding: 28rpx;
word-wrap: break-word;
text-align: center;
}
image{
width: 750rpx;
height: 750rpx;
}
}
</style> </style>

View File

@ -129,6 +129,7 @@
getIndexData, getIndexData,
getDiy, getDiy,
getArticleList, getArticleList,
cloudWarehouse,
getArticleCategoryLists getArticleCategoryLists
} from '@/api/api.js' } from '@/api/api.js'
import { import {
@ -332,7 +333,7 @@
// //
itemTap(item) { itemTap(item) {
if (this.userid) {
if (item.video_link.length > 0) { if (item.video_link.length > 0) {
uni.navigateTo({ uni.navigateTo({
// #ifdef MP || H5 // #ifdef MP || H5
@ -347,11 +348,7 @@
url: `/pages/plantGrass/plant_detail/index?id=${item.community_id}` url: `/pages/plantGrass/plant_detail/index?id=${item.community_id}`
}) })
} }
} else {
this.isAuto = true;
this.isShowAuth = true
}
}, },
// //
authColse: function(e) { authColse: function(e) {

View File

@ -1,60 +1,65 @@
<template> <template>
<view class=""> <view class="">
<view class="info"> <view class="info">
<view class="bg"></view> <view class="bg"></view>
<view class="card"> <view class="card">
<view class="title">店铺保证金信息</view> <view class="title">店铺保证金信息</view>
<view class="item"> <view class="item">
<text>已缴纳保证金</text> <text>已缴纳保证金</text>
<text>{{merchant_Data.paid_margin}}</text> <text>{{merchant_Data.paid_margin}}</text>
</view>
<view class="item">
<text>剩余缴纳保证金</text>
<text>{{merchant_Data.unpaid_margin}}</text>
</view>
<view class="item">
<text>缴纳店铺账户</text>
<text>{{merchant_Data.mer_name}}</text>
</view>
</view>
</view> </view>
<view class="item"> <view class="price">
<text>缴纳店铺账户</text> <view class="title">缴纳金额</view>
<text>{{merchant_Data.mer_name}}</text> <view class="tab">
</view> <view class="item active" style="margin: 0;">{{merchant_Data.margin}}</view>
</view> </view>
</view> <button class="btn" @click="paydecimal">缴纳</button>
<view class="price"> </view>
<view class="title">缴纳金额</view> <!-- <view class="tip">
<view class="tab">
<view class="item active" style="margin: 0;">{{merchant_Data.margin}}</view>
</view>
<button class="btn" @click="paydecimal">缴纳</button>
</view>
<!-- <view class="tip">
<view class="title">注意事项</view> <view class="title">注意事项</view>
<view class="text">充值后帐户的金额不能提现可用于商城消费使用佣金导入账户之后不能再次导出不可提现账户充值出现问题可联系商城客服也可拨打商城客服热线<text @click="copyPhone('4008888888')">4008888888</text> <view class="text">充值后帐户的金额不能提现可用于商城消费使用佣金导入账户之后不能再次导出不可提现账户充值出现问题可联系商城客服也可拨打商城客服热线<text @click="copyPhone('4008888888')">4008888888</text>
</view> </view>
</view> --> </view> -->
<view class="content-order" v-for="(item,i ) in productList"> <view class="content-order" v-for="(item,i ) in productList">
<view class="">订单编号{{item.order_sn}}</view> <view class="">订单编号{{item.order_sn}}</view>
<view class="">支付金额{{item.total_price}}</view> <view class="">支付金额{{item.total_price}}</view>
<view class="">支付状态{{item.pay_type==1?'已支付':'待支付'}}</view> <view class="">支付状态{{item.paid==1?'已支付':'待支付'}}</view>
<view class="">支付时间{{item.pay_time}}</view> <view class="">支付时间{{item.pay_time}}</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
</view> </view>
<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
</view>
</template> </template>
<script> <script>
import { import {
merchant, merchant,
paymerchant, paymerchant,
marginlist marginlist
} from '@/api/api.js' } from '@/api/api.js'
export default { export default {
data() { data() {
return { return {
mer_id:0, mer_id: 0,
merchant_Data: {}, merchant_Data: {},
where:{ where: {
page:1, page: 1,
limit:10 limit: 10
}, },
productList:[], productList: [],
loadend: false, loadend: false,
loading: false, loading: false,
loadTitle: '加载更多', loadTitle: '加载更多',
@ -63,26 +68,26 @@
onLoad(e) { onLoad(e) {
this.mer_id = e.mer_id this.mer_id = e.mer_id
this.decimal() this.decimal()
this.list(false) this.list(true)
}, },
onReachBottom() { onReachBottom() {
if (this.productList.length > 0) { if (this.productList.length > 0) {
setTimeout(() => { setTimeout(() => {
this.list(false); this.list(false);
}, 1000) }, 1000)
} }
}, },
methods: { methods: {
list(isPage){ list(isPage) {
let that = this; let that = this;
if (that.loadend) return; if (that.loadend) return;
if (that.loading) return; if (that.loading) return;
if (isPage === true) that.$set(that, 'productList', []); if (isPage === true) that.$set(that, 'productList', []);
that.loading = true; that.loading = true;
that.loadTitle = ''; that.loadTitle = '';
marginlist(that.where).then(res => { marginlist(that.where).then(res => {
let list = res.data.list; let list = res.data.list;
let productList = that.$util.SplitArray(list, that.productList); let productList = that.$util.SplitArray(list, that.productList);
let loadend = list.length < that.where.limit; let loadend = list.length < that.where.limit;
@ -92,63 +97,66 @@
setTimeout(() => { setTimeout(() => {
that.$set(that, 'productList', productList); that.$set(that, 'productList', productList);
}, 500) }, 500)
// console.log(that.productList)
that.$set(that.where, 'page', that.where.page + 1); that.$set(that.where, 'page', that.where.page + 1);
if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
}).catch(err => { }).catch(err => {
that.loading = false; that.loading = false;
that.loadTitle = '加载更多'; that.loadTitle = '加载更多';
}); });
}, },
// //
decimal() { decimal() {
merchant({ merchant({
id: this.mer_id id: this.mer_id
}).then((res) => { }).then((res) => {
this.merchant_Data = res.data this.merchant_Data = res.data
}); });
}, },
// //
paydecimal() { paydecimal() {
if (this.merchant_Data.is_margin != 1) { let that = this
this.$util.Tips({ uni.showModal({
title: '暂时无需缴纳保证金' title: '提示',
}); content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳保证金',
} else { success: (res) => {
if (res.confirm) {
uni.showModal({ paymerchant().then((res) => {
title: '提示', uni.requestPayment({
content: '商户' + this.merchant_Data.mer_name + '是否同意缴纳保证金', provider: 'wxpay',
success: function(res) { orderInfo: res.data
if (res.confirm) { .config, //
// console.log(''); success: (res) => {
paymerchant().then((res) => { that.$util.Tips({
console.log(res.data) title: '支付成功'
uni.requestPayment({ });
provider: 'wxpay', that.decimal()
orderInfo: res.data that.list(true)
.config, // },
success: function(res) { fail: (err) => {
console.log('success:' + JSON.stringify(res)); that.$util.Tips({
}, title: '支付失败'
fail: function(err) { });
console.log('fail:' + JSON.stringify(err)); console.log('fail:' + JSON.stringify(err));
} }
}); });
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
that.$util.Tips({
title: err
}) })
} else if (res.cancel) { })
console.log('用户点击取消'); } else if (res.cancel) {
} console.log('用户点击取消');
} }
}); }
});
}
}
},
} }
} }
</script> </script>
@ -157,172 +165,174 @@
</style> </style>
<style lang="scss"> <style lang="scss">
page { page {
background-color: #fff; background-color: #fff;
}
.content-order{
background: #F4F4F4;
border-radius: 21rpx 21rpx ;
margin-top: 30rpx;
padding: 10rpx;
margin-left: 10rpx;
margin-right: 10rpx;
view{
font-size: 30rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin: 20rpx;
} }
}
.info {
display: flex;
flex-direction: column;
align-items: center;
position: relative;
height: 250rpx;
.bg { .content-order {
background-color: #FF5C2D; background: #F4F4F4;
height: 170rpx; border-radius: 21rpx 21rpx;
width: 100vw; margin-top: 30rpx;
border-radius: 0rpx 0rpx 28rpx 28rpx; padding: 10rpx;
position: absolute; margin-left: 10rpx;
top: 0; margin-right: 10rpx;
left: 0;
}
.card { view {
width: 694rpx; font-size: 30rpx;
min-height: 180rpx; font-family: PingFang SC-Regular, PingFang SC;
background: #FFFFFF; font-weight: 400;
margin-top: 38.55rpx; color: #333333;
box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1); margin: 20rpx;
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
padding: 31.5rpx 28rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
position: absolute;
top: 0;
.title { }
font-size: 32rpx; }
font-weight: 600;
color: #333333;
padding-bottom: 10rpx;
}
.item { .info {
display: flex; display: flex;
justify-content: space-between; flex-direction: column;
font-size: 32rpx; align-items: center;
font-weight: 400; position: relative;
color: #333333; height: 250rpx;
margin-bottom: 10rpx;
text:nth-child(1){
flex-shrink: 0;
margin-right: 18rpx;
}
}
}
}
.price { .bg {
display: flex; background-color: #FF5C2D;
flex-direction: column; height: 170rpx;
padding: 0 28rpx; width: 100vw;
margin-top: 50rpx; border-radius: 0rpx 0rpx 28rpx 28rpx;
position: absolute;
top: 0;
left: 0;
}
.title { .card {
font-size: 32rpx; width: 694rpx;
font-weight: 600; min-height: 180rpx;
color: #333333; background: #FFFFFF;
line-height: 39rpx; margin-top: 38.55rpx;
margin-bottom: 42rpx; box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1);
} border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
padding: 31.5rpx 28rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
position: absolute;
top: 0;
.tab { .title {
display: flex; font-size: 32rpx;
flex-wrap: wrap; font-weight: 600;
justify-content: left; color: #333333;
width: 694rpx; padding-bottom: 10rpx;
}
.item { .item {
width: 217rpx; display: flex;
height: 131rpx; justify-content: space-between;
margin: 0 auto; font-size: 32rpx;
margin-bottom: 20rpx; font-weight: 400;
border-radius: 7rpx 7rpx 7rpx 7rpx; color: #333333;
border: 2rpx solid #F5F5F5; margin-bottom: 10rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
font-weight: 500;
line-height: 32rpx;
}
.active { text:nth-child(1) {
border: 2rpx solid #FF5C2D; flex-shrink: 0;
color: #FF5C2D; margin-right: 18rpx;
} }
} }
}
}
.input { .price {
width: 100%; display: flex;
height: 112rpx; flex-direction: column;
background: #F5F5F5; padding: 0 28rpx;
border-radius: 56rpx 56rpx 56rpx 56rpx; margin-top: 85rpx;
opacity: 1;
padding: 0 45.56rpx;
box-sizing: border-box;
font-size: 28rpx;
font-weight: 400;
color: #333;
line-height: 35rpx;
}
.btn { .title {
width: 694rpx; font-size: 32rpx;
height: 84rpx; font-weight: 600;
margin-top: 73.6rpx; color: #333333;
background: #FF5C2D; line-height: 39rpx;
box-shadow: 0rpx 14rpx 44rpx 2rpx #E9EFF5; margin-bottom: 42rpx;
border-radius: 42rpx 42rpx 42rpx 42rpx; }
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #FFFFFF;
}
}
.tip { .tab {
display: flex; display: flex;
flex-direction: column; flex-wrap: wrap;
padding: 0 28rpx; justify-content: left;
margin-top: 84rpx; width: 694rpx;
.title { .item {
font-size: 32rpx; width: 217rpx;
font-weight: 500; height: 131rpx;
color: #FF5C2D; margin: 0 auto;
line-height: 32rpx; margin-bottom: 20rpx;
margin-bottom: 21rpx; border-radius: 7rpx 7rpx 7rpx 7rpx;
} border: 2rpx solid #F5F5F5;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
font-weight: 500;
line-height: 32rpx;
}
.text { .active {
font-size: 28rpx; border: 2rpx solid #FF5C2D;
font-weight: 400; color: #FF5C2D;
color: rgba(0, 0, 0, 0.6); }
line-height: 42rpx; }
-webkit-background-clip: text;
} .input {
} width: 100%;
height: 112rpx;
background: #F5F5F5;
border-radius: 56rpx 56rpx 56rpx 56rpx;
opacity: 1;
padding: 0 45.56rpx;
box-sizing: border-box;
font-size: 28rpx;
font-weight: 400;
color: #333;
line-height: 35rpx;
}
.btn {
width: 694rpx;
height: 84rpx;
margin-top: 73.6rpx;
background: #FF5C2D;
box-shadow: 0rpx 14rpx 44rpx 2rpx #E9EFF5;
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #FFFFFF;
}
}
.tip {
display: flex;
flex-direction: column;
padding: 0 28rpx;
margin-top: 84rpx;
.title {
font-size: 32rpx;
font-weight: 500;
color: #FF5C2D;
line-height: 32rpx;
margin-bottom: 21rpx;
}
.text {
font-size: 28rpx;
font-weight: 400;
color: rgba(0, 0, 0, 0.6);
line-height: 42rpx;
-webkit-background-clip: text;
}
}
</style> </style>

View File

@ -1,5 +1,20 @@
<template> <template>
<view class="gather"> <view class="gather">
<!-- #ifdef MP || APP-PLUS -->
<view class="conten-top" :style="'height:'+statusBarHeight+'px'">
<view class="" style="position: absolute;left: 30rpx;bottom: 15rpx;" @click="logout"><i
class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"></i></view>
<view class=""
style="position: absolute;left: 30rpx;bottom: 15rpx;width: 120rpx; left:50%;margin-left:-60rpx;">
商家平台
</view>
</view>
<view :style="'height:'+statusBarHeight+'px'"></view>
<!-- #endif -->
<block v-if="isShow&&userInfoData.mer_info.mer_name"> <block v-if="isShow&&userInfoData.mer_info.mer_name">
<view class="" v-if="userInfoData.mer_info.setting_status==1"> <view class="" v-if="userInfoData.mer_info.setting_status==1">
<view class="special_work com" v-if="userInfoData.mer_info.type_code === 'TypeSupplyChain'"> <view class="special_work com" v-if="userInfoData.mer_info.type_code === 'TypeSupplyChain'">
@ -39,12 +54,14 @@
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill"></image> <image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill"></image>
<text class="text">订单管理</text> <text class="text">订单管理</text>
</view> --> </view> -->
<view class="examine" <view class="examine"
@click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=1`)"> @click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=1`)">
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill"> <image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill">
</image> </image>
<text class="text">入库管理</text> <text class="text">入库管理</text>
</view> </view>
<view class="examine" <view class="examine"
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}&product_type=98`, '商户设置')"> @click="navigator(`/pages/product/basicSet?mer_id=${mer_id}&product_type=98`, '商户设置')">
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill"></image> <image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill"></image>
@ -67,12 +84,12 @@
</image> </image>
<text class="text">订单核销</text> <text class="text">订单核销</text>
</view> </view>
<view class="examine" @click="navigator(`/pages/margin/margin`)"> <view class="examine" @click="margin(`/pages/margin/margin`)">
<image class="icon_img" src="@/static/images/jy.png"> <image class="icon_img" src="@/static/images/jy.png">
</image> </image>
<text class="text">保证缴纳</text> <text class="text">缴纳保证金</text>
</view> </view>
<!-- <view class="examine" <!-- <view class="examine"
@click="navigator(`/pages/commissionedSales/index/index?mer_id=${mer_id}`)"> @click="navigator(`/pages/commissionedSales/index/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/weituo.png" mode="aspectFill"> <image class="icon_img" src="@/static/images/weituo.png" mode="aspectFill">
</image> </image>
@ -125,7 +142,7 @@
<view class="special_work-titleb" v-if='codenote[0].status==0'>交易申请状态待审核</view> <view class="special_work-titleb" v-if='codenote[0].status==0'>交易申请状态待审核</view>
</view> </view>
<view class="content "> <view class="content ">
<!-- <view class="examine" <!-- <view class="examine"
@click="navigator(`/pages/users/supply_procurement/index?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`)"> @click="navigator(`/pages/users/supply_procurement/index?type_id=12&isDetail=1&product_type=98&cate_id=${userInfoData.mer_info.category_id}`)">
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image> <image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
@ -186,10 +203,14 @@
<view class="examine" @click="margin(`/pages/margin/margin`)"> <view class="examine" @click="margin(`/pages/margin/margin`)">
<image class="icon_img" src="@/static/images/jy.png"> <image class="icon_img" src="@/static/images/jy.png">
</image> </image>
<text class="text">保证缴纳</text> <text class="text">缴纳保证金</text>
</view> </view>
<!--
<view class="examine" <view class="examine"
@click="navigator(`/pages/admin/financial_management/index?mer_id=${mer_id}&product_type=98&type_id=${userInfoData.mer_info.type_id}`)">
<image class="icon_img" :src="`${prefix}cwgl.png`" mode="aspectFill"></image>
<text class="text">财务管理</text>
</view>
<!-- <view class="examine"
@click="navigator(`/pages/users/trading_hall/index?mer_id=${mer_id}`)"> @click="navigator(`/pages/users/trading_hall/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/diaohuo.png" mode="aspectFill"> <image class="icon_img" src="@/static/images/diaohuo.png" mode="aspectFill">
</image> </image>
@ -303,10 +324,10 @@
<text class="text">商户设置</text> <text class="text">商户设置</text>
</view> </view>
<view class="examine" @click="navigator(`/pages/margin/margin`)"> <view class="examine" @click="margin(`/pages/margin/margin`)">
<image class="icon_img" src="@/static/images/jy.png"> <image class="icon_img" src="@/static/images/jy.png">
</image> </image>
<text class="text">保证缴纳</text> <text class="text">缴纳保证金</text>
</view> </view>
<!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)"> <!-- <view class="examine" @click="navigator(`/pages/users/user_invoice_Finance/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill"> <image class="icon_img" src="@/static/images/cwgk.png" mode="aspectFill">
@ -374,10 +395,10 @@
</image> </image>
<text class="text">商户设置</text> <text class="text">商户设置</text>
</view> </view>
<view class="examine" @click="navigator(`/pages/margin/margin`)"> <view class="examine" @click="margin(`/pages/margin/margin`)">
<image class="icon_img" src="@/static/images/jy.png"> <image class="icon_img" src="@/static/images/jy.png">
</image> </image>
<text class="text">保证缴纳</text> <text class="text">缴纳保证金</text>
</view> </view>
</view> </view>
</view> </view>
@ -410,11 +431,12 @@
<emptyPage title="暂无信息"></emptyPage> <emptyPage title="暂无信息"></emptyPage>
</view> </view>
<view class="settlementAgreement" v-if="isFshow"> <view class="settlementAgreement" v-if="isFshow">
<view class="setAgCount" style="width: 100%;height: 100%;"> <view class="setAgCount" style="width: 100%;height: 100%; padding-top:120rpx ;">
<!-- <i class="icon iconfont icon-cha" @click="recuo"></i> -->
<view class="" style="width: 60rpx;height: 60rpx; position: absolute;right: 30rpx; top:20rpx" <view class="" style="width: 60rpx;height: 60rpx; position: absolute;left: 30rpx; top:80rpx"
@click="recuo"> @click="recuo">
<image src="@/static/images/close.png" mode="aspectFit" style="width: 60rpx;height: 60rpx;"></image> <i class="iconfont icon-xiangzuo" style="width: 60rpx;height: 60rpx;font-size: 40rpx;"></i>
<!-- <image src="@/static/images/close.png" mode="aspectFit" style="width: 60rpx;height: 60rpx;"></image> -->
</view> </view>
<div class="title">{{detail.title}}</div> <div class="title">{{detail.title}}</div>
<view style="margin: 20rpx 0;">甲方公司:{{company?company:"暂无公司信息"}}</view> <view style="margin: 20rpx 0;">甲方公司:{{company?company:"暂无公司信息"}}</view>
@ -440,9 +462,9 @@
<view class="userpage"> <view class="userpage">
<view class="userpage-icon" @click="close"> <view class="userpage-icon" @click="close">
<image src="@/static/images/close.png" mode=""></image> <!-- <image src="@/static/images/close.png" mode=""></image> -->
<i class="iconfont icon-xiangzuo" style="width: 60rpx;height: 60rpx;font-size: 40rpx;"></i>
</view> </view>
<form report-submit='true' style="height: 90%;"> <form report-submit='true' style="height: 90%;">
<view class='merchantsSettled' :style="{'height':Fheight}"> <view class='merchantsSettled' :style="{'height':Fheight}">
<view class="title">填写信息</view> <view class="title">填写信息</view>
@ -606,7 +628,7 @@
cardno_back: '' cardno_back: ''
}, },
Fheight: 0, Fheight: 0,
statusBarHeight: 0
}; };
}, },
computed: { computed: {
@ -615,7 +637,7 @@
created() {}, created() {},
onLoad() { onLoad() {
this.Fheight = uni.getSystemInfoSync().windowHeight + 'px'; this.Fheight = uni.getSystemInfoSync().windowHeight + 'px';
console.log(this.Fheight) this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 45;
}, },
onShow() { onShow() {
if (this.isLogin) { if (this.isLogin) {
@ -628,9 +650,6 @@
this.getUserInfo() this.getUserInfo()
this.codelist() this.codelist()
this.list() this.list()
}, },
@ -855,6 +874,12 @@
} }
}, },
logout() {
uni.switchTab({
url: '/pages/gather/gather'
})
},
// //
buyserset() { buyserset() {
uni.navigateTo({ uni.navigateTo({
@ -862,11 +887,7 @@
}) })
}, },
navigator(url, t) { navigator(url, t) {
if (this.userInfoData.mer_info.mer_settlement_agree_status == 0) { if (this.userInfoData.mer_info.mer_settlement_agree_status == 0) {
// console.log(this.codenote)
if (this.codenote.length == 0) { if (this.codenote.length == 0) {
this.isFshow = true this.isFshow = true
this.countDown() this.countDown()
@ -880,9 +901,7 @@
this.countDown() this.countDown()
} }
} }
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: url url: url
}) })
@ -939,6 +958,16 @@
background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%); background: linear-gradient(180deg, #FFFFFF 0%, #F6F6F6 100%);
} }
.conten-top {
width: 100%;
text-align: center;
background-color: #fff;
position: absolute;
top: 0;
position: fixed;
z-index: 10;
}
.userpage { .userpage {
width: 100%; width: 100%;
@ -952,7 +981,7 @@
height: 60rpx; height: 60rpx;
position: absolute; position: absolute;
top: 65rpx; top: 65rpx;
right: 60rpx; left: 60rpx;
image { image {
width: 100%; width: 100%;

File diff suppressed because it is too large Load Diff

View File

@ -22,10 +22,15 @@
<view :class="{'head':true,'show':showtit}" <view :class="{'head':true,'show':showtit}"
style="padding-top: var(--status-bar-height);display: block;"> style="padding-top: var(--status-bar-height);display: block;">
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<u--image :showLoading="true" v-if="cloudList.length>0" src="/static/images/LHYC/FH.png" <!-- <u--image :showLoading="true" v-if="cloudList.length>0" src="/static/images/LHYC/FH.png"
width="50.82rpx" height="50.82rpx" @click='goBack'></u--image> width="50.82rpx" height="50.82rpx" @click='goBack'></u--image>
<u--image v-else :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx" <u--image v-else :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
height="50.82rpx" @click='goBack'></u--image> height="50.82rpx" @click='goBack'></u--image> -->
<i class="iconfont icon-xiangzuo" v-if="cloudList.length>0"
style="font-size: 40rpx;text-align: left;" @click='goBack'></i>
<i class="iconfont icon-xiangzuo" v-else style="font-size: 40rpx;text-align: left;"
@click='goBack'></i>
<view class="head_tit" style="font-size: 36.8rpx;font-weight: 700;transform: skewX(-10deg);" <view class="head_tit" style="font-size: 36.8rpx;font-weight: 700;transform: skewX(-10deg);"
:style="{color:cloudList.length>0?'':'black'}" :style="{color:cloudList.length>0?'':'black'}"
@click="navgo(`/pages/nongKe/supply_chain/supplier?type_id=10&street_id=${street_code}&townName=${street}`)"> @click="navgo(`/pages/nongKe/supply_chain/supplier?type_id=10&street_id=${street_code}&townName=${street}`)">
@ -70,7 +75,6 @@
</view> </view>
--> -->
<view class="flags1"> <view class="flags1">
</view> </view>
</view> </view>
@ -110,24 +114,28 @@
<view style="align-items: center;display: flex;justify-content: space-between;"> <view style="align-items: center;display: flex;justify-content: space-between;">
<view class="" style="display: flex;align-items: center;"> <view class="" style="display: flex;align-items: center;">
<view class="back" style="margin-right: 17rpx;"> <view class="back" style="margin-right: 17rpx;">
<u--image :showLoading="true" src="/static/images/LHYC/FH.png" width="50.82rpx" <!-- <u--image :showLoading="true" src="/static/images/LHYC/FH.png" width="50.82rpx"
height="50.82rpx" @click='goBack'></u--image> height="50.82rpx" @click='goBack'></u--image> -->
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"
@click='goBack'></i>
</view> </view>
<view class="" style="font-size: 40rpx;transform: skewX(-10deg);"> <view class="" style="font-size: 40rpx;transform: skewX(-10deg);">
供销综合云市场 供销综合云商品
</view> </view>
</view> </view>
<view style="position: relative;width: 289.14rpx;"> <view style="position: relative;width: 289.14rpx;">
<u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="请输入..." <u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="请输入..."
v-model="keyword" class="serch_cls"></u-search> v-model="keyword" class="serch_cls" style="height: 56.82rpx;"></u-search>
<u--image class="img_cls" :showLoading="true" src="/static/images/GXSC/SSBT.png" <!-- <u--image class="img_cls" :showLoading="true" src="/static/images/GXSC/SSBT.png"
width="115.65rpx" height="56.82rpx" @click="serch"></u--image> width="115.65rpx" height="56.82rpx" @click="serch"></u--image> -->
<view class="serchbtn img_cls" @click="serch">搜索</view>
</view> </view>
<view class='head_r' @click="showPop=true"> <view class='head_r' @click="showPop=true">
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx" <u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx"
height="50.82rpx"></u--image> height="50.82rpx"></u--image>
<text class="" style="height: 5px;"></text> <text class="" style="height: 10px;"></text>
<view class="flags"> <view class="flags">
</view> </view>
@ -143,23 +151,23 @@
:disable-touch="true"> :disable-touch="true">
<swiper-item v-for="(item,index) in cloudList"> <swiper-item v-for="(item,index) in cloudList">
<u--image :showLoading="true" :src="item.cover" :class="act_img" width="750rpx" <u--image :showLoading="true" :src="item.cover" :class="act_img" width="750rpx"
height="998.83rpx"></u--image> height="718.46rpx"></u--image>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<view class="" style="height:998.83rpx;" v-if="act_swiper"> <view class="" style="height:718.46rpx;" v-if="act_swiper">
</view> </view>
<view class="menu" v-if="showtit" style="transition: 1s;"> <view class="menu" v-if="showtit" style="transition: 1s;">
<swiper :autoplay="false" :active-class="activeClass" :interval="3000" class="swiper" <swiper :autoplay="false" :active-class="activeClass" :interval="3000" class="swiper"
:circular="true" previous-margin='270rpx' next-margin='270rpx' :current="current" :circular="true" previous-margin='280rpx' next-margin='280rpx' :current="current"
@change="test"> @change="test">
<swiper-item v-for="(item,index) in cloudList" :key="index" @click="clickSwiperFn(index)"> <swiper-item v-for="(item,index) in cloudList" :key="index" @click="clickSwiperFn(index)">
<view class="swiper_item" :class="{swiper_item_act:index==current}"> <view class="swiper_item" :class="{swiper_item_act:index==current}">
<u--image :showLoading="true" :src="item.background" class="swiper_b" <u--image :showLoading="true" :src="item.background" class="swiper_b"
width="175.23rpx" height="175.23rpx"></u--image> width="140.19rpx" height="140.19rpx"></u--image>
</view> </view>
</swiper-item> </swiper-item>
@ -191,7 +199,7 @@
<view class="right"> <view class="right">
<view class="tit"> <view class="tit">
<!-- 亿福馒头粉纯天然无添加小麦粉加工 1000g/ --> <!-- 亿福馒头粉纯天然无添加小麦粉加工 1000g/ -->
{{item.store_info}} {{ item.store_name || item.store_info }}
</view> </view>
<view class=""> <view class="">
<view class="good_score"> <view class="good_score">
@ -225,7 +233,7 @@
</view> </view>
</view> </view>
<view style="height: 100rpx;"> <view style="height: 100rpx;">
<u-loadmore :status="status" /> <!-- <u-loadmore :status="status" /> -->
</view> </view>
</view> </view>
<!-- --> <!-- -->
@ -338,8 +346,7 @@
<!-- 多规格购物车 --> <!-- 多规格购物车 -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse">
</authorize>
<view class="" :style="`height:${appInfo.bottom}px;`"> <view class="" :style="`height:${appInfo.bottom}px;`">
</view> </view>
</view> </view>
@ -397,7 +404,8 @@
</u-popup> </u-popup>
</view> </view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse">
</authorize>
</view> </view>
</template> </template>
@ -485,7 +493,7 @@
page_num: 1, page_num: 1,
act_img: "", act_img: "",
cartTagInfo: {}, cartTagInfo: {},
isAuto: false,
headTop1: "", headTop1: "",
actList: [{ actList: [{
tit: '综合', tit: '综合',
@ -503,6 +511,7 @@
}], }],
status: "loadmore", status: "loadmore",
flag: false, flag: false,
isAuto: false,
isShowAuth: false, // isShowAuth: false, //
} }
@ -523,13 +532,7 @@
let that = this let that = this
setTimeout(() => { setTimeout(() => {
uni.createSelectorQuery()
.in(this)
.select('.flags')
.boundingClientRect(rect => {
this.headtop = rect.top
})
.exec();
uni.createSelectorQuery() uni.createSelectorQuery()
.in(this) .in(this)
.select('.flags1') .select('.flags1')
@ -581,6 +584,14 @@
onPageScroll(e) { onPageScroll(e) {
let that = this let that = this
this.showtit = !Boolean(e.scrollTop) this.showtit = !Boolean(e.scrollTop)
uni.createSelectorQuery()
.in(this)
.select('.flags')
.boundingClientRect(rect => {
this.headtop = rect.top
console.log(rect.top)
})
.exec();
uni.createSelectorQuery() uni.createSelectorQuery()
.in(this) .in(this)
.select('.content') .select('.content')
@ -850,8 +861,9 @@
}, },
addcart(item, i) { addcart(item, i) {
if (!this.isLogin) { if (!this.isLogin) {
this.isAuto = true; console.log('2222')
this.isShowAuth = true this.isAuto = true
this.isShowAuth = true;
return return
} }
@ -960,6 +972,19 @@
} }
} }
.serchbtn {
// position: absolute;
// right: 5rpx;
// top: 5rpx;
width: 100rpx;
height: 50rpx;
border-radius: 30rpx;
text-align: center;
line-height: 50rpx;
// background-color: #FEAB00;
background: linear-gradient(to right, #F84221, #FF6D20);
}
.selected-list { .selected-list {
padding: 24rpx 14rpx; padding: 24rpx 14rpx;
border-radius: 10.51rpx 10.51rpx 10.51rpx 10.51rpx; border-radius: 10.51rpx 10.51rpx 10.51rpx 10.51rpx;
@ -1192,7 +1217,7 @@
.img_cls { .img_cls {
position: absolute; position: absolute;
top: 50%; top: 50%;
right: 7rpx; right: 5rpx;
transform: translateY(-50%); transform: translateY(-50%);
} }
@ -1276,11 +1301,11 @@
.menu { .menu {
position: absolute; position: absolute;
top: 748rpx; top: 490rpx;
width: 750rpx; width: 750rpx;
// background-color: rgba(255, 255, 255, 0.7); // background-color: rgba(255, 255, 255, 0.7);
height: 250rpx; height: 250rpx;
// height: 175.23rpx; // height: 140.19rpx;
// box-shadow: 0 0 100px 100px rgba(255, 255, 255, 0.5); // box-shadow: 0 0 100px 100px rgba(255, 255, 255, 0.5);
// box-shadow: 0 0 100rpx 30rpx rgba(255, 255, 255, 0.9); // box-shadow: 0 0 100rpx 30rpx rgba(255, 255, 255, 0.9);
@ -1375,9 +1400,9 @@
.act_img { .act_img {
// transition:t; // transition:t;
transform: translateY(-840rpx); transform: translateY(-580rpx);
/* #ifdef APP-PLUS */ /* #ifdef APP-PLUS */
transform: translateY(-800rpx); transform: translateY(-540rpx);
/* #endif */ /* #endif */
} }
@ -1404,7 +1429,7 @@
.swipers { .swipers {
width: 750rpx; width: 750rpx;
height: 998.83rpx; height: 718.46rpx;
} }
.card { .card {
@ -1441,7 +1466,7 @@
font-size: 33.29rpx; font-size: 33.29rpx;
line-height: 50px; line-height: 50px;
background: linear-gradient(to right, #F84221, #FF6D20); background: linear-gradient(to right, #F84221, #FF6D20);
width: 175.23rpx; width: 140.19rpx;
text-align: center; text-align: center;
} }
} }

View File

@ -9,7 +9,10 @@
<view class="head_tit"> <view class="head_tit">
<view class="" style="display: flex;align-items: center;"> <view class="" style="display: flex;align-items: center;">
<view class="back" @click='backjJump()' style="margin-right:17rpx ;"> <view class="back" @click='backjJump()' style="margin-right:17rpx ;">
<view class="iconfont icon-xiangzuo" style="color: #333333;"></view> <!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
height="50.82rpx"></u--image> -->
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"
></i>
</view> </view>
<view style="font-size: 40rpx;"> <view style="font-size: 40rpx;">
<!-- {{titName}} --> <!-- {{titName}} -->
@ -23,8 +26,9 @@
:value='sotreParam.keyword' @confirm="searchSubmit"></input> --> :value='sotreParam.keyword' @confirm="searchSubmit"></input> -->
<u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="搜索店铺名称" <u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="搜索店铺名称"
v-model="sotreParam.keyword" class="serch_cls"></u-search> v-model="sotreParam.keyword" class="serch_cls"></u-search>
<u--image @tap="searchSubmit" class="img_cls" :showLoading="true" <view class="serchbtn img_cls" @tap="searchSubmit">搜索</view>
src="/static/images/GXSC/SSBT.png" width="115.65rpx" height="56.82rpx"></u--image> <!-- <u--image @tap="searchSubmit" class="img_cls" :showLoading="true"
src="/static/images/GXSC/SSBT.png" width="115.65rpx" height="56.82rpx"></u--image> -->
</view> </view>
</view> </view>
@ -700,7 +704,19 @@
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.serchbtn {
// position: absolute;
// right: 5rpx;
// top: 5rpx;
width: 100rpx;
height: 50rpx;
border-radius: 30rpx;
text-align: center;
line-height: 50rpx;
// background-color: #FEAB00;
color: #fff;
background: linear-gradient(to right, #F84221, #FF6D20);
}
.com_name { .com_name {
font-size: 32rpx; font-size: 32rpx;
// background-color: red; // background-color: red;
@ -1301,7 +1317,7 @@
.img_cls { .img_cls {
position: absolute; position: absolute;
top: 50%; top: 50%;
right: 7rpx; right: 5rpx;
transform: translateY(-50%); transform: translateY(-50%);
} }

View File

@ -9,7 +9,11 @@
<view class="head_tit"> <view class="head_tit">
<view class="" style="display: flex;align-items: center;"> <view class="" style="display: flex;align-items: center;">
<view class="back" @click='backjJump()' style="margin-right: 17rpx;"> <view class="back" @click='backjJump()' style="margin-right: 17rpx;">
<view class="iconfont icon-xiangzuo" style="color: #333333;"></view> <!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
height="50.82rpx"></u--image> -->
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"
></i>
</view> </view>
<view style="font-size: 40rpx;"> <view style="font-size: 40rpx;">
<!-- {{titName}} --> <!-- {{titName}} -->
@ -26,8 +30,9 @@
:value='sotreParam.keyword' @confirm="searchSubmit"></input> --> :value='sotreParam.keyword' @confirm="searchSubmit"></input> -->
<u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="搜索店铺名称" <u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="搜索店铺名称"
v-model="sotreParam.keyword" class="serch_cls"></u-search> v-model="sotreParam.keyword" class="serch_cls"></u-search>
<u--image @tap="searchSubmit" class="img_cls" :showLoading="true" <view class="serchbtn img_cls" @tap="searchSubmit">搜索</view>
src="/static/images/GXSC/SSBT.png" width="115.65rpx" height="56.82rpx"></u--image> <!-- <u--image @tap="searchSubmit" class="img_cls" :showLoading="true"
src="/static/images/GXSC/SSBT.png" width="115.65rpx" height="56.82rpx"></u--image> -->
</view> </view>
</view> </view>
@ -699,6 +704,19 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.serchbtn {
// position: absolute;
// right: 5rpx;
// top: 5rpx;
width: 100rpx;
height: 50rpx;
border-radius: 30rpx;
text-align: center;
line-height: 50rpx;
// background-color: #FEAB00;
color: #fff;
background: linear-gradient(to right, #F84221, #FF6D20);
}
* { * {
margin: 0; margin: 0;
padding: 0; padding: 0;
@ -1304,7 +1322,7 @@
.img_cls { .img_cls {
position: absolute; position: absolute;
top: 50%; top: 50%;
right: 7rpx; right: 5rpx;
transform: translateY(-50%); transform: translateY(-50%);
} }

View File

@ -8,8 +8,9 @@
<view class="head_tit"> <view class="head_tit">
<view class="" style="display: flex;align-items: center;"> <view class="" style="display: flex;align-items: center;">
<u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx" <!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
height="50.82rpx" @click='backjJump'></u--image> height="50.82rpx" @click='backjJump'></u--image> -->
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;" @click='backjJump'></i>
<view class="" <view class=""
style="font-size: 36.8rpx;font-weight: 700;transform: skewX(-10deg);margin-left: 20rpx;color: #F84221;"> style="font-size: 36.8rpx;font-weight: 700;transform: skewX(-10deg);margin-left: 20rpx;color: #F84221;">
供销综合云市场 供销综合云市场
@ -141,7 +142,7 @@
</view> </view>
<u-loadmore :status="status" />
</view> </view>
<!-- 热搜 --> <!-- 热搜 -->
@ -414,6 +415,7 @@
menuList: [], menuList: [],
street: "", street: "",
showPicker: false, showPicker: false,
status: "loadmore",
// //
downMenu: [{ downMenu: [{
title: '默认', title: '默认',
@ -572,7 +574,7 @@
area_code: code area_code: code
}).then(res => { }).then(res => {
this.$refs.uPicker.setColumnValues(1, res.data); this.$refs.uPicker.setColumnValues(1, res.data);
console.log(res.data, 9999)
}); });
}, },
@ -920,19 +922,33 @@
}, },
// //
onReachBottom() { onReachBottom() {
if (this.count === this.storeList.length) { this.sotreParam.page += 1
if (this.count === 0) {
let rqData = {
keyword: this.sotreParam.keyword,
page: this.sotreParam.page,
limit: 10,
order: this.sotreParam.order,
category_id: this.sotreParam.category_id,
type_id: this.sotreParam.type_id,
street_id: this.sotreParam.street_id,
credit_buy: this.credit_buy
}
if (this.latitude) {
rqData.location = this.latitude + ',' + this.longitude
}
// console.log(rqData)
storeMerchantList(rqData).then(res => {
if (res.data.list == 0) {
this.status = "nomore"
return return
} }
uni.showToast({ this.count = res.data.count
title: '已加载全部', this.storeList.push(...res.data.list)
icon: 'none',
duration: 1000 })
});
} else {
this.sotreParam.page += 1
this.storeMerchantList()
}
} }
} }

View File

@ -9,7 +9,10 @@
<view class="head_tit"> <view class="head_tit">
<view class="" style="display: flex;align-items: center;"> <view class="" style="display: flex;align-items: center;">
<view class="back" @click='backjJump()' style="margin-right: 17rpx;"> <view class="back" @click='backjJump()' style="margin-right: 17rpx;">
<view class="iconfont icon-xiangzuo" style="color: #333333;"></view> <!-- <u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
height="50.82rpx"></u--image> -->
<i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"
></i>
</view> </view>
<view style="font-size: 40rpx;"> <view style="font-size: 40rpx;">
<!-- {{titName}} --> <!-- {{titName}} -->
@ -26,8 +29,9 @@
:value='sotreParam.keyword' @confirm="searchSubmit"></input> --> :value='sotreParam.keyword' @confirm="searchSubmit"></input> -->
<u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="搜索店铺名称" <u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="搜索店铺名称"
v-model="sotreParam.keyword" class="serch_cls"></u-search> v-model="sotreParam.keyword" class="serch_cls"></u-search>
<u--image @tap="searchSubmit" class="img_cls" :showLoading="true" <view class="serchbtn img_cls" @tap="searchSubmit">搜索</view>
src="/static/images/GXSC/SSBT.png" width="115.65rpx" height="56.82rpx"></u--image> <!-- <u--image @tap="searchSubmit" class="img_cls" :showLoading="true"
src="/static/images/GXSC/SSBT.png" width="115.65rpx" height="56.82rpx"></u--image> -->
</view> </view>
</view> </view>
@ -701,7 +705,19 @@
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.serchbtn {
// position: absolute;
// right: 5rpx;
// top: 5rpx;
width: 100rpx;
height: 50rpx;
border-radius: 30rpx;
text-align: center;
line-height: 50rpx;
// background-color: #FEAB00;
color: #fff;
background: linear-gradient(to right, #F84221, #FF6D20);
}
.com_name { .com_name {
font-size: 32rpx; font-size: 32rpx;
// background-color: red; // background-color: red;
@ -1302,7 +1318,7 @@
.img_cls { .img_cls {
position: absolute; position: absolute;
top: 50%; top: 50%;
right: 7rpx; right: 5rpx;
transform: translateY(-50%); transform: translateY(-50%);
} }

View File

@ -306,7 +306,7 @@
<view class="content-clip"></view> <view class="content-clip"></view>
<view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false"> <view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false">
<!-- <view class='bnt cancel' @click="cancelSales">取消售后</view> --> <!-- <view class='bnt cancel' @click="cancelSales">取消售后</view> -->
<!-- <view v-if="!orderInfo.receipt && !isGoodsReturn" class='bnt cancel' @click="applyInvoice">申请开票</view> --> <view v-if="!orderInfo.receipt && !isGoodsReturn" class='bnt cancel' @click="applyInvoice">申请开票</view>
<view v-if="orderInfo.activity_type == 2 && (orderInfo.status == 10 || orderInfo.status == 11)" <view v-if="orderInfo.activity_type == 2 && (orderInfo.status == 10 || orderInfo.status == 11)"
class=" acea-row row-right row-middle"> class=" acea-row row-right row-middle">
<view v-if="orderInfo.presellOrder.activeStatus == 0" class='bnt b-color btn_auto'> <view v-if="orderInfo.presellOrder.activeStatus == 0" class='bnt b-color btn_auto'>

View File

@ -363,7 +363,7 @@
}, },
mapGetters(['isLogin', 'uid', 'viewColor', 'keyColor', ])), mapGetters(['isLogin', 'uid', 'viewColor', 'keyColor', ])),
onLoad: function(options) { onLoad: function(options) {
console.log('11111111')
this.credit_buy = options.credit_buy this.credit_buy = options.credit_buy
// console.log(options.product_type) // console.log(options.product_type)
if (options.product_type) { if (options.product_type) {

View File

@ -28,7 +28,8 @@
<view class="list_count"> <view class="list_count">
<view v-if="followDetail.author" class="title"> <view v-if="followDetail.author" class="title">
<view class="head-menu"> <view class="head-menu">
<image src="@/static/images/right.png" mode="aspectFill" @click="returns"></image> <i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;" @click="returns"></i>
<!-- <image src="@/static/images/right.png" mode="aspectFill" @click="returns"></image> -->
</view> </view>
<view class="author"> <view class="author">
@ -263,7 +264,8 @@
<image src="../static/images/no_content.png"></image> <image src="../static/images/no_content.png"></image>
<text>内容不存在可能被删除了哦~</text> <text>内容不存在可能被删除了哦~</text>
<navigator class="btn" :open-type="open_grass ? 'switchTab' : 'navigate'" <navigator class="btn" :open-type="open_grass ? 'switchTab' : 'navigate'"
url="/pages/plant_grass/index">返回首页</navigator> url="/pages/index/index">返回首页</navigator>
</view> </view>
</view> </view>
<!-- 他提到的宝贝弹窗 --> <!-- 他提到的宝贝弹窗 -->
@ -531,9 +533,9 @@
that.followDetail = null that.followDetail = null
that.loadData = false that.loadData = false
uni.hideLoading() uni.hideLoading()
return that.$util.Tips({ // return that.$util.Tips({
title: err // title: err
}); // });
}) })
}, },
/*获取评论*/ /*获取评论*/

View File

@ -130,7 +130,7 @@
selHeight="250upx"> selHeight="250upx">
</avatar> </avatar>
<!-- 提到的宝贝弹窗 --> <!-- 提到的宝贝弹窗 -->
<uni-popup ref="associated" type="bottom"> <uni-popup ref="associated" type="bottom" style="z-index: 9999;">
<associated @close="close" @getProduct="getProduct" :checkedObj="productList"></associated> <associated @close="close" @getProduct="getProduct" :checkedObj="productList"></associated>
</uni-popup> </uni-popup>
<!-- 话题弹窗 --> <!-- 话题弹窗 -->

View File

@ -32,7 +32,7 @@
getProductContent(obj) { getProductContent(obj) {
// console.log(obj); // console.log(obj);
this.goodsDis = obj; this.goodsDis = obj;
this.a=obj.store_name this.a=obj.store_name;
}, },
save() { save() {
setStorage('goodsDis', this.goodsDis); setStorage('goodsDis', this.goodsDis);

View File

@ -0,0 +1,695 @@
<template>
<view class=" writeBg ">
<view class="content_list">
<view class="content_list_item">
<view>商品详情</view>
<!-- <view class="content_list_item_han">
<span v-if="disModel" style="color: #000000">去修改</span>
<span v-else>设置详情</span>
<span class="iconfont">&#xe6bd;</span>
</view> -->
</view>
<input-goods-detils class="input-goods-detils" @getProductContent="getProductContent" :title="store_name" :prodectContent="goodsDis" :maxLength="200"></input-goods-detils>
<block v-if="!moreThanFlag">
<view class="content_list_video input-goods-detils">
<view class="content_list_video_title">商品视频</view>
<view class="video_list">
<view class="video_list_item photo" v-if="addGoodsSecoundData.video_link">
<view class="jiao" @click="deleteImage()">
<!-- video标签在app端层级过高 -->
<!--#ifndef APP-PLUS-->
<video :src="addGoodsSecoundData.video_link"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<img src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/3/video_bg.png"
style=" width:150rpx"></img>
<!--#endif-->
<image src="../static/images/close.png" mode="widthFix"></image>
</view>
<!--#ifndef APP-PLUS-->
<view style="position: absolute;">
<view class="videoHover" @click="videoshow">
</view>
<text class="video-text">点击可预览视频</text>
</view>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<view class='preview_video'>
<view class="videoHover" @click="videoshow">
</view>
<text class="video-text">点击可预览视频</text>
</view>
<!--#endif-->
</view>
<view class="photo" @click="uploadVideo" v-else>
<view>
<image src="../static/images/creamer.png" mode="widthFix"></image>
</view>
<view>添加视频</view>
</view>
</view>
</view>
<view class="container_input marginTop_none input-goods-detils">
<view class="container_input_item">
<view class="container_input_item_label"><span>是否推荐</span></view>
<view class="container_input_item_value">
<switch :checked="addGoodsSecoundData.is_good == 1" color="#E93323" style="transform:scale(0.8)"
@change="isGood" />
</view>
</view>
<!-- <view class="container_input_item">
<view class="container_input_item_label"><span>是否开启礼包</span></view>
<view class="container_input_item_value">
<switch :checked="addGoodsSecoundData.is_gift_bag == 1" color="#E93323" style="transform:scale(0.8)"
@change="isGiftBag" />
</view>
</view> -->
</view>
<!-- <view class="tip input-goods-detils">
<span class="iconfont">&#xe688;</span>
<span>开启后此商品只能在分销礼包中展示并销售</span>
</view> -->
<view class="container_input marginTop_none input-goods-detils">
<!-- <view class="container_input_item">
<view class="container_input_item_label"><span>限购数量</span></view>
<view class="container_input_item_value">
<input v-model="addGoodsSecoundData.once_count" type="number" value="" placeholder="请输入限购数量"
placeholder-class="inputPlaceHolder" />
</view>
</view> -->
<view class="container_input_item">
<view class="container_input_item_label"><span>商品排序</span></view>
<view class="container_input_item_value">
<input v-model="addGoodsSecoundData.sort" type="number" value="" placeholder="请输入商品排序"
placeholder-class="inputPlaceHolder" />
</view>
</view>
</view>
</block>
<view class="more_than" @click="moreThanFlag=!moreThanFlag" >
<view v-if="moreThanFlag">更多</view>
<view v-else>收起</view>
</view>
</view>
<view v-if="showVideo" class="video-count">
<!--#ifndef APP-PLUS-->
<video id="myVideo" class="videoLink" autoplay loop muted :src="addGoodsSecoundData.video_link"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<video id="myVideo" class="videoLink" autoplay loop
:src='addGoodsSecoundData.video_link && (addGoodsSecoundData.video_link.substring(0,4) == "http" || addGoodsSecoundData.video_link.substring(0,5) == "https") ?addGoodsSecoundData.video_link : "http:" + addGoodsSecoundData.video_link'></video>
<!--#endif-->
</view>
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view>
<view class="handle dobuButton">
<view class="handle_button margin_right" @click="lastStep">上一步</view>
<view class="handle_button" @click="submitCreatedGoods">提交</view>
</view>
</view>
</template>
<script>
import { TOKENNAME, HTTP_REQUEST_URL } from '@/config/app.js';
import store from 'store';
import {
navigateTo,
setStorage,
getStorage,
removeStorage,
navigateBack,
Toast,
Loading,
hideLoading,
Modal
} from '../../../libs/uniApi.js';
import { productCreate, productUpdate } from 'api/product.js';
import inputGoodsDetils from '../components/inputGoodsDetils.vue';
export default {
components: {
inputGoodsDetils
},
props: {
merId: {
type: [String, Number],
default: ''
},
product_id: {
type: [String, Number],
default: ''
},
showCommodity: {
type: Boolean,
default: false
},
resetKey: {
type: Boolean,
default: false
},
code: {
type: [String, Number],
default: 0
}
},
data() {
return {
showVideo: false,
disModel: false,
upload_max: 10,
uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`,
addGoodsSecoundData: {
is_good: 0, //
is_gift_bag: 0,
sort: '',
once_count: '', //
video_link: ''
},
goodsDis: {imageList: [],store_name:""},
store_name:'',
moreThanFlag: true,
};
},
mounted() {
this.initData();
// this.$nextTick(()=>{
// this.initData();
// })
},
updated() {
// this.initData();
},
watch: {
addGoodsSecoundData: {
handler(val) {
setTimeout(() => {
setStorage('editCommodity', val)
});
},
deep: true
},
resetKey: {
handler(val) {
// console.log(1);
this.initData();
}
},
goodsDis: {
handler(val) {
setTimeout(() => {
setStorage('goodsDis', this.goodsDis);
});
},
deep: true
},
},
methods: {
videoshow() {
this.showVideo = true
this.videoContext = uni.createVideoContext('myVideo', this);
this.$nextTick(() => {
this.videoContext.play();
})
// this.video_link = this.formData.video_link;
// this.videoContext.requestFullScreen({ direction: 90 });
// this.videoContext.play(); this.videoplay = true;
},
initData() {
let editGoodsDetils = {};
if (getStorage('goodsDis')) {
this.disModel = true;
}
if (this.product_id) {
// editGoodsDetils = getStorage('editGoodsDetils');
editGoodsDetils = this.$store.state.storage.storage;
// console.log('ss',editGoodsDetils.content);
// editGoodsDetils = getStorage('editGoodsDetils');
// console.log('',editGoodsDetils);
Object.keys(this.addGoodsSecoundData).forEach(item => {
console.log(item, editGoodsDetils[item]);
this.addGoodsSecoundData[item] = editGoodsDetils[item];
});
if (editGoodsDetils.content) {
this.goodsDis.imageList = editGoodsDetils.content.image;
this.goodsDis.store_name = editGoodsDetils.content.title;
this.store_name = editGoodsDetils.content.title;
// console.log(this.goodsDis, editGoodsDetils.content);
setStorage('goodsDis', {
store_name: editGoodsDetils.content.title,
imageList: editGoodsDetils.content.image
});
this.disModel = true;
}
setStorage('canChangeSecound', true);
return;
}else {
setStorage('goodsDis', {
store_name: '',
imageList: []
});
}
if (getStorage('addGoodsSecoundData')) {
Object.keys(this.addGoodsSecoundData).forEach(item => {
if (getStorage('addGoodsSecoundData')[item] || getStorage('addGoodsSecoundData')[item] == 0) {
this.addGoodsSecoundData[item] = getStorage('addGoodsSecoundData')[item];
}
});
}
},
lastStep() {
this.$emit('lastStep');
},
//
submitCreatedGoods() {
Loading();
let waitDeleteData = ['addGoodsFormData', 'singleSpecification', 'attrValue', 'modifyPriceData',
'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils', 'canChange', 'canChangeSecound'
];
let attrValue = getStorage('addGoodsFormData').spec_type == 0 ? [getStorage('singleSpecification')] :
getStorage('attrValue');
let postData = {
...this.addGoodsSecoundData,
...getStorage('addGoodsFormData'),
content: {
title: getStorage('goodsDis') ? getStorage('goodsDis').store_name : '',
image: getStorage('goodsDis') ? getStorage('goodsDis').imageList : []
},
video_link: this.addGoodsSecoundData.video_link
};
if (attrValue) {
postData.attrValue = attrValue.filter(item => item != '');
postData.attrValue[0].bar_code
}
// console.log(postData);
if (getStorage('addGoodsFormData').spec_type == 0) {
// postData.attr = [getStorage('singleSpecification')];
}
if (this.product_id) {
productUpdate(this.merId, this.product_id, postData)
.then(res => {
waitDeleteData.forEach(item => {
if (getStorage(item)) {
removeStorage(item);
}
});
hideLoading()
Modal('提交成功', '点击确定,返回商品管理', {
showCancel: false
}).then(() => {
uni.removeStorageSync('singleSpecification')
uni.redirectTo({
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
})
})
})
.catch(rej => {
Toast(rej);
});
} else {
productCreate(this.merId, postData)
.then(res => {
waitDeleteData.forEach(item => {
if (getStorage(item)) {
removeStorage(item);
}
});
hideLoading();
Modal('提交成功', '点击确定,返回商品管理', {
showCancel: false,
}).then(() => {
uni.redirectTo({
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
})
})
})
.catch(rej => {
Toast(rej);
});
}
},
//
isGood(e) {
this.addGoodsSecoundData.is_good = e.detail.value ? 1 : 0;
},
//
isGiftBag(e) {
this.addGoodsSecoundData.is_gift_bag = e.detail.value ? 1 : 0;
},
switchChange(value, item) {
this.addGoodsSecoundData[item.model] = value ? 1 : 0;
},
//
inputGoodsDetils() {
navigateTo(1, '/pages/product/addGoods/addGoodDetils', { mer_id: this.merId });
},
//
uploadVideo() {
uni.chooseVideo({
sourceType: ['camera', 'album'],
success: res => {
console.log(res)
if (Math.ceil(res.size / 1024) < this.upload_max * 1024) {
uni.uploadFile({
url: this.uploadUrl, //
filePath: res.tempFilePath,
name: 'file',
//
formData: {
user: 'test'
},
header: {
// #ifdef MP
'Content-Type': 'multipart/form-data',
// #endif
[TOKENNAME]: 'Bearer ' + store.state.app.token
},
success: uploadFileRes => {
let data = JSON.parse(uploadFileRes.data);
this.addGoodsSecoundData.video_link = (data.data.src);
},
complete: a => {
// console.log(a);
}
});
} else {
uni.showModal({
title: '提示',
content: `视频超出限制${this.upload_max}MB,已过滤`
});
}
},
fail: err => {
//
// uni.showModal({
// content: JSON.stringify(err)
// });
console.log(err)
}
});
},
deleteImage(index) {
this.addGoodsSecoundData.video_link = '';
},
getProductContent(obj) {
// console.log(obj);
this.goodsDis = obj;
this.a=obj.store_name
},
}
};
</script>
<style lang="scss" scoped>
@import './scss/index.scss';
.content_list {
width: 710rpx;
margin: auto;
padding: 0 20rpx;
box-sizing: border-box;
background: #fff;
margin-top: 31rpx;
border-radius: 10rpx;
.input-goods-detils{
width: 100%;
padding: 20rpx 10rpx !important;
}
.more_than{
background: #FFFFFF;
border-radius: 0 0 10rpx 10rpx;
margin: auto;
// margin-top: 30rpx;
border-top: 1px solid #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 84rpx;
color: #333333;
font-size: 30rpx;
}
.content_list_item {
padding: 32rpx 10rpx;
display: flex;
justify-content: space-between;
border-bottom: 1px solid #eee;
.content_list_item_han {
color: #bbbbbb;
display: flex;
align-items: center;
}
}
.content_list_video {
min-height: 154rpx;
padding: 23rpx 10rpx;
display: flex;
justify-content: space-between;
.content_list_video_title {
padding-top: 10rpx;
}
.video_list {
flex: 1;
display: flex;
justify-content: flex-end;
flex-wrap: wrap;
}
}
}
.videoHover {
width: 180rpx;
height: 180rpx;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
left: 0;
z-index: 10;
view {
width: 50rpx;
height: 50rpx;
background: #000000;
border-radius: 50rpx;
display: flex;
align-items: center;
justify-content: center;
.iconfont {
color: #ffffff;
font-size: 21rpx;
}
}
}
.photo {
border: 1px solid #dddddd;
opacity: 1;
border-radius: 8rpx;
font-size: 28rpx;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
// padding: 27rpx 21rpx 24rpx 21rpx;
width: 150rpx;
height: 150rpx;
box-sizing: border-box;
color: #bbbbbb;
margin-left: 16rpx;
position: relative;
margin-bottom: 12rpx;
image {
width: 62rpx;
margin-bottom: 10rpx;
}
}
.jiao {
image {
position: absolute;
top: -14rpx;
right: -14rpx;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
padding: 8rpx;
background: #e93323;
z-index: 2;
}
video {
width: 150rpx;
height: 150rpx;
}
}
.preview_video {
position: absolute;
}
.container_input {
background: #fff;
padding: 0 20rpx;
width: 710rpx;
margin: auto;
margin-top: 31rpx;
border-radius: 10rpx;
&_item {
display: flex;
height: 106rpx;
align-items: center;
.select_and_input {
display: flex;
align-items: center;
justify-content: space-between;
.greyColor {
color: #bbbbbb;
}
}
.radio {
padding: 30rpx 0;
}
&_label {
padding-left: 10rpx;
color: #333333;
font-size: 30rpx;
display: flex;
align-items: center;
.select_check {
display: flex;
align-items: center;
justify-content: center;
width: 40rpx;
height: 40rpx;
border: 1px solid #cccccc;
border-radius: 50%;
margin-right: 20rpx;
.iconfont {
font-size: 24rpx;
}
}
.select {
background: #e93323;
border: none;
.iconfont {
color: #fff;
}
}
}
&_value {
padding-right: 10rpx;
flex: 1;
display: flex;
align-items: center;
justify-content: flex-end;
>span:nth-child(1) {
display: inline-block;
margin-right: 15rpx;
}
.text {
color: #000;
display: inline-block;
max-width: 400rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
input {
text-align: right;
}
.select_group {
display: flex;
}
&_select {
display: flex;
margin-right: 110rpx;
}
}
.flex_start {
padding: 0 10rpx;
margin-top: 40rpx;
justify-content: flex-start;
}
}
>view:not(:last-child) {
border-bottom: 1px solid #eeeeee;
}
}
.inputPlaceHolder {
color: #bbbbbb;
}
.paddingTop_none {
padding-top: 0 !important;
}
.marginTop_none {
margin-top: 0;
}
.video-count {
position: fixed;
width: 600rpx;
height: 500rpx;
top: 50%;
left: 50%;
margin-left: -300rpx;
margin-top: -250rpx;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
.videoLink {
width: 600rpx;
height: 500rpx;
}
}
// .writeBg {
// background: #fff;
// }
.tip{
padding: 0 !important;
margin: 0 !important;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,230 @@
<template>
<view class="container">
<select-form style="border-radius: 10rpx 10rpx 0 0;" :platformClassification="formList" :form="singleSpecification"
@input="input"></select-form>
<view class="more_than" @click="moreThanFlag?selectMoreThan():spliceMoreThan()">
<view v-if="moreThanFlag">更多</view>
<view v-else>收起</view>
</view>
<!-- <view class="handle">
<view class="button" @click="saveSingleSpecification">
保存
</view>
</view> -->
</view>
</template>
<script>
import selectForm from '../components/selectForm.vue';
import { navigateTo, navigateBack, serialize, setStorage, getStorage } from '../../../libs/uniApi.js';
// attrValue
export default {
components: {
selectForm
},
props: ['product_id'],
data() {
return {
singleSpecification: {
price: '', //
cost: '', //
stock: '', //
ot_price: '', //
bar_code: '', //
weight: '', //
volume: '', //
image: '',
extension_one: '',
extension_two: ''
},
moreThanFlag: true,
formList: [{
id: 1,
label: '售价',
type: 'digit',
model: 'price',
holder: '请填写售价'
}, {
id: 10,
label: '库存',
type: 'digit',
model: 'stock',
holder: '请填写库存',
disable: true
}],
moreThanList: [{
id: 2,
label: '成本价',
type: 'digit',
holder: '请填写成本价',
model: 'cost'
},
{
id: 3,
label: '原价',
type: 'digit',
holder: '请填写原价',
model: 'ot_price'
},
{
id: 5,
label: '商品编号',
type: 'input',
holder: '请填写商品编号',
model: 'bar_code'
},
{
id: 6,
label: '重量',
type: 'digit',
holder: '请输入重量',
model: 'weight'
},
{
id: 7,
label: '体积',
type: 'digit',
holder: '请输入体积',
model: 'volume'
},
// {
// id: 8,
// label: '',
// type: 'digit',
// holder: '',
// model: 'extension_one'
// },
// {
// id: 9,
// label: '',
// type: 'digit',
// holder: '',
// model: 'extension_two'
// }
],
}
},
watch: {
singleSpecification: {
handler(val) {
this.singleSpecification = val;
this.saveSingleSpecification();
},
deep: true
}
},
// onLoad(option) {
// console.log(option);
// this.singleSpecification.bar_code=option.code
// },
// onShow() {
// if(getStorage('addGoodsFormData').image) {
// this.singleSpecification.image = getStorage('addGoodsFormData').image;
// }
// if(getStorage('singleSpecification')) {
// Object.keys(this.singleSpecification).forEach(item => {
// if(getStorage('singleSpecification')[item]) {
// this.singleSpecification[item] = getStorage('singleSpecification')[item]
// }
// })
// }
// },
// beforeDestroy() {
// console.log('123');
// uni.removeStorage({
// key: 'singleSpecification'
// });
// },
mounted() {
if (getStorage('addGoodsFormData').image) {
this.singleSpecification.image = getStorage('addGoodsFormData').image;
}
if (getStorage('singleSpecification')) {
Object.keys(this.singleSpecification).forEach(item => {
if (getStorage('singleSpecification')[item]) {
this.singleSpecification[item] = getStorage('singleSpecification')[item]
}
})
}
// if (!this.$props.product_id) {
// this.formList.push({
// id: 10,
// label: '',
// type: 'digit',
// model: 'stock',
// holder: '',
// disable: true
// })
// }
},
destroyed() {
setStorage('singleSpecification', {});
},
methods: {
selectMoreThan() {
this.formList = this.formList.concat(this.moreThanList);
this.moreThanFlag = false;
},
spliceMoreThan() {
this.moreThanFlag = true;
// this.formList.splice(!this.$props.product_id ? 2 : 1, this.formList.length);
this.formList.splice(2, this.formList.length);
},
input(val) {
this.singleSpecification = val
},
//
saveSingleSpecification() {
setStorage('singleSpecification', this.singleSpecification);
// navigateBack(1);
}
}
}
</script>
<style lang="scss" scoped>
.container {
padding: 0 !important;
}
.more_than {
background: #FFFFFF;
border-radius: 0 0 10rpx 10rpx;
margin: auto;
// margin-top: 30rpx;
margin-top: 1px;
display: flex;
align-items: center;
justify-content: center;
width: 710rpx;
height: 84rpx;
color: #333333;
font-size: 30rpx;
}
.handle {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 126rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
.button {
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
font-size: 32rpx;
width: 690rpx;
height: 86rpx;
background: #E93323;
border-radius: 43rpx;
}
}
</style>

View File

@ -18,7 +18,7 @@
} }
} }
.tip { .tip {
padding: 16rpx 0 0 40rpx; padding: 16rpx 0 0 20rpx;
font-size: 22rpx; font-size: 22rpx;
color: #e93323; color: #e93323;
display: flex; display: flex;
@ -36,6 +36,14 @@
width: 710rpx; width: 710rpx;
font-size: 30rpx; font-size: 30rpx;
border-radius: 10rpx; border-radius: 10rpx;
.icon_top{
transform: rotate(-90deg);
}
.icon_bottom{
transform: rotate(90deg);
}
.popup_group_item { .popup_group_item {
padding: 32rpx 30rpx; padding: 32rpx 30rpx;
display: flex; display: flex;

View File

@ -1,112 +1,118 @@
<template> <template>
<view class=" writeBg "> <view>
<view class="container_input marginTop_none"> <block v-if="showComponent">
<view class="container_input_item"> <view class=" writeBg ">
<view class="container_input_item_label"><span>是否推荐</span></view> <view class="container_input marginTop_none">
<view class="container_input_item_value"> <view class="container_input_item">
<switch :checked="addGoodsSecoundData.is_good == 1" color="#E93323" style="transform:scale(0.8)" <view class="container_input_item_label"><span>是否推荐</span></view>
@change="isGood" /> <view class="container_input_item_value">
</view> <switch :checked="addGoodsSecoundData.is_good == 1" color="#E93323" style="transform:scale(0.8)"
</view> @change="isGood" />
<view class="container_input_item">
<view class="container_input_item_label"><span>是否开启礼包</span></view>
<view class="container_input_item_value">
<switch :checked="addGoodsSecoundData.is_gift_bag == 1" color="#E93323" style="transform:scale(0.8)"
@change="isGiftBag" />
</view>
</view>
</view>
<view class="tip">
<span class="iconfont">&#xe688;</span>
<span>开启后此商品只能在分销礼包中展示并销售</span>
</view>
<view class="container_input marginTop_none">
<view class="container_input_item">
<view class="container_input_item_label"><span>限购数量</span></view>
<view class="container_input_item_value">
<input v-model="addGoodsSecoundData.once_count" type="number" value="" placeholder="请输入限购数量"
placeholder-class="inputPlaceHolder" />
</view>
</view>
<view class="container_input_item">
<view class="container_input_item_label"><span>商品排序</span></view>
<view class="container_input_item_value">
<input v-model="addGoodsSecoundData.sort" type="number" value="" placeholder="请输入商品排序"
placeholder-class="inputPlaceHolder" />
</view>
</view>
</view>
<view class="content_list">
<view class="content_list_item" @click="inputGoodsDetils">
<view>商品详情</view>
<view class="content_list_item_han">
<span v-if="disModel" style="color: #000000">去修改</span>
<span v-else>设置详情</span>
<span class="iconfont">&#xe6bd;</span>
</view>
</view>
<view class="content_list_video">
<view class="content_list_video_title">商品视频</view>
<view class="video_list">
<view class="video_list_item photo" v-if="addGoodsSecoundData.video_link">
<view class="jiao" @click="deleteImage()">
<!-- video标签在app端层级过高 -->
<!--#ifndef APP-PLUS-->
<video :src="addGoodsSecoundData.video_link"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<img src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/3/video_bg.png" style=" width:150rpx" ></img>
<!--#endif-->
<image src="../static/images/close.png" mode="widthFix"></image>
</view> </view>
<!--#ifndef APP-PLUS-->
<view style="position: absolute;">
<view class="videoHover" @click="videoshow">
</view>
<text class="video-text">点击可预览视频</text>
</view>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<view class='preview_video'>
<view class="videoHover" @click="videoshow">
</view>
<text class="video-text">点击可预览视频</text>
</view>
<!--#endif-->
</view> </view>
<view class="container_input_item">
<view class="container_input_item_label"><span>是否开启礼包</span></view>
<view class="container_input_item_value">
<switch :checked="addGoodsSecoundData.is_gift_bag == 1" color="#E93323" style="transform:scale(0.8)"
@change="isGiftBag" />
<view class="photo" @click="uploadVideo" v-else>
<view>
<image src="../static/images/creamer.png" mode="widthFix"></image>
</view> </view>
<view>添加视频</view>
</view> </view>
</view> </view>
</view> <view class="tip">
</view> <span class="iconfont">&#xe688;</span>
<view v-if="showVideo" class="video-count"> <span>开启后此商品只能在分销礼包中展示并销售</span>
<!--#ifndef APP-PLUS--> </view>
<video id="myVideo" class="videoLink" autoplay loop muted :src="addGoodsSecoundData.video_link"></video> <view class="container_input marginTop_none">
<!--#endif--> <view class="container_input_item">
<!--#ifdef APP-PLUS--> <view class="container_input_item_label"><span>限购数量</span></view>
<view class="container_input_item_value">
<input v-model="addGoodsSecoundData.once_count" type="number" value="" placeholder="请输入限购数量"
placeholder-class="inputPlaceHolder" />
</view>
</view>
<view class="container_input_item">
<view class="container_input_item_label"><span>商品排序</span></view>
<view class="container_input_item_value">
<input v-model="addGoodsSecoundData.sort" type="number" value="" placeholder="请输入商品排序"
placeholder-class="inputPlaceHolder" />
</view>
</view>
</view>
<view class="content_list">
<view class="content_list_item" @click="inputGoodsDetils">
<view>商品详情</view>
<view class="content_list_item_han">
<span v-if="disModel" style="color: #000000">去修改</span>
<span v-else>设置详情</span>
<span class="iconfont">&#xe6bd;</span>
</view>
</view>
<view class="content_list_video">
<view class="content_list_video_title">商品视频</view>
<view class="video_list">
<view class="video_list_item photo" v-if="addGoodsSecoundData.video_link">
<view class="jiao" @click="deleteImage()">
<!-- video标签在app端层级过高 -->
<!--#ifndef APP-PLUS-->
<video :src="addGoodsSecoundData.video_link"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<img src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/3/video_bg.png"
style=" width:150rpx"></img>
<!--#endif-->
<image src="../static/images/close.png" mode="widthFix"></image>
</view>
<video id="myVideo" class="videoLink" autoplay loop <!--#ifndef APP-PLUS-->
:src='addGoodsSecoundData.video_link && (addGoodsSecoundData.video_link.substring(0,4) == "http" || addGoodsSecoundData.video_link.substring(0,5) == "https") ?addGoodsSecoundData.video_link : "http:" + addGoodsSecoundData.video_link'></video> <view style="position: absolute;">
<!--#endif--> <view class="videoHover" @click="videoshow">
</view>
<text class="video-text">点击可预览视频</text>
</view>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<view class='preview_video'>
<view class="videoHover" @click="videoshow">
</view>
<text class="video-text">点击可预览视频</text>
</view>
<!--#endif-->
</view>
<view class="photo" @click="uploadVideo" v-else>
<view>
<image src="../static/images/creamer.png" mode="widthFix"></image>
</view>
<view>添加视频</view>
</view>
</view>
</view>
</view>
<view v-if="showVideo" class="video-count">
<!--#ifndef APP-PLUS-->
<video id="myVideo" class="videoLink" autoplay loop muted :src="addGoodsSecoundData.video_link"></video>
<!--#endif-->
<!--#ifdef APP-PLUS-->
<video id="myVideo" class="videoLink" autoplay loop
:src='addGoodsSecoundData.video_link && (addGoodsSecoundData.video_link.substring(0,4) == "http" || addGoodsSecoundData.video_link.substring(0,5) == "https") ?addGoodsSecoundData.video_link : "http:" + addGoodsSecoundData.video_link'></video>
<!--#endif-->
</view>
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view>
<view class="handle dobuButton">
<view class="handle_button margin_right" @click="lastStep">上一步</view>
<view class="handle_button" @click="submitCreatedGoods">提交</view>
</view>
</view> </view>
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view> </block>
<view class="handle dobuButton"> <view class="handle_button" @click="submitCreatedGoods">提交</view>
<view class="handle_button margin_right" @click="lastStep">上一步</view>
<view class="handle_button" @click="submitCreatedGoods">提交</view>
</view>
</view> </view>
</template> </template>
<script> <script>
@ -148,7 +154,8 @@
}, },
data() { data() {
return { return {
showVideo:false, showComponent: false,
showVideo: false,
disModel: false, disModel: false,
upload_max: 10, upload_max: 10,
uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`, uploadUrl: `${HTTP_REQUEST_URL}/api/upload/video`,
@ -166,7 +173,7 @@
// console.log('123'); // console.log('123');
this.initData(); this.initData();
}, },
watch: { watch: {
addGoodsSecoundData: { addGoodsSecoundData: {
handler(val) { handler(val) {
@ -184,16 +191,16 @@
} }
}, },
methods: { methods: {
videoshow() { videoshow() {
this.showVideo = true this.showVideo = true
this.videoContext = uni.createVideoContext('myVideo', this); this.videoContext = uni.createVideoContext('myVideo', this);
this.$nextTick(() => { this.$nextTick(() => {
this.videoContext.play(); this.videoContext.play();
}) })
// this.video_link = this.formData.video_link; // this.video_link = this.formData.video_link;
// this.videoContext.requestFullScreen({ direction: 90 }); // this.videoContext.requestFullScreen({ direction: 90 });
// this.videoContext.play(); this.videoplay = true; // this.videoContext.play(); this.videoplay = true;
}, },
initData() { initData() {
let editGoodsDetils = {}; let editGoodsDetils = {};
if (getStorage('goodsDis')) { if (getStorage('goodsDis')) {
@ -235,7 +242,7 @@
submitCreatedGoods() { submitCreatedGoods() {
Loading(); Loading();
let waitDeleteData = ['addGoodsFormData', 'singleSpecification', 'attrValue', 'modifyPriceData', let waitDeleteData = ['addGoodsFormData', 'singleSpecification', 'attrValue', 'modifyPriceData',
'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils', 'canChange', 'canChangeSecound' 'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils', 'canChange', 'canChangeSecound', 'editCommodity'
]; ];
let attrValue = getStorage('addGoodsFormData').spec_type == 0 ? [getStorage('singleSpecification')] : let attrValue = getStorage('addGoodsFormData').spec_type == 0 ? [getStorage('singleSpecification')] :
getStorage('attrValue'); getStorage('attrValue');
@ -248,12 +255,25 @@
}, },
video_link: this.addGoodsSecoundData.video_link video_link: this.addGoodsSecoundData.video_link
}; };
if (attrValue) {
if(attrValue){ postData.attrValue = attrValue.filter(item => item != '');
postData.attrValue = attrValue.filter(item => item != ''); postData.attrValue[0].bar_code
postData.attrValue[0].bar_code }
} let info = getStorage('editCommodity');
// console.log(postData); Object.keys(info).forEach(key=>{
postData[key]=info[key];
})
postData.stock = postData.attrValue[0].stock;
// console.log(postData);
if(!postData.store_name||postData.store_name?.trim().length<=0)return Toast('请输入商品名称');
if(!postData.imageList||postData.imageList.length<=0)return Toast('请上传商品图片');
if(postData.cate_name?.trim().length<=0)return Toast('请选择平台分类');
if(postData.unit_name?.trim().length<=0)return Toast('请输入商品单位');
if(!postData.attrValue[0].price||postData.attrValue[0].price<0)return Toast('价格不能小于0');
if(!postData.stock||postData.stock<0)return Toast('库存不能小于0');
if(!postData.content.title||postData.content.title?.trim().length<=0)return Toast('请输入商品详情');
if(!postData.content.image||postData.content.image?.length<=0)return Toast('请上传商品图片');
// return Toast('');
if (getStorage('addGoodsFormData').spec_type == 0) { if (getStorage('addGoodsFormData').spec_type == 0) {
// postData.attr = [getStorage('singleSpecification')]; // postData.attr = [getStorage('singleSpecification')];
} }
@ -269,7 +289,7 @@
Modal('提交成功', '点击确定,返回商品管理', { Modal('提交成功', '点击确定,返回商品管理', {
showCancel: false showCancel: false
}).then(() => { }).then(() => {
uni.removeStorageSync('singleSpecification') uni.removeStorageSync('singleSpecification')
uni.redirectTo({ uni.redirectTo({
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
}) })
@ -322,8 +342,8 @@
uni.chooseVideo({ uni.chooseVideo({
sourceType: ['camera', 'album'], sourceType: ['camera', 'album'],
success: res => { success: res => {
console.log(res) console.log(res)
if (Math.ceil(res.size / 1024) < this.upload_max * 1024) { if (Math.ceil(res.size / 1024) < this.upload_max * 1024) {
uni.uploadFile({ uni.uploadFile({
url: this.uploadUrl, // url: this.uploadUrl, //
@ -355,11 +375,11 @@
} }
}, },
fail: err => { fail: err => {
// //
// uni.showModal({ // uni.showModal({
// content: JSON.stringify(err) // content: JSON.stringify(err)
// }); // });
console.log(err) console.log(err)
} }
}); });
}, },
@ -413,32 +433,34 @@
} }
} }
} }
.videoHover {
width: 180rpx; .videoHover {
height: 180rpx; width: 180rpx;
height: 180rpx;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
left: 0;
z-index: 10;
view {
width: 50rpx;
height: 50rpx;
background: #000000;
border-radius: 50rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: absolute;
top: 0;
left: 0;
z-index: 10;
view { .iconfont {
width: 50rpx; color: #ffffff;
height: 50rpx; font-size: 21rpx;
background: #000000;
border-radius: 50rpx;
display: flex;
align-items: center;
justify-content: center;
.iconfont {
color: #ffffff;
font-size: 21rpx;
}
} }
} }
}
.photo { .photo {
border: 1px solid #dddddd; border: 1px solid #dddddd;
opacity: 1; opacity: 1;
@ -481,10 +503,12 @@
height: 150rpx; height: 150rpx;
} }
} }
.preview_video{
position: absolute; .preview_video {
position: absolute;
}
}
.container_input { .container_input {
background: #fff; background: #fff;
padding: 0 20rpx; padding: 0 20rpx;
@ -603,6 +627,7 @@
.marginTop_none { .marginTop_none {
margin-top: 0; margin-top: 0;
} }
.video-count { .video-count {
position: fixed; position: fixed;
width: 600rpx; width: 600rpx;
@ -621,6 +646,7 @@
height: 500rpx; height: 500rpx;
} }
} }
// .writeBg { // .writeBg {
// background: #fff; // background: #fff;
// } // }

View File

@ -14,7 +14,7 @@
<script> <script>
import selectForm from '../components/selectForm.vue'; import selectForm from '../components/selectForm.vue';
import { navigateTo, navigateBack, serialize, setStorage, getStorage} from '../../../libs/uniApi.js'; import { navigateTo, navigateBack, serialize, setStorage, getStorage } from '../../../libs/uniApi.js';
// attrValue // attrValue
export default { export default {
components:{ components:{

View File

@ -7,8 +7,8 @@
<view class="store_bg"> <view class="store_bg">
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺背景图</view> <view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>上传店铺背景图</view>
<block v-if="images[0].img"> <block v-if="images[0].img">
<!-- <u--image :showLoading="true" :src="images[0].img" width="388px" height="210.53rpx" radius="4px" <!-- <u--image :showLoading="true" :src="images[0].img" width="388px" height="210.53rpx" radius="4px"
@click="delImg(0)" mode="aspectFit"></u--image> --> @click="delImg(0)" mode="aspectFit"></u--image> -->
<u--image :showLoading="true" :src="images[0].img" width="360px" height="210.53rpx" radius="4px" <u--image :showLoading="true" :src="images[0].img" width="360px" height="210.53rpx" radius="4px"
@click="delImg(2)"></u--image> @click="delImg(2)"></u--image>
</block> </block>
@ -74,9 +74,11 @@
<view class="flex_a_c"> <view class="flex_a_c">
<text class="sub_title">配送方式</text> <text class="sub_title">配送方式</text>
<view class="flex"> <view class="flex">
<checkbox-group name="" @change="checkboxChange" > <checkbox-group name="" @change="checkboxChange">
<checkbox disabled='true' :checked="isZiti" :value="check.ziti" /><text class="text ziti">到店自提(加入供应链)</text> <checkbox disabled='true' :checked="isZiti" :value="check.ziti" /><text
<checkbox disabled='true' :checked="isKuaidi" :value="check.kuaidi" /><text class="text">快递配送</text> class="text ziti">到店自提(加入供应链)</text>
<checkbox disabled='true' :checked="isKuaidi" :value="check.kuaidi" /><text
class="text">快递配送</text>
</checkbox-group> </checkbox-group>
</view> </view>
</view> </view>
@ -110,10 +112,12 @@
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>店铺营业时间:</view> <view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>店铺营业时间:</view>
<view class="bus_time flex_a_c"> <view class="bus_time flex_a_c">
<view class="select" @click="beginTimeShow = true"> <view class="select" @click="beginTimeShow = true">
{{ mer_take_time[0] ? mer_take_time[0] : '选择开始时间' }}</view> {{ mer_take_time[0] ? mer_take_time[0] : '选择开始时间' }}
</view>
<view class="select" @click="overTimeShow = true"> <view class="select" @click="overTimeShow = true">
{{ mer_take_time[1] ? mer_take_time[1] : '选择结束时间' }}</view> {{ mer_take_time[1] ? mer_take_time[1] : '选择结束时间' }}
</view>
</view> </view>
</block> </block>
</view> </view>
@ -134,13 +138,13 @@
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>客服电话</view> <view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>客服电话</view>
<input class="com_input" type="number" v-model="servicePhone" placeholder="输入客服电话"> <input class="com_input" type="number" v-model="servicePhone" placeholder="输入客服电话">
</view> </view>
<!-- <view class="item_cell flex_a_c" v-if="type_code!='TypeFamousSpecialties'||type_code!='TypeLocalCuisine'||type_code!='TypeFeaturedCultural'" > <!-- <view class="item_cell flex_a_c" v-if="type_code!='TypeFamousSpecialties'||type_code!='TypeLocalCuisine'||type_code!='TypeFeaturedCultural'" >
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao" v-if="credit_buy"></i>开启先货后款</view> <view class="sub_title flex_a_c"><i class="iconfont icon-xinghao" v-if="credit_buy"></i>开启先货后款</view>
<u-switch v-model="credit_buy" @change="change"></u-switch> <u-switch v-model="credit_buy" @change="change"></u-switch>
</view> --> </view>
<!-- <view class="item_cell flex_a_c" v-if="credit_buy"> <view class="item_cell flex_a_c" v-if="credit_buy">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算周期</view> <view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算周期</view>
<input type="number" v-model="settle_cycle" placeholder="请输入 /周期单位为:天"> <input type="number" v-model="settle_cycle" placeholder="请输入 /周期单位为:天">
</view> </view>
@ -148,8 +152,8 @@
<view class="item_cell flex_a_c" v-if="credit_buy"> <view class="item_cell flex_a_c" v-if="credit_buy">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算利率</view> <view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算利率</view>
<input type="number" maxlength="5" v-model="interest_rate" placeholder="请输入 /利率单位为: %"> <input type="number" maxlength="5" v-model="interest_rate" placeholder="请输入 /利率单位为: %">
</view> --> </view>
<!-- <view class="remarks">*利率结算范围为:0.01 ~ 0.1 利率单位为:%</view> --> <view class="remarks">*利率结算范围为:0.01 ~ 0.1 利率单位为:%</view> -->
<!-- <view class="item_cell"> <!-- <view class="item_cell">
<view class="if_btn flex_a_c_j_sb"> <view class="if_btn flex_a_c_j_sb">
<text class="sub_title">是否开启商户</text> <text class="sub_title">是否开启商户</text>
@ -221,7 +225,7 @@
}, },
isZiti: false, isZiti: false,
isKuaidi: false, isKuaidi: false,
delivery_way: [1,2], delivery_way: [1, 2],
takeName: '', takeName: '',
takePhone: '', takePhone: '',
servicePhone: '', servicePhone: '',
@ -271,16 +275,16 @@
credit_buy: false, // credit_buy: false, //
interest_rate: '', // interest_rate: '', //
settle_cycle: '', // settle_cycle: '', //
mer_name:'', mer_name: '',
type_code:'' type_code: ''
} }
}, },
onLoad(e) { onLoad(e) {
this.id = e.mer_id this.id = e.mer_id
this.getMerchantInfo(e.mer_id) this.getMerchantInfo(e.mer_id)
this.isZiti = true this.isZiti = true
this.isKuaidi = true this.isKuaidi = true
}, },
onShow() {}, onShow() {},
methods: { methods: {
@ -288,7 +292,7 @@
merchantInfoAPI({ merchantInfoAPI({
id id
}).then(res => { }).then(res => {
this.mer_name= res.data.mer_name this.mer_name = res.data.mer_name
this.images[0].img = res.data.mer_banner this.images[0].img = res.data.mer_banner
this.images[1].img = res.data.mer_avatar this.images[1].img = res.data.mer_avatar
this.images[2].img = res.data.mini_banner this.images[2].img = res.data.mini_banner
@ -305,11 +309,11 @@
res.data.mer_take_day.forEach((item, i) => { res.data.mer_take_day.forEach((item, i) => {
this.dateWeek[Number(item) - 1].isCheck = true this.dateWeek[Number(item) - 1].isCheck = true
}) })
this.type_code= res.data.type_code this.type_code = res.data.type_code
this.mer_take_time = res.data.mer_take_time this.mer_take_time = res.data.mer_take_time
this.intro = res.data.mer_info this.intro = res.data.mer_info
this.cruxText = res.data.mer_keyword this.cruxText = res.data.mer_keyword
this.servicePhone = res.data.service_phone this.servicePhone = res.data.service_phone
this.mer_address = res.data.mer_address this.mer_address = res.data.mer_address
this.merState = res.data.mer_state === 1 ? true : false this.merState = res.data.mer_state === 1 ? true : false
@ -374,7 +378,7 @@
mer_avatar: this.images[1].img, mer_avatar: this.images[1].img,
mini_banner: this.images[2].img, mini_banner: this.images[2].img,
mer_certificate: this.images[3].img, mer_certificate: this.images[3].img,
delivery_way: [1,2], delivery_way: [1, 2],
mer_take_name: this.takeName, mer_take_name: this.takeName,
mer_take_phone: this.takePhone, mer_take_phone: this.takePhone,
mer_take_address: this.detailSite, mer_take_address: this.detailSite,
@ -408,9 +412,9 @@
// url:'/pages/moreProject/moreProject' // url:'/pages/moreProject/moreProject'
// }) // })
uni.redirectTo({ uni.redirectTo({
url:'/pages/moreProject/moreProject' url: '/pages/moreProject/moreProject'
}) })
}, 1000) }, 1000)
}).catch(err => { }).catch(err => {
Toast(err) Toast(err)
@ -443,7 +447,7 @@
// sizeType: ['original', 'compressed'], // sizeType: ['original', 'compressed'],
// sourceType: ['album', 'camera'], // sourceType: ['album', 'camera'],
// success: function(res) { // success: function(res) {
// uni.showLoading({ // uni.showLoading({
// title: '...' // title: '...'
// }) // })
@ -461,7 +465,7 @@
// Toast('') // Toast('')
// } // }
// }); // });
}, },
delImg(i) { delImg(i) {
let that = this let that = this

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="input_content"> <view class="input_content">
<view class="input_content_textarea"> <view class="input_content_textarea">
<textarea v-model="prodectContent.store_name" placeholder="请输入简介" placeholder-class="placeholderStyle" <textarea v-model="prodectContent.store_name" placeholder="请输入商品详情" placeholder-class="placeholderStyle"
:maxlength="maxLength" /> :maxlength="maxLength" />
<view><text v-if="prodectContent.store_name">{{prodectContent.store_name.length}}</text><text <view><text v-if="prodectContent.store_name">{{prodectContent.store_name.length}}</text><text
v-else>0</text>/{{maxLength}}</view> v-else>0</text>/{{maxLength}}</view>
@ -31,7 +31,8 @@
<text v-else>0</text>/200 <text v-else>0</text>/200
</view> </view>
</view> </view>
<view class="input_content_describe_textarea"><textarea v-model="prodectContent.store_info" value="" <view class="input_content_describe_textarea">
<textarea v-model="prodectContent.store_info" value=""
placeholder="请填写商品简介" placeholderClass="placeholderClass" maxlength="200" /></view> placeholder="请填写商品简介" placeholderClass="placeholderClass" maxlength="200" /></view>
</view> </view>
@ -40,7 +41,7 @@
<view class="input_content_keyword_value"><input v-model="prodectContent.keyword" type="text" value="" <view class="input_content_keyword_value"><input v-model="prodectContent.keyword" type="text" value=""
placeholder="填写关键字" /></view> placeholder="填写关键字" /></view>
</view> </view>
<avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx"> <avatar style="height: 1px;" @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx">
</avatar> </avatar>
</view> </view>
</template> </template>
@ -90,7 +91,7 @@
prodectContent: { prodectContent: {
handler(val) { handler(val) {
// console.log(val.store_name); // console.log(val.store_name);
this.upstore=val.store_name this.upstore=val.store_name
this.$emit('getProductContent', val); this.$emit('getProductContent', val);
}, },
@ -110,7 +111,7 @@
} }
}, },
mounted() { mounted() {
// console.log(this.$props.prodectContent);
}, },
methods: { methods: {
handleChooseImage() { handleChooseImage() {
@ -142,10 +143,11 @@
[TOKENNAME]: 'Bearer ' + store.state.app.token [TOKENNAME]: 'Bearer ' + store.state.app.token
}, },
success: (uploadFileRes) => { success: (uploadFileRes) => {
// console.log(uploadFileRes.data); // console.log(JSON.parse(uploadFileRes.data));
let imgData = JSON.parse(uploadFileRes.data) let imgData = JSON.parse(uploadFileRes.data)
// that.prodectContent.imageList.push(imgData.data.path) // that.prodectContent.imageList.push(imgData.data.path)
that.prodectContent = { imageList: [...that.prodectContent.imageList, imgData.data.path] ,store_name:this.upstore} if(!that.prodectContent.imageList)that.prodectContent.imageList=[];
that.prodectContent = { imageList: [...that.prodectContent.imageList, imgData.data.path] ,store_name:this.upstore};
}, },
complete(res) { complete(res) {
// console.log(res) // console.log(res)

View File

@ -5,7 +5,7 @@
<view class="title_search"> <view class="title_search">
<span class="iconfont">&#xe67d;</span> <span class="iconfont">&#xe67d;</span>
<form @submit="search" report-submit="true"> <form @submit="search" report-submit="true">
<input type="text" :name="where.keyword" v-model="where.keyword" placeholder="搜索商品" confirm-type='search'/> <input type="text" v-model="where.keyword" placeholder="搜索商品" confirm-type='search'/>
</form> </form>
</view> </view>
</view> </view>

View File

@ -47,12 +47,13 @@
<swiper-item :class="{ active: 1 == swiperCur }"> <swiper-item :class="{ active: 1 == swiperCur }">
<view class="slide-navigator"> <view class="slide-navigator">
<!-- 隐藏暂时不需要 --> <!-- 隐藏暂时不需要 -->
<navigator class="item" :url="`/pages/product/addGoods/freightTemplate?mer_id=${mer_id}`" <!-- <navigator class="item"
hover-class='none'> :url="`/pages/product/addGoods/freightTemplate?mer_id=${mer_id}`"
<image mode='widthFix' class="image" src="../static/images/product_freight.png"> hover-class='none'>
</image> <image mode='widthFix' class="image" src="../static/images/product_freight.png">
<text class="text">运费模板</text> </image>
</navigator> <text class="text">运费模板</text>
</navigator> -->
<navigator class="item" <navigator class="item"
:url="`/pages/product/addGoods/mulSpecification?mer_id=${mer_id}`" :url="`/pages/product/addGoods/mulSpecification?mer_id=${mer_id}`"
hover-class='none'> hover-class='none'>
@ -60,12 +61,12 @@
src="../static/images/product_specification.png"></image> src="../static/images/product_specification.png"></image>
<text class="text">规格模板</text> <text class="text">规格模板</text>
</navigator> </navigator>
<navigator class="item" <!-- <navigator class="item"
:url="`/pages/users/online_warehousing/index?mer_id=${mer_id}&product_id=${data.product_id}&unique=${data.unique}`" :url="`/pages/users/online_warehousing/index?mer_id=${mer_id}&product_id=${data.product_id}&unique=${data.unique}`"
hover-class='none'> hover-class='none'>
<image mode='widthFix' class="image" src="@/static/images/daoru.png"></image> <image mode='widthFix' class="image" src="@/static/images/daoru.png"></image>
<text class="text">商品导入</text> <text class="text">商品导入</text>
</navigator> </navigator> -->
</view> </view>
</swiper-item> </swiper-item>
</block> </block>
@ -124,9 +125,9 @@
</view> </view>
<view class="operation acea-row row-between-wrapper"> <view class="operation acea-row row-between-wrapper">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<view class="" class="bnt" @click="Fonline(item)" style="width:150rpx"> <!-- <view class="" class="bnt" @click="Fonline(item)" style="width:150rpx">
线上入库 线上入库
</view> </view> -->
<view class="" class="bnt" @click="Fline(item)" style="width:150rpx"> <view class="" class="bnt" @click="Fline(item)" style="width:150rpx">
线下入库 线下入库
</view> </view>
@ -169,7 +170,7 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<view class="shuru" v-if="this.on_line == 1"> <view class="shuru" v-if="this.on_line == 1">
数量: <input type="number" v-model="data.number" placeholder="请输入"> 数量: <input type="number" v-model="data.number" placeholder="请输入">
</view> </view>
@ -245,7 +246,8 @@
on_line: '', on_line: '',
isshow: false, isshow: false,
num: -1, num: -1,
ll: 0 ll: 0,
} }
}, },
onLoad(options) { onLoad(options) {
@ -262,10 +264,10 @@
}, },
onReachBottom() { onReachBottom() {
// console.log(this.status, '222222222') // console.log(this.status, '222222222')
if (this.status == 'nomore') return; if (this.status == 'nomore') return;
this.status = 'loading'; this.status = 'loading';
this.where.page = ++this.where.page; this.where.page = ++this.where.page;
this.getList(this.mer_id, true); this.getList(this.mer_id, false);
}, },
methods: { methods: {
@ -342,7 +344,17 @@
this.checkboxList1 = item.attrValue this.checkboxList1 = item.attrValue
this.data.product_id = item.attrValue[0].product_id this.data.product_id = item.attrValue[0].product_id
this.data.unique = item.attrValue[0].unique this.data.unique = item.attrValue[0].unique
this.show = true if (item.spec_type == 1) {
this.show = true
} else {
navigateTo(1, '/pages/users/online_warehousing/index', {
mer_id: this.mer_id,
product_id: this.data.product_id,
unique: this.data.unique,
});
}
}, },
//线 //线
@ -381,8 +393,8 @@
} else { } else {
postImport(this.mer_id, this.data).then(res => { postImport(this.mer_id, this.data).then(res => {
this.data.unique = '' this.data.unique = ''
this.data.product_id='' this.data.product_id = ''
this.data.number=1 this.data.number = 1
this.loading = false this.loading = false
this.loaded = false this.loaded = false
this.getList(this.mer_id, true); this.getList(this.mer_id, true);
@ -391,15 +403,15 @@
title: res.message title: res.message
}) })
this.data.unique = '' this.data.unique = ''
this.data.product_id='' this.data.product_id = ''
this.data.number=1 this.data.number = 1
}).catch(err => { }).catch(err => {
this.show = false this.show = false
this.data.unique = '' this.data.unique = ''
this.data.product_id='' this.data.product_id = ''
this.data.number=1 this.data.number = 1
this.$util.Tips({ this.$util.Tips({
title: '请选择规格后再次进行入库' title: '请选择规格后再次进行入库'
}) })
@ -414,12 +426,15 @@
title: '请选择规格' title: '请选择规格'
}) })
} else { } else {
navigateTo(1, '/pages/users/online_warehousing/index', { navigateTo(1, '/pages/users/online_warehousing/index', {
mer_id: this.mer_id, mer_id: this.mer_id,
product_id: this.data.product_id, product_id: this.data.product_id,
unique: this.data.unique, unique: this.data.unique,
}); });
} }
} }
@ -474,8 +489,7 @@
res => { res => {
that.loading = false; that.loading = false;
that.loaded = res.data.list.length < that.where.limit; that.loaded = res.data.list.length < that.where.limit;
// that.productList.push.apply(that.productList, res.data.list); that.productList.push.apply(that.productList, res.data.list);
that.productList.push(...res.data.list);
that.where.page = that.where.page + 1; that.where.page = that.where.page + 1;
}, },
@ -541,6 +555,7 @@
title: '下架成功', title: '下架成功',
icon: 'none' icon: 'none'
}) })
that.getList(this.mer_id,false)
} else if (res.cancel) { } else if (res.cancel) {
// console.log(''); // console.log('');
} }
@ -561,6 +576,7 @@
icon: 'success' icon: 'success'
}, () => { }, () => {
that.$set(item, 'is_show', item.is_show == 0 ? 1 : 0); that.$set(item, 'is_show', item.is_show == 0 ? 1 : 0);
that.getList(this.mer_id,false)
}); });
}).catch(err => { }).catch(err => {
return that.$util.Tips({ return that.$util.Tips({

View File

@ -226,7 +226,8 @@
<text class="count">{{item.relevance.length}}</text> <text class="count">{{item.relevance.length}}</text>
</view> </view>
</view> </view>
<view v-if="showManage == item.author.uid || showManage " class="manage" :style="{'margin-top':item.relevance.length>0?'-115rpx':'0px'}"> <view v-if="showManage == item.author.uid || showManage " class="manage"
:style="{'margin-top':item.relevance.length>0?'-115rpx':'0px'}">
<view class="manage-gou"></view> <view class="manage-gou"></view>
<navigator hover-class="none" <navigator hover-class="none"
:url="'/pages/plantGrass/plant_release/index?id='+item.community_id+'&type=2'" :url="'/pages/plantGrass/plant_release/index?id='+item.community_id+'&type=2'"
@ -304,16 +305,16 @@
deleteAndroidHeight deleteAndroidHeight
这两个参数用于控制评论等的高度 这两个参数用于控制评论等的高度
--> -->
<douyin-scrollview ref="comments" :deleteIOSHeight="36" :deleteAndroidHeight="15" :userInfo="userInfo" <douyin-scrollview ref="comments" :deleteIOSHeight="36" :deleteAndroidHeight="15" :userInfo="userInfo"
@closeScrollview="closeScrollview" @successFul="pinlunFun"></douyin-scrollview> @closeScrollview="closeScrollview" @successFul="pinlunFun"></douyin-scrollview>
</view> </view>
</uni-popup> </uni-popup>
<!-- 他提到的宝贝弹窗 --> <!-- 他提到的宝贝弹窗 -->
<uni-popup type="bottom" ref="pinglunMentioned" style="background-color: rebeccapurple;"> <uni-popup type="bottom" ref="pinglunMentioned">
<mentioned ref="mentioned" @close="closePopup" :list="moreList" :uid="authorUid" ></mentioned> <mentioned ref="mentioned" @close="closePopup" :list="moreList" :uid="authorUid"></mentioned>
</uni-popup> </uni-popup>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<view class="fixed-head"> <view class="fixed-head">
@ -361,6 +362,7 @@
import { import {
navigateBack navigateBack
} from '../../../libs/uniApi'; } from '../../../libs/uniApi';
import list from '../../../uni_modules/uview-ui/libs/config/props/list';
export default { export default {
computed: configMap({ computed: configMap({
statusBarHeight: 0, statusBarHeight: 0,
@ -718,6 +720,7 @@
// }); // });
// })' // })'
// that.isUser ? // that.isUser ?
videoList({ videoList({
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
@ -896,11 +899,43 @@
// if(!this.loadVideo) return // if(!this.loadVideo) return
this.loadVideo = true this.loadVideo = true
// 这个方法主要就是用来第一次进入视频播放时用来处理 // 这个方法主要就是用来第一次进入视频播放时用来处理
deoList(this.videoID).then(async (res) => { // deoList(this.videoID).then(async (res) => {
// this.loadVideo = false
// this.userUid = res.data.uid
// this.page = 1;
// var msg = [res.data];
// for (let i = 0; i < msg.length; i++) {
// msg[i]['isMore'] = false
// msg[i]['playIng'] = false
// msg[i]['state'] = false
// msg[i]['isplay'] = false
// msg[i]['loading'] = false
// msg[i]['community_id'] = msg[i]['community_id'].toString()
// }
// this.dataList = msg;
// if (this.dataList.length !== 0) {
// this.dataList[this.k].state = 'play';
// uni.createVideoContext(this.dataList[this.k].community_id, this).play()
// }
// }).catch(err => {
// return uni.showToast({
// title: err,
// icon: 'none',
// duration: 2000
// });
// })
videoList({
page: this.page,
limit: this.limit,
id: this.videoID
}).then(async (res) => {
this.loadVideo = false this.loadVideo = false
this.userUid = res.data.uid this.userUid = res.data.uid
this.page = this.page + 1;
var msg = [res.data]; var msg =res.data.list;
for (let i = 0; i < msg.length; i++) { for (let i = 0; i < msg.length; i++) {
msg[i]['isMore'] = false msg[i]['isMore'] = false
msg[i]['playIng'] = false msg[i]['playIng'] = false
@ -914,6 +949,7 @@
if (this.dataList.length !== 0) { if (this.dataList.length !== 0) {
this.dataList[this.k].state = 'play'; this.dataList[this.k].state = 'play';
uni.createVideoContext(this.dataList[this.k].community_id, this).play() uni.createVideoContext(this.dataList[this.k].community_id, this).play()
this.page = that.page + 1
} }
}).catch(err => { }).catch(err => {
return uni.showToast({ return uni.showToast({
@ -924,7 +960,6 @@
}) })
// this.isUser ? // this.isUser ?
// myVideoList(this.userUid, { // myVideoList(this.userUid, {
// page: this.page, // page: this.page,
@ -1113,7 +1148,6 @@
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// .video-list{ // .video-list{
// padding: 200rpx 28.07rpx 0 28.07rpx; // padding: 200rpx 28.07rpx 0 28.07rpx;
// display: flex; // display: flex;
@ -1133,7 +1167,7 @@
/* #ifdef MP */ /* #ifdef MP */
padding-top: 200rpx; padding-top: 200rpx;
/* #endif */ /* #endif */
// background-color: #000000; // background-color: #000000;
background-color: #F5F5F5; background-color: #F5F5F5;
@ -1256,18 +1290,19 @@
left: 0; left: 0;
top: 70rpx; top: 70rpx;
height: 86rpx; height: 86rpx;
.icon-xiangzuo { .icon-xiangzuo {
margin-left: 10px; margin-left: 10px;
width: 20px; width: 20px;
height: 20px; height: 20px;
color: #ffffff; color: #ffffff;
} }
padding-right: 30rpx; padding-right: 30rpx;
} }

View File

@ -190,6 +190,9 @@
uni.hideKeyboard(); uni.hideKeyboard();
}else{ }else{
that.getUserInfo(); that.getUserInfo();
} }
}, },
/** /**
@ -227,7 +230,8 @@
let reply_id = that.reply_id ? that.reply_id : 0 let reply_id = that.reply_id ? that.reply_id : 0
replyCreateApi(that.id,{content: that.content,reply_id: reply_id}).then(res => { replyCreateApi(that.id,{content: that.content,reply_id: reply_id}).then(res => {
// console.log(res.message) // console.log(res.message)
if(res.status == 1){ // console.log(res)
if(res.status == 200){
if(that.isChild){ if(that.isChild){
if(that.list[that.index]['children']){ if(that.list[that.index]['children']){
that.list[that.index]['children'].push(res.data) that.list[that.index]['children'].push(res.data)
@ -472,7 +476,7 @@
.send{ .send{
font-size: 26rpx; font-size: 26rpx;
color: #ffffff; color: #ffffff;
padding: 12rpx 30rpx; padding: 15rpx 30rpx;
background: #E93323; background: #E93323;
border-radius: 30rpx; border-radius: 30rpx;
text-align: center; text-align: center;

View File

@ -435,7 +435,9 @@
}, },
watch: { watch: {
k(new_k, old_k) { k(new_k, old_k) {
const max = new_k + 2; const max = new_k + 2;
if (this.max < max) { if (this.max < max) {
this.max = max; this.max = max;
} }
@ -451,7 +453,7 @@
uni.createVideoContext(this.dataList[old_k].community_id + '' + old_k, this) uni.createVideoContext(this.dataList[old_k].community_id + '' + old_k, this)
.pause() //如果视频暂停那么旧视频停止这里的this.dataList[old_k].id + '' + old_k后面加 old_k 是为了每一个视频的 id 值不同,这样就可以大程度的避免串音问题 .pause() //如果视频暂停那么旧视频停止这里的this.dataList[old_k].id + '' + old_k后面加 old_k 是为了每一个视频的 id 值不同,这样就可以大程度的避免串音问题
// console.log('已经暂停 --> 第' + (old_k + 1) + '个视频~') //提示 // console.log('已经暂停 --> 第' + (old_k + 1) + '个视频~') //提示
// #ifdef MP
this.dataList[new_k].state = 'play' this.dataList[new_k].state = 'play'
this.dataList[new_k].isplay = false this.dataList[new_k].isplay = false
this.dataList[new_k].playIng = true this.dataList[new_k].playIng = true
@ -461,7 +463,7 @@
}, 250) }, 250)
} }
this.videoShare(this.dataList[new_k]) this.videoShare(this.dataList[new_k])
// #endif
} }
}, },
onLoad(options) { onLoad(options) {
@ -504,7 +506,7 @@
} }
}) })
}, },
//#ifdef MP
videoShare(item) { videoShare(item) {
if (item && item.status == 1) { if (item && item.status == 1) {
let uid = this.uid ? this.uid : 0; let uid = this.uid ? this.uid : 0;
@ -520,7 +522,7 @@
uni.hideShareMenu() uni.hideShareMenu()
} }
}, },
// #endif
goBack: function() { goBack: function() {
uni.navigateBack(); uni.navigateBack();
}, },
@ -752,43 +754,43 @@
let that = this let that = this
// 1.这里引入后端请求数据 // 1.这里引入后端请求数据
if (that.videoshow) { // if (that.videoshow) {
deoList(this.videoID).then(res => { // deoList(this.videoID).then(res => {
that.videoData([res.data]) // that.videoData([res.data])
if (res.data.list.length < that.limit) { // if (res.data.list.length < that.limit) {
this.loadMore = false; // this.loadMore = false;
} // }
}).catch(err => { // }).catch(err => {
return uni.showToast({ // return uni.showToast({
title: err, // title: err,
icon: 'none', // icon: 'none',
duration: 2000 // duration: 2000
}); // });
}) // })
this.videoshow = false // this.videoshow = false
} else { // } else {
// videoList().then(res=>{ // videoList().then(res=>{
// that.videoData(res.data.list); // that.videoData(res.data.list);
// }) // })
// console.log(that.userUid,that.videoID) // console.log(that.userUid,that.videoID)
videoList({ videoList({
page: that.page, page: that.page,
limit: that.limit, limit: that.limit,
id: this.videoID id: this.videoID
}).then(res => { }).then(res => {
that.videoData(res.data.list) that.videoData(res.data.list)
if (res.data.list.length < that.limit) { if (res.data.list.length < that.limit) {
this.loadMore = false; this.loadMore = false;
} }
}).catch(err => { }).catch(err => {
return uni.showToast({ return uni.showToast({
title: err, title: err,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
}) })
} // }
// that.isUser ? // that.isUser ?
// myVideoList(that.userUid, { // myVideoList(that.userUid, {
@ -851,7 +853,9 @@
this.communityId = list[0]['community_id'] this.communityId = list[0]['community_id']
if (list.length == 0) return if (list.length == 0) return
let that = this; let that = this;
that.page = that.page + 1; that.page = that.page + 1;
var msg = list var msg = list
// 2.这里把视频添加到视频列表 // 2.这里把视频添加到视频列表
for (let i = 0; i < msg.length; i++) { for (let i = 0; i < msg.length; i++) {
@ -861,15 +865,21 @@
msg[i]['isplay'] = true msg[i]['isplay'] = true
msg[i]['loading'] = false msg[i]['loading'] = false
that.dataList.push(msg[i]) that.dataList.push(msg[i])
//#ifndef H5
console.log(i, that.k)
if (i == 0 && that.k == 0) { if (i == 0 && that.k == 0) {
this.dataList[0].isplay = false this.dataList[0].isplay = false
this.dataList[0].playIng = true this.dataList[0].playIng = true
this.dataList[0].state = 'play' this.dataList[0].state = 'play'
this.dataList[0].loading = false this.dataList[0].loading = false
uni.createVideoContext(that.dataList[0].community_id + '' + 0, that).play() setTimeout(() => {
uni.createVideoContext(that.dataList[0].community_id + '' + 0, that).play()
// uni.createVideoContext(this.dataList[new_k].community_id + '' + new_k, this).play()
}, 250)
} }
//#endif
} }
//#ifdef MP //#ifdef MP
if (this.k == 0) { if (this.k == 0) {
@ -1767,7 +1777,7 @@
margin-top: 27rpx; margin-top: 27rpx;
.product-item { .product-item {
display: inline-block; display: inline-block;
width: 444rpx; width: 444rpx;
height: 136rpx; height: 136rpx;
background: rgba(0, 0, 0, .55); background: rgba(0, 0, 0, .55);

View File

Before

Width:  |  Height:  |  Size: 944 B

After

Width:  |  Height:  |  Size: 944 B

View File

Before

Width:  |  Height:  |  Size: 747 B

After

Width:  |  Height:  |  Size: 747 B

File diff suppressed because one or more lines are too long

View File

@ -1,242 +1,259 @@
<template> <template>
<view v-if="!successful" :style="viewColor"> <view class="">
<form report-submit='true'> <!-- #ifdef MP || APP-PLUS -->
<view class='merchantsSettled'>
<view class="merchantBgCount">
<image mode="widthFix" class="merchantBg" :src="domain+'/static/diy/merchantBg'+keyColor+'.jpg'"
alt="">
</view>
<view class="application-record" @click="jumpToList">
申请记录
<text class="iconfont icon-xiangyou"></text>
</view>
<view class='list'>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name">商户名称</text>
<input type="text" maxlength="30" placeholder="请输入商户名称"
v-model="merchantData.enterprise_name" @input="validateBtn"
placeholder-class='placeholder' />
</view>
</view>
<view class="conten-top" :style="'height:'+statusBarHeight+'px'">
<view class="" style="position: absolute;left: 30rpx;bottom: 15rpx;" @click="logout"><i
class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"></i></view>
<view class=""
style="position: absolute;left: 30rpx;bottom: 15rpx;width: 120rpx; left:50%;margin-left:-60rpx;">
商家入驻
</view>
</view>
<view :style="'height:'+statusBarHeight+'px'"></view>
<!-- #endif -->
<view class="item"> <view v-if="!successful" :style="viewColor">
<view class="acea-row row-middle"> <form report-submit='true'>
<text class="item-name">联系电话</text> <view class='merchantsSettled'>
<input type="text" placeholder="请输入手机号" v-model="merchantData.phone" @input="validateBtn" <view class="merchantBgCount">
placeholder-class='placeholder' /> <image mode="widthFix" class="merchantBg" :src="domain+'/static/diy/merchantBg'+keyColor+'.jpg'"
</view> alt="">
</view> </view>
<view class="item rel"> <view class="application-record" @click="jumpToList">
<view class="acea-row row-middle"> 申请记录
<text class="item-name">验证码</text> <text class="iconfont icon-xiangyou"></text>
<input type="text" placeholder="填写验证码" v-model="merchantData.yanzhengma"
@input="validateBtn" class="codeIput" placeholder-class='placeholder' />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''"
@click="handleVerify">
{{ text }}
</button>
</view>
</view> </view>
<view class="item" v-if="isShowCode"> <view class='list'>
<view class="acea-row row-middle"> <view class="item">
<text class="item-name">验证码</text> <view class="acea-row row-middle">
<input type="text" placeholder="请输入验证码" class="codeIput" v-model="codeVal" <text class="item-name">商户名称</text>
@input="validateBtn" placeholder-class='placeholder' /> <input type="text" maxlength="30" placeholder="请输入商户名称"
<view class="imageCode" @click="again"> v-model="merchantData.enterprise_name" @input="validateBtn"
<image :src="codeUrl" /> placeholder-class='placeholder' />
</view> </view>
</view> </view>
</view>
<view class="item">
<view class="uni-list"> <view class="item">
<view class="uni-list-cell"> <view class="acea-row row-middle">
<view class="uni-list-cell-db acea-row row-middle"> <text class="item-name">联系电话</text>
<text class="item-name">商户分类</text> <input type="text" placeholder="请输入手机号" v-model="merchantData.phone"
<picker @change="bindPickerChange" :value="index" :range="array" @input="validateBtn" placeholder-class='placeholder' />
range-key="category_name"> </view>
<input placeholder="请选择商户分类" type="text" readonly disabled </view>
v-model="mer_classification"> <view class="item rel">
<view class='iconfont icon-jiantou'></view> <view class="acea-row row-middle">
</picker> <text class="item-name">验证码</text>
<input type="text" placeholder="填写验证码" v-model="merchantData.yanzhengma"
@input="validateBtn" class="codeIput" placeholder-class='placeholder' />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''"
@click="handleVerify">
{{ text }}
</button>
</view>
</view>
<view class="item" v-if="isShowCode">
<view class="acea-row row-middle">
<text class="item-name">验证码</text>
<input type="text" placeholder="请输入验证码" class="codeIput" v-model="codeVal"
@input="validateBtn" placeholder-class='placeholder' />
<view class="imageCode" @click="again">
<image :src="codeUrl" />
</view> </view>
</view> </view>
</view> </view>
</view> <view class="item">
<view class="item"> <view class="uni-list">
<view class="uni-list"> <view class="uni-list-cell">
<view class="uni-list-cell"> <view class="uni-list-cell-db acea-row row-middle">
<view class="uni-list-cell-db acea-row row-middle"> <text class="item-name">商户分类</text>
<text class="item-name">店铺类型</text> <picker @change="bindPickerChange" :value="index" :range="array"
<text class="iconfont wenhao" @click="getAgreement">?</text> range-key="category_name">
<picker @change="bindPickerChange1" :value="index1" :range="storeTypeArr" <input placeholder="请选择商户分类" type="text" readonly disabled
range-key="type_name"> v-model="mer_classification">
<input placeholder="请选择店铺类型" type="text" disabled readonly <view class='iconfont icon-jiantou'></view>
v-model="mer_storeType"> </picker>
<view v-if="mer_storeType" @tap.stop="mer_storeType=''" </view>
class="iconfont icon-guanbi2"></view>
<view class='iconfont icon-jiantou'></view>
</picker>
</view> </view>
</view> </view>
</view> </view>
</view> <view class="item">
<view class="item"> <view class="uni-list">
<view class="uni-list"> <view class="uni-list-cell">
<view class="uni-list-cell"> <view class="uni-list-cell-db acea-row row-middle">
<view class="uni-list-cell-db acea-row row-middle"> <text class="item-name">店铺类型</text>
<text class="item-name businessBox">店铺所在地</text> <text class="iconfont wenhao" @click="getAgreement">?</text>
<picker mode=multiSelector @change="bindPickerChange2" :value="index2" <picker @change="bindPickerChange1" :value="index1" :range="storeTypeArr"
:range="business" range-key="name" @columnchange="pickerColumnchange"> range-key="type_name">
<input class="businessBox" placeholder="请选择商圈" type="text" readonly disabled <input placeholder="请选择店铺类型" type="text" disabled readonly
v-model="business_name"> v-model="mer_storeType">
<view class='iconfont icon-jiantou'></view> <view v-if="mer_storeType" @tap.stop="mer_storeType=''"
</picker> class="iconfont icon-guanbi2"></view>
<view class='iconfont icon-jiantou'></view>
</picker>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> <view class="item">
<view class="item"> <view class="uni-list">
<view class="uni-list"> <view class="uni-list-cell">
<view class="uni-list-cell"> <view class="uni-list-cell-db acea-row row-middle">
<view class="uni-list-cell-db acea-row row-middle"> <text class="item-name businessBox">店铺所在地</text>
<text class="item-name businessBox">详细地址</text> <picker mode=multiSelector @change="bindPickerChange2" :value="index2"
<input type="text" maxlength="30" placeholder="请输入详细地址" :range="business" range-key="name" @columnchange="pickerColumnchange">
v-model="merchantData.address" @input="validateBtn" <input class="businessBox" placeholder="请选择商圈" type="text" readonly disabled
placeholder-class='placeholder' /> v-model="business_name">
<view class='iconfont icon-jiantou'></view>
</picker>
</view>
</view>
</view>
</view>
<view class="item">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name businessBox">详细地址</text>
<input type="text" maxlength="30" placeholder="请输入详细地址"
v-model="merchantData.address" @input="validateBtn"
placeholder-class='placeholder' />
</view>
</view> </view>
</view> </view>
</view> </view>
</view> <view class="item">
<view class="item"> <view class="uni-list">
<view class="uni-list"> <view class="uni-list-cell">
<view class="uni-list-cell"> <view class="uni-list-cell-db acea-row row-middle">
<view class="uni-list-cell-db acea-row row-middle"> <text class="item-name businessBox">公司名称</text>
<text class="item-name businessBox">公司名称</text> <input type="text" maxlength="30" placeholder="请输入公司名称"
<input type="text" maxlength="30" placeholder="请输入公司名称" v-model="merchantData.company_name" @input="validateBtn"
v-model="merchantData.company_name" @input="validateBtn" placeholder-class='placeholder' />
placeholder-class='placeholder' />
</view>
</view> </view>
</view> </view>
</view> </view>
</view> <view class="item">
<view class="item"> <view class="acea-row row-middle">
<view class="acea-row row-middle"> <text class="item-name">法人名称</text>
<text class="item-name">法人名称</text> <input type="text" placeholder="请输入法人名称" v-model="merchantData.user_name"
<input type="text" placeholder="请输入法人名称" v-model="merchantData.user_name" @input="validateBtn" placeholder-class='placeholder' />
@input="validateBtn" placeholder-class='placeholder' /> </view>
</view> </view>
</view> <view class="item">
<view class="item"> <view class="uni-list">
<view class="uni-list"> <view class="uni-list-cell">
<view class="uni-list-cell"> <view class="uni-list-cell-db acea-row row-middle">
<view class="uni-list-cell-db acea-row row-middle"> <text class="item-name businessBox">社会信用代码</text>
<text class="item-name businessBox">社会信用代码</text> <input type="text" maxlength="30" placeholder="请输入社会信用代码"
<input type="text" maxlength="30" placeholder="请输入社会信用代码" v-model="merchantData.social_credit_code" @input="validateBtn"
v-model="merchantData.social_credit_code" @input="validateBtn" placeholder-class='placeholder' />
placeholder-class='placeholder' />
</view>
</view> </view>
</view> </view>
</view> </view>
</view>
<!-- <view class="item"> <!-- <view class="item">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<text class="item-name">是否农贸市场</text> <text class="item-name">是否农贸市场</text>
<u-switch v-model="isnm" @change="change" activeColor="#42CA4C"></u-switch> <u-switch v-model="isnm" @change="change" activeColor="#42CA4C"></u-switch>
</view> </view>
</view> --> </view> -->
<view class="item no-border"> <view class="item no-border">
<view class='acea-row row-middle'> <view class='acea-row row-middle'>
<text class="item-title">请上传营业执照及行业相关资质证明图片</text> <text class="item-title">请上传营业执照及行业相关资质证明图片</text>
<text class="item-desc">(图片最多可上传10张,图片格式支持JPGPNGJPEG)</text> <text class="item-desc">(图片最多可上传10张,图片格式支持JPGPNGJPEG)</text>
<view class="upload"> <view class="upload">
<view class='pictrue' v-for="(item,index) in pics" :key="index" :data-index="index" <view class='pictrue' v-for="(item,index) in pics" :key="index" :data-index="index"
@click="getPhotoClickIdx"> @click="getPhotoClickIdx">
<image :src='item'></image> <image :src='item'></image>
<text class='iconfont icon-guanbi1' @click.stop='DelPic(index)'></text> <text class='iconfont icon-guanbi1' @click.stop='DelPic(index)'></text>
</view> </view>
<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic' <view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic'
v-if="pics.length < 10"> v-if="pics.length < 10">
<text class='iconfont icon-icon25201'></text> <text class='iconfont icon-icon25201'></text>
<view>上传图片</view> <view>上传图片</view>
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="item no-border">
<checkbox-group @change='ChangeIsAgree'>
<checkbox class="checkbox" :checked="isAgree ? true : false" />已阅读并同意
</checkbox-group>
<button class="settleAgree" @click="getConfig">入驻协议</button>
</view>
<button class='submitBtn' :class="validate === true? 'on':''" @click="formSubmit">
提交申请
</button>
</view> </view>
<view class="item no-border"> </view>
<checkbox-group @change='ChangeIsAgree'> </form>
<checkbox class="checkbox" :checked="isAgree ? true : false" />已阅读并同意 <view class="settlementAgreement" v-if="showProtocol">
</checkbox-group> <view class="setAgCount" style="width: 656rpx;height: 458px;">
<button class="settleAgree" @click="getConfig">入驻协议</button> <i class="icon iconfont icon-cha" @click="showProtocol = false"></i>
<div class="title">{{isType ? '店铺类型说明' : '商户入驻协议'}}</div>
<view class="content">
<jyf-parser :html="protocol" ref="article" :tag-style="tagStyle"></jyf-parser>
<!-- <view v-html="protocol"></view> -->
</view>
</view>
</view>
<view class="settlementAgreement" v-if="isshow">
<view class="setAgCount" style="width: 100%;height: 100%;padding-top: 180rpx;">
<!-- <i class="icon iconfont icon-cha" @click="recuo"></i> -->
<view class="" style="width: 60rpx;height: 60rpx; position: absolute;left: 30rpx; top:90rpx"
@click="recuo">
<i class="iconfont icon-xiangzuo" style="width: 60rpx;height: 60rpx;font-size: 40rpx;"></i>
<!-- <image src="@/static/images/close.png" mode="aspectFit" style="width: 60rpx;height: 60rpx;"></image> -->
</view> </view>
<button class='submitBtn' :class="validate === true? 'on':''" @click="formSubmit"> <div class="title">{{detail.title}}</div>
提交申请 <view style="margin: 20rpx 0;">甲方公司:{{company?company:"暂无公司信息"}}</view>
</button> <view style="margin: 20rpx 0;">机构代码:{{organization_code?organization_code:"暂无公司信息"}}</view>
<view class="contenta">
<jyf-parser :html="detail.mer_services_agree" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
<view class="setAgCountbtn">
<button class="setAgCountbtna" @click="refuse">
拒绝
</button>
<button :class="num>0?'setAgCountbtnb':'setAgCountbtnc'" :disabled="num!=0" @click="agree">
<text v-if="num>0">请仔细阅读协议{{num}}S</text>
<text v-else>同意</text>
</button>
</view>
</view> </view>
</view> </view>
</form> <view class='loadingicon acea-row row-center-wrapper' v-if="loading">
<view class="settlementAgreement" v-if="showProtocol"> <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>
<view class="setAgCount" style="width: 656rpx;height: 458px;">
<i class="icon iconfont icon-cha" @click="showProtocol = false"></i>
<div class="title">{{isType ? '店铺类型说明' : '商户入驻协议'}}</div>
<view class="content">
<jyf-parser :html="protocol" ref="article" :tag-style="tagStyle"></jyf-parser>
<!-- <view v-html="protocol"></view> -->
</view>
</view> </view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse">
</authorize>
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }"
ref="verify">
</Verify>
</view> </view>
<view class="settlementAgreement" v-if="isshow"> <view class="settledSuccessMain " v-else :style="viewColor">
<view class="setAgCount" style="width: 100%;height: 100%;"> <view class="settledSuccessful">
<!-- <i class="icon iconfont icon-cha" @click="recuo"></i> --> <image class="image" src="../static/images/settledSuccessful.svg" alt="">
<view class="" style="width: 60rpx;height: 60rpx; position: absolute;right: 30rpx; top:20rpx" <view class="title">恭喜您的资料提交成功</view>
@click="recuo"> <view class="info">预计15个工作日内审核完毕平台客服会及时与您联系</view>
<image src="@/static/images/close.png" mode="aspectFit" style="width: 60rpx;height: 60rpx;"></image> <view class="goHome" hover-class="none" @click="goHome">
</view> 返回首页
</view>
<div class="title">{{detail.title}}</div>
<view style="margin: 20rpx 0;">甲方公司:{{company?company:"暂无公司信息"}}</view>
<view style="margin: 20rpx 0;">机构代码:{{organization_code?organization_code:"暂无公司信息"}}</view>
<view class="contenta">
<jyf-parser :html="detail.mer_services_agree" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
<view class="setAgCountbtn">
<button class="setAgCountbtna" @click="refuse">
拒绝
</button>
<button :class="num>0?'setAgCountbtnb':'setAgCountbtnc'" :disabled="num!=0" @click="formSubmit">
<text v-if="num>0">请仔细阅读协议{{num}}S</text>
<text v-else>同意</text>
</button>
</view>
</view> </view>
</view> </view>
<view class='loadingicon acea-row row-center-wrapper' v-if="loading">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>
</view>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }"
ref="verify">
</Verify>
</view>
<view class="settledSuccessMain" v-else :style="viewColor">
<view class="settledSuccessful">
<image class="image" src="../static/images/settledSuccessful.svg" alt="">
<view class="title">恭喜您的资料提交成功</view>
<view class="info">预计15个工作日内审核完毕平台客服会及时与您联系</view>
<view class="goHome" hover-class="none" @click="goHome">
返回首页
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
@ -274,6 +291,9 @@
import { import {
configMap configMap
} from "@/utils"; } from "@/utils";
import {
intention,
} from "@/api/product"
import parser from "@/components/jyf-parser/jyf-parser"; import parser from "@/components/jyf-parser/jyf-parser";
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import Verify from '@/components/verify/verify.vue'; import Verify from '@/components/verify/verify.vue';
@ -354,7 +374,14 @@
mer_i_id: null, // id mer_i_id: null, // id
isType: false, isType: false,
num: 10, num: 10,
detail: {} detail: {},
statusBarHeight: 0,
where: {
type: 1,
page: 1,
limit: 10
},
codenote: []
}; };
}, },
beforeDestroy() { beforeDestroy() {
@ -383,12 +410,25 @@
} }
this.getArea() this.getArea()
this.shoplist() this.shoplist()
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 45;
}, },
onShow() { onShow() {
}, },
onReady() {}, onReady() {},
methods: { methods: {
//
codelist() {
intention(this.where).then(res => {
this.codenote = res.data.list
})
},
//退
logout() {
uni.switchTab({
url: '/pages/user/index'
})
},
// //
recuo() { recuo() {
if (this.num > 0) { if (this.num > 0) {
@ -576,13 +616,18 @@
street_code: this.street_id street_code: this.street_id
}).then((res) => { }).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.company = ''
this.organization_code = ''
this.$util.Tips({ this.$util.Tips({
title: res.msg title: res.msg
}); });
return false; return false;
} else {
this.company = res.data.title
this.organization_code = res.data.organization_code
} }
this.company = res.data.title
this.organization_code = res.data.organization_code
}).catch(res => { }).catch(res => {
console.log(res) console.log(res)
}) })
@ -753,75 +798,144 @@
showxy() { showxy() {
this.isshow = true this.isshow = true
}, },
//
formSubmit: function(e) { agree() {
let that = this; let that = this;
if (that.validateForm() && that.validate) { let requestData = {
if (this.num == 0) { phone: that.merchantData.phone,
let requestData = { mer_name: that.merchantData.enterprise_name,
phone: that.merchantData.phone, name: that.merchantData.user_name,
mer_name: that.merchantData.enterprise_name, code: that.merchantData.yanzhengma,
name: that.merchantData.user_name, company_name: that.merchantData.company_name,
code: that.merchantData.yanzhengma, address: that.merchantData.address,
company_name: that.merchantData.company_name, social_credit_code: that.merchantData.social_credit_code,
address: that.merchantData.address, merchant_category_id: that.merchantData.classification,
social_credit_code: that.merchantData.social_credit_code, mer_type_id: that.merchantData.mer_type,
merchant_category_id: that.merchantData.classification, mer_storeType: this.mer_storeType,
mer_type_id: that.merchantData.mer_type, area_id: this.area_id,
mer_storeType: this.mer_storeType, street_id: this.street_id,
area_id: this.area_id, village_id: this.village_id,
street_id: this.street_id, is_nmsc: this.isnum,
village_id: this.village_id, images: that.pics
is_nmsc: this.isnum, }
images: that.pics that.validate = false;
} if (that.mer_i_id) {
that.validate = false; updateGoodsRecord(that.mer_i_id, requestData).then(res => {
if (that.mer_i_id) { if (res.status == 200) {
updateGoodsRecord(that.mer_i_id, requestData).then(res => { title: '提交成功',
if (res.status == 200) { that.loading = true;
title: '提交成功', that.timer = setTimeout(() => {
that.loading = true; that.successful = true;
that.timer = setTimeout(() => {
that.successful = true;
that.validate = true;
}, 1000)
}
}).catch(res => {
this.isshow = false
that.validate = true; that.validate = true;
that.$util.Tips({ }, 1000)
title: res }
}); }).catch(res => {
}) this.isshow = false
} else { that.validate = true;
create(requestData).then(data => { that.$util.Tips({
if (data.status == 200) { title: res
title: '提交成功', });
that.loading = true; })
this.timer = setTimeout(() => { } else {
that.successful = true; create(requestData).then(data => {
that.validate = true; if (data.status == 200) {
}, 1000) title: '提交成功',
} that.loading = true;
this.timer = setTimeout(() => {
that.successful = true;
that.validate = true;
}, 1000)
}
}).catch(res => { }).catch(res => {
that.validate = true; this.isshow = false
that.$util.Tips({ that.validate = true;
title: res that.$util.Tips({
}); title: res
}) });
} })
} else { }
},
formSubmit() {
if (this.validateForm() && this.validate) {
if (this.codenote.length == 0) {
this.isshow = true this.isshow = true
this.countDown() this.countDown()
} else {
if (this.codenote[0].status == 0) {
uni.showModal({
title: '申请正在审核中,请勿重复提交'
})
} else {
this.isshow = true
this.countDown()
}
} }
} }
// let that = this;
// if (that.validateForm() && that.validate) {
// if (this.num == 0) {
// let requestData = {
// phone: that.merchantData.phone,
// mer_name: that.merchantData.enterprise_name,
// name: that.merchantData.user_name,
// code: that.merchantData.yanzhengma,
// company_name: that.merchantData.company_name,
// address: that.merchantData.address,
// social_credit_code: that.merchantData.social_credit_code,
// merchant_category_id: that.merchantData.classification,
// mer_type_id: that.merchantData.mer_type,
// mer_storeType: this.mer_storeType,
// area_id: this.area_id,
// street_id: this.street_id,
// village_id: this.village_id,
// is_nmsc: this.isnum,
// images: that.pics
// }
// that.validate = false;
// if (that.mer_i_id) {
// updateGoodsRecord(that.mer_i_id, requestData).then(res => {
// if (res.status == 200) {
// title: '',
// that.loading = true;
// that.timer = setTimeout(() => {
// that.successful = true;
// that.validate = true;
// }, 1000)
// }
// }).catch(res => {
// this.isshow = false
// that.validate = true;
// that.$util.Tips({
// title: res
// });
// })
// } else {
// create(requestData).then(data => {
// if (data.status == 200) {
// title: '',
// that.loading = true;
// this.timer = setTimeout(() => {
// that.successful = true;
// that.validate = true;
// }, 1000)
// }
// }).catch(res => {
// that.validate = true;
// that.$util.Tips({
// title: res
// });
// })
// }
// } else {
// this.isshow = true
// this.countDown()
// }
// }
}, },
@ -930,6 +1044,16 @@
color: #fff !important; color: #fff !important;
} }
.conten-top {
width: 100%;
text-align: center;
background-color: #fff;
position: absolute;
top: 0;
position: fixed;
z-index: 10;
}
.uni-input-placeholder { .uni-input-placeholder {
color: #B2B2B2; color: #B2B2B2;
} }
@ -960,7 +1084,9 @@
.merchantsSettled { .merchantsSettled {
background-image: linear-gradient(var(--view-bntColor21) 0%, var(--view-bntColor22) 100%); background-image: linear-gradient(var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
height: 140vh; height: 140vh;
position: relative;
} }
.merchantsSettled .merchantBg { .merchantsSettled .merchantBg {

View File

@ -20,7 +20,7 @@
<view class="" v-if="!isFshow"> <view class="" v-if="!isFshow">
<view class="site-box1 flex_a_c_j_sb"> <view class="site-box1 flex_a_c_j_sb">
<view class="place_wrapper flex_a_c" @click="selectLocation"> <view class="place_wrapper flex_a_c" @click="selectLocation">
<view class="iconfont icon-weizhi"></view> <view class="iconfont icon-weizhi"></view>
<view class="town_name">{{street}}</view> <view class="town_name">{{street}}</view>
</view> </view>
@ -175,7 +175,7 @@
import { import {
getIndexData, getIndexData,
getDiy, getDiy,
cloudWarehouse
} from '@/api/api.js' } from '@/api/api.js'
import { import {
@ -183,8 +183,7 @@
} from '@/api/product.js'; } from '@/api/product.js';
import { import {
getGeocoder, getGeocoder,
merClassifly, merClassifly
getProductHot
} from '@/api/store.js'; } from '@/api/store.js';
import { import {
getArea, getArea,
@ -247,19 +246,17 @@
loadTitle: '加载更多', loadTitle: '加载更多',
} }
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.list(true); this.list(true, this.street_id);
this.Area() this.Area()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
onShow() {
this.selfLocation()
},
onLoad() { onLoad() {
this.list()
this.Area() this.Area()
this.selfLocation()
// this.openTongZhi() // this.openTongZhi()
uni.$on('connectstatusChange', (connectstatus) => { uni.$on('connectstatusChange', (connectstatus) => {
var connectstr = '' var connectstr = ''
@ -273,15 +270,13 @@
}) })
}, },
onReachBottom() { onReachBottom() {
if (this.productList.length > 0) { if (this.productList.length > 0) {
setTimeout(() => { setTimeout(() => {
this.list(false); this.list(false, this.street_id);
}, 500) }, 500)
} else { }
this.list()
}
}, },
beforeDestroy() { beforeDestroy() {
@ -300,13 +295,12 @@
this.street = newValue.split(',')[0] this.street = newValue.split(',')[0]
this.town = newValue.split(',')[0] this.town = newValue.split(',')[0]
this.street_id = newValue.split(',')[1] this.street_id = newValue.split(',')[1]
}); });
if (this.street.length <= 0) {
this.selfLocation()
}
}, },
// #ifdef APP-PLUS // #ifdef APP-PLUS
@ -336,7 +330,6 @@
}, },
// //
list(isPage, id) { list(isPage, id) {
let that = this; let that = this;
if (that.loadend) return; if (that.loadend) return;
if (that.loading) return; if (that.loading) return;
@ -345,7 +338,13 @@
that.loading = true; that.loading = true;
that.loadTitle = ''; that.loadTitle = '';
getProductHot(that.where.page, that.where.limit).then(res => { cloudWarehouse({
page: that.where.page,
limit: that.where.limit,
street_code: id,
category_id: 0
}).then(res => {
// console.log(222)
let list = res.data.list; let list = res.data.list;
let productList = that.$util.SplitArray(list, that.productList); let productList = that.$util.SplitArray(list, that.productList);
let loadend = list.length < that.where.limit; let loadend = list.length < that.where.limit;
@ -400,25 +399,16 @@
} else if (scrollTop > 100) { } else if (scrollTop > 100) {
this.backColor = 1 this.backColor = 1
this.isFshow = true this.isFshow = true
} }
}, },
getCloudShopMerId(id) { getCloudShopMerId(id) {
get_cloud_shop(id).then(res => { get_cloud_shop(id).then(res => {
res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0 res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0
}) })
}, },
selectLocation() { selectLocation() {
this.showPicker = true this.showPicker = true
}, },
confirm(e) { confirm(e) {
@ -426,7 +416,8 @@
this.street = e.value[1].name this.street = e.value[1].name
this.street_id = e.value[1].code this.street_id = e.value[1].code
this.town = e.value[1].name this.town = e.value[1].name
this.productList = [] this.loadend = false;
this.$set(this.where, 'page', 1)
this.list(true, this.street_id) this.list(true, this.street_id)
this.$nextTick(() => { this.$nextTick(() => {
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code); this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
@ -517,7 +508,8 @@
this.street = e.value[1].name this.street = e.value[1].name
this.street_id = e.value[1].code this.street_id = e.value[1].code
this.town = e.value[1].name this.town = e.value[1].name
this.productList = [] this.loadend = false;
this.$set(this.where, 'page', 1)
this.list(true, this.street_id) this.list(true, this.street_id)
}, },
selfLocation() { selfLocation() {
@ -544,12 +536,13 @@
this.town = res.data.address_reference.town.title this.town = res.data.address_reference.town.title
this.street_id = res.data.address_reference.town.id this.street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street this.street = res.data.address_component.street
this.list(true,this.street_id)
this.$nextTick(() => { this.$nextTick(() => {
this.$bus.$emit('value-updated', this.street + ',' + this this.$bus.$emit('value-updated', this.street + ',' + this
.street_id); .street_id);
}) })
this.list(this.street_id)
}).catch(err => { }).catch(err => {
this.isshow = false this.isshow = false
uni.showToast({ uni.showToast({

View File

@ -8,7 +8,7 @@
</div> </div>
</div> </div>
<div class="whiteBg" v-if="formItem === 1"> <div class="whiteBg" v-if="formItem === 1">
<div class="title acea-row row-center-wrapper"> <div class="title acea-row row-center-wrappe">
<div class="item" :class="current === index ? 'on' : ''" v-for="(item, index) in navList" <div class="item" :class="current === index ? 'on' : ''" v-for="(item, index) in navList"
@click="navTap(index)" :key="index"> @click="navTap(index)" :key="index">
{{ item }} {{ item }}
@ -47,11 +47,13 @@
v-model="account" /> v-model="account" />
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<div class="acea-row row-middle"> <div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image> <image src="/static/images/code_2.png"></image>
<input type="text" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
v-model="captcha" /> <input type="number" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
v-model="captcha" maxlength="4" />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" <button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''"
@click="handleVerify"> @click="handleVerify">
{{ text }} {{ text }}
@ -61,8 +63,8 @@
<div class="item" v-if="isShowCode"> <div class="item" v-if="isShowCode">
<div class="acea-row row-middle"> <div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image> <image src="/static/images/code_2.png"></image>
<input type="text" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput" <input type="number" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
v-model="codeVal" /> v-model="codeVal" maxlength="4" />
<div class="code" @click="getcaptcha"> <div class="code" @click="getcaptcha">
<image class="code-img" style="width: 100%;height: 100%;" :src="codeUrl" /> <image class="code-img" style="width: 100%;height: 100%;" :src="codeUrl" />
</div> </div>
@ -95,8 +97,9 @@
<div class="item"> <div class="item">
<div class="acea-row row-middle"> <div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image> <image src="/static/images/code_2.png"></image>
<input type="text" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput" <input type="number" placeholder="填写验证码" maxLength='4' placeholder-class="placeholder" class="codeIput"
v-model="captcha" /> v-model="captcha" />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" <button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''"
@click="handleVerify"> @click="handleVerify">
{{ text }} {{ text }}
@ -110,10 +113,11 @@
v-model="password" /> v-model="password" />
</div> </div>
</div> </div>
<div class="item" v-if="isShowCode"> <div class="item" v-if="isShowCode">
<div class="acea-row row-middle"> <div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image> <image src="/static/images/code_2.png"></image>
<input type="text" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput" <input type="number" placeholder="填写验证码" maxlength="4" placeholder-class="placeholder" class="codeIput"
v-model="codeVal" /> v-model="codeVal" />
<div class="code" @click="getcaptcha"> <div class="code" @click="getcaptcha">
<image class="code-img" style="width: 100%;height: 100%;" :src="codeUrl" /> <image class="code-img" style="width: 100%;height: 100%;" :src="codeUrl" />
@ -156,16 +160,18 @@
<input type='number' placeholder='填写手机号码' placeholder-class='placeholder' <input type='number' placeholder='填写手机号码' placeholder-class='placeholder'
v-model="account"></input> v-model="account"></input>
</view> </view>
<view class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
<input type='number' placeholder='填写验证码' placeholder-class='placeholder' class="codeIput" <input type='number' placeholder='填写验证码' maxlength="4" placeholder-class='placeholder' class="codeIput"
v-model="captcha"></input> v-model="captcha"></input>
<button class="code" :class="disabled === true ? 'on' : ''" :disabled='disabled' <button class="code" :class="disabled === true ? 'on' : ''" :disabled='disabled'
@click="handleVerify"> @click="handleVerify">
{{ text }} {{ text }}
</button> </button>
</view> </view>
<view class="item"> <view class="item">
<input type='password' placeholder='填写登录密码' placeholder-class='placeholder' <input type='password' placeholder='填写登录密码' placeholder-class='placeholder'
v-model="password"></input> v-model="password"></input>
</view> </view>
<view class="protocol acea-row row-between-wrapper"> <view class="protocol acea-row row-between-wrapper">
@ -892,7 +898,9 @@
// #ifdef APP-PLUS // #ifdef APP-PLUS
jpushModule.initJPushService() jpushModule.initJPushService()
jpushModule.getRegistrationID(result => { jpushModule.getRegistrationID(result => {
if (result.registerID) { if (result.registerID) {
bindJG({ bindJG({
phone: this.account, phone: this.account,
jg_register_id: result.registerID jg_register_id: result.registerID

View File

@ -150,7 +150,7 @@
</view> </view>
<view class='discount' v-else>免运费</view> <view class='discount' v-else>免运费</view>
</view> </view>
<view class='item acea-row row-between-wrapper' <!-- <view class='item acea-row row-between-wrapper'
v-if="!seckillId && order_type != 3 && order_type != 4 && item.order.enabledCoupon"> v-if="!seckillId && order_type != 3 && order_type != 4 && item.order.enabledCoupon">
<view>店铺优惠券</view> <view>店铺优惠券</view>
<block v-if="item.coupon.length>0"> <block v-if="item.coupon.length>0">
@ -163,14 +163,15 @@
<block v-else> <block v-else>
<view class='discount'>暂无优惠券</view> <view class='discount'>暂无优惠券</view>
</block> </block>
</view> </view> -->
<!-- <view v-if="item.openReceipt == 1" class='item acea-row row-between-wrapper'> <view class='item acea-row row-between-wrapper'>
<view>开具发票 <text @tap="showInvoice" class="iconfont icon-wenhao1"></text></view> <view>开具发票 <text @tap="showInvoice" class="iconfont icon-wenhao1"></text></view>
<view class='discount discount_voice' @tap="goInvoice(item.mer_id)"> <view class='discount discount_voice' @tap="goInvoice(item.mer_id)">
{{(item.invoiceData && item.invoiceData.receipt_title) ? item.invoiceData.receipt_title : '不开发票'}} {{(item.invoiceData && item.invoiceData.receipt_title) ? item.invoiceData.receipt_title : '不开发票'}}
<text class='iconfont icon-jiantou'></text> <text class='iconfont icon-jiantou'></text>
</view> </view>
</view> --> </view>
<view v-if="order_type === 2 && item.list[0].productPresell.presell_type ==2" <view v-if="order_type === 2 && item.list[0].productPresell.presell_type ==2"
class="item acea-row row-between-wrapper" class="item acea-row row-between-wrapper"
style="border-top: 1px solid #f5f5f5; border-bottom: 1px solid #f5f5f5;"> style="border-top: 1px solid #f5f5f5; border-bottom: 1px solid #f5f5f5;">
@ -382,6 +383,7 @@
</view> </view>
</view> </view>
<view style='height:140rpx;'></view> <view style='height:140rpx;'></view>
<view class='footer acea-row row-between-wrapper'> <view class='footer acea-row row-between-wrapper'>
<view class="footer_count"> <view class="footer_count">
<view> <view>

View File

@ -250,8 +250,8 @@
</view> </view>
</view> </view>
<view class='bottom acea-row row-right row-middle'> <view class='bottom acea-row row-right row-middle'>
<!-- <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt' <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt'
@click.stop='applyInvoice(item.order_id)'>申请开票</view> --> @click.stop='applyInvoice(item.order_id)'>申请开票</view>
<block v-if="item.status == 0 || item.status == 9 || item.status == -1"> <block v-if="item.status == 0 || item.status == 9 || item.status == -1">
<view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view>
</block> </block>

View File

@ -259,8 +259,8 @@
</view> </view>
</view> </view>
<view class='bottom acea-row row-right row-middle'> <view class='bottom acea-row row-right row-middle'>
<!-- <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt' <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt'
@click.stop='applyInvoice(item.order_id)'>申请开票</view> --> @click.stop='applyInvoice(item.order_id)'>申请开票</view>
<block v-if="item.status == 0 || item.status == 9 || item.status == -1"> <block v-if="item.status == 0 || item.status == 9 || item.status == -1">
<view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view>
</block> </block>

View File

@ -247,8 +247,8 @@
</view> </view>
</view> </view>
<view class='bottom acea-row row-right row-middle'> <view class='bottom acea-row row-right row-middle'>
<!-- <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt' <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt'
@click.stop='applyInvoice(item.order_id)'>申请开票</view> --> @click.stop='applyInvoice(item.order_id)'>申请开票</view>
<block v-if="item.status == 0 || item.status == 9 || item.status == -1"> <block v-if="item.status == 0 || item.status == 9 || item.status == -1">
<view v-if="!item.receipt && item.status != -1" class="bnt cancelBnt">一键转卖</view> <view v-if="!item.receipt && item.status != -1" class="bnt cancelBnt">一键转卖</view>
<view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view>

View File

@ -257,8 +257,8 @@
</view> </view>
</view> </view>
<view class='bottom acea-row row-right row-middle'> <view class='bottom acea-row row-right row-middle'>
<!-- <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt' <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt'
@click.stop='applyInvoice(item.order_id)'>申请开票</view> --> @click.stop='applyInvoice(item.order_id)'>申请开票</view>
<block v-if="item.status == 0 || item.status == 9 || item.status == -1"> <block v-if="item.status == 0 || item.status == 9 || item.status == -1">
<view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view> <view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view>
</block> </block>
@ -283,6 +283,12 @@
去付款 去付款
</view> </view>
</block> </block>
<block v-if="item.order_status == 2 ">
<view class='bnt b-color' @click.stop='goOrderDetails(item.order_id)'>
去发货
</view>
</block>
<block v-if="item.order_status == 9 "> <block v-if="item.order_status == 9 ">
<view class='bnt b-color' v-if="item.status==12" @click.stop='dePay'> <view class='bnt b-color' v-if="item.status==12" @click.stop='dePay'>

View File

@ -172,7 +172,7 @@
}, },
getOrderInfo() { getOrderInfo() {
groupOrderDetail(this.order_id, this.product_type).then(res => { groupOrderDetail(this.order_id, this.product_type).then(res => {
console.log(res)
this.couponData = res.data this.couponData = res.data
this.$nextTick(() => { this.$nextTick(() => {
if (this.couponData.interest !== null) { if (this.couponData.interest !== null) {
@ -189,6 +189,7 @@
pay_type: this.payType pay_type: this.payType
} }
).then(res => { ).then(res => {
if (res.data.paid === false) { if (res.data.paid === false) {
// //
@ -204,7 +205,7 @@
}, 1000) }, 1000)
} }
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message title: err.message
}) })
@ -213,7 +214,10 @@
orderPay(this.order_id, { orderPay(this.order_id, {
type: this.payType type: this.payType
}).then(res => { }).then(res => {
let jsConfig = res.data.result.config let jsConfig = res.data.result.config
if (res.data.status === 'weixinApp') { if (res.data.status === 'weixinApp') {
// //
// #ifdef APP-PLUS // #ifdef APP-PLUS
@ -257,15 +261,40 @@
}); });
// #endif // #endif
} else {
if (res.status == 200) {
// uni.navigateBack({
// delta: 1
// })
uni.showToast({
icon: 'none',
title: res.message
})
if(res.data.status='error'){
}else{
setTimeout(() => {
uni.navigateBack({
delta: 2
})
}, 1000)
}
}
} }
// setTimeout(() => { // setTimeout(() => {
// uni.navigateBack({ // uni.navigateBack({
// delta: 1 // delta: 1
// }) // })
// }, 1000) // }, 1000)
uni.showToast({ // uni.showToast({
title: res.message // icon:'none' ,
}) // title: res.message
// })
}) })
} }

View File

@ -118,19 +118,19 @@
payStatus: true payStatus: true
} }
// #ifdef H5 ||APP-PLUS // #ifdef H5 ||APP-PLUS
, // ,
{ // {
name: '支付宝支付', // name: '',
icon: 'icon-zhifubao', // icon: 'icon-zhifubao',
// #ifdef H5 || APP-PLUS // // #ifdef H5 || APP-PLUS
value: 'alipay', // value: 'alipay',
// #endif // // #endif
// #ifdef MP // // #ifdef MP
value: 'alipayQr', // value: 'alipayQr',
// #endif // // #endif
title: '支付宝支付', // title: '',
payStatus: true // payStatus: true
} // }
// #endif // #endif
], ],
}; };

26
static/iconfont/demo.css Normal file
View File

@ -0,0 +1,26 @@
/* Logo 字体 */
@font-face {
font-family: "iconfont";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-dianzan2:before {
content: "\e61f";
}
.icon-dianzan3:before {
content: "\e601";
}

BIN
static/img/X.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

BIN
static/img/close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

BIN
static/img/colse1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
static/img/gn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/img/jb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/img/li.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/img/shanpin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
static/img/zhi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

View File

@ -8,6 +8,8 @@
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import app from "./app"; import app from "./app";
import storage from "./storage.js";
export default { export default {
app app,
storage
}; };

29
store/modules/storage.js Normal file
View File

@ -0,0 +1,29 @@
import {
getUserInfo,
Appversion
} from "../../api/user.js";
import {
LOGIN_STATUS,
UID,
USER_INFO
} from '../../config/cache';
import Cache from '../../utils/cache';
const state = {
storage: {},
};
const mutations = {
setStorage(state, data) {
state.storage = data;
},
};
const actions = {
};
export default {
state,
mutations,
actions
};

View File

@ -28,9 +28,6 @@ function baseRequest(url, method, data, {
}) { }) {
let Url = HTTP_REQUEST_URL, let Url = HTTP_REQUEST_URL,
header = HEADER; header = HEADER;
if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token; if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
return new Promise((reslove, reject) => { return new Promise((reslove, reject) => {
@ -50,7 +47,10 @@ function baseRequest(url, method, data, {
else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) { else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) {
reject(res.data); reject(res.data);
} else if (res.data.status == 501) { } else if (res.data.code==0||res.data.code==1) {
reslove(res.data, res);
}else if (res.data.status == 501) {
uni.reLaunch({ uni.reLaunch({
url: '/pages/error/index' url: '/pages/error/index'
}) })

View File

@ -8,7 +8,7 @@
// | Author: CRMEB Team <admin@crmeb.com> // | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
import { import {
HTTP_REQUEST_URL,
HTTP_REQUEST_URL_FOUR, HTTP_REQUEST_URL_FOUR,
HEADER, HEADER,
TOKENNAME TOKENNAME
@ -44,9 +44,9 @@ function baseRequest(url, method, data, {
data: data || {}, data: data || {},
success: (res) => { success: (res) => {
// #ifdef APP-PLUS // #ifdef APP-PLUS
// console.log('app', Url + '/api/' + url, res.data); console.log('app', Url + '/api/' + url,res);
// #endif // #endif
// console.log(res.data.code)
if (noVerify) if (noVerify)
reslove(res.data, res); reslove(res.data, res);
else if (res.data.status == 200) else if (res.data.status == 200)
@ -54,7 +54,10 @@ function baseRequest(url, method, data, {
else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) { else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) {
reject(res.data); reject(res.data);
} else if (res.data.status == 501) { } else if (res.data.code==0||res.data.code==1) {
reslove(res.data, res);
}else if (res.data.status == 501) {
uni.reLaunch({ uni.reLaunch({
url: '/pages/error/index' url: '/pages/error/index'
}) })

75
utils/requestc.js Normal file
View File

@ -0,0 +1,75 @@
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import {
HTTP_REQUEST_URL,
HEADER,
TOKENNAME
} from '@/config/live.js';
import store from '../store';
/**
* 发送请求
*/
function baseRequest(url, method, data, {
noAuth = false,
noVerify = false
}) {
let Url = HTTP_REQUEST_URL,
header = HEADER;
if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
return new Promise((reslove, reject) => {
uni.request({
url: Url + '/api/' + url,
method: method || 'GET',
header: header,
data: data || {},
success: (res) => {
// #ifdef APP-PLUS
// console.log('app', Url + '/api/' + url, method);
// #endif
if (noVerify)
reslove(res.data, res);
else if (res.data.status == 200)
reslove(res.data, res);
else if ([410000, 410001, 410002, 40000].indexOf(res.data.status) !== -1) {
reject(res.data);
} else if (res.data.code==0||res.data.code==1) {
reslove(res.data, res);
}else if (res.data.status == 501) {
uni.reLaunch({
url: '/pages/error/index'
})
reject(res.data);
} else
reject(res.data.message || '系统错误');
},
fail: (message) => {
console.log(url, method, data)
reject('请求失败',message);
}
})
});
}
const request = {};
['options', 'get', 'post', 'put', 'head', 'delete', 'trace', 'connect'].forEach((method) => {
request[method] = (api, data, opt) => baseRequest(api, method, data, opt || {})
});
export default request;

View File

@ -1,5 +1,6 @@
import { import {
getGXconfig getGXconfig,
miniapp
} from "@/api/uniMP.js"; } from "@/api/uniMP.js";
import { import {
HTTP_REQUEST_URL HTTP_REQUEST_URL
@ -66,11 +67,73 @@ const loadMP = async (id) => {
console.log('初始化完成', wgtFile); console.log('初始化完成', wgtFile);
installMP(); installMP();
}, },
fail(res) { fail(res) {
clearInterval(timer); clearInterval(timer);
timer = null; timer = null;
uni.hideLoading(); uni.hideLoading();
} }
});
downloadTask.onProgressUpdate((res) => {
// console.log('初始化进度' + res.progress);
if (res.progress > count) count += 10;
if (count >= 90) {
clearInterval(timer);
timer = null;
}
});
} else {
open()
}
});
};
//加载商城小程序
const loadMPx = async (id) => {
appid = id;
let info = await miniapp();
console.log('最新版本', info.data);
console.log(mp, uni);
// return ;
uni.showLoading({
title: '初始化中...',
mask: true
})
mp.getUniMPVersion(id, (ret) => {
console.log('当前版本', ret);
let flag;
if (HTTP_REQUEST_URL == 'https://shop.lihaink.cn') {
flag = false
} else {
flag = true
}
if (0 != ret.code || compareVersions(info.data.appInfo.version, ret.versionInfo.name) == 1 ||
flag ==
true) {
let count = 0;
timer = setInterval(() => {
if (count < 100) uni.showLoading({
title: `初始化中... ${count}%`,
mask: true
})
else uni.showLoading({
title: '初始化中...100%',
mask: true
})
}, 600)
let downloadTask = uni.downloadFile({
url: info.data.appInfo.dow_url,
success(res) {
wgtFile = res.tempFilePath;
console.log('初始化完成', wgtFile);
installMP();
},
fail(res) {
clearInterval(timer);
timer = null;
uni.hideLoading();
}
}); });
downloadTask.onProgressUpdate((res) => { downloadTask.onProgressUpdate((res) => {
// console.log('初始化进度' + res.progress); // console.log('初始化进度' + res.progress);
@ -89,17 +152,68 @@ const loadMP = async (id) => {
// 按URL加载小程序 // 按URL加载小程序
const loadMPurl = async (e) => { const loadMPurl = async (e) => {
appid = e.id; appid = e.id;
mp.getUniMPVersion(appid, (ret) => { let FURL = e.url;
console.log('当前版本', ret); uni.showLoading({
wgtFile = e.url; title: '初始化中...',
doInstallMP(); mask: true
// if (0 != ret.code) { })
// wgtFile = e.url; uni.request({
// installMP(); url: FURL,
// } else { method: 'GET',
// open() success: (fileInfo) => {
// } mp.getUniMPVersion(appid, (ret) => {
}); console.log('当前版本', ret);
let flag;
if (HTTP_REQUEST_URL == 'https://shop.lihaink.cn') {
flag = false
} else {
flag = true
}
if (0 != ret.code || compareVersions(fileInfo.data?.data?.version, ret.versionInfo.name) == 1 || flag ==
true) {
let count = 0;
timer = setInterval(() => {
if (count < 100) uni.showLoading({
title: `初始化中... ${count}%`,
mask: true
})
else uni.showLoading({
title: '初始化中...100%',
mask: true
})
}, 600)
let downloadTask = uni.downloadFile({
url: fileInfo.data?.data?.down_url,
success(res) {
wgtFile = res.tempFilePath;
console.log('初始化完成', wgtFile);
installMP();
},
fail(res) {
clearInterval(timer);
timer = null;
uni.hideLoading();
}
});
downloadTask.onProgressUpdate((res) => {
// console.log('初始化进度' + res.progress);
if (res.progress > count) count += 10;
if (count >= 90) {
clearInterval(timer);
timer = null;
}
});
} else {
open()
}
});
},
fail:(err)=> {
console.log('错误:', err);
}
})
}; };
// 小程序版本信息 // 小程序版本信息
@ -127,8 +241,8 @@ const doInstallMP = () => {
open(); open();
} else { } else {
uni.hideLoading(); uni.hideLoading();
clearInterval(timer); clearInterval(timer);
timer = null; timer = null;
uni.showModal({ uni.showModal({
title: '初始化失败', title: '初始化失败',
content: JSON.stringify(r), content: JSON.stringify(r),
@ -145,13 +259,13 @@ const open = (id = null) => {
icon: 'none', icon: 'none',
title: '请先登录' title: '请先登录'
}) })
let avatar = store?.state?.userInfo?.avatar; let avatar = store?.state?.userInfo?.avatar;
mp.openUniMP({ mp.openUniMP({
appid: id || appid, appid: id || appid,
extraData: { extraData: {
uniMP: true, uniMP: true,
token: token, token: token,
avatar: avatar, avatar: avatar,
} }
}, (ret) => { }, (ret) => {
uni.hideLoading(); uni.hideLoading();
@ -168,7 +282,8 @@ const open = (id = null) => {
export default { export default {
loadMP, loadMP,
loadMPurl, loadMPurl,
loadMPx,
installMP, installMP,
doInstallMP, doInstallMP,
getVersion, getVersion,

View File

@ -50,5 +50,10 @@ export const initEvent = () => {
console.log('Host sendEvent: ' + JSON.stringify(ret)); console.log('Host sendEvent: ' + JSON.stringify(ret));
}); });
} }
if (ret.event == 'log') {
// console.log('2222222')
console.log('收到小程序事件: ' + JSON.stringify(ret));
}
}); });
} }