This commit is contained in:
THK3121 2023-09-13 14:20:07 +08:00
commit 3cf3fdbc99
88 changed files with 6966 additions and 2442 deletions

96
App.vue
View File

@ -76,6 +76,15 @@
onLaunch: function(option) {
this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
this.globalData.uid = this.$store.state.app.uid;
let appkey = uni.getStorage({
key: 'launchFlag'
})
if (appkey) {
setTimeout(() => {
this.$store.dispatch('INIT_CONFIG');
}, 6000)
}
// #ifdef APP-PLUS
//uni
@ -202,8 +211,11 @@
},
onShow() {
let that = this
// H5
if (this.$store.state.app.token) {
@ -232,20 +244,74 @@
// #endif
},
mounted() {
uni.onTabBarMidButtonTap((e) => {
// console.log("", e);
uni.switchTab({
url: '/pages/plant_release/index'
})
// uni.navigateTo({
// url: '/pages/plant_release/index'
// })
});
uni.setTabBarItem((e) => { console.log("点击了", e)});
},
methods: {
//
checknetwork() {
uni.onNetworkStatusChange(function(res) {
if (res.isConnected) {
uni.reLaunch({
url: '/pages/index/index'
})
} else {
uni.showModal({
title: '系统提示',
content: '当前设备无网络或网络较差',
cancelText: '取消',
confirmText: '确定',
success: (res) => {
if (res.confirm) {
uni.reLaunch({
url: '/pages/index/index'
})
} else {
// #ifdef H5
uni.navigateTo({
url: '/pages/users/login/login_copy'
})
// #endif
// #ifdef APP-PLUS
plus.runtime.quit()
// #endif
}
}
})
}
})
},
/**
* 语音播报
*
@ -396,9 +462,17 @@
display: flex;
justify-content: center;
align-items: center;
margin-top: -40rpx;
margin-top: -50rpx;
// box-shadow: 0px 5px 10px 1px rgba(32, 161, 98, 0.3);
}
.custom_style-txt {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 5rpx;
}
}
.bg-color-red {

View File

@ -24,6 +24,7 @@ export function getWechatConfig() {
);
}
/**
* 获取微信sdk配置
* @returns {*}

View File

@ -8,3 +8,49 @@
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
//发布委托商品选择 供应链商家接口
export function supplychain(data) {
return request.get("community/supplychain/list", data);
}
//普通商家发布委托商品
export function entrustchain(data) {
return request.post("community/entrust", data);
}
//获取委托商品列表
export function entrustlist(data) {
return request.get("community/entrust/list", data);
}
//供应链商家是否同意委托
export function checkchain(id,data) {
return request.post("community/entrust/check/"+id, data);
}
//供应链商家申请结束委托
export function finishchain(id,data) {
return request.post("community/entrust/apply/finish/"+id, data);
}
//商家申请结束委托
export function finishentrust(id,data) {
return request.post("community/entrust/finish/"+id, data);
}
//委托商品加入购物车
export function addEntrustCart(data) {
return request.post("community/entrust/addEntrustCart", data);
}
//获取委托商品详情
export function entrustdetail(id) {
return request.get("community/entrust/"+id);
}
//编辑委托商品详情
export function editentrust(id,data) {
return request.post("community/entrust/edit/"+id, data);
}

View File

@ -9,6 +9,14 @@
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
import Cache from '@/utils/cache'
/**
* 获取版本信息
*/
export function Appversion(data) {
return request.get(`app/version`, data, {
noAuth: true
});
}
/**
* 提交提现
*/

View File

@ -2,13 +2,12 @@
<view :class="'wf-page wf-page'+type">
<!-- left -->
<view>
<view id="left" v-if="leftList.length">
<view v-for="(item,index) in leftList" :key="index"
class="wf-itema" @tap="itemTap(item)">
<WaterfallsFlowItem :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
<WaterfallsFlowItem :item="item" :isStore="isStore" :heightx="251" :type="type" @goShop="goShop"/>
</view>
</view>
</view>
@ -17,7 +16,7 @@
<view id="right" v-if="rightList.length">
<view v-for="(item,index) in rightList" :key="index"
class="wf-itemb" @tap="itemTap(item)">
<WaterfallsFlowItem :item="item" :isStore="isStore" :type="type" @goShop="goShop"/>
<WaterfallsFlowItem :item="item" :isStore="isStore" :heightx="336" :type="type" @goShop="goShop"/>
</view>
</view>
</view>
@ -57,6 +56,7 @@ export default {
rightList: [], //
mark: 0, //
boxHeight: [], // 01
};
},
watch: {
@ -107,9 +107,6 @@ export default {
immediate: true,
deep:true
},
mounted(){
this.getUserInfo()
},
// item
mark() {
@ -122,6 +119,7 @@ export default {
methods: {
//
waterFall() {
const i = this.mark;
@ -170,7 +168,7 @@ export default {
},
// item
itemTap(item) {
// this.$emit('itemTap', item)
this.$emit('itemTap', item)
},
// item
goShop(item) {

View File

@ -80,7 +80,7 @@ export default {
require: true
},
type: {
type: Number,
type: Number|String,
default: 0
},
isStore: {

View File

@ -1,7 +1,11 @@
<template>
<view class="wf-item-page" @click="gogogo(item)">
<image :src="item.image" mode="widthFix" class="item-img" />
<view class='pictrue'>
<!-- <image :src="item.image[0]" mode="widthFix" class="item-img" /> -->
<image :src="item.image" mode="aspectFill" class="item-img"></image>
<!-- <easy-loadimage mode="widthFix" :image-src="item.image[0]"></easy-loadimage> -->
</view>
<view class="title">{{item.store_name}}</view>
<!-- <view class="tag">
@ -65,18 +69,26 @@
}
.item-img {
.pictrue {
width: 100% !important;
height: 345rpx;
image {
width: 100%;
height: 345rpx;
}
}
.item-info {}
.title {
font-size: 30rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin: 12px 0;
padding-right: 12rpx;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
@ -136,6 +148,7 @@
margin-top: 12rpx;
height: 26rpx;
line-height: 26rpx;
.relase-one {
// font-style: italic;
transform: skewX(-15deg);

View File

@ -1,8 +1,10 @@
<template>
<view class="wf-item-page" @click="gogogo(item)">
<image :src="item.image[0]" mode="widthFix" class="item-img" />
<view class="wf-item-page">
<view class='pictrue'>
<!-- <image :src="item.image[0]" mode="widthFix" class="item-img" /> -->
<image :src="item.image[0]" mode="aspectFill" class="item-img"></image>
<!-- <easy-loadimage mode="widthFix" :image-src="item.image[0]"></easy-loadimage> -->
</view>
<view class="goods_item_img" v-if="item.video_link.length>0">
<image src="@/static/images/sp.png" mode="aspectFit"></image>
</view>
@ -17,54 +19,32 @@
<script>
import {
getUserInfo
} from '@/api/user.js';
string
} from '../../plugin/clipboard/clipboard'
export default {
props: {
item: {
type: Object,
require: true
},
heightx: {
type: string,
require: true
}
},
data() {
return {
user_id: ''
}
},
mounted() {
this.getUserInfo()
},
methods: {
/**
* 获取个人用户信息
*/
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
this.user_id = res.data.uid
});
},
gogogo(item) {
if (item.video_link.length > 0) {
uni.navigateTo({
// #ifdef MP || H5
url: `/pages/short_video/nvueSwiper/index?id=${item.community_id}&uid=${this.user_id}&user=1`
// #endif
// #ifdef APP
url: `/pages/short_video/appSwiper/index?id=${item.community_id}&uid=${this.user_id}&user=1`
// #endif
})
} else {
uni.navigateTo({
url: `/pages/plantGrass/plant_detail/index?id=${item.community_id}`
})
}
},
}
@ -80,9 +60,16 @@
position: relative;
}
.item-img {
.pictrue {
width: 100% !important;
height: 345rpx;
image{
width: 100% ;
height: 345rpx;
}
}
.item-info {
display: flex;

View File

@ -5,7 +5,7 @@
<block v-for="(item,index) in imgUrls" :key='index'>
<swiper-item>
<image :src="item" class="slide-image" />
<image :src="item" class="slide-image" mode="aspectFit" />
<!-- <view class="stop" v-if="isType == 2">
<image class="image" src="/static/images/stop.png"></image>
</view> -->

View File

@ -9,7 +9,7 @@
</view>
<view class="iconclose" @click="close">
X
<image src="@/static/images/wt_close.png" mode="aspectFit"></image>
</view>
</view>
<view class="main">
@ -61,12 +61,12 @@
<view class="price_num">
<span>委托数量</span>
<subtractive v-if='item.number==0' style="margin-top: 10rpx;margin-left: 20rpx;"
class="step" :min="1" :max="item.attrValue[index].stock" :value="peicenumber"
class="step" :min="0" :max="item.attrValue[index].stock" :value="peicenumber"
:isMax="true" :isMin="true" index="11" @eventChange="numberChange($event,i)">
</subtractive>
<subtractive v-else style="margin-top: 10rpx;margin-left: 20rpx;" class="step"
:min="1" :max="item.attrValue[index].stock" :value="item.number" :isMax="true"
:min="0" :max="item.attrValue[index].stock" :value="item.number" :isMax="true"
:isMin="true" index="11" @increment="incrementTotal($event,i,item)"
@eventChange="numberChange($event,i)"></subtractive>
</view>
@ -288,6 +288,7 @@
that.$set(item, 'check', true);
that.$set(item, 'number', val.number);
that.$set(item, 'price', val.price);
that.peicenumber=val.number
}
})
})
@ -395,13 +396,18 @@
width: 44rpx;
height: 44rpx;
line-height: 44rpx;
border: 2rpx solid #fff;
border-radius: 50%;
text-align: center;
color: #fff;
position: absolute;
top: -150rpx;
right: 30rpx;
image {
width: 100%;
height: 100%;
}
}
.search {

View File

@ -9,7 +9,7 @@
</view>
<view class="iconclose" @click="close">
X
<image src="@/static/images/wt_close.png" mode="aspectFit"></image>
</view>
</view>
<view class="main">
@ -61,13 +61,14 @@
<view class="price_num">
<span>出售数量</span>
<subtractive v-if='item.number==0' style="margin-top: 10rpx;margin-left: 20rpx;"
class="step" :min="1" :max="item.attrValue[index].stock" :value="peicenumber"
class="step" :min="0" :max="item.attrValue[index].stock" :value="peicenumber"
:isMax="true" :isMin="true" index="11" @eventChange="numberChange($event,i)">
</subtractive>
<subtractive v-else style="margin-top: 10rpx;margin-left: 20rpx;" class="step"
:min="1" :max="item.attrValue[index].stock" :value="item.number" :isMax="true"
:isMin="true" index="11" @eventChange="numberChange($event,i)" ></subtractive>
:min="0" :max="item.attrValue[index].stock" :value="item.number" :isMax="true"
:isMin="true" index="11" @increment="incrementTotal($event,i,item)"
@eventChange="numberChange($event,i)"></subtractive>
</view>
</view>
</view>
@ -130,7 +131,7 @@
bought: [],
checkedArr: [],
aryys: [],
// picker
storageCustomList: [{
CustGoodsCode: "TEST001",
@ -165,14 +166,37 @@
},
mounted() {
this.checkedArr = this.checkedObj
this.aryys = this.checkedObj
this.getBounht();
},
methods: {
//
producrprice(e, i, item) {
this.bought[i].price = e.detail.value
this.$set(item, 'check', false);
for (let i in this.checkedArr) {
if (this.checkedArr[i].product_id == item.product_id) {
this.checkedArr.splice(i, 1)
}
}
},
incrementTotal(e, i, item) {
// console.log(e, i, item)
this.$set(item, 'check', false);
for (let i in this.checkedArr) {
if (this.checkedArr[i].product_id == item.product_id) {
this.checkedArr.splice(i, 1)
}
}
},
// picker
bindPickerChange: function(e, storage, num) {
@ -180,7 +204,6 @@
this.bought[num].attrValue[this.index].stock = storage[e.detail.value].stock
this.bought[num].product_attr_unique = storage[e.detail.value].unique
this.pickerData = storage[this.index] //
if (this.bought[num].attrValue[this.index].stock == 0) {
this.$util.Tips({
title: '库存不足'
@ -220,15 +243,22 @@
setValue: function(event) {
this.$set(this.whereb, 'keyword', event.detail.value);
if (!event.detail.value) {
this.whereb.page = 1
this.loadedb = false
this.getBounht()
}
},
searchBut() {
this.whereb.page = this.wherec.page = this.wheres.page =
this.bought = []
this.isActive == 0 ? this.getBounht() : ''
this.whereb.page = 1
this.loadedb = false
this.getBounht()
},
getBounht() {
var that = this;
// console.log('1111111', that.loadingb, that.loadedb)
if (that.loadingb || that.loadedb) return;
that.loadingb = true;
@ -259,6 +289,7 @@
that.$set(item, 'check', true);
that.$set(item, 'number', val.number);
that.$set(item, 'price', val.price);
that.peicenumber=val.number
}
})
})
@ -268,29 +299,29 @@
getCheckedGoods() {
this.checked = []
this.checkedArr.forEach((item, index) => {
this.check.push(item)
this.checkedArr.push(item)
})
},
/*点击选中与否*/
goodsCheck(item) {
this.$set(item, 'check', !item.check);
if (item.check) {
if (this.peicenumber == 0) {
item.number = 1
}
if (!item.product_attr_unique) {
item.product_attr_unique = item.attrValue[0].unique
}
this.checkedArr.push(item)
} else {
this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.spu_id == item.spu_id) || (item
.spu_id == (
itemn.spu && itemn.spu.spu_id)))), 1)
this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.product_id == item.product_id))), 1)
}
},
/*确定提交*/
submit() {
@ -345,13 +376,18 @@
width: 44rpx;
height: 44rpx;
line-height: 44rpx;
border: 2rpx solid #fff;
border-radius: 50%;
text-align: center;
color: #fff;
position: absolute;
top: -150rpx;
right: 30rpx;
image {
width: 100%;
height: 100%;
}
}
.search {

View File

@ -94,6 +94,10 @@
}
if (newValue < this.min) {
newValue = this.min
this.$util.Tips({
title: '达到最小值了',
icon: 'error'
})
}
if (newValue < this.max && this.maxDisabled === true) {
this.maxDisabled = false;
@ -104,6 +108,10 @@
this.maxDisabled = true;
}
if (newValue > this.max) {
this.$util.Tips({
title: '达到最大值了',
icon: 'error'
})
newValue = this.max
}
if (newValue > this.min && this.minDisabled === true) {
@ -114,6 +122,7 @@
return;
}
this.inputValue = newValue / scale;
this.$emit('increment', this.inputValue)
},
_getDecimalScale() {
let scale = 1;

View File

@ -9,8 +9,8 @@ let httpApiThree
// 网络接口修改此字符 小程序域名要求https
// let httpApi = 'http://192.168.31.110:8324' // 测试
if (process.env.NODE_ENV === "development") {
httpApi = 'https://shop.lihaink.cn' // 生产
// httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = 'https://shop.lihaink.cn' // 生产
httpApi = "https://crmeb-test.shop.lihaink.cn"
// httpApi = "http://192.168.0.222"
// httpApi = "http://192.168.0.108:8325"
// httpApi = 'http://192.168.0.108:8325'
@ -24,8 +24,8 @@ if (process.env.NODE_ENV === "development") {
// httpApiThree = 'baseUrlTest' // h5跨域配置
// #endif
} else if (process.env.NODE_ENV === 'production') {
// httpApi = 'https://shop.lihaink.cn' // 生产
httpApi = "https://crmeb-test.shop.lihaink.cn"
httpApi = 'https://shop.lihaink.cn' // 生产
// httpApi = "https://crmeb-test.shop.lihaink.cn"
httpApiTwo = 'https://nk.lihaink.cn' // 生产
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产
}

View File

@ -2,8 +2,8 @@
"name" : "惠农生活",
"appid" : "__UNI__3A527D1",
"description" : "",
"versionName" : "1.1.0",
"versionCode" : 110,
"versionName" : "1.3.6",
"versionCode" : 136,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -1,5 +1,32 @@
{
"pages": [
//#ifdef APP-PLUS
//
{
"path": "pages/guide/judge",
"style": {
"enablePullDownRefresh": false,
"onReachBottomDistance": 100,
"navigationStyle": "custom",
"app-plus": {
"contentAdjust": false,
"bounce": "none"
}
}
},
{
"path": "pages/guide/guide",
"style": {
"enablePullDownRefresh": false,
"onReachBottomDistance": 100,
"navigationStyle": "custom",
"app-plus": {
"contentAdjust": false,
"bounce": "none"
}
}
},
// #endif
//pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
@ -102,6 +129,24 @@
}
}
,{
"path": "uni_modules/guyue-updater/pages/updater",
"style": {
"app-plus": {
"animationDuration": 200,
"animationType": "fade-in",
"background": "transparent",
"backgroundColorTop": "transparent",
"bounce": "none",
"popGesture": "none",
"scrollIndicator": false,
"titleNView": false
},
"backgroundColor": "transparent",
"disableScroll": true,
"navigationStyle": "custom"
}
}
],
"subPackages": [{
"root": "pages/goods_cate",
@ -583,6 +628,12 @@
"navigationBarTitleText": "采购订单"
}
},
{
"path": "order_list/relase",
"style": {
"navigationBarTitleText": "委托订单"
}
},
{
"path": "order_list/order",
"style": {
@ -986,7 +1037,13 @@
"style": {
"navigationBarTitleText": "订单列表"
}
}, {
"path": "financial_management/index",
"style": {
"navigationBarTitleText": "财务管理"
}
},
{
"path": "orderRefund/index",
"style": {
@ -1174,7 +1231,9 @@
"pages": [{
"path": "plant_detail/index",
"style": {
"navigationBarTitleText": "内容详情"
"navigationBarTitleText": "内容详情",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
@ -1547,11 +1606,13 @@
"selectedColor": "#E93323",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/tabbar_icon/a.png",
"selectedIconPath": "static/tabbar_icon/a-a.png",
"text": "泸州"
},
{
"pagePath": "pages/gather/gather",
@ -1561,16 +1622,16 @@
},
{
"pagePath": "pages/plant_release/index",
"iconPath": "static/tabbar_icon/d.png",
"selectedIconPath": "static/tabbar_icon/d-a.png",
"text": "发布",
"visible": false
"iconPath": "static/tabbar_icon/c.png",
"selectedIconPath": "static/tabbar_icon/c-a.png",
"text": "发布"
},
{
"pagePath": "pages/supply_chains/supply_chains",
"iconPath": "static/tabbar_icon/c.png",
"selectedIconPath": "static/tabbar_icon/c-a.png",
"iconPath": "static/tabbar_icon/d.png",
"selectedIconPath": "static/tabbar_icon/d-a.png",
"text": "供应"
},
{
@ -1579,15 +1640,8 @@
"selectedIconPath": "static/tabbar_icon/e-a.png",
"text": "我的"
}
],
"midButton": {
"width": "68px",
"height": "70px",
"iconWidth": "48px",
"pagePath": "pages/plant_release/index",
"iconPath": "static/tabbar_icon/d.png",
"text": "发布"
}
]

View File

@ -0,0 +1,674 @@
<template>
<view class="">
<view class="finance_head">
<view class="top">
<view>
<view v-if="user_id == 0" class="accont">
<u--image
:showLoading="true"
:src="userInfo.avatar || '../../static/img/public/man.png'"
width="44px"
height="44px"
shape="circle"
></u--image>
<view class="name">{{ userInfo.nickname }}</view>
<!-- <u-icon name="setting-fill" color="white" size="20"></u-icon> -->
</view>
<view v-else class="accont">
<u--image
:showLoading="true"
:src="userInfo.avatar || '../../static/img/public/man.png'"
width="44px"
height="44px"
shape="circle"
></u--image>
<view class="name">{{ userInfo.nickname }}</view>
<!-- <u-icon name="setting-fill" color="white" size="20"></u-icon> -->
</view>
</view>
<!-- <view class="right" @click="navTo('/subpkg/topUp/topUp')">
账户充值
</view> -->
</view>
<view class="center">
<view class="title">
<text style="margin-right: 20rpx">账户总金额()</text
><uni-icons
@click="updateEye()"
:type="eyeType ? 'eye-filled' : 'eye-slash-filled'"
color="#fff"
></uni-icons>
</view>
<view class="price" v-show="eyeType"
>{{ all_money }}</view
>
<view class="price" v-show="!eyeType">****</view>
<view class="bubble">
<!-- <image src="../../static/img/contract/bubble.png"></image> -->
<view class="text" v-show="eyeType"
>可提现金额{{ userInfo.user_money || 0.0 }}</view
>
<view class="text" v-show="!eyeType">可提现金额****</view>
</view>
</view>
<view class="bottom" @click="navTo('/subpkg/orderDetail/orderDetail')">
<view class="item">
<view>履约保证金额()</view>
<view class="num" v-show="eyeType">{{
userInfo.deposit || 0.0
}}</view>
<view class="num" v-show="!eyeType">****</view>
</view>
<u-line direction="col" length="40%" color="#999999FF"></u-line>
<view class="item">
<view>个人收益金额()</view>
<view class="num" v-show="eyeType">{{
userInfo.user_money || 0.0
}}</view>
<view class="num" v-show="!eyeType">****</view>
</view>
</view>
</view>
<view class="bill">
<view style="width: 100%; height: 90rpx; background-color: #fff"></view>
<uni-section
titleFontSize="32rpx"
type="line"
title="账单流水"
></uni-section>
<!-- <u-subsection :list="billTypeList" :current="current" mode="subsection"></u-subsection> -->
<!-- <view class="type_box">
<view class="type">
<view :class="current == 0 ? 'active' : ''" @click="changeBillType(0)"
>日账单</view
>
<view :class="current == 1 ? 'active' : ''" @click="changeBillType(1)"
>月账单</view
>
</view>
</view> -->
<!-- 日账单 -->
<view class="bill_list" v-show="current == 0">
<!-- <view class="card" v-for="(item, index) in billList" :key="index">
<view class="top">
<view class="blue">账单详情</view>
<view>账单日期{{item.create_time}}</view>
</view>
<view class="bottom">
<view class="left">
<view>收益金额()</view>
<view class="num">{{item.change_amount}}</view>
</view>
<view class="right">
<view>支出金额:{{item.change_amount_desc<0?item.change_amount:'0.00'}}</view>
<view>入账金额:{{item.change_amount_desc>0?item.change_amount:'0.00'}}</view>
</view>
</view>
</view> -->
<view class="item" v-for="(item, index) in billList" :key="item.id">
<view class="top">
账单日期: {{ current ? item.month : item.create_time }}
</view>
<view class="bottom">
<view class="text">
<view class="t_item" v-if="current == 0">
<view class="t_title">任务名称</view>
<view class="tips">{{ item.remark }}</view>
</view>
<!--<view class="t_item">
<view class="t_title">金额归属</view>
<view class="tips">{{
$store.state.app.userInfo.nickname
}}</view>
</view> -->
<view class="t_item">
<view class="t_title">收益来源</view>
<view class="tips">
<text v-if="item.change_type == 202" style="color: #46be61">{{
item.type_desc
}}</text>
<text
v-else-if="item.change_type == 203"
style="color: #ff7c32"
>{{ item.type_desc }}</text
>
<text v-else="item.change_type == 203">{{
item.type_desc
}}</text>
</view>
</view>
</view>
<view class="price">
{{
current
? item.expenditure == 0
? "+" + item.income
: "-" + item.income
: item.change_amount_desc
}}
</view>
</view>
</view>
<!-- <view class="card" v-for="(item, index) in billList" :key="index">
<view class="top">
<view class="blue">账单详情</view>
<view>账单日期{{current?item.month:item.create_time}}</view>
</view>
<view class="bottom">
<view class="left">
<view>收益金额()</view>
<view class="num">
{{current?(item.expenditure==0?item.income:'-'+item.income):item.change_amount_desc}}
</view>
</view>
<view class="right">
<view>支出金额:{{item.expenditure>0?item.expenditure:'0.00'}}</view>
<view>入账金额:{{item.income>0?item.income:'0.00'}}</view>
</view>
</view>
</view>
-->
<u-loadmore
:status="loadConfig.status"
:loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText"
:nomore-text="loadConfig.nomoreText"
/>
</view>
<!-- 月账单 -->
<view class="bill_list" v-show="current == 1">
<view class="card" v-for="(item, index) in billListMonth" :key="index">
<view class="top">
<view class="blue">账单详情</view>
<view>账单日期{{ item.month }}</view>
</view>
<view class="bottom">
<view class="left">
<view>个人收益金额()</view>
<view class="num">{{ item.income }}</view>
</view>
<view class="right">
<view
>支出金额:{{
item.expenditure > 0 ? item.expenditure : "0.00"
}}</view
>
<view>入账金额:{{ item.income > 0 ? item.income : "0.00" }}</view>
</view>
</view>
</view>
<u-loadmore status="nomore" nomore-text="仅展示一年数据" />
</view>
<!-- <button class="btn" @click="navTo('/subpkg/withdrawDeposit/withdrawDeposit')">提现余额</button> -->
</view>
</view>
</template>
<script>
// import {
// accountLogLists,
// accountLogListsMonth
// } from "@/api/pay.js"
// import {
// userInfo
// } from "@/api/oaUser.js"
// import {
// Toast
// } from '@/libs/uniApi.js'
import {
getUserInfo,
} from '@/api/user.js';
export default {
data () {
return {
user_id: 0,
userInfo: {},
otherUserInfo: {},
billTypeList: ['日账单', '月账单'],
current: 0,
billList: [],
eyeType:true,
billListMonth: [],
loadConfig: {
page: 1,
limit: 25,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '没有更多账单了~~',
status: 'loadmore'
},
}
},
onLoad (e) {
if (e.id > 0) {
this.user_id = e.id
}
// this.loadBill()
},
onShow () {
if (this.user_id == 0) {
this.userInfo = this.$store.state.app.userInfo;
getUserInfo().then((res) => {
this.$store.commit('setUserInfo', res.data);
this.userInfo = res.data;
})
} else {
this.OtherUserInfo()
}
},
computed: {
// eyeType () {
// return this.$store.state.config.eyeType;
// },
all_money(){
let str = 0.00;
try{
this.userInfo.user_money?str=str+parseFloat(this.userInfo.user_money):0.00;
this.userInfo.deposit?str=str+parseFloat(this.userInfo.deposit):0.00;
str = str.toFixed(2);
}catch(e){
str = 0.00;
}
return str;
}
},
onBackPress () {
this.loadBill()
},
methods: {
navTo (url) {
url ?
uni.navigateTo({
url: url
}) : Toast('暂未开放')
},
async OtherUserInfo () {
// let res = await userInfo({
// id: this.user_id
// });
getUserInfo().then(res => {
// that.userInfo = res.data;
// that.userInfo.svip_open = true;
// that.userInfo.vip_status = 2;
// that.is_promoter = res.data.is_promoter;
// that.extension_status = res.data.extension_status;
// this.userInfo = res.data
console.log(res.data)
});
// this.userInfo = res.data
},
updateEye () {
this.eyeType=!this.eyeType
},
//
changeBillType (type) {
this.current = type;
if (type == 1) this.loadBillMonth();
},
async loadBill () {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await accountLogLists({
type: 'um', //
page_no: this.loadConfig.page,
page_size: this.loadConfig.limit,
user_id: this.user_id
});
this.loadConfig.status = "loadmore"
if (res.data.lists.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.billList = [...this.billList, ...res.data.lists];
},
async loadBillMonth () {
let res = await accountLogListsMonth();
let list = [];
for (let key in res.data) {
list.push(res.data[key])
}
this.billListMonth = list;
}
},
onPullDownRefresh () {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page {
// background-color: #fff;
}
.finance_head {
background-color: #f02828;
height: 400rpx;
position: relative;
// box-shadow: 0 -10px 20px rgba(#fff, 0.9) inset;
background-image: linear-gradient(to top, rgba(#fff, 1), transparent);
// box-shadow: -10px -10px 40px rgba(#fff, 0.9);
background-size: 100% 35%;
background-repeat: no-repeat;
background-position: center bottom;
.top {
display: flex;
justify-content: space-between;
align-items: center;
flex: 1;
color: #fff;
padding: 10rpx 28rpx;
.accont {
// background-color: red;
display: flex;
justify-content: space-between;
width: auto;
width: auto;
line-height: 44px;
.name {
margin-left: 20rpx;
}
.name {
margin-left: 20rpx;
}
}
.left {
display: flex;
align-items: center;
flex: 1;
font-size: 28rpx;
font-weight: 500;
color: #ffffff;
// .name {
// margin: 0 17.5rpx;
// }
image {
width: 40rpx;
height: 40rpx;
}
}
.right {
font-size: 24.53rpx;
font-weight: 400;
color: #ffffff;
}
}
.center {
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
.title {
font-size: 25rpx;
font-weight: 400;
line-height: 39rpx;
}
.price {
font-size: 60rpx;
font-weight: bold;
line-height: 39rpx;
margin-top: 28rpx;
margin-bottom: 14rpx;
}
.bubble {
padding: 20rpx 28rpx 10rpx 28rpx;
background-image: url("@/static/images/bubble.png");
background-repeat: no-repeat;
background-size: 100% 100%;
.text {
}
}
}
.bottom {
position: absolute;
bottom: -78rpx;
left: 50%;
transform: translateX(-50%);
width: 694rpx;
height: 140rpx;
background: #ffffff;
box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1);
border-radius: 14rpx 14rpx 14rpx 14rpx;
display: flex;
justify-content: space-around;
align-items: center;
.item {
text-align: center;
font-size: 25rpx;
font-weight: 400;
color: #666666;
line-height: 39rpx;
.num {
font-size: 39rpx;
font-weight: 500;
color: #f02828;
line-height: 39rpx;
}
}
}
}
.bill {
// padding: 28rpx;
// padding-top: 90rpx;
padding-bottom: 32rpx;
background-color: #f5f5f5;
.type_box {
background-color: #fff;
padding: 32rpx 0;
.type {
height: 53rpx;
width: 333rpx;
display: flex;
align-items: center;
overflow: hidden;
margin: 0 auto;
view {
flex: 1;
color: #f02828;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #3274f9;
&:nth-child(1) {
border-radius: 30rpx 0 0 30rpx;
}
&:nth-child(2) {
border-radius: 0 30rpx 30rpx 0;
}
}
.active {
background-color: #f02828;
color: #fff;
}
}
}
.bill_list {
// background-color: #f5f5f5;
padding-bottom: 100rpx;
padding-top: 28rpx;
.card {
padding: 28rpx;
background-color: #fff;
margin-bottom: 21rpx;
.top {
display: flex;
align-items: center;
font-size: 25rpx;
font-weight: 400;
color: #333333ff;
line-height: 39rpx;
.blue {
width: 137rpx;
height: 49rpx;
background: #3274f9;
border-radius: 26rpx 26rpx 26rpx 26rpx;
font-size: 25rpx;
font-weight: 400;
color: #ffffff;
line-height: 39rpx;
display: flex;
justify-content: center;
align-items: center;
margin-right: 28rpx;
}
}
.bottom {
display: flex;
justify-content: space-between;
align-items: center;
height: 160rpx;
.left {
flex: 1;
text-align: center;
font-size: 25rpx;
font-weight: 400;
color: #666666;
line-height: 39rpx;
.num {
font-size: 39rpx;
font-weight: 500;
color: #f02828;
line-height: 39rpx;
}
}
.right {
flex: 1;
font-size: 25rpx;
font-weight: 400;
color: #666666;
line-height: 39rpx;
}
}
}
.item {
margin: 0 auto;
margin-bottom: 28rpx;
width: 694rpx;
// height: 238rpx;
background: #ffffff;
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
padding: 28rpx;
.top {
margin-bottom: 28rpx;
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
&:before {
display: inline-block;
content: "账单详情";
width: 137rpx;
height: 49rpx;
line-height: 49rpx;
text-align: center;
background: #3274f9;
border-radius: 26rpx 26rpx 26rpx 26rpx;
color: #fff;
margin-right: 28rpx;
}
}
.bottom {
display: flex;
justify-content: space-between;
.text {
font-size: 25rpx;
font-weight: 400;
color: #999999;
line-height: 39rpx;
.t_item {
display: flex;
.t_title {
margin-bottom: 16rpx;
flex-shrink: 0 !important;
}
.tips {
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
}
}
.price {
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: 500;
color: #f02828;
}
}
}
}
.btn {
color: #fff;
border-radius: 100px;
text-align: center;
line-height: 84.21rpx;
margin: 0 auto;
margin-top: 84.21rpx;
width: 693.93rpx;
height: 84.21rpx;
background: #f02828;
box-shadow: 0px 9px 26px 1px #e9eff5;
position: fixed;
bottom: 0;
left: 50%;
transform: translate(-50%, -50%);
}
}
</style>

View File

@ -239,7 +239,6 @@
const data = {
product_type: this.where.product_type
}
console.log('data', data);
orderStatistics(mer_id, data).then(
res => {
that.census = res.data.order;

View File

@ -146,7 +146,7 @@
</view>
</view>
<view style="height:120upx;"></view>
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'">
<view class="footer acea-row row-right row-middle" v-if="goname != 'looks'" style="margin-bottom: var(--status-bar-height);">
<view class="more"></view>
<view class="bnt cancel" v-if="orderInfo.pay_type == 8 && orderInfo.status == 12" @click="tongyi(order_id,1)">
同意

View File

@ -4,7 +4,7 @@
<view class="search">
<view class="search-content acea-row row-middle">
<text class="iconfont icon-sousuo"></text>
<input v-model="where.store_name" confirm-type="search" placeholder="请输收货人手机号或退款订单号搜索" class="input"
<input v-model="where.search_info" confirm-type="search" placeholder="请输收货人手机号或订单号搜索" class="input"
@confirm="handleSearch" />
</view>
</view>
@ -261,7 +261,7 @@
page: 1,
limit: 10,
status: 1,
store_name: '',
search_info: '',
product_type: ''
},
list: [],
@ -284,9 +284,7 @@
that.init();
}
},
types: function() {
this.getIndex();
}
},
onLoad(option) {
this.where.product_type = uni.getStorageSync("PRODUCT_TYPE") ?? ""
@ -324,12 +322,13 @@
},
handleSearch() {
this.loaded = false;
this.where.page = 3;
this.where.page = 1;
this.list = [];
this.getIndex();
},
//
getIndex() {
let that = this;
if (that.loading || that.loaded) return;
that.loading = true;
@ -355,7 +354,7 @@
that.loaded = res.data.list.length < that.where.limit;
that.list.push.apply(that.list, res.data.list);
that.where.page = that.where.page + 1;
console.log(that.list)
// console.log(that.list)
// console.log(that.list);
},
@ -381,10 +380,12 @@
if (val != 'verify') {
if (this.where.status != val) {
this.where.status = val;
this.where.search_info=''
delete this.where.is_verify;
this.init();
}
} else {
this.where.search_info=''
this.where.is_verify = 1;
delete this.where.status;
this.init();

View File

@ -789,6 +789,7 @@
</block>
</swiper>
</div>
</div>
<div class="recording" v-if="recording">
<image src="/static/images/recording.png" />
@ -1944,6 +1945,7 @@
position: fixed;
bottom: 0;
left: 0;
margin-bottom: var(--status-bar-height);;
}
.broadcast-details .footerCon.on {

View File

@ -821,8 +821,10 @@
//
get_product_list: function(isPage) {
let that = this;
if (that.loadend) return;
if (that.loading) return;
if (isPage === true) that.$set(that, 'productList', []);
that.loading = true;
that.loadTitle = '';

View File

@ -1,28 +1,26 @@
<template>
<!-- #ifdef APP || H5 -->
<view>
<!-- #endif -->
<view class="content">
<form @submit="formSubmit" report-submit='true'>
<view class="release_content">
<view class="release_item">
<view class="release_item-one">
<view class="item-one">
被委托商家
</view>
<e-select v-model="value1" :options="options1" placeholder="选择选项"></e-select>
<e-select v-model="formData.entrust_mer_id" :value='formData.entrust_mer_id' :options="options1" @change="change1"
placeholder="选择选项"></e-select>
</view>
<view class="release_item-one">
<view class="item-one">
委托周期
</view>
<view class="" @click="calendar">
<view class="">
<input type="number" v-model="date" />
<input type="number" v-model="formData.entrust_day" />
</view>
<!-- <e-select v-model="value1" :options="options1" placeholder="选择选项"></e-select> -->
</view>
<view class='item acea-row row-between-wrapper'>
<view class='name'><text class="iconfont icon-baobeilianjie"></text>添加产品({{productList.length}})
@ -32,7 +30,7 @@
<text v-if="productList.length == 0" class="text">选择产品</text>
<view v-else class="text">
<image class="image" v-for="(item,index) in productList" :key="index"
:src="item.image || (item.spu && item.spu.image)"></image>
:src="item.image"></image>
</view>
<text class="iconfont icon-xiangyou"></text>
</view>
@ -41,7 +39,7 @@
<view class="content_center-one" v-for="(item,i) in productList" :key="i">
<view class="center-one">
<view class="center-one-img">
<image :src="item.image" mode=""></image>
<image :src="item.image" mode="aspectFit"></image>
</view>
<view class="center-one-txt">
<view class="one-txta">
@ -60,29 +58,27 @@
</view>
</view>
<button class="release_btn button" form-type="submit">发布</button>
<button class="release_btn button" form-type="submit">提交</button>
</view>
</form>
<uni-calendar ref="calendar" :date="info.date" :insert="info.insert" :lunar="info.lunar"
:startDate="info.startDate" :endDate="info.endDate" :range="info.range" @confirm="confirm"
:showMonth="info.showMonth" @close="close" />
<!-- 提到的宝贝弹窗 -->
<uni-popup ref="associated" type="bottom">
<associated @close="close" @getProduct="getProduct" :checkedObj="productList"></associated>
</uni-popup>
</view>
</template>
<script>
import associated from '@/components/realselist/realselist.vue';
import eselect from '@/components/e-select/e-select.vue';
// import {} from '@/api/sale.js'
import {
supplychain,
entrustchain,
editentrust,
entrustdetail
} from '@/api/sale.js'
export default {
components: {
associated,
@ -92,20 +88,8 @@
return {
value1: 1,
value2: "",
options1: [{
text: "Shenzhen1",
value: 1
}, {
options1: [],
text: "Shenzhen2",
value: 2
}, {
text: "Shenzhen3",
value: 3
}],
date: 1,
productList: [],
info: {
startDate: '',
@ -116,6 +100,14 @@
selected: [],
showMonth: false
},
formData: {
entrust_mer_id: '',
entrust_day: 15,
is_type: "4",
product_info: [],
content: ''
},
type: ''
};
},
computed: {
@ -124,27 +116,49 @@
},
onLoad(options) {
onLoad(e) {
this.id = e.id;
this.type = e.type
if (this.type) {
uni.setNavigationBarTitle({
title: '编辑打折'
})
this.editlist(e.id)
}
},
mounted() {
this.list()
},
methods: {
//
confirm(e) {
let self = this
if (e.range.after && e.range.before) {
let star = new Date(e.range.after).getTime()
let stop = new Date(e.range.before).getTime()
let arr = stop - star
this.date = Math.floor(arr / (24 * 3600 * 1000));
// console.log(days)
if (this.date < 0) {
this.date = this.date * -1
}
}
change1(item) {
console.log(item);
},
list() {
supplychain({
page: 1
}).then((res => {
for (let i in res.data.list) {
this.options1.push({
text: res.data.list[i].mer_name,
value: res.data.list[i].mer_id
})
}
// console.log(res)
}))
},
editlist(id) {
entrustdetail(id).then((res) => {
this.formData.entrust_mer_id = res.data.entrust_mer_id
this.formData.entrust_day = res.data.entrust_day
this.productList = res.data.product_list
this.getProduct(res.data.product_list)
})
},
calendar() {
this.$refs.calendar.open()
},
@ -158,12 +172,97 @@
},
//
getProduct(data) {
console.log(data)
this.formData.product_info=[]
if (data.length > 0) {
for (let i in data) {
this.formData.content += data[i].store_name + ','
this.formData.product_info.push({
product_attr_unique: data[i].product_attr_unique,
number: Number(data[i].number),
price: data[i].price
})
}
}
this.$refs.associated.close()
},
//
formSubmit(e) {
console.log(e)
let that = this,
value = that.formData;
if (value.entrust_day.length == 0 || value.entrust_day <= 0) return that.$util.Tips({
title: '请选择委托周期'
});
if (value.product_info.length == 0) return that.$util.Tips({
title: '请选择产品'
});
if (!value.entrust_mer_id) return that.$util.Tips({
title: '请添加商家'
});
this.type?
editentrust(this.id,value).then(res => {
if (res.status == '200') {
uni.hideLoading()
that.$util.Tips({
title: '编辑成功',
icon: 'success'
});
that.formData = {
entrust_mer_id: '',
entrust_day: 0,
is_type: "4",
product_info: []
}
uni.redirectTo({
url: '/pages/commissionedSales/initiateDelegation/index'
})
} else {
that.$util.Tips({
title: res.messge,
icon: 'success'
});
}
}).catch(err => {
return that.$util.Tips({
title: err
});
})
:
entrustchain(value).then(res => {
if (res.status == '200') {
uni.hideLoading()
that.$util.Tips({
title: '提交成功',
icon: 'success'
});
that.formData = {
entrust_mer_id: '',
entrust_day: 0,
is_type: "4",
product_info: []
}
uni.redirectTo({
url: '/pages/commissionedSales/initiateDelegation/index'
})
} else {
that.$util.Tips({
title: res.messge,
icon: 'success'
});
}
}).catch(err => {
return that.$util.Tips({
title: err
});
})
}
}
}
@ -174,6 +273,10 @@
background: #F5F5F5;
}
.content {
height: 100vh;
position: relative;
}
.release_content {
@ -418,6 +521,10 @@
}
.release_btn {
margin-top: 100rpx;
position: absolute;
bottom: 150rpx;
left: 50%;
margin-left: -347rpx;
}
</style>

View File

@ -1,57 +1,51 @@
<template>
<view class="content">
<view class="content_top">
<view class="content_top-one">
<image src="@/static/images/dong.gif" mode="aspectFill"></image>
</view>
<view class="content_top-two">
<view class="top-two-one">
{{objinfo.mer_status==0?"待处理":""||objinfo.mer_status==2?"已拒绝":""||objinfo.mer_status==1?"已接受":""}}
</view>
<view class="top-two-two">
<!-- 2020-07-07 14:14:14
-->
{{objinfo.entrust_start_date}}
</view>
</view>
</view>
<view class="content_center">
<view class="content_center-one">
<view class="content_center-one" v-for="(item,index) in objinfo.product_list">
<view class="center-one">
<view class="center-one-img">
<image src="../../annex/static/left.png" mode=""></image>
<image :src="item.image[0]" mode="aspectFit"></image>
</view>
<view class="center-one-txt">
<view class="one-txta">
良品铺子肉松饼1000g/ ...
{{item.store_name}}
</view>
<view class="one-txtb">
<view class="">
委托价:¥<span>34.90</span>
委托价:¥<span>{{item.price}}</span>
</view>
<view class="">
数量:100
数量:{{item.number}}
</view>
</view>
</view>
</view>
</view>
<view class="content_center-one">
<view class="center-one">
<view class="center-one-img">
<image src="../../annex/static/left.png" mode=""></image>
</view>
<view class="center-one-txt">
<view class="one-txta">
良品铺子肉松饼1000g/ ...
</view>
<view class="one-txtb">
<view class="">
委托价:¥<span>34.90</span>
</view>
<view class="">
数量:100
</view>
</view>
</view>
</view>
</view>
<view class="content_center-two">
<view class="content_center-two" v-if="objinfo">
<view class="center-two">
<view class="center-twoa">
委托方:
</view>
<view class="center-twob">
通滩镇镇街店铺
{{objinfo.mer_info.mer_name}}
</view>
</view>
<view class="center-two">
@ -59,7 +53,7 @@
被委托方:
</view>
<view class="center-twob">
通滩镇镇街店铺
{{objinfo.entrust_mer_info.mer_name}}
</view>
</view>
<view class="center-two">
@ -67,7 +61,7 @@
委托周期:
</view>
<view class="center-twob">
通滩镇镇街店铺
{{objinfo.entrust_day}}
</view>
</view>
<view class="center-two">
@ -75,7 +69,15 @@
结算周期:
</view>
<view class="center-twob">
通滩镇镇街店铺
{{objinfo.mer_info.settle_cycle}}
</view>
</view>
<view class="center-two">
<view class="center-twoa">
结算利息:
</view>
<view class="center-twob">
{{objinfo.mer_info.interest_rate}}%
</view>
</view>
<view class="center-two">
@ -83,7 +85,8 @@
状态:
</view>
<view class="center-twob">
通滩镇镇街店铺
{{objinfo.mer_status==0?"待处理":""||objinfo.mer_status==2?"已拒绝":""||objinfo.mer_status==1?"已接受":""}}
</view>
</view>
<view class="center-two">
@ -91,15 +94,15 @@
是否结束委托:
</view>
<view class="center-twob">
通滩镇镇街店铺
{{objinfo.entrust_finish==0?'未结束':""||objinfo.entrust_finish==1?'已结束':""||objinfo.entrust_finish==2?'商家拒绝':""||objinfo.entrust_finish==3?'申请':""}}
</view>
</view>
<view class="center-two">
<view class="center-two" v-if="objinfo.entrust_finish_refusal">
<view class="center-twoa">
拒绝原因:
</view>
<view class="center-twob">
通滩镇镇街店铺
<view class="center-twob" :style="{'text-align':objinfo.entrust_finish_refusal.length<15?'right':'left'}">
{{objinfo.entrust_finish_refusal}}
</view>
</view>
</view>
@ -111,38 +114,137 @@
</view>
<view class="content_bootm_one">
<view class="content_bootm_one" v-for="(item,i) in objinfo.product_list" @click="Merchbaby(item)">
<view class="bootm_oneimg">
<image src="@/static/images/bg2.png" mode=""></image>
<image :src="item.image[0]" mode="aspectFit"></image>
</view>
<view class="">
良品铺子肉松饼1000g/ 面包糕...
{{item.store_name}}
</view>
</view>
<view class="content_bootm_one">
<view class="bootm_oneimg">
<image src="@/static/images/bg2.png" mode=""></image>
</view>
<view class="">
良品铺子肉松饼1000g/ 面包糕...
</view>
</view>
</view>
<button class="release_btn button" form-type="submit">发布</button>
<button class="release_btn button" v-if="objinfo.mer_status==1&&type==1" @click="submit(objinfo)">发布</button>
</view>
</template>
<script>
import {
addEntrustCart,
entrustdetail
} from '@/api/sale.js'
export default {
data() {
return {
objinfo: {},
goodsData: [{
name: '我发起的',
name1: '委托销售商品',
type: 1,
src: require('@/static/images/wtbg1.png'),
img: require('@/static/images/wtt1.png')
},
{
name: '我收到的',
name1: '帮助销售商品',
type: 2,
src: require('@/static/images/wtbg2.png'),
img: require('@/static/images/wtt2.png')
}
],
type: 0,
}
},
onLoad(e) {
this.list(e.id)
this.type = e.type
},
onShow() {
},
methods: {
//
list(id) {
entrustdetail(id).then((res) => {
this.objinfo = res.data
})
},
//
Merchbaby(item) {
uni.navigateTo({
url: `/pages/goods_details/index?id=${item.product_id}`
})
},
//
submit(item) {
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()
})
}
})
}
}
}
</script>
<style lang="scss">
.content {
position: relative;
}
.content_top {
height: 151rpx;
background: linear-gradient(84deg, #2352FA 0%, #6497FF 100%);
display: flex;
padding-top: 21rpx;
.content_top-one {
width: 107rpx;
height: 107rpx;
margin-left: 28rpx;
image {
width: 100%;
height: 100%;
}
}
.content_top-two {
margin-left: 25rpx;
.top-two-one {
font-size: 35rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin-top: 10rpx;
}
.top-two-two {
font-size: 28rpx;
font-family: SF Pro Display-Light, SF Pro Display;
font-weight: 300;
color: #FFFFFF;
margin-top: 10rpx;
}
}
}
@ -217,6 +319,10 @@
}
.center-twob {
width: 360rpx;
text-align: right;
word-wrap: break-word;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 400;
@ -277,6 +383,4 @@
position: fixed;
bottom: 100rpx;
}
</style>

View File

@ -6,7 +6,7 @@
<cxNavTitle :tabs="tabs" :activeItem="activeItem" @tabClick="tabClick" :show='false'></cxNavTitle>
</view>
<!-- 审核通过 打折的拒绝同意功能 调货不需要功能 -->
<view class="content-content" v-for="(item,i) in list" :key="i" >
<view class="content-content" v-for="(item,i) in orderList" :key="i">
<view class="content-one">
<view class="content-one-img">
@ -14,88 +14,94 @@
</view>
<view class="content-one-txt">
<view class="one-txt-a">
{{item.content}}
{{item.title}}
</view>
<view class="one-txt-b">
委托周期:{{item.day}}
委托周期:{{item.entrust_day}}
</view>
</view>
</view>
<view class="content-two_one" v-if="item.type==1">
<view class="content-two-edita" @click="soldEdit">
<view class="content-two_one" v-if="item.mer_status==0">
<view class="content-two-edita" @click="order">
待处理
</view>
<view class="contentgn">
<view class="contentgn_a">
<!-- <view class="contentgn_a" @click="soldEdit(item)">
处理
</view>
<span></span>-->
<view class="contentgn_a" style="margin-left: 10rpx;" @click="Edit(item)">
编辑
</view>
<span></span>
<view class="contentgn_b">
<view class="contentgn_a" style="margin-left: 10rpx;" @click="deleteOrder(item)">
删除
</view>
<span></span>
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_oneq" v-if="item.type==2">
<view class="content-two_oneq" v-if="item.mer_status==1">
<view class="content-two-editb" @click="accepted">
已接受
</view>
<view class="contentgn">
<view class="contentgn_a" @click="closingorder">
<view class="contentgn_a" @click="closingorder(item)" v-if="item.entrust_finish==3">
结束委托
</view>
<span></span>
<view class="contentgn_b">
<span v-if="item.entrust_finish==3"></span>
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_one" v-if="item.type==3">
<view class="content-two_one" v-if="item.mer_status==2">
<view class="content-two-editc" @click="declined">
已拒绝
</view>
<view class="contentgn">
<view class="contentgn_a">
<!--<view class="contentgn_a" @click="deleteOrder(item)">
删除
</view>
<span></span>
<view class="contentgn_b">
<span></span> -->
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_one" v-if="item.type==4">
<view class="content-two-editd" @click="soldEdit">
已完成
</view>
<view class="contentgn">
<view class="contentgn_a">
<view class="contentgn_a" @click="deleteOrder(item)">
删除
</view>
<span></span>
<view class="contentgn_b">
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
</view>
<view v-if="orderList.length == 0 && this.where.page > 1">
<view class="adddelegation" @click="addDelegation">
<view class="adddelegation-one">
<image src="@/static/images/delegation.png" mode=""></image>
</view>
<view class="adddelegation-two">
新增委托
</view>
</view>
<view v-if="orderList.length == 0">
<emptyPage title="暂无订单~"></emptyPage>
</view>
<u-loadmore :status="status" v-if="orderList.length >= where.limit" />
<uni-popup ref="bindmobile" type="center" @click="close">
<view class="" style="position: relative;">
<view class="entrust">
<view class="entrust_close" @click="close">
@ -107,19 +113,16 @@
委托申请处理
</view>
<view class="bg-content-b">
结算周期: <span>30</span>
结算周期: <span>{{obj.settle_cycle}}</span>
</view>
<view class="bg-content-c">
利息比例: <span>0.05%</span>
利息比例: <span>{{obj.interest_rate}}%</span>
</view>
<view class="entrust_bga_btn">
<view class="cancellation">
<view class="cancellation" @click="passDelete(obj)">
拒绝
</view>
<view class="determine">
<view class="determine" @click="passagree(obj)">
接受
</view>
</view>
@ -129,7 +132,6 @@
</view>
</uni-popup>
<uni-popup ref="bindmobile1" type="center" @click="close">
<view class="" style="position: relative;">
<view class="entrust">
<view class="entrust_close" @click="close">
@ -149,15 +151,11 @@
</view>
</view>
</view>
</view>
</view>
</view>
</uni-popup>
<uni-popup ref="bindmobile2" type="center" @click="close">
<view class="" style="position: relative;">
<view class="entrust">
<view class="entrust_close" @click="close">
@ -168,20 +166,17 @@
<view class="bg-content-a" style="margin-left: 207rpx;">
结束委托申请处理
</view>
<view class="bg-content-b">
结算周期: <span>30</span>
<view class="bg-content-b" v-if="obj.mer_info">
结算周期: <span>{{obj.mer_info.settle_cycle}}</span>
</view>
<view class="bg-content-c">
利息比例: <span>0.05%</span>
<view class="bg-content-c" v-if="obj.mer_info">
利息比例: <span>{{obj.mer_info.interest_rate}}%</span>
</view>
<view class="entrust_bga_btn">
<view class="cancellation">
<view class="cancellation" @click="refused">
拒绝
</view>
<view class="determine">
<view class="determine" @click="agree(obj)">
接受
</view>
</view>
@ -202,24 +197,19 @@
<view class="bg-content-a" style="margin-left: 207rpx;">
结束委托申请处理
</view>
<view class="bg-content-b">
结算周期: <span>30</span>
<view class="bg-content-b" v-if="obj.mer_info">
结算周期: <span>{{obj.mer_info.settle_cycle}}</span>
</view>
<view class="bg-content-c" v-if="obj.mer_info">
利息比例: <span>{{obj.mer_info.interest_rate}}%</span>
</view>
<view class="bg-content-c">
利息比例: <span>0.05%</span>
</view>
<view class="bg-content-c">
拒绝原因
<view class="" style="margin-top: 21rpx;">
<textarea value="" placeholder="输入拒绝原因" class="bg-content_textarea" />
<textarea v-model="refuseds" placeholder="输入拒绝原因" class="bg-content_textarea" />
</view>
</view>
<view class="entrust_bga_btn">
<view class="entrust_bga_btn" @click="agree(obj)">
<view class="determine">
接受
</view>
@ -235,34 +225,44 @@
<script>
import cxNavTitle from '@/components/cx-navTitle.vue'
import emptyPage from '@/components/emptyPage.vue';
import {
entrustlist,
finishchain,
checkchain,
finishentrust
} from '@/api/sale.js'
export default {
components: {
cxNavTitle,
emptyPage
emptyPage,
},
data() {
return {
activeItem: "tabOne",
status: 'loadmore',
tabTitle: "",
orderList: [],
where: {
page: 1,
limit: 10
limit: 10,
type: 1,
status: 0
},
tabs: [{
name: "tabOne",
label: '待处理',
type: '1'
type: 0
},
{
name: "tabTwo",
label: '已接受',
type: '2'
type: 1
},
{
name: "tabThree",
label: '已拒绝',
type: '3'
type: 2
},
],
@ -290,79 +290,248 @@
type: 4
}
]
],
obj: {},
refuseds: ''
}
},
onLoad() {
this.tabTitle = this.tabs[0].name
// -- :
console.log(this.tabs[0])
// console.log(this.tabs[0])
},
mounted() {
this.commislist()
},
methods: {
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.page = ++this.where.page;
this.commislist()
},
nav(item) {
// uni.navigateTo({
// url: '/pages/commissionedSales/delegation_details/index'
// })
},
//
commislist() {
entrustlist(this.where).then((res) => {
this.orderList.push(...res.data.list)
if (res.data.list.length < this.where.limit) this.status = 'nomore'
if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true
})
},
//
tabClick(e) { //
this.activeItem = e.name; //class
this.tabTitle = e.name; //
this.where.page = 1
this.orderList = []
this.where.status = e.type
this.commislist()
},
//
Edit(item) {
uni.navigateTo({
url: '/pages/commissionedSales/addDelegation/index?id=' + item.community_id + '&type=edit'
})
},
//
addDelegation() {
uni.navigateTo({
url: '/pages/commissionedSales/addDelegation/index'
})
},
//
close() {
console.log('1111111')
this.$refs.bindmobile.close()
this.$refs.bindmobile1.close()
this.$refs.bindmobile2.close()
this.$refs.bindmobile3.close()
},
//
order(item) {
if (item.mer_status == 0 && entrust_order_id != 0) {
uni.navigateTo({
url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id
})
} else {
this.$util.Tips({
title: '商家还没同意该订单',
icon: 'err'
})
}
},
//
detail(item) {
uni.navigateTo({
url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id
})
},
//
soldEdit() {
soldEdit(item) {
this.obj = item
console.log(item)
this.$refs.bindmobile.open()
},
//
accepted() {
this.$refs.bindmobile1.open()
},
//
closingorder() {
closingorder(item) {
console.log(item)
this.obj = item
this.$refs.bindmobile2.open()
// this.$refs.bindmobile3.open()
},
//
refused() {
this.$refs.bindmobile2.close()
setTimeout(() => {
this.$refs.bindmobile3.open()
}, 1000)
},
//
declined() {
this.$refs.bindmobile2.open()
// this.$refs.bindmobile2.open()
this.$refs.bindmobile3.open()
},
agree(item) {
finishentrust(item.community_id, {
status: 2,
refusal: this.refuseds
}).then(res => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabTwo"
this.$refs.bindmobile2.close()
this.$refs.bindmobile3.close()
this.commislist()
})
},
//
deleteOrder(item) {
checkchain(item.community_id, {
status: 3
}).then(res => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabOne"
this.commislist()
}).catch((err) => {
console.log(err)
this.$util.Tips({
title: err,
icon: 'error'
})
})
},
//
auditEdit() {
},
//
passDelete() {
passDelete(item) {
checkchain(item.community_id, {
status: 2
}).then((res) => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabOne"
this.commislist()
})
},
//
passagree() {
passagree(item) {
checkchain(item.community_id, {
status: 1
}).then((res) => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabOne"
this.commislist()
this.$refs.bindmobile.close()
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
height: 100vh;
position: relative;
}
.content_top {
background-color: #FFFFFF;
}
.adddelegation {
width: 694rpx;
height: 95rpx;
background: linear-gradient(276deg, #F98649 0%, #F34E45 100%);
box-shadow: 0 5rpx 11rpx 2rpx rgba(136, 20, 7, 0.3);
border-radius: 47rpx 47rpx 47rpx 47rpx;
opacity: 1;
display: flex;
position: fixed;
position: absolute;
bottom: 84rpx;
left: 50%;
margin-left: -347rpx;
.adddelegation-one {
width: 50rpx;
margin-right: 30rpx;
height: 50rpx;
margin-left: 242rpx;
margin-top: 21rpx;
image {
width: 50rpx;
height: 50rpx;
}
}
.adddelegation-two {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin-top: 25rpx;
}
}
.content_top {
@ -558,12 +727,11 @@
}
span {
width: 0px;
width: 1px;
height: 30rpx;
opacity: 1;
margin-top: 10rpx;
border: 2rpx solid #CCCCCC;
margin-top: 8rpx;
background-color: #cccccc;
}
@ -744,7 +912,7 @@
.entrust_bg-content {
position: absolute;
top: 404rpx;
top: 304rpx;
.bg-content-a {
margin-left: 242rpx;
@ -790,7 +958,7 @@
.bg-content_textarea {
width: 624rpx;
height: 152rpx;
height: 242rpx;
padding: 25rpx 18rpx;
background: #F5F5F5;

View File

@ -6,7 +6,7 @@
<cxNavTitle :tabs="tabs" :activeItem="activeItem" @tabClick="tabClick" :show='false'></cxNavTitle>
</view>
<view class="content-content" v-for="(item,i) in list" :key="i" @click="nav(item)">
<view class="content-content" v-for="(item,i) in orderList" :key="i" @click="nav(item)">
<view class="content-one">
<view class="content-one-img">
@ -14,108 +14,114 @@
</view>
<view class="content-one-txt">
<view class="one-txt-a">
{{item.content}}
{{item.title}}
</view>
<view class="one-txt-b">
委托周期:{{item.day}}
委托周期:{{item.entrust_day}}
</view>
<view class="one-txt-b" v-if="item.mer_status==1" style="color: red;margin-top: 3rpx;">
{{item.entrust_finish==0?'未申请结束委托':""||item.entrust_finish==1?'委托已结束':""||item.entrust_finish==2?'商家拒绝结束委托':""||item.entrust_finish==3?'结束委托申请中':""}}
</view>
</view>
</view>
<view class="content-two_one" v-if="item.type==1">
<view class="content-two-edita" @click="soldEdit">
<view class="content-two_one" v-if="item.mer_status==0">
<view class="content-two-edita" @click="order">
待处理
</view>
<view class="contentgn">
<view class="contentgn_a">
<view class="contentgn_a" @click="soldEdit(item)">
处理
</view>
<span></span>
<view class="contentgn_b">
<!-- <view class="contentgn_a" style="margin-left: 10rpx;" @click="Edit(item)">
编辑
</view>
<span></span> -->
<!-- <view class="contentgn_a" style="margin-left: 10rpx;" @click="deleteOrder(item)">
删除
</view>
<span></span> -->
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_oneq" v-if="item.type==2">
<view class="content-two_oneq" v-if="item.mer_status==1">
<view class="content-two-editb" @click="accepted">
已接受
</view>
<view class="contentgn">
<view class="contentgn_a" @click="closingorder">
结束委托
<view class="contentgn_a" style="margin-left: 10rpx;"
v-if="item.entrust_order_id>0&&item.mer_status==1" @click="closingorder(item)">
申请结束委托
</view>
<span></span>
<view class="contentgn_b">
<span v-if="item.entrust_order_id>0&&item.mer_status==1"></span>
<view class="contentgn_a" v-if="item.entrust_order_id==0" style="margin-left: 10rpx;"
@click="order(item)">
去下单
</view>
<span v-if="item.entrust_order_id==0"></span>
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_one" v-if="item.type==3">
<view class="content-two_one" v-if="item.mer_status==2">
<view class="content-two-editc" @click="declined">
已拒绝
</view>
<view class="contentgn">
<view class="contentgn_a">
删除
</view>
<span></span>
<view class="contentgn_b">
<!--
-->
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
<view class="content-two_one" v-if="item.type==4">
<view class="content-two-editd" @click="soldEdit">
已完成
</view>
<view class="contentgn">
<view class="contentgn_a">
删除
</view>
<span></span>
<view class="contentgn_b">
<view class="contentgn_b" @click="detail(item)">
详情
</view>
</view>
</view>
</view>
<view v-if="orderList.length == 0 && this.where.page > 1">
<view v-if="orderList.length == 0">
<emptyPage title="暂无订单~"></emptyPage>
</view>
<u-loadmore :status="status" v-if="orderList.length >= where.limit" />
<u-loadmore :status="status" v-if="orderList.length >= where.limit" />
<uni-popup ref="bindmobile" type="center" @click="close">
<view class="" style="position: relative;">
<view class="entrust">
<view class="entrust_close" @click="close">
<image src="@/static/images/wt_close.png" mode=""></image>
</view>
<view class="entrust_bg">
<view class="entrust_bg-content">
<view class="entrust_bg-content" v-if="obj.mer_info">
<view class="bg-content-a">
委托申请处理
</view>
<view class="bg-content-b" >
结算周期: <span>30</span>
结算周期: <span>{{obj.mer_info.settle_cycle}}</span>
</view>
<view class="bg-content-c" >
利息比例: <span>0.05%</span>
利息比例: <span>{{obj.mer_info.interest_rate}}%</span>
</view>
<view class="entrust_bga_btn">
<view class="cancellation">
<view class="cancellation" @click="passDelete(obj)">
拒绝
</view>
<view class="determine">
<view class="determine" @click="passagree(obj)">
接受
</view>
</view>
@ -125,7 +131,6 @@
</view>
</uni-popup>
<uni-popup ref="bindmobile1" type="center" @click="close">
<view class="" style="position: relative;">
<view class="entrust">
<view class="entrust_close" @click="close">
@ -134,26 +139,23 @@
<view class="entrust_bga">
<view class="entrust_bg-content">
<view class="bg-content-a">
确定结束委托?
<!-- 确定结束委托? -->
申请委托结束处理
</view>
<view class="entrust_bga_btn">
<view class="cancellation">
<view class="cancellation" @click="close">
取消
</view>
<view class="determine">
<view class="determine" @click="deteragrss(obj)">
确定
</view>
</view>
</view>
</view>
</view>
</view>
</uni-popup>
<uni-popup ref="bindmobile2" type="center" @click="close">
<view class="" style="position: relative;">
<view class="entrust">
<view class="entrust_close" @click="close">
@ -166,13 +168,10 @@
</view>
<view class="bg-content-b">
结算周期: <span>30</span>
</view>
<view class="bg-content-c">
利息比例: <span>0.05%</span>
</view>
<view class="entrust_bga_btn">
<view class="cancellation">
拒绝
@ -200,20 +199,15 @@
</view>
<view class="bg-content-b">
结算周期: <span>30</span>
</view>
<view class="bg-content-c">
利息比例: <span>0.05%</span>
</view>
<view class="bg-content-c">
拒绝原因
<view class="" style="margin-top: 21rpx;">
<textarea value="" placeholder="输入拒绝原因" class="bg-content_textarea" />
</view>
</view>
<view class="entrust_bga_btn">
<view class="determine">
@ -231,7 +225,11 @@
<script>
import cxNavTitle from '@/components/cx-navTitle.vue'
import emptyPage from '@/components/emptyPage.vue';
import {} from '@/api/sale.js'
import {
entrustlist,
finishchain,
checkchain
} from '@/api/sale.js'
export default {
components: {
cxNavTitle,
@ -239,27 +237,32 @@
},
data() {
return {
obj: {},
activeItem: "tabOne",
status: 'loadmore',
activeItem: "tabOne",
tabTitle: "",
orderList: [],
where: {
page: 1,
limit: 10
type: 2,
limit: 10,
status: 0
},
tabs: [{
name: "tabOne",
label: '待处理',
type: '1'
type: '0'
},
{
name: "tabTwo",
label: '已接受',
type: '2'
type: '1'
},
{
name: "tabThree",
label: '已拒绝',
type: '3'
type: '2'
},
],
@ -297,59 +300,150 @@
},
mounted() {
this.commislist()
},
methods: {
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.page = ++this.where.page;
this.commislist()
},
nav(item) {
uni.navigateTo({
url: '/pages/commissionedSales/delegation_details/index'
// uni.navigateTo({
// url: '/pages/commissionedSales/delegation_details/index'
// })
},
//
commislist() {
entrustlist(this.where).then((res) => {
this.orderList.push(...res.data.list)
if (res.data.list.length < this.where.limit) this.status = 'nomore'
if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true
})
},
//
tabClick(e) { //
this.activeItem = e.name; //class
this.tabTitle = e.name; //
this.where.page = 1
this.orderList = []
this.where.status = e.type
this.commislist()
},
//
close() {
console.log('1111111')
this.$refs.bindmobile.close()
this.$refs.bindmobile1.close()
this.$refs.bindmobile2.close()
this.$refs.bindmobile3.close()
},
//
detail(item) {
uni.navigateTo({
url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id
})
},
//
soldEdit() {
soldEdit(item) {
this.obj = item
this.$refs.bindmobile.open()
},
//
accepted() {
this.$refs.bindmobile1.open()
},
//
closingorder() {
this.$refs.bindmobile3.open()
closingorder(item) {
this.obj = item
this.$refs.bindmobile1.open()
// this.$refs.bindmobile3.open()
},
//
order(item) {
uni.navigateTo({
url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id + '&type=1'
})
},
//
deteragrss(item) {
finishchain(item.community_id, {
status: 1
}).then((res) => {
console.log(res)
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabTwo"
this.commislist()
this.$refs.bindmobile1.close()
}).catch((err) => {
this.$refs.bindmobile1.close()
this.$util.Tips({
title: err,
icon: 'error'
})
})
},
//
declined() {
this.$refs.bindmobile2.open()
// this.$refs.bindmobile2.open()
this.$refs.bindmobile3.open()
},
//
deleteOrder(item) {
checkchain(item.community_id, {
status: 3
}).then(res => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabOne"
this.commislist()
})
},
//
auditEdit() {
},
//
passDelete() {
passDelete(item) {
checkchain(item.community_id, {
status: 2
}).then((res) => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabOne"
this.commislist()
this.$refs.bindmobile.close()
})
},
//
passagree() {
passagree(item) {
checkchain(item.community_id, {
status: 1
}).then((res) => {
this.$util.Tips({
title: res.message,
icon: 'success'
})
this.orderList = []
this.tabTitle = "tabOne"
this.commislist()
this.$refs.bindmobile.close()
})
}
}
}
@ -738,7 +832,7 @@
.entrust_bg-content {
position: absolute;
top: 404rpx;
top: 304rpx;
.bg-content-a {
margin-left: 242rpx;
@ -784,7 +878,7 @@
.bg-content_textarea {
width: 624rpx;
height: 152rpx;
height: 242rpx;
padding: 25rpx 18rpx;
background: #F5F5F5;

View File

@ -2,16 +2,16 @@
<view class="gather">
<view @click="selectLocation" v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{ 'opacity': backColor,}">
<view :class="['place_wrapper', 'flex_a_c', isFshow ? 'sitebox' : '']" @click="selectLocation">
<view :class="['iconfont', 'icon-weizhi', isFshow ? 'sitebox' : '']"
style="color:#000;margin-left: 20rpx;">
style=" margin-left: 20rpx">
</view>
<view class="town_name" style="color:#000;">{{street}}</view>
<view class="town_name">{{ street }}</view>
</view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#000;"></view>
<view :class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']"></view>
</navigator>
</view>
<!--<view class="site-box ','flex_a_c_j_sb'" v-if="ishshow">
@ -19,6 +19,12 @@
<img :src="bgColor" alt="">
</view>
</view> -->
</view>
<!-- <view class="site-box ','flex_a_c_j_sb'" v-if="ishshow">
<view class="bg-img">
<img :src="bgColor" alt="">
</view>
</view> -->
</view>
@ -220,7 +226,6 @@
this.backColor = 'rgba(252, 252, 252, 1)'
this.isFshow = true
}
},
@ -370,7 +375,7 @@ this.editFlag = false;
timeout: '10',
success: (res) => {
// console.log(res)
this.isshow = false
let latitude, longitude;
latitude = res.latitude.toString();
longitude = res.longitude.toString();
@ -388,6 +393,7 @@ this.editFlag = false;
})
}).catch(err => {
this.isshow = false
uni.showToast({
title: err,
icon: 'none'
@ -395,12 +401,8 @@ this.editFlag = false;
})
},
fail: (err) => {
this.isshow = false
uni.showToast({
title: "获取定位超时",
icon: 'none',
duration: 2000
});
}
});
},
@ -480,7 +482,9 @@ this.editFlag = false;
/* #ifdef H5 */
padding-top: 25rpx;
/* #endif */
// background-color: #e5e5e5;
background: url('@/static/images/bg2.png') no-repeat;
background-size: 100% 100%;
padding-right: 20rpx;
//

View File

@ -658,6 +658,11 @@
that.getConfig();
uni.hideLoading();
},
onHide(){
this.CartCount=0
},
/**
* 用户点击右上角分享
*/

347
pages/guide/guide.vue Normal file
View File

@ -0,0 +1,347 @@
<template>
<view>
<view class="swiper-css zqui-rel" :style="{ height: hpx }">
<swiper class="swiper" :style="{ height: hpx }" :indicator-dots="indicatorDots" :autoplay="autoplay"
disable-touch='true' :interval="interval" :duration="duration" @change="guideAction">
<swiper-item v-for="(item, index) in imageList" :key="index" catchtouchmove="stopChange">
<image class="image-size" mode="widthFix" :src="item.src" />
</swiper-item>
</swiper>
<!-- 按钮样式切换 -->
<template v-if="cur != 2">
<view class=" flex-column dots">
<block v-for="(item,index) in imageList" :key="index">
<view class="dot" :class="{'active': index == cur}"></view>
</block>
</view>
</template>
<!-- 第三张图使用按钮立即进入 -->
<template v-if="cur == 1">
<button class="flex-column cu-btn footer" @click="launchApp">立即体验</button>
</template>
<!-- 右上角跳过按钮 -->
<view class="btn-box" @click="launchApp"><text class="passbtn">{{num}}跳过</text></view>
</view>
</view>
</template>
<script>
const animation = weex.requireModule('animation');
export default {
data() {
return {
//,
imageList: [{
src: '/static/images/guide.png'
}
],
indicatorDots: false,
autoplay: false,
interval: 10000,
duration: 500,
iStatusBarHeight: '0px',
hpx: '100%',
cur: 0,
dotsStyles: '',
num: 3
};
},
onLoad() {
let that = this;
plus.navigator.closeSplashscreen();
uni.getSystemInfo({
success: function(res) {
that.hpx = res.windowHeight + 'px';
}
});
},
onReady() {
// this.move(0, 1);
},
mounted() {
this.countDown()
},
methods: {
countDown() {
let {
num
} = this;
if (num === 3) this.nums = true;
num = num > 0 ? num - 1 : "GO";
setTimeout(() => {
this.num = num;
if (num == 'GO') {
this.launchApp()
return
}
this.countDown();
}, 1000);
},
stopTouchMove: function() {
return false;
},
launchApp() {
//,,
uni.setStorage({
key: 'launchFlag',
data: true,
success() {
uni.switchTab({
url: '/pages/index/index'
})
}
});
},
guideAction(event) {
let that = this,
index = event.detail.current;
that.cur = index;
// if (index == 0) {
// that.move(0, 1);
// that.moveTwo(150, 0.1);
// that.moveThree(150, 0.1);
// that.lefMainAction(0);
// }
// if (index == 1) {
// that.moveTwo(0, 1);
// that.move(150, 0.1);
// that.moveThree(150, 0.1);
// that.lefMainAction(uni.upx2px(80) + 'px');
// }
// if (index == 2) {
// that.moveThree(0, 1);
// that.moveTwo(150, 0.1);
// that.move(150, 0.1);
// that.lefMainAction(uni.upx2px(160) + 'px');
// }
},
lefMainAction(mum) {
var testLM = this.$refs.lefMain;
animation.transition(
testLM, {
styles: {
transform: 'translate(' + mum + ',0px)'
},
duration: 400, //ms
timingFunction: 'ease',
delay: 0 //ms
},
function() {}
);
},
move(tran, opa) {
var testEl = this.$refs.box1;
animation.transition(
testEl, {
styles: {
transform: 'translate(' + tran + 'px,0px)',
transformOrigin: 'center center',
opacity: opa
},
duration: 800, //ms
timingFunction: 'ease',
delay: 0 //ms
},
function() {}
);
var textE2 = this.$refs.box2;
animation.transition(
textE2, {
styles: {
transform: 'translate(0px,' + tran + 'px) scale(' + opa + ')',
transformOrigin: 'center center',
opacity: opa
},
duration: 800, //ms
timingFunction: 'ease',
delay: 0 //ms
},
function() {}
);
},
moveTwo(tran, opa) {
var testEl = this.$refs.box3;
animation.transition(
testEl, {
styles: {
transform: 'translate(' + tran + 'px,0px)',
transformOrigin: 'center center',
opacity: opa
},
duration: 800, //ms
timingFunction: 'ease',
delay: 0 //ms
},
function() {}
);
var textE2 = this.$refs.box4;
animation.transition(
textE2, {
styles: {
transform: 'translate(0px,' + tran + 'px) scale(' + opa + ')',
transformOrigin: 'center center',
opacity: opa
},
duration: 800, //ms
timingFunction: 'ease',
delay: 0 //ms
},
function() {}
);
},
moveThree(tran, opa) {
var testEl = this.$refs.box5;
animation.transition(
testEl, {
styles: {
transform: 'translate(' + tran + 'px,0px)',
transformOrigin: 'center center',
opacity: opa
},
duration: 800, //ms
timingFunction: 'ease',
delay: 0 //ms
},
function() {}
);
var textE2 = this.$refs.box6;
animation.transition(
textE2, {
styles: {
transform: 'translate(0px,' + tran + 'px) scale(' + opa + ')',
transformOrigin: 'center center',
opacity: opa
},
duration: 800, //ms
timingFunction: 'ease',
delay: 0 //ms
},
function() {}
);
}
}
};
</script>
<style lang="scss">
page {
min-height: 100%;
height: 100%;
}
.guide {
width: 100%;
height: 100%;
}
.image-size {
width: 750rpx;
height: 100%;
border: 1px solid red;
}
.title-box {
padding: 250rpx 0 120rpx 64rpx;
}
.guide-title {
font-size: 48rpx;
font-weight: bold;
color: rgba(58, 61, 68, 1);
}
.guide-subtitle {
margin-top: 20rpx;
font-size: 35rpx;
color: rgba(131, 136, 146, 1);
line-height: 50rpx;
}
.footer {
width: 231rpx;
height: 80rpx;
text-align: center;
position: fixed;
bottom: 116rpx;
left: 37%;
font-size: 30rpx;
color: #FFFFFF;
background-color: #2B9939;
}
.btn-box {
position: absolute;
z-index: 999;
right: 40rpx;
top: 120rpx;
}
.dots {
display: flex;
justify-content: center;
position: absolute;
z-index: 999;
height: 151rpx;
left: 0;
right: 0;
bottom: 20rpx;
}
.passbtn {
color: #ffffff;
text-align: center;
border-width: 1rpx;
border-color: rgba(255, 255, 255, 0.5);
border-style: solid;
border-radius: 30rpx;
font-size: 28rpx;
padding-top: 10rpx;
padding-bottom: 10rpx;
padding-left: 25rpx;
padding-right: 25rpx;
}
.dot {
margin: 0 4rpx;
width: 15rpx;
height: 15rpx;
background: #CDD2DD;
border-radius: 8rpx;
transition: all .6s;
}
.dot.active {
width: 40rpx;
background: #838892 !important;
}
/* 相对定位 */
.zqui-rel {
position: relative;
}
.swiper-css {
width: 750rpx;
}
.swiper-item {
width: 750rpx;
}
</style>

34
pages/guide/judge.vue Normal file
View File

@ -0,0 +1,34 @@
<template>
<view class="content"></view>
</template>
<script>
export default {
onLoad() {
this.checkGuide();
},
methods: {
checkGuide() {
console.log("进入checkGuide判断页");
//
try {
var launchFlag = uni.getStorageSync('launchFlag');
// console.log("launchFlag:" + launchFlag);
if (launchFlag) { //
uni.switchTab({
url:'/pages/index/index'
})
} else { //
console.log('去引导页');
uni.redirectTo({
url: '/pages/guide/guide'
});
}
} catch (e) {
console.log(e.message);
}
}
}
};
</script>

View File

@ -2,15 +2,15 @@
<view class="Circle_friends">
<view class="circle_friends_wrapper">
<view v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{ 'background-color': backColor }">
<view class="site-box flex_a_c_j_sb" :style="{ 'opacity': backColor,}">
<view :class="['place_wrapper', 'flex_a_c', isFshow ? 'sitebox' : '']" @click="selectLocation">
<view :class="['iconfont', 'icon-weizhi', isFshow ? 'sitebox' : '']"
style="color: #000; margin-left: 20rpx">
style=" margin-left: 20rpx">
</view>
<view class="town_name" style="color: #000">{{ street }}</view>
<view class="town_name">{{ street }}</view>
</view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view :class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']" style="color: #000"></view>
<view :class="['iconfont', 'icon-xiaoxi', isFshow ? 'sitebox' : '']"></view>
</navigator>
</view>
<!--<view class="site-box ','flex_a_c_j_sb'" v-if="ishshow">
@ -20,17 +20,34 @@
</view> -->
</view>
<zbpSwiper ref="list" :isSelectPlace="true" :town="street" :show="show" :location_Arr="locationArr"
@kkchange="kkchange" @change="dchange">
@change="dchange">
</zbpSwiper>
<view class="tabs_wrapper">
<u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"
<!-- <u-tabs :list="tabsData.list" @click="tabsChange" lineColor="#F84221" keyName="cate_name"
:activeStyle="activeStyle" itemStyle="padding-left: 0px; height: 33px;"></u-tabs>
<view class="tabs_wrapper-img">
<image src="@/static/images/zk.png" mode=""></image>
</view> -->
<view class="" style="width: 670rpx;">
<u-tabs :list="tabsData.list" @click="tabsChange" itemStyle=" height: 33px;" lineColor="#F84221"
:current="current" keyName="cate_name" :activeStyle="activeStyle"></u-tabs>
</view>
<view class="tabs_wrapper-img" @click="open">
<image src="@/static/images/zk.png" mode=""></image>
</view>
</view>
<view class=""> </view>
<view class="goodslist">
<WaterfallsFlow :wfList="cateGoods" />
<WaterfallsFlow :wfList="productList" @itemTap='itemTap' :type="1" />
</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 class="empty_wrapper" v-if="emptyShow">
<u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
@ -39,16 +56,39 @@
<u-picker :defaultIndex="[0, 0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
<u-loadmore :status="status" v-if="cateGoods.length >= where.limit" />
<!-- <view class="bg_color"></view> -->
<!--<m-tabbar native>
<template v-slot:tabbar_index_2>
<view class="custom_style">
<view class="custom_style_icon"></view>
<view class="custom_style-txt" style="color: #282828;">
发布
</view>
</view>
</template>
</m-tabbar> -->
<uni-popup ref="popup" type="bottom">
<view class="classpage">
<view class="classpage-one">
全部分类
<image src="@/static/images/cuo.png" mode="" @click="cuo"></image>
</view>
<view class="classpage-two">
点击进入分类
</view>
<view class="classpage-three">
<view class="" v-for="(item,i) in tabsData.list" :key='i' @click="tabsChange2(item,i)">
{{item.cate_name}}
</view>
</view>
</view>
</uni-popup>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"
:isGoIndex="false"></authorize>
<view class="location" v-if="isshow">
<view class="locationa"> 位置权限使用说明 </view>
<view class="locationb"> 用于向你推荐最近门店 </view>
@ -61,7 +101,10 @@
import zbpSwiper from '@/components/zbpSwiper'
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlows.vue'
import authorize from '@/components/Authorize';
import {
getUserInfo
} from '@/api/user.js';
import {
getSlideAPI
} from '@/api/lihai.js'
@ -92,19 +135,21 @@
mTabbar,
zbpSwiper,
easyLoadimage,
WaterfallsFlow
WaterfallsFlow,
authorize
},
data() {
return {
activeStyle: {
isAuto: false, //
isShowAuth: false, //
activeStyle: {
color: '#333333',
fontWeight: 'bold',
transform: 'scale(1.04)'
},
isshow: false,
locationArr: ({}),
status: 'loadmore',
bgColor: '',
showPicker: false,
columnData: [],
@ -120,48 +165,40 @@
where: {
category_id: 0,
page: 1,
limit: 6
limit: 10
},
loadend: false,
loading: false,
loadTitle: '加载更多',
currentItemId: 69, // 0 || 69
keyword: '',
location: '',
emptyShow: false,
street: '',
cateGoods: [],
productList: [],
recoList: [],
articleList: [],
streeta_id: '',
street: '',
bgColor: '',
backColor: 'rgba(252, 252, 252, 0)',
backColor: 0,
isFshow: false,
scrollTop: 0,
show: true
show: true,
userid: '',
current:0
}
},
onShow() {
onPullDownRefresh() {
//
uni.onNetworkStatusChange((res) => {
// truefalse
if (res.isConnected) {
this.getCateList()
this.cateGoods = []
this.getGoods()
this.Area()
uni.stopPullDownRefresh()
},
onLoad() {
this.getCateList()
// this.getArticle()
this.getGoods()
this.Area()
//this.setPermissions()
// this.openTongZhi()
uni.$on('connectstatusChange', (connectstatus) => {
var connectstr = ''
if (connectstatus == true) {
@ -172,30 +209,33 @@
}
this.connectstatus = connectStr
})
},
onTabItemTap(e) {
console.log(e)
if (e.text.length >= 4) {
uni.pageScrollTo({
selector: ".Circle_friends",
scrollTop: 0
})
}
});
},
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.page = ++this.where.page;
this.getGoods()
onPullDownRefresh() {
this.getCateList()
this.getGoods(true)
this.Area()
uni.stopPullDownRefresh()
},
mounted() {
onLoad() {
this.selfLocation()
// #ifdef H5
//
window.addEventListener("scroll", this.scrolling);
// #endif
this.getCateList()
//this.getArticle()
this.getGoods(true)
this.Area()
//this.setPermissions()
// this.openTongZhi()
},
onTabItemTap(e) {
uni.pageScrollTo({
@ -205,13 +245,37 @@
},
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.page = ++this.where.page;
this.getGoods()
onHide() {
this.getGoods(true)
uni.pageScrollTo({
selector: ".Circle_friends",
scrollTop: 0
})
uni.setTabBarItem({
index: 0,
text: "泸州",
iconPath: '/static/tabbar_icon/a.png',
selectedIconPath: '/static/tabbar_icon/a-a.png'
});
this.isFshow = false
},
onReachBottom() {
if (this.productList.length > 0) {
setTimeout(() => {
this.getGoods(false);
}, 1000)
} else {
this.get_host_product();
}
},
mounted() {
this.getUserInfo()
this.selfLocation()
// #ifdef H5
//
@ -221,9 +285,10 @@
this.$bus.$on('value-updated', (newValue) => {
//
this.street = newValue.split(',')[0]
});
},
// #ifdef APP-PLUS
onPageScroll(e) {
@ -232,7 +297,7 @@
//
if (scrollTop <= 20) {
this.backColor = 'rgba(252, 252, 252, 0.0)'
this.backColor = 0
this.isFshow = false
this.show = true
uni.setTabBarItem({
@ -242,11 +307,11 @@
selectedIconPath: '/static/tabbar_icon/a-a.png'
});
} else if (20 < scrollTop && scrollTop <= 100) {
this.backColor = 'rgba(255, 255, 255, 0.5)'
this.backColor = 0.5
this.isFshow = true
this.show = false
} else if (scrollTop > 100) {
this.backColor = 'rgba(252, 252, 252, 1.0)'
this.backColor = 1
this.isFshow = true
this.show = false
this.$nextTick(() => {
@ -267,7 +332,55 @@
this.$bus.$off('value-updated')
},
methods: {
//
open() {
this.$refs.popup.open()
},
//
cuo() {
this.$refs.popup.close()
},
//
onLoadFun(data) {
this.getUserInfo();
this.isShowAuth = false;
},
/**
* 获取个人用户信息
*/
getUserInfo() {
getUserInfo().then(res => {
this.userid = res.data.uid
});
},
//
itemTap(item) {
if (this.userid) {
if (item.video_link.length > 0) {
uni.navigateTo({
// #ifdef MP || H5
url: `/pages/short_video/nvueSwiper/index?id=${item.community_id}&uid=${this.userid}&user=1`
// #endif
// #ifdef APP
url: `/pages/short_video/appSwiper/index?id=${item.community_id}&uid=${this.userid}&user=1`
// #endif
})
} else {
uni.navigateTo({
url: `/pages/plantGrass/plant_detail/index?id=${item.community_id}`
})
}
} else {
this.isAuto = true;
this.isShowAuth = true
}
},
//
authColse: function(e) {
this.isShowAuth = e
},
scrolling() {
//
let scrollTop =
@ -292,7 +405,7 @@
// console.log("header ");
}
if (scrollTop <= 20) {
this.backColor = 'rgba(252, 252, 252, 0.0)'
this.backColor = 0
this.isFshow = false
uni.setTabBarItem({
index: 0,
@ -301,10 +414,10 @@
selectedIconPath: '/static/tabbar_icon/a-a.png'
});
} else if (20 < scrollTop && scrollTop <= 100) {
this.backColor = 'rgba(255, 255, 255, 0.5)'
this.backColor = 0.5
this.isFshow = true
} else if (scrollTop > 100) {
this.backColor = 'rgba(252, 252, 252, 1.0)'
this.backColor = 1
this.isFshow = true
uni.setTabBarItem({
@ -320,12 +433,8 @@
kkchange(e) {
this.bgColor = e
},
tabsChange1(item) {
this.getArticleList(item.article_category_id)
this.streeta_id = item.id
this.tabsData1.tabsActive = item.index
@ -455,30 +564,33 @@
}
})
},
getGoods: function(item) {
getGoods: function(isPage) {
let that = this;
if (that.loadend) return;
if (that.loading) return;
graphicLstApi(this.where).then(res => {
this.cateGoods.push(...res.data.list)
if (isPage === true) that.$set(that, 'productList', []);
if (res.data.list.length < this.where.limit) this.status = 'nomore'
that.loading = true;
that.loadTitle = '';
graphicLstApi(that.where).then(res => {
let list = res.data.list;
let productList = that.$util.SplitArray(list, that.productList);
let loadend = list.length < that.where.limit;
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? '已全部加载' : '加载更多';
setTimeout(() => {
that.$set(that, 'productList', productList);
}, 500)
if (this.where.page == 1 && res.data.list.length <= 0) this.emptyShow = true
// if (item) {
// if (item.index == 1 && this.cateGoods[0]) {
// uni.navigateTo({
// // #ifdef MP || H5
// url: `/pages/short_video/nvueSwiper/index?id=${this.cateGoods[0].community_id}`
// // #endif
// // #ifdef APP
// url: `/pages/short_video/appSwiper/index?id=${this.cateGoods[0].community_id}`
// // #endif
// })
// }
// }
})
// console.log(that.productList)
that.$set(that.where, 'page', that.where.page + 1);
if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
}).catch(err => {
that.loading = false;
that.loadTitle = '加载更多';
});
},
/*获取分类列表*/
async getCateList() {
@ -486,22 +598,39 @@
data
} = await getTopicList()
this.tabsData.list = [{
cate_name: "推荐",
cate_name: "热门推荐",
category_id: 0
}, ...data]
},
tabsChange(item) {
this.cateGoods = []
this.productList = []
this.where.category_id = item.category_id
this.emptyShow = false
this.status = 'loadmore'
this.where.page = 1
this.getGoods(item)
this.loadend = false;
this.$set(this.where, 'page', 1)
this.getGoods(true)
this.street_id = item.id
this.tabsData.tabsActive = item.index
this.current = item.index
},
tabsChange2(item,index) {
// console.log(item,index)
this.productList = []
this.where.category_id = item.category_id
this.$refs.popup.close()
this.emptyShow = false
this.loadend = false;
this.$set(this.where, 'page', 1)
this.getGoods(true)
this.tabsData.tabsActive = index
this.current = index
},
selfLocation() {
if (uni.getStorageSync('loction') == true) {
this.isshow = false
} else {
@ -510,7 +639,7 @@
}
uni.getLocation({
type: 'wgs84',
timeout: '10',
timeout: '1000',
success: (res) => {
this.isshow = false
let latitude, longitude;
@ -520,6 +649,7 @@
lat: latitude,
long: longitude
}).then(res => {
let town = res.data.address_reference.town.title
let street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street
@ -530,6 +660,7 @@
})
}).catch(err => {
this.isshow = false
uni.showToast({
title: err,
icon: 'none'
@ -538,11 +669,7 @@
},
fail: (err) => {
this.isshow = false
uni.showToast({
title: "获取定位超时",
icon: 'none',
duration: 2000
});
}
});
},
@ -677,6 +804,57 @@
background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
}
.classpage {
width: 100%;
height: calc(100vh - 50px);
background-color: #fff;
position: relative;
padding-top: 40rpx;
padding-left: 40rpx;
padding-right: 10rpx;
.classpage-one {
text-align: center;
image {
position: absolute;
right: 25rpx;
width: 42rpx;
height: 42rpx;
}
}
.classpage-two {
font-size: 26rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin-top: 77rpx;
}
.classpage-three {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-top: 35rpx;
view {
margin-right: 20rpx;
margin-bottom: 14rpx;
width: 210rpx;
height: 81rpx;
line-height: 81rpx;
text-align: center;
background: #FFFFFF;
border-radius: 11rpx 11rpx 11rpx 11rpx;
opacity: 1;
border: 2rpx solid #707070;
}
}
}
// .bg-img {
// position: absolute;
// width: 100%;
@ -737,6 +915,8 @@
padding-top: 25rpx;
/* #endif */
// background-color: #e5e5e5;
background: url('@/static/images/bg2.png') no-repeat;
background-size: 100% 100%;
padding-right: 20rpx;
@ -755,6 +935,7 @@
.iconfont {
opacity: 0;
color: #fff;
font-size: 30rpx;
font-size: 35.09rpx;
}
@ -772,8 +953,9 @@
}
/deep/.u-tabs__wrapper__nav__item {
padding: 0 0px;
padding-right: 10rpx;
// padding: 0 0px;
padding-left: 0rpx;
padding-right: 20rpx;
}
.search_wrapper {
@ -783,9 +965,29 @@
.tabs_wrapper {
width: 720rpx;
margin: 0 auto;
margin-bottom: 21.05rpx;
// margin-left: -20rpx;
position: relative;
}
.tabs_wrapper-img {
width: 40rpx;
height: 60rpx;
position: absolute;
z-index: 888;
background-color: #fff;
right: 0rpx;
top: 0;
image {
width: 40rpx;
height: 40rpx;
margin-top: 10rpx;
}
}
.empty_wrapper {

View File

@ -1,6 +1,7 @@
<template>
<view class="gather">
<block v-if="isShow">
<view class="" v-if="userInfoData.mer_info.setup_status==1">
<view class="special_work com" v-if="userInfoData.mer_info.type_code === 'TypeSupplyChain'">
<view class="special_work com" v-if="true">
<view class="title">市级供应链</view>
@ -15,6 +16,16 @@
<image class="icon_img" :src="`${prefix}cwgl.png`" mode="aspectFill"></image>
<text class="text">财务管理</text>
</view>
<!-- <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/admin/order/index?mer_id=${mer_id}&product_type=98&type_id=${userInfoData.mer_info.type_id}`)">
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill"></image>
<text class="text">订单管理</text>
</view> -->
<view class="examine"
@click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}&stype=1`)">
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill">
@ -42,6 +53,18 @@
</image>
<text class="text">订单核销</text>
</view>
<!-- <view class="examine"
@click="navigator(`/pages/commissionedSales/index/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/weituo.png" mode="aspectFill">
</image>
<text class="text">委托销售</text>
</view>
<view class="examine"
@click="navigator(`/pages/users/order_list/relase?mer_id=${mer_id}&status=-1`)">
<image class="icon_img" src="@/static/images/weituo.png" mode="aspectFill">
</image>
<text class="text">委托订单</text>
</view> -->
<!-- <view class="examine" @click="navigator(`/pages/nongKe/teach_video/teach_video`)">
<image class="icon_img"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/spjs.png" mode="aspectFill">
@ -62,14 +85,17 @@
</view>
</view>
<view class="business com" v-if="userInfoData.mer_info.type_code === 'TypeStore'">
<view class="business com"
v-if="userInfoData.mer_info.type_code === 'TypeStore'||userInfoData.mer_info.type_code === 'TypeTownSupplyChain'">
<view class="business com" v-if="true">
<view class="special_work com">
<view class="title">我的店铺</view>
<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/nongKe/supply_chain/supplier?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>
<text class="text">供货采购</text>
</view>
@ -77,8 +103,9 @@
@click="navigator('/pages/users/order_list/indexCopy?status=-1&product_type=98')">
<image class="icon_img" :src="`${prefix}jhgl.png`" mode="aspectFill"></image>
<text class="text">进货管理</text>
</view>
<view class="examine" @click="navigator(`/pages/admin/stockOut/index?mer_id=${mer_id}`)">
</view> -->
<view class="examine"
@click="navigator(`/pages/admin/stockOut/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}smck.png`" mode="aspectFill">
</image>
<text class="text">扫码出库</text>
@ -136,11 +163,19 @@
</image>
<text class="text">委托销售</text>
</view>
<view class="examine" @click="navigator(`/pages/releaseManagement/index?mer_id=${mer_id}`)">
<view class="examine"
@click="navigator(`/pages/users/order_list/relase?mer_id=${mer_id}&status=-1`)">
<image class="icon_img" src="@/static/images/weituo.png" mode="aspectFill">
</image>
<text class="text">委托订单</text>
</view>
<view class="examine"
@click="navigator(`/pages/releaseManagement/index?mer_id=${mer_id}`)">
<image class="icon_img" src="@/static/images/fabu.png" mode="aspectFill">
</image>
<text class="text">发布管理</text>
</view> -->
<!-- <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>
@ -169,7 +204,8 @@
<image class="icon_img" :src="`${prefix}jhgl.png`" mode="aspectFill"></image>
<text class="text">进货管理</text>
</view>
<view class="examine" @click="navigator(`/pages/admin/stockOut/index?mer_id=${mer_id}`)">
<view class="examine"
@click="navigator(`/pages/admin/stockOut/index?mer_id=${mer_id}`)">
<image class="icon_img" :src="`${prefix}smck.png`" mode="aspectFill">
</image>
<text class="text">扫码出库</text>
@ -226,7 +262,8 @@
</view>
</view>
<view class="business com" v-if="userInfoData.mer_info.type_code === 'TypeFeaturedCultural'|| userInfoData.mer_info.type_code === 'TypeFamousSpecialties'|| userInfoData.mer_info.type_code === 'TypeLocalCuisine' ">
<view class="business com"
v-if="userInfoData.mer_info.type_code === 'TypeFeaturedCultural'|| userInfoData.mer_info.type_code === 'TypeFamousSpecialties'|| userInfoData.mer_info.type_code === 'TypeLocalCuisine' ">
<view class="business com" v-if="true">
<view class="special_work com">
<view class="title">我的店铺</view>
@ -273,6 +310,26 @@
</view>
</view>
<view class="" v-else>
<view class="business com">
<view class="special_work com">
<view class="title">我的店铺</view>
<view class="content ">
<view class="examine"
@click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
</image>
<text class="text">商户设置</text>
</view>
</view>
</view>
</view>
</view>
</block>
<!-- <m-tabbar native>
<template v-slot:tabbar_index_2>
@ -363,8 +420,6 @@
mounted() {
this.appLocation()
},
methods: {

View File

@ -22,7 +22,8 @@
<view class='header acea-row row-middle' :class='isGoodsReturn ? "on":""'>
<view class='pictrue' v-if="isGoodsReturn==false">
<image v-if="orderInfo.status != 9&&orderInfo.status !=12" :src="imgUrl+'/static/order_'+(orderInfo.status+2)+'.gif'">
<image v-if="orderInfo.status != 9&&orderInfo.status !=12"
:src="imgUrl+'/static/order_'+(orderInfo.status+2)+'.gif'">
</image>
<image v-else :src="imgUrl+'/static/order_2.gif'"></image>
@ -60,10 +61,19 @@
<view :class="orderInfo.order_status == 5 ? 'on':''">已完成</view>
</view>
<view class='progress acea-row row-between-wrapper'>
<view class='iconfont icon-webicon318 t-color'
<view
v-if="orderInfo.order_status == 8||orderInfo.order_status == 9||orderInfo.order_status == 1">
<view class='iconfont icon-webicon318 t-color'>
</view>
<view class='iconfont t-color' else></view>
<view class='iconfont t-color'></view>
</view>
<view class="" v-else>
<view class='iconfont icon-yuandianxiao t-color'>
</view>
<view class='iconfont t-color'></view>
</view>
<view class='line b-color'></view>
<view class='iconfont'
:class='((orderInfo.status == 0 || orderInfo.status == 9||orderInfo.order_status == 2) ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 0 ? "t-color":"")'>
@ -73,13 +83,17 @@
</view>
<view class='iconfont'
:class='(orderInfo.status == 1 ? "icon-webicon318":"icon-yuandianxiao") + " " +(orderInfo.status >= 1 && orderInfo.status != 9 ? "t-color":"")'
:class='(orderInfo.status == 3 ? "icon-webicon318":"icon-yuandianxiao") + " " +(orderInfo.status > 3 && orderInfo.status != 9 ? "t-color":"")'
v-if="orderInfo.order_type == 0"></view>
<view class='line' :class='orderInfo.status > 1 && orderInfo.status != 9 ? "b-color":""'
v-if="orderInfo.order_type == 0"></view>
<view class='iconfont'
:class='(orderInfo.status == 2 && orderInfo.status != 9&& orderInfo.order_status != 8 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 2 && orderInfo.status != 9 ? "t-color":"")'>
</view>
<view class='line' :class='orderInfo.status > 2 && orderInfo.status != 9 ? "b-color":""'>
</view>
<view class='iconfont'
@ -327,7 +341,7 @@
hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.order_id">查看物流
</navigator>
<view class="" v-if="orderInfo.activity_type==98">
<view class="" v-if="orderInfo.activity_type==98||orderInfo.activity_type==99">
<view class='bnt b-color' @tap='confirmOrdera(orderInfo)' v-if="orderInfo.pay_type==8">确认收货
</view>
<view class='bnt b-color' @tap='confirmOrderb(orderInfo)' v-else>确认收货

View File

@ -232,6 +232,17 @@
})
}
} else if (this.product_type == 99) {
if(val==1){
uni.navigateTo({
url: `/pages/users/order_list/relase?status=1&product_type=${this.product_type}`
})
}else{
uni.navigateTo({
url: `/pages/users/order_list/relase?status=0&product_type=${this.product_type}`
})
}
} else {
if(val==1){
uni.navigateTo({

File diff suppressed because it is too large Load Diff

View File

@ -187,7 +187,7 @@
// #endif
},
onLoad(options) {
console.log(options.type);
this.id = options.id;
this.order_id = options.order_id;
this.tabActive = options.type || 1;

View File

@ -143,8 +143,8 @@
<!-- <m-tabbar native>
<template v-slot:tabbar_index_2>
<view class="custom_style">
<view class="custom_style_icon" style="margin-top: -50rpx;"></view>
<view class="" style="color: red;">
<view class="custom_style_icon"></view>
<view class="custom_style-txt" style="color: red;">
发布
</view>
</view>
@ -680,6 +680,36 @@
page {
background: #F5F5F5;
}
.custom_style {
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 24rpx;
&_icon {
background-image: url('@/static/tabbar_icon/d-a.png');
background-repeat: no-repeat;
background-size: cover;
font-size: 80rpx;
width: 100rpx;
height: 100rpx;
border-radius: 100%;
display: flex;
justify-content: center;
align-items: center;
margin-top: -50rpx;
// box-shadow: 0px 5px 10px 1px rgba(32, 161, 98, 0.3);
}
.custom_style-txt{
display: flex;
flex-direction: column;
align-items: center;
margin-top: 5rpx;
}
}
.crop_btn {
line-height: 90rpx;
@ -783,6 +813,7 @@
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
.iconfont {
color: #ffffff;

View File

@ -162,22 +162,22 @@
<checkbox-group class="select_group flex_start" @change="deliveryWayChange">
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
<view>
<checkbox :value="val.value" :checked="setFormData.delivery_way.includes(val.value)" />
<checkbox :value="val.value" disabled :checked="val.value" />
</view>
<view>{{ val.name }}</view>
</label>
</checkbox-group>
</view>
<view v-if="setFormData.delivery_way.includes('2')" class="popup_group_item">
<!-- <view v-if="setFormData.delivery_way.includes('2')" class="popup_group_item">
<view class="popup_group_item_label">是否包邮</view>
<view class="popup_group_item_value">
<view class="popup_group_item_message">
<switch :checked="setFormData.delivery_free == '1'" color="#E93323"
style="transform:scale(0.8)" @change="deliveryFreeChange" />
</view>
style="transform:scale(0.8)" @change="deliveryFreeChange" disabled="true"/>
</view>
</view>
</view> -->
<view class="popup_group_item"
v-if="setFormData.delivery_way.includes('2') && setFormData.delivery_free == 0"
@ -304,7 +304,7 @@
specifica: '', //
setSpecificaValue: '', //
setSpecificaValue2: '',
delivery_way: [], // 1 2
delivery_way: [1,2], // 1 2
delivery_free: '1', // 0 1
temp_id: '', // ID
tempName: '' //
@ -407,7 +407,7 @@
this.bar_code_dis = true
}
this.initData();
this.getDeliveryType();
// this.getDeliveryType();
if (this.product_id) {
this.initDataEditData();
}

View File

@ -73,8 +73,8 @@
<text class="sub_title">配送方式</text>
<view class="flex">
<checkbox-group name="" @change="checkboxChange" >
<checkbox :checked="isZiti" :value="check.ziti" /><text class="text ziti">到店自提(加入供应链)</text>
<checkbox :checked="isKuaidi" :value="check.kuaidi" /><text class="text">快递配送</text>
<checkbox disabled='true' :checked="isZiti" :value="check.ziti" /><text class="text ziti">到店自提(加入供应链)</text>
<checkbox disabled='true' :checked="isKuaidi" :value="check.kuaidi" /><text class="text">快递配送</text>
</checkbox-group>
</view>
</view>
@ -133,10 +133,10 @@
<input class="com_input" type="number" v-model="servicePhone" placeholder="输入客服电话">
</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>
<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="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算周期</view>
<input type="number" v-model="settle_cycle" placeholder="请输入 /周期单位为:天">
@ -146,7 +146,7 @@
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>先货后款结算利率</view>
<input type="number" maxlength="5" v-model="interest_rate" placeholder="请输入 /利率单位为: %">
</view>
<view class="remarks">*利率结算范围为:0.01 ~ 0.1 利率单位为:%</view>
<!-- <view class="remarks">*利率结算范围为:0.01 ~ 0.1 利率单位为:%</view> -->
<!-- <view class="item_cell">
<view class="if_btn flex_a_c_j_sb">
<text class="sub_title">是否开启商户</text>
@ -217,7 +217,7 @@
},
isZiti: false,
isKuaidi: false,
delivery_way: [],
delivery_way: [1,2],
takeName: '',
takePhone: '',
servicePhone: '',
@ -274,6 +274,9 @@
onLoad(e) {
this.id = e.mer_id
this.getMerchantInfo(e.mer_id)
this.isZiti = true
this.isKuaidi = true
},
onShow() {},
methods: {
@ -281,7 +284,7 @@
merchantInfoAPI({
id
}).then(res => {
console.log(res);
this.mer_name= res.data.mer_name
this.images[0].img = res.data.mer_banner
this.images[1].img = res.data.mer_avatar
this.images[2].img = res.data.mini_banner
@ -302,7 +305,7 @@
this.mer_take_time = res.data.mer_take_time
this.intro = res.data.mer_info
this.cruxText = res.data.mer_keyword
this.mer_name= res.data.mer_name
this.servicePhone = res.data.service_phone
this.mer_address = res.data.mer_address
this.merState = res.data.mer_state === 1 ? true : false
@ -367,7 +370,7 @@
mer_avatar: this.images[1].img,
mini_banner: this.images[2].img,
mer_certificate: this.images[3].img,
delivery_way: this.delivery_way,
delivery_way: [1,2],
mer_take_name: this.takeName,
mer_take_phone: this.takePhone,
mer_take_address: this.detailSite,

File diff suppressed because one or more lines are too long

View File

@ -226,19 +226,19 @@
<text class="count">{{item.relevance.length}}</text>
</view>
</view>
<view v-if="showManage" class="manage">
<view v-if="showManage == item.author.uid" class="manage">
<view class="manage-gou"></view>
<navigator hover-class="none"
:url="'/pages/plantGrass/plant_release/index?id='+item.community_id+'&type=2'"
class="items">
<image src="../static/img/index/video-edit.png" style="width: 16px; height: 16px;">
</image>
<text class="text">编辑</text>
<text class="text" style="margin-left: 20rpx;">编辑</text>
</navigator>
<view class="items" @click.stop="deleteTopic(item)">
<image src="../static/img/index/video-delete.png"
style="width: 16px; height: 16px;"></image>
<text class="text">删除</text>
<text class="text" style="margin-left: 20rpx;">删除</text>
</view>
</view>
<!-- 1.视频预览时的图片currenttimes就是获取当前滑块的时间点如果不需要可以注释掉 -->
@ -358,6 +358,7 @@
import {
getUserInfo
} from '@/api/user.js';
import { navigateBack } from '../../../libs/uniApi';
export default {
computed: configMap({
statusBarHeight: 0,
@ -401,7 +402,7 @@
newTime: 0, //跟手滑动后的最新时间💗
timeNumber: 0, //🌟💗
ProgressBarBottom: 20, //进度条离底部的距离💗
object_fit: 'cover', //视频样式默认包含🌟💗
object_fit: 'contain', //视频样式默认包含🌟💗
mode: 'aspectFit', //图片封面样式🌟💗
timeout: "", //🌟用来阻止 setTimeout()方法
voice: "", //🌟用来阻止 setTimeout()方法
@ -501,7 +502,7 @@
this.wHeight = uni.getSystemInfoSync().screenHeight; //获取屏幕高度
this.boxStyle.height = this.wHeight; //改变视频高度
this.get() //这一步,加载视频数据
// if (this.isLogin) this.getUserInfo()
if (this.isLogin) this.getUserInfo()
},
onReady() {},
methods: {
@ -637,17 +638,23 @@
content: '确定要删除该话题么?',
success: function(res) {
if (res.confirm) {
console.log(item.community_id)
deletePlantApi(item.community_id).then(res => {
if (res.status === 200) {
console.log(res)
if (res.status == 200) {
that.$util.Tips({
title: res.message
});
setTimeout(function() {
uni.redirectTo({
url: '/pages/plantGrass/plant_user/index?id=' +
item.uid
// setTimeout(function() {
// uni.redirectTo({
// url: '/pages/plantGrass/plant_user/index?id=' +
// item.uid
// })
// }, 1000);
uni.navigateBack({
delta:1,
})
}, 1000);
}
})
} else if (res.cancel) {
@ -855,6 +862,7 @@
},
scrolls(event) {
this.showManage = false;
this.isDragging = event.isDragging;
if (!event.isDragging) { //isDragging判断用户是不是在滑动滑动true停止滑动false。我们要用户停止滑动时才给 k 赋值,这样就可以避免很多麻烦
@ -1240,6 +1248,7 @@
height: 86rpx;
.icon-xiangzuo {
margin-left: 10px;
width: 20px;
@ -1405,7 +1414,7 @@
box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
padding: 0 8px;
position: absolute;
bottom: 10px;
bottom: 185px;
right: 60px;
border-radius: 8px;
@ -1541,7 +1550,8 @@
.product-item {
width: 444rpx;
height: 136rpx;
background: rgba(0, 0, 0, .55);
// background: rgba(0, 0, 0, .55);
background-color: #F4F4F4;
border-radius: 12rpx;
padding: 16rpx 15rpx;
margin-right: 30rpx;
@ -1587,7 +1597,8 @@
.name {
font-size: 24rpx;
width: 286rpx;
color: #fff;
// color: #fff;
color: #000;
}
.product-price {
@ -1602,7 +1613,8 @@
.sm,
.money {
color: #ffffff;
// color: #ffffff;
color: #000;
font-size: 24rpx;
}
}

View File

@ -1,65 +1,6 @@
<template>
<view class="merchant-details">
<view style="height: var(--status-bar-height);"></view>
<view class="tit">
<u--image style="margin: 0 auto;" :showLoading="true" src="../../../static/images/SJRZ/succes.png"
width="348.83rpx" height="271.77rpx" @click="goBack"></u--image>
恭喜您的申请已通过
</view>
<view class="content">
<view class="steps">
<u-steps current="3" direction="column" mode="number">
<u-steps-item title="运输中" desc="11:40">
<!-- <u--image style="margin: 0 auto;" :showLoading="true" src="../../../static/images/SJRZ/CGBZ.png"
width="31.54rpx" height="31.54rpx"></u--image> -->
<!-- <u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/succes.png" width="348.83rpx" height="271.77rpx"
@click="goBack"></u--image> -->
<text class="slot-icon" slot="icon"><u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/CGBZ.png" width="31.54rpx"
height="31.54rpx"></u--image></text>
</u-steps-item>
<u-steps-item title="待审核" desc="10:35">
<text class="slot-icon" slot="icon"><u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/CGBZ.png" width="31.54rpx"
height="31.54rpx"></u--image></text>
</u-steps-item>
<u-steps-item title="审核通过" desc="11:40">
<text class="slot-icon" slot="icon"><u--image style="margin: 0 auto;" :showLoading="true"
src="../../../static/images/SJRZ/CGBZ.png" width="31.54rpx"
height="31.54rpx"></u--image></text>
</u-steps-item>
</u-steps>
</view>
<view class="msg" v-if="mer_id > 0 && resData.login_url" @click="copyTBL()">
<view style="margin-bottom: 20rpx;">
<text style="font-weight: bold;">登录地址</text>
<text class="">{{resData.login_url}}</text>
</view>
<view>
<text style="font-weight: bold;">商户账号</text>
<text class="">{{resData.phone}}</text>
</view>
<!-- <view class=" phone">
<view class="">
<text class="head">商户账号</text>
<text class="content">{{resData.phone}}</text>
</view>
<text class="cope" @click="copyTBL()">复制</text>
</view> -->
</view>
</view>
<view class="btn" v-if="mer_id > 0">
<view class="">
温馨提示初始密码默认为手机号后六位请初次登录后及时修改
</view>
</view>
<view class="btn_bottom" @click="navgo(`/pages/product/basicSet?mer_id=${mer_id}`)">
<u-button type="primary" style="background-color: #3274F9;border-radius: 30rpx;border: none;"
text="完善商户信息"></u-button>
</view>
<!-- <view class="top">
<view class="top">
<image class="img" src="../static/images/successTop.png" mode=""></image>
<view class="title">
恭喜您的申请已通过
@ -77,8 +18,12 @@
</view>
<text class="cope" @click="copyTBL()">复制</text>
</view>
</view> -->
</view>
<view class="btn" v-if="mer_id > 0">
<view class="">
温馨提示初始密码默认为手机号后六位请初次登录后及时修改
</view>
</view>
</view>
</template>
@ -109,11 +54,6 @@
}
},
methods: {
navgo(url) {
uni.navigateTo({
url
})
},
getGoodsDetails(id) {
getGoodsDetails(id).then(res => {
this.resData = res.data
@ -198,100 +138,69 @@
<style lang="scss" scoped>
.merchant-details {
padding: 0 4vw;
// padding: ;
height: 100vh;
position: relative;
// background-color: #C5D9FD;
background-image: url("../../../static/images/SJRZ/bg.png");
background-repeat: no-repeat;
position: relative;
.tit {
color: white;
font-size: 33.29rpx;
text-align: center;
// padding: 50vh 0;
transform: translateY(5vh);
display: flex;
// justify-content: space-around;
flex-direction: column;
align-items: center;
}
.content {
background-color: white;
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
// transform: translateY(20vh);
margin-top: 100rpx;
box-sizing: border-box;
padding: 2vw;
// .steps {}
.msg {
width: 85%;
padding: 30rpx;
// height: 150rpx;
margin: 30rpx auto;
background-color: #F4F7FE;
border-radius: 8rpx;
.li {
// margin-: ;
// display: flex;
// justify-content: left;
// display: flex;
// flex-shrink: 1;
}
}
}
background-color: #fff;
height: 100vh;
position: relative;
.top {
display: flex;
flex-direction: column;
align-items: center;
.img {
width: 340rpx;
height: 280rpx;
margin: 140rpx 0 30rpx 0;
}
.title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
}
.btn {
// width: 70%;
// position: absolute;
// text-align: center;
// color: #999999;
// font-size: 24rpx;
// bottom: 80rpx
// background-color: red;
// height: 100vw;
margin-top: 5vw;
.msg {
width: 85%;
padding: 30rpx;
height: 150rpx;
margin: 70rpx 70rpx;
background-color: #F6F6F6;
border-radius: 8rpx;
.url {
display: flex;
flex-wrap: nowrap;
margin-bottom: 20rpx;
}
.btn_bottom {
position: fixed;
width: 92vw;
bottom: 20rpx;
.phone {
display: flex;
justify-content: space-between;
}
.head {
color: #333333;
font-size: 28rpx;
font-weight: 500;
white-space: nowrap;
}
.content {
color: #999999;
font-size: 26rpx;
}
.cope {
padding: 5rpx 16rpx;
color: #FFFFFF;
border-radius: 30rpx;
background-color: #999999;
margin-left: 40rpx;
font-size: 20rpx;
}
}
.btn {
width: 70%;
position: absolute;
text-align: center;
color: #999999;
font-size: 24rpx;
bottom: 80rpx
}
}
</style>

View File

@ -2,19 +2,22 @@
<view class="Circle_friends">
<view class="circle_friends_wrapper">
<view v-if="isFshow">
<view class="site-box flex_a_c_j_sb" :style="{'background-color':backColor}">
<view class="site-box flex_a_c_j_sb" :style="{'opacity':backColor}">
<view :class="['place_wrapper','flex_a_c',isFshow?'sitebox':'']" @click="selectLocation">
<view :class="['iconfont','icon-weizhi',isFshow?'sitebox':'']"
style="color:#000;margin-left: 20rpx;">
<view :class="['iconfont','icon-weizhi',isFshow?'sitebox':'']" style="margin-left: 20rpx;">
</view>
<view class="town_name" style="color:#000;">{{street}}</view>
<view class="town_name">{{street}}</view>
</view>
<navigator url="/pages/chat/customer_list/index?type=0" hover-class="none">
<view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#000;"></view>
<view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#fff;"></view>
</navigator>
</view>
</view>
<zbpSwiper :isSelectPlace="true" :town="street" :streetname="street" :location_Arr="locationArr"
@change="dchange">
</zbpSwiper>
@ -70,8 +73,6 @@
</view>
<view class="list-con">
<!-- <view class="list-con-left"
@tap="navgo('/pages/nongKe/specialty/index?type_code=TypeFamousSpecialties')"> -->
<view class="list-con-left"
@tap="navgo('/pages/nongKe/specialty/index?type_code=TypeFamousSpecialties')">
<!-- <view class="list-con-title">
@ -85,8 +86,6 @@
<image src="@/static/images/f5.png" mode="aspectFit"></image>
</view>
<view class="list-con-right">
<!-- <view class="con-right" style="margin-bottom: 20rpx"
@click="navgo('/pages/nongKe/food/index?type_code=TypeLocalCuisine')"> -->
<view class="con-right" style="margin-bottom: 20rpx"
@click="navgo('/pages/nongKe/food/index?type_code=TypeLocalCuisine')">
<!-- <view class="list-con-title">
@ -99,8 +98,6 @@
</view> -->
<image src="@/static/images/f7.png" mode="aspectFit"></image>
</view>
<!-- <view class="con-right"
@click="navgo('/pages/nongKe/tourism/index?type_code=TypeFeaturedCultural')"> -->
<view class="con-right"
@click="navgo('/pages/nongKe/tourism/index?type_code=TypeFeaturedCultural')">
<!-- <view class="list-con-title">
@ -119,7 +116,10 @@
<image src="@/static/images/f4.png" mode="aspectFit"></image>
</view>
<view class="goodslist">
<WaterfallsFlow :wfList="cateGoods" />
<WaterfallsFlow :wfList="productList" :type="1" />
</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 class="empty_wrapper" v-if="emptyShow">
<u-empty :show="emptyShow" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
@ -128,7 +128,7 @@
<u-picker :defaultIndex="[0, 0]" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
<u-loadmore :status="status" v-if="cateGoods.length >= where.limit" />
<view class="location" v-if="isshow">
<view class="locationa"> 位置权限使用说明 </view>
@ -138,7 +138,9 @@
<template v-slot:tabbar_index_2>
<view class="custom_style">
<view class="custom_style_icon"></view>
</view>
<view class="custom_style-txt" style="color: #282828;">
发布
</view> </view>
</template>
</m-tabbar> -->
</view>
@ -196,7 +198,7 @@
},
isshow: false,
locationArr: ({}),
status: 'loadmore',
bgColor: '',
showPicker: false,
columnData: [],
@ -220,25 +222,27 @@
location: '',
emptyShow: false,
town: '',
cateGoods: [],
productList: [],
recoList: [],
articleList: [],
street_id: '',
street: '',
bgColor: '',
isFshow: false,
backColor: 'rgba(252, 252, 252, 0)'
backColor: 0,
loadend: false,
loading: false,
loadTitle: '加载更多',
}
},
onPullDownRefresh() {
this.cateGoods = []
this.list()
this.list(true);
this.Area()
uni.stopPullDownRefresh()
},
onLoad() {
this.list()
this.Area()
@ -257,13 +261,16 @@
})
},
onReachBottom() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.where.page = ++this.where.page;
if (this.productList.length > 0) {
setTimeout(() => {
this.list(false);
}, 500)
} else {
this.list()
}
},
beforeDestroy() {
//
@ -290,26 +297,24 @@
}
},
// #ifdef APP-PLUS
onPageScroll(e) {
const scrollTop = e.scrollTop;
if (scrollTop <= 20) {
this.backColor = 'rgba(252, 252, 252, 0)'
this.backColor = 0
this.isFshow = false
} else if (20 < scrollTop && scrollTop <= 100) {
this.backColor = 'rgba(252, 252, 252, .5)'
this.backColor = 0.5
this.isFshow = true
} else if (scrollTop > 100) {
this.backColor = 'rgba(252, 252, 252, 1)'
this.backColor = 1
this.isFshow = true
}
},
// #endif
methods: {
navaction(val) {
uni.navigateTo({
@ -318,16 +323,33 @@
},
//
list(id) {
if (id) {
spuInfo(id, this.where1).then(res => {
this.cateGoods.push(...res.data.list)
})
} else {
getProductHot(this.where.page, this.where.limit).then(res => {
this.cateGoods.push(...res.data.list)
})
}
list(isPage, id) {
let that = this;
if (that.loadend) return;
if (that.loading) return;
if (isPage === true) that.$set(that, 'productList', []);
that.loading = true;
that.loadTitle = '';
getProductHot(that.where.page, that.where.limit).then(res => {
let list = res.data.list;
let productList = that.$util.SplitArray(list, that.productList);
let loadend = list.length < that.where.limit;
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? '已全部加载' : '加载更多';
that.$set(that, 'productList', productList);
// console.log(that.productList)
that.$set(that.where, 'page', that.where.page + 1);
if (that.where.page == 1 && res.data.list.length <= 0) that.emptyShow = true
}).catch(err => {
that.loading = false;
that.loadTitle = '加载更多';
});
},
@ -358,13 +380,13 @@
if (scrollTop <= 20) {
this.backColor = 'rgba(252, 252, 252, 0)'
this.backColor = 0
this.isFshow = false
} else if (20 < scrollTop && scrollTop <= 100) {
this.backColor = 'rgba(252, 252, 252, .5)'
this.backColor = 0.5
this.isFshow = true
} else if (scrollTop > 100) {
this.backColor = 'rgba(252, 252, 252, 1)'
this.backColor = 1
this.isFshow = true
@ -392,7 +414,8 @@
this.street = e.value[1].name
this.street_id = e.value[1].code
this.town = e.value[1].name
this.productList = []
this.list(true, this.street_id)
this.$nextTick(() => {
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
@ -482,6 +505,8 @@
this.street = e.value[1].name
this.street_id = e.value[1].code
this.town = e.value[1].name
this.productList = []
this.list(true, this.street_id)
},
selfLocation() {
if (uni.getStorageSync('loction') == true) {
@ -503,6 +528,7 @@
lat: latitude,
long: longitude
}).then(res => {
this.isshow = false
this.town = res.data.address_reference.town.title
this.street_id = res.data.address_reference.town.id
this.street = res.data.address_component.street
@ -513,6 +539,7 @@
})
this.list(this.street_id)
}).catch(err => {
this.isshow = false
uni.showToast({
title: err,
icon: 'none'
@ -614,7 +641,8 @@
/* #ifdef H5 */
padding-top: 25rpx;
/* #endif */
// background-color: #e5e5e5;
background: url('@/static/images/bg2.png') no-repeat;
background-size: 100% 100%;
padding-right: 20rpx;
@ -859,6 +887,7 @@
margin-top: -10rpx;
padding: 12rpx;
.list-con-left {
width: 357rpx;
height: 482rpx;

View File

@ -373,14 +373,8 @@
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
this.merId = res.data.service.mer_id
})
},
//
deliveryFreeChange(val) {

View File

@ -616,10 +616,8 @@
if (this.type == 'edit') {
this.formData.product_info = []
}
this.productList = []
this.price = 0;
console.log(data)
if (data.length > 0) {
this.productList = data;
for (let i in data) {

View File

@ -228,6 +228,9 @@
<template v-slot:tabbar_index_2>
<view class="custom_style">
<view class="custom_style_icon"></view>
<view class="custom_style-txt" style="color: #282828;">
发布
</view>
</view>
</template>
</m-tabbar> -->

View File

@ -230,6 +230,7 @@
})
return
}
feedback({
type: this.qsArray[this.qsIndex].feedback_category_id,
content: this.con,
@ -238,6 +239,9 @@
contact: this.phone
}).then(res => {
this.isShowbox = true
uni.redirectTo({
url:'/pages/user/index'
})
}).catch(error => {
this.$util.Tips({
title: error

View File

@ -155,7 +155,7 @@
that.where.page = 1;
that.shopList = [];
getOrderList(that.where, that.mer_id).then(res => {
console.log(res);
// console.log(res);
that.shopList = res.data.list
console.log(that.shopList);
})
@ -164,9 +164,9 @@
if (this.loading || this.loaded) return;
this.loading = true;
getOrderList(this.where, this.mer_id).then(res => {
console.log(res);
// console.log(res);
this.shopList = res.data.list
console.log(this.shopList);
// console.log(this.shopList);
})
},
importshop(order_id, product_id, unique) {

View File

@ -10,8 +10,8 @@
<view>
<text class='default t-color'
v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street || ''}}{{typeof(addressInfo.brigade)=='string'?addressInfo.brigade:addressInfo.brigade.name }}{{addressInfo.detail}}
v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street || ''}}
<text v-if='addressInfo.brigade'>{{typeof(addressInfo.brigade)=='string'?addressInfo.brigade:addressInfo.brigade.name }}{{addressInfo.detail}}</text>
</view>
</view>
<navigator v-else :url="'/pages/users/user_address/index?cartId='+cartId" hover-class="none"
@ -1083,7 +1083,7 @@
that.order_key = res.data.key
that.cartArr[4].title =
`结算周期:${res.data.order[0].settle_cycle}天 日利率:${res.data.order[0].interest_rate}%`
console.log(res.data.order[0]);
if (res.data.order[0].credit_buy == 1 && this.type_id == 12) {
this.cartArr[4].payStatus = 1
} else {
@ -1126,7 +1126,7 @@
real_name: res.data.real_name,
phone: res.data.phone
}
console.log(that.addressId);
this.$nextTick(() => {
this.getConfirm(that.addressId);
})

View File

@ -732,7 +732,7 @@
if (status == 5) {
uni.navigateTo({
url: '/pages/users/refund/list?type=0'
url: '/pages/users/refund/list?type=98'
})
} else {
if (status == this.orderStatus) return;

File diff suppressed because it is too large Load Diff

View File

@ -111,7 +111,7 @@
isScroll: true,
page: 1,
limit: 15,
type: 1
type: 0
}
},
onLoad(e) {
@ -153,7 +153,7 @@
},
getList() {
if (!this.isScroll) return
if (this.type == 1) {
if (this.type == 0) {
refundList({
type: this.tabIndex,
page: this.page,
@ -167,7 +167,7 @@
})
} else {
refundList({
product_type: 98,
product_type: this.type,
type: this.tabIndex,
page: this.page,
limit: this.limit

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

BIN
static/applet/gx_app.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

BIN
static/applet/shop_app.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 43 KiB

BIN
static/images/bubble.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
static/images/cuo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1010 B

BIN
static/images/dian.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
static/images/guide.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 KiB

BIN
static/images/relase.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/images/right.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/images/shopp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/images/zk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -1,5 +1,6 @@
import {
getUserInfo
getUserInfo,
Appversion
} from "../../api/user.js";
import {
LOGIN_STATUS,
@ -9,6 +10,9 @@ import Cache from '../../utils/cache';
import {
USER_INFO
} from '../../config/cache';
// #ifdef APP-PLUS
import Updater from '@/uni_modules/guyue-updater/index';
// #endif
const state = {
location: Cache.get('LOCATION_DATA', true) || {},
@ -99,9 +103,80 @@ const actions = {
}).catch(() => {
});
},
async INIT_CONFIG({
state,
commit
}, data = false) {
const wgt_v = uni.getStorageSync('wgt_version') || '1.0.0';
// #ifdef APP-PLUS
let os = uni.getSystemInfoSync();
let apptype;
if (os.osName == 'ios') {
apptype = 2
} else {
apptype = 1
}
Appversion({
version: os.appWgtVersion,
type: apptype
}).then((res) => {
if (Object.keys(res.data.appInfo).length > 0) {
// if(res.data.appInfo.version) uni.showLoading({
// title: '检查更新中'
// })
// 版本更新
if (compareVersions(res.data.appInfo.version, os.appWgtVersion || wgt_v) == 1 &&
compareVersions(res.data.appInfo.version,
wgt_v) == 1) {
try {
let info = res.data.appInfo || {};
let version = {
title: info.title || '发现新版本',
content: info.content || '修复了部分BUG',
versionName: info.version || '1.0.1',
downUrl: info.dow_url || '',
force: info.force == 1 ? true : false, // 是否强制更新
quiet: info.quiet == 1 ? true : false // 是否静默更新
}
Updater.update(version);
} catch (e) {
console.log(e);
}
// uni.hideLoading();
}
}
}).catch((err) => {
// console.log(err)
})
// #endif
}
};
function compareVersions(version1, version2) {
const arr1 = version1.split('.').map(Number);
const arr2 = version2.split('.').map(Number);
for (let i = 0; i < Math.max(arr1.length, arr2.length); i++) {
const num1 = i < arr1.length ? arr1[i] : 0;
const num2 = i < arr2.length ? arr2[i] : 0;
if (num1 > num2) {
return 1;
} else if (num1 < num2) {
return -1;
}
}
return 0;
}
export default {
state,
mutations,

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,6 @@
## 1.0.22023-06-02
修复部分bug新增条件编译仅限app平台调用
## 1.0.12023-06-02
去除ts使用js进行开发兼容性更好
## 1.0.02023-05-04
完成初始功能支持apk安装以及wgt升级支持显示弹窗升级、静默更新以及强制更新支持进度显示支持覆盖原生tabbar、原生导航栏

View File

@ -0,0 +1,24 @@
import { download, install } from "./updater";
export default class Updater {
static async update(options ) {
// #ifdef APP-PLUS
// 静默更新
if (options.quiet) {
download({
url: options.downUrl,
onSuccess(filePath) {
install(filePath, false, options.versionName);
},
});
} else if (options.downUrl) {
uni.navigateTo({
url: `/uni_modules/guyue-updater/pages/updater?data=${encodeURIComponent(JSON.stringify(options))}`,
animationType: "fade-in",
animationDuration: 200,
});
}
// #endif
}
}

View File

@ -0,0 +1,12 @@
export type UpdateParams = {
content: string; // 必填,更新内容,内容中使用 \n 进行换行
downUrl: string; // 必填wgt热更新请给出 .wgt 的文件地址APK整包更新请设置下载apk地址ios请设置苹果商店的连接地址;
title?: string; // 用于显示弹窗标题,默认 发现新版本
versionName?: string; // 版本名,用于显示更新版本,如 1.0.0
quiet?: boolean; // 是否是静默更新开启后不会有弹窗会在后台下载更新文件在下次启动APP时使用更新
force?: boolean; // 是否是强制更新,开启后,弹窗无法被关闭,必须更新
updateBtnText?: string; // 升级按钮文字,默认 立即升级
downMsgTip?: string; // 仅android默认 下载中,请稍后
downSucTip?: string; // 仅android默认 下载完成,安装中
downErrorTip?: string; // 仅android默认 下载失败,请重试
}

View File

@ -0,0 +1,82 @@
{
"id": "guyue-updater",
"displayName": "App版本升级弹框和进度提示",
"version": "1.0.2",
"description": "app热更新模块支持apk安装以及wgt升级支持显示弹窗升级、静默更新以及强制更新支持进度显示支持覆盖原生tabar原生导航栏",
"keywords": [
"热更新",
"进度提示",
"版本升级",
"app自动升级",
"wgt自动升级"
],
"repository": "",
"engines": {
"HBuilderX": "^3.4.9"
},
"dcloudext": {
"type": "sdk-js",
"sale": {
"regular": {
"price": "9.98"
},
"sourcecode": {
"price": "16.80"
}
},
"contact": {
"qq": "2292550932"
},
"declaration": {
"ads": "无",
"data": "插件不采集任何数据",
"permissions": "无"
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"Vue": {
"vue2": "y",
"vue3": "y"
},
"App": {},
"H5-mobile": {
"Safari": "n",
"Android Browser": "n",
"微信浏览器(Android)": "n",
"QQ浏览器(Android)": "n"
},
"H5-pc": {
"Chrome": "n",
"IE": "n",
"Edge": "n",
"Firefox": "n",
"Safari": "n"
},
"小程序": {
"微信": "n",
"阿里": "n",
"百度": "n",
"字节跳动": "n",
"QQ": "n",
"钉钉": "n",
"快手": "n",
"飞书": "n",
"京东": "n"
},
"快应用": {
"华为": "n",
"联盟": "n"
}
}
}
}
}

View File

@ -0,0 +1,315 @@
<template>
<view class="container">
<view class="main" @click.stop="">
<view class="header">
<image src="../assets/bg1.png" class="bg1" />
<image src="../assets/bg2.png" class="bg2" />
<view class="version-title">{{ updateParams.title }}</view>
<view class="version-name" v-if="updateParams.versionName">V{{ updateParams.versionName }}</view>
</view>
<view class="title">更新内容</view>
<view class="content" >
<rich-text :nodes="content" />
</view>
<view class="progress" v-if="downloading">
<view class="slider">
<view class="active-slider" :style="{ width: `${progress}%` }">
<view class="bar" />
<view class="dot">
<view class="text">{{ progress }}%</view>
<view class="circle" />
</view>
</view>
</view>
</view>
<view class="button" :class="{'active': !downloading || downloadError}" @click="handleButton">
{{ downloadText }}
</view>
</view>
<view class="bottom" v-if="!updateParams.force" @click="back">
<view class="line"/>
<image src="../assets/close.png" class="close" />
</view>
</view>
</template>
<script>
import { download, install } from "../updater";
export default {
data() {
const data = {
updateParams: {},
progress: 0,
downloading: false,
downloadSucc: false,
downloadError: false,
};
return data;
},
computed: {
content() {
return (this.updateParams.content || '').replace(/[\r\n]/gim, '<br/>');
},
downloadText () {
if (this.downloadSucc) {
return this.updateParams.downSucTip;
}
if (this.downloadError) {
return this.updateParams.downErrorTip;
}
if (this.downloading) {
return this.updateParams.downMsgTip;
}
return this.updateParams.updateBtnText;
},
},
onLoad(params) {
const data = {
title: '发现新版本',
updateBtnText: '立即升级',
downMsgTip: '下载中,请稍后',
downSucTip: '下载完成,安装中',
downErrorTip: '下载失败,请重试',
quiet: false,
force: false,
...(JSON.parse(decodeURIComponent(params.data)))
};
this.updateParams = data;
},
onBackPress() {
return this.updateParams.force;
},
methods: {
back() {
if (!this.updateParams.force) {
uni.navigateBack();
}
},
//
start() {
if (!this.updateParams.downUrl) {
return;
}
// ios appstore.apk.wgt
const isResource = ['.apk', '.wgt'].some(ext => this.updateParams.downUrl.toLocaleLowerCase().includes(ext));
if (plus.os.name !== "Android" || !isResource) {
plus.runtime.openURL(this.updateParams.downUrl);
return;
}
this.downloading = true;
const self = this;
download({
url: self.updateParams.downUrl,
onProgress(progress) {
self.progress = progress;
},
onSuccess(filePath) {
self.downloadSucc = true;
self.downloadError = false;
install(filePath, true);
},
onFail() {
self.downloading = false;
self.downloadSucc = false;
self.downloadError = true;
},
});
},
handleButton() {
if (!this.downloading) {
return this.start();
}
if (this.downloadError) {
this.progress = 0;
this.downloading = false;
this.downloadSucc = false;
this.downloadError = true;
return this.start();
}
},
},
};
</script>
<style lang="less">
page {
width: 100vw;
height: 100vh;
background: transparent;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.3);
}
.main {
width: 75%;
background-color: #fff;
border-radius: 8rpx;
padding-bottom: 10rpx;
}
.header {
position: relative;
.bg1 {
width: 100%;
height: calc(100vw * 0.375);
border-top-left-radius: 8rpx;
border-top-right-radius: 8rpx;
}
.bg2 {
position: absolute;
top: -40%;
right: 13%;
width: 35.9%;
height: calc(100vw * 0.5441);
}
.version-title {
position: absolute;
top: 13%;
left: 8%;
color: #961c00;
font-size: 40rpx;
}
.version-name {
position: absolute;
top: 36%;
left: 24%;
background-color: #e54139;
color: #fff;
font-size: 26rpx;
line-height: 26rpx;
padding: 8rpx 20rpx;
border-radius: 20rpx;
}
}
.title {
background-color: #ff6d42;
color: #fff;
display: inline-block;
margin-top: 12rpx;
margin-left: 30rpx;
font-size: 26rpx;
line-height: 26rpx;
padding: 8rpx 20rpx;
border-radius: 8rpx;
}
.content {
margin-top: 12rpx;
margin-left: 30rpx;
font-size: 28rpx;
line-height: 2;
max-height: 240rpx;
overflow-y: auto;
}
.button {
margin: 20rpx 30rpx;
background-color: #ffaa00;
color: #fff;
font-size: 30rpx;
text-align: center;
padding: 20rpx 0;
border-radius: 14rpx;
opacity: 0.5;
pointer-events: none;
&:active {
opacity: 0.6;
}
&.active {
opacity: 1;
pointer-events: initial;
}
}
.progress {
padding: 50rpx 50rpx 18rpx;
.slider {
position: relative;
width: 100%;
height: 10rpx;
border-radius: 5rpx;
background-color: #e2e2e2;
.active-slider {
display: flex;
flex-direction: row;
align-items: center;
position: absolute;
left: 0;
top: 0;
width: 0%;
height: 10rpx;
border-radius: 5rpx;
.bar {
flex: 1;
height: 100%;
background-color: #e84116;
border-top-left-radius: 5rpx;
border-bottom-left-radius: 5rpx;
}
.dot {
position: relative;
margin-left: -12rpx;
.text {
position: absolute;
top: -34rpx;
left: -50%;
color: #e84116;
font-size: 24rpx;
font-weight: 500;
}
.circle {
width: 12rpx;
height: 12rpx;
border: 6rpx solid #e84116;
border-radius: 50%;
background-color: #fff;
}
}
}
}
}
.bottom {
display: flex;
flex-direction: column;
align-items: center;
.line {
width: 3rpx;
height: 50rpx;
background-color: #fff;
}
.close {
width: 64rpx;
height: 64rpx;
margin-top: -4rpx;
}
}
</style>

View File

@ -0,0 +1,65 @@
# App热更新
App热更新模块支持apk安装以及wgt升级支持显示弹窗升级、静默更新以及强制更新支持进度显示支持覆盖原生tabbar、原生导航栏。
可用于自建热更新渠道,不依赖于云服务,无云服务费用支出,也可以适配官方更新中心。
## 使用说明
### 1.将此项目导入自己的项目工程
### 2.在page.json中注册页面如下
```javascript
{
"path": "uni_modules/guyue-updater/pages/updater",
"style": {
"navigationStyle": "custom",
"backgroundColor": "transparent",
"disableScroll": true,
"app-plus": {
"backgroundColorTop": "transparent",
"background": "transparent",
"scrollIndicator": false,
"titleNView": false,
"popGesture": "none",
"bounce": "none",
"animationType": "fade-in",
"animationDuration": 200
}
}
}
```
### 3.将版本检测函数导入需要使用的页面
一般在App.vue中的onLaunch导入或者首页导入需要自行完成热更新检查一般在APP启动时发起一个请求获取热更新数据数据获取后可以调用该组件完成更新。
```javascript
import Updater from '@/uni_modules/guyue-updater/index';
// 仅在app平台有效其他平台调用无效
Updater.update({
title: '发现新版本',
content: '1. 我们更新了新的UI设计\n2. 我们更新了新的UI设计\n3. 我们更新了新的UI设计\n4. 我们更新了新的UI设计\n',
versionName: '1.3.6',
downUrl: 'https://cdn.xxx.cn/mp/__UNI__1F29D65.wgt',
force: false,
})
```
## 参数说明
```javascript
export type UpdateParams = {
content: string; // 必填,更新内容,内容中使用 \n 进行换行
downUrl: string; // 必填wgt热更新请给出 .wgt 的文件地址APK整包更新请设置下载apk地址ios请设置苹果商店的连接地址;
title?: string; // 用于显示弹窗标题,默认 发现新版本
versionName?: string; // 版本名,用于显示更新版本,如 1.0.0
quiet?: boolean; // 是否是静默更新开启后不会有弹窗会在后台下载更新文件在下次启动APP时使用更新
force?: boolean; // 是否是强制更新,开启后,弹窗无法被关闭,必须更新
updateBtnText?: string; // 升级按钮文字,默认 立即升级
downMsgTip?: string; // 仅android默认 下载中,请稍后
downSucTip?: string; // 仅android默认 下载完成,安装中
downErrorTip?: string; // 仅android默认 下载失败,请重试
}
```
## Android如何跳转到应用市场更新
downUrl 设置为应用市场的地址即可,如: market://details?id={这里写你的应用包名}
## iOS 如何跳转到AppStore
downUrl 设置为AppStore的地址即可 itms-apps://itunes.apple.com/cn/app/hello-uni-app/id1417078253

View File

@ -0,0 +1,31 @@
export const download = ({ url, onProgress, onSuccess, onFail }) => {
const task = uni.downloadFile({
url,
success(res) {
if (res.statusCode === 200) {
onSuccess && onSuccess(res.tempFilePath);
}
},
fail() {
onFail && onFail();
}
});
task.onProgressUpdate(res => {
onProgress && onProgress(res.progress);
});
};
export const install = (filePath, restart = false, version='') => {
plus.runtime.install(filePath, {
force: true
}, () => {
console.log('install success...');
if (restart) {
uni.setStorageSync('wgt_version', version);
plus.runtime.restart();
}
}, (e) => {
console.error('install fail...', e);
});
};

View File

@ -1,4 +1,9 @@
import { getGXconfig } from "@/api/uniMP.js";
import {
getGXconfig
} from "@/api/uniMP.js";
import {
HTTP_REQUEST_URL
} from '@/config/app';
const mp = uni.requireNativePlugin('uniMP');
let appid = ''; // 应用id
@ -29,20 +34,27 @@ const loadMP = async (id) => {
console.log(mp, uni);
// return ;
uni.showLoading({
title: '下载中...',
title: '初始化中...',
mask: true
})
mp.getUniMPVersion(id, (ret) => {
console.log('当前版本', ret);
if (0 != ret.code || compareVersions(info.data.version, ret.versionInfo.name) == 1 || true) {
let flag;
if (HTTP_REQUEST_URL == 'https://shop.lihaink.cn') {
flag = false
} else {
flag = true
}
if (0 != ret.code || compareVersions(info.data.version, ret.versionInfo.name) == 1 || flag ==
true) {
let count = 0;
timer = setInterval(() => {
if (count < 100) uni.showLoading({
title: `下载中... ${count}%`,
title: `初始化中... ${count}%`,
mask: true
})
else uni.showLoading({
title: '安装中...',
title: '初始化中...100%',
mask: true
})
}, 600)
@ -50,12 +62,17 @@ const loadMP = async (id) => {
url: info.data.version_info?.dow_url,
success(res) {
wgtFile = res.tempFilePath;
console.log('下载完成', wgtFile);
console.log('初始化完成', wgtFile);
installMP();
},
fail(res) {
clearInterval(timer);
timer = null;
uni.hideLoading();
}
});
downloadTask.onProgressUpdate((res) => {
// console.log('下载进度' + res.progress);
// console.log('初始化进度' + res.progress);
if (res.progress > count) count += 10;
if (count >= 90) {
clearInterval(timer);
@ -76,22 +93,10 @@ const getVersion = (id) => {
});
})
}
// 安装小程序
// 初始化小程序
const installMP = () => {
mp.getUniMPVersion(appid, (ret) => {
console.log('安装:供销', ret);
doInstallMP();
// if (0 != ret.code) { //获取失败时安装应用
// doInstallMP();
// } else {
// uni.showModal({
// title: '提示',
// content: 'uni小程序已安装是否覆盖',
// success: res => {
// res.confirm && doInstallMP();
// }
// });
// }
console.log('getUniMPVersion: ' + JSON.stringify(ret));
});
};
@ -101,20 +106,18 @@ const doInstallMP = () => {
wgtFile: wgtFile
}, (r) => {
if (0 == r.code) {
// uni.showToast({
// title: '安装成功'
// });
console.log('小程序安装成功');
open();
} else {
uni.hideLoading();
clearInterval(timer);
timer = null;
uni.showModal({
title: '安装失败',
title: '初始化失败',
content: JSON.stringify(r),
showCancel: false
});
}
console.log('安装供销: ' + JSON.stringify(r));
console.log('初始化供销: ' + JSON.stringify(r));
});
};