大更新,修改登录bug,新增主题颜色,修改各个页面等
This commit is contained in:
parent
a3a77d0a00
commit
3714cfd14c
api
components
libs
pages.jsonpages
admin/stockOut
gather
nongKe/supply_chain
plant_release
supply_chains
user
users
store/modules
uni.scssuni_modules/bt-cropper/components/bt-cropper
@ -93,8 +93,8 @@ export const getNoticeListAPI = (data) => request.get('/Notice/list')
|
||||
export const getNoticeInfoAPI = (data) => request.get('/Notice/info', data)
|
||||
|
||||
|
||||
export const getArea = (data) => request.get('/city/get_area', data, { noAuth: true })
|
||||
export const getStreet = (data) => request.get('/city/get_street', data, { noAuth: true })
|
||||
export const getVillage = (data) => request.get('/city/get_village', data, { noAuth: true })
|
||||
export const getbrigadeAPI = (data) => request.get('/common/get_brigade', data, { noAuth: true })
|
||||
export const postBindingAPI = (data) => request.post('/Userinfo/Binding', data, { noAuth: true, noVerify: true })
|
||||
export const getArea = (data) => request.get('city/get_area', data, { noAuth: true })
|
||||
export const getStreet = (data) => request.get('city/get_street', data, { noAuth: true })
|
||||
export const getVillage = (data) => request.get('city/get_village', data, { noAuth: true })
|
||||
export const getbrigadeAPI = (data) => request.get('common/get_brigade', data, { noAuth: true })
|
||||
export const postBindingAPI = (data) => request.post('Userinfo/Binding', data, { noAuth: true, noVerify: true })
|
@ -20,8 +20,8 @@ export function getCartCounts() {
|
||||
* 获取购物车列表
|
||||
*
|
||||
*/
|
||||
export function getCartList() {
|
||||
return request.get("user/cart/lst");
|
||||
export function getCartList(data) {
|
||||
return request.get("user/cart/lst", data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
24
api/store.js
24
api/store.js
@ -1,20 +1,18 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import request from "@/utils/request.js";
|
||||
/**
|
||||
* 添加扫码商品
|
||||
* @returns {*}
|
||||
*/
|
||||
export function addCartApi(data) {
|
||||
return request.post('v2/micropay/addCart', data);
|
||||
}
|
||||
/**
|
||||
* 获取产品详情
|
||||
* @param int id
|
||||
*
|
||||
*/
|
||||
export function getProductDetail(id) {
|
||||
return request.get('store/product/detail/' + id, {}, {
|
||||
export function getProductDetail(id, data) {
|
||||
return request.get('store/product/detail/' + id, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
@ -123,7 +121,7 @@ export function getProductHot(page, limit) {
|
||||
* 获取商户推荐产品
|
||||
*
|
||||
*/
|
||||
export function getMerProductHot(id,data) {
|
||||
export function getMerProductHot(id, data) {
|
||||
return request.get(`product/spu/recommend`, {
|
||||
page: data.page === undefined ? 1 : data.page,
|
||||
limit: data.limit === undefined ? 10 : data.limit,
|
||||
@ -462,7 +460,7 @@ export function getStoreTypeApi() {
|
||||
*
|
||||
*/
|
||||
export function arrivalNoticeApi(data) {
|
||||
return request.post('store/product/increase_take',data);
|
||||
return request.post('store/product/increase_take', data);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -49,15 +49,6 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
const app = getApp();
|
||||
import Cache from '../utils/cache';
|
||||
import {
|
||||
@ -184,6 +175,13 @@
|
||||
toLogin(true);
|
||||
},
|
||||
getUserProfile() {
|
||||
console.log(11);
|
||||
toLogin(true);
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/login/index'
|
||||
})
|
||||
console.log(22);
|
||||
return
|
||||
let self = this;
|
||||
Routine.getUserProfile()
|
||||
.then(res => {
|
||||
|
@ -40,7 +40,7 @@ class AuthWechat {
|
||||
|
||||
}
|
||||
|
||||
isAndroid(){
|
||||
isAndroid() {
|
||||
let u = navigator.userAgent;
|
||||
return u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;
|
||||
}
|
||||
@ -107,7 +107,7 @@ class AuthWechat {
|
||||
}
|
||||
|
||||
// 使用微信内置地图查看位置接口;
|
||||
seeLocation(config){
|
||||
seeLocation(config) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.wechat().then(wx => {
|
||||
this.toPromise(wx.openLocation, config).then(res => {
|
||||
@ -179,11 +179,12 @@ class AuthWechat {
|
||||
* @param {Object} code
|
||||
*/
|
||||
auth(code) {
|
||||
console.log('授权登陆获取token');
|
||||
return new Promise((resolve, reject) => {
|
||||
let loginType = Cache.get(LOGINTYPE);
|
||||
commonAuth({
|
||||
auth: {
|
||||
type:'wechat',
|
||||
type: 'wechat',
|
||||
auth: {
|
||||
code,
|
||||
spread: Cache.get("spread") ?? 0
|
||||
@ -191,10 +192,10 @@ class AuthWechat {
|
||||
}
|
||||
}).then(res => {
|
||||
const data = res.data;
|
||||
if(res.data.status == 200){
|
||||
if (res.data.status == 200) {
|
||||
store.commit("LOGIN", {
|
||||
token: data.result.token,
|
||||
time:data.result.exp
|
||||
time: data.result.exp
|
||||
});
|
||||
store.commit("SETUID", data.result.user.uid);
|
||||
store.commit('UPDATE_USERINFO', data.result.user);
|
||||
@ -202,10 +203,10 @@ class AuthWechat {
|
||||
Cache.clear(STATE_KEY);
|
||||
loginType && Cache.clear(LOGINTYPE);
|
||||
resolve();
|
||||
}else{
|
||||
uni.setStorageSync('auth_token',res.data.result.key);
|
||||
} else {
|
||||
uni.setStorageSync('auth_token', res.data.result.key);
|
||||
return uni.navigateTo({
|
||||
url:'/pages/users/login/index'
|
||||
url: '/pages/users/login/index'
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -255,7 +256,7 @@ class AuthWechat {
|
||||
return new Promise((resolve, reject) => {
|
||||
let configDefault = {
|
||||
fail(res) {
|
||||
console.log(res,11111);
|
||||
console.log(res, 11111);
|
||||
if (that.instance) return reject({
|
||||
is_ready: true,
|
||||
wx: that.instance
|
||||
@ -268,7 +269,7 @@ class AuthWechat {
|
||||
})
|
||||
},
|
||||
success(res) {
|
||||
return resolve(res,2222);
|
||||
return resolve(res, 2222);
|
||||
}
|
||||
};
|
||||
Object.assign(configDefault, config);
|
||||
|
11
pages.json
11
pages.json
@ -16,7 +16,8 @@
|
||||
{
|
||||
"path": "pages/gather/gather",
|
||||
"style": {
|
||||
"navigationBarTitleText": "工作台"
|
||||
"navigationBarTitleText": "工作台",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -201,7 +202,8 @@
|
||||
"path": "supply_chain/supplier",
|
||||
"style": {
|
||||
"navigationBarTitleText": "供货采购",
|
||||
"enablePullDownRefresh": true
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}, {
|
||||
@ -490,7 +492,8 @@
|
||||
"path": "login/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录",
|
||||
"navigationBarBackgroundColor": "#EB5447"
|
||||
"navigationBarBackgroundColor": "#EB5447",
|
||||
"navigationStyle": "custom"
|
||||
// #ifdef MP || APP-PLUS
|
||||
,
|
||||
"navigationBarTextStyle": "#fff"
|
||||
@ -1263,7 +1266,7 @@
|
||||
"pagePath": "pages/home/index",
|
||||
"iconPath": "static/images/1-001.png",
|
||||
"selectedIconPath": "static/images/1-002.png",
|
||||
"text": "首页"
|
||||
"text": "泸州"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/gather/gather",
|
||||
|
@ -327,15 +327,10 @@
|
||||
})
|
||||
},
|
||||
async addCartGoods(code) {
|
||||
try {
|
||||
const res = await addCartApi({ bar_code: code })
|
||||
const res = await addCartApi({ bar_code: code }).catch(err => Toast(err))
|
||||
this.getCartList();
|
||||
this.getCartNum();
|
||||
Toast('添加成功')
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
Toast(e)
|
||||
}
|
||||
},
|
||||
pay() {
|
||||
let selectValue = []
|
||||
|
@ -1,34 +1,34 @@
|
||||
<template>
|
||||
<view class="gather">
|
||||
|
||||
<u-swiper :list="swiperList" keyName="pic" :autoplay="true" height="491.23rpx"></u-swiper>
|
||||
<!-- <view class="special_work com" v-if="userInfoData.mer_info.type_id === 12"> -->
|
||||
<view class="special_work com" v-if="true">
|
||||
<view class="title">市级供应链</view>
|
||||
<view class="content">
|
||||
<view class="examine" @click="navigator(`/pages/nongKe/supply_chain/goods_list?merid=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg10%402x.png`" mode="aspectFill"></image>
|
||||
<image class="icon_img" :src="`${prefix}zsgl.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`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg11%402x.png`" mode="aspectFill"></image>
|
||||
<image class="icon_img" :src="`${prefix}cwgl.png`" mode="aspectFill"></image>
|
||||
<text class="text">财务管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg8%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">入库管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/product/basicSet?mer_id=${mer_id}&product_type=98`, '商户设置')">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg4%402x.png`" mode="aspectFill"></image>
|
||||
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill"></image>
|
||||
<text class="text">商户设置</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg3%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商品管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg21%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">提现管理</text>
|
||||
</view>
|
||||
@ -40,52 +40,52 @@
|
||||
<view class="special_work com">
|
||||
<view class="title">我的店铺</view>
|
||||
<view class="content ">
|
||||
<view class="examine" @click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=11`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg6%402x.png`" mode="aspectFill"></image>
|
||||
<view class="examine" @click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1`)">
|
||||
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
|
||||
<text class="text">供货采购</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator('/pages/nongKe/supply_chain/purchase_control')">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg7%402x.png`" mode="aspectFill"></image>
|
||||
<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}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg9%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}smck.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">扫码出库</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg8%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">入库管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg3%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">提现管理</text>
|
||||
</view>
|
||||
|
||||
<view class="examine" @click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg1%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}kfjl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">客服记录</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg2%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">订单核销</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/admin/order/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg5%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">订单管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg3%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商品管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg4%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商户设置</text>
|
||||
</view>
|
||||
@ -96,64 +96,64 @@
|
||||
<!-- <gatherBusiness :userInfoData="userInfoData" /> -->
|
||||
</view>
|
||||
|
||||
<!-- <view class="business com" v-if="userInfoData.mer_info.type_id === 11"> -->
|
||||
<view class="business com" v-if="true">
|
||||
<view class="business com" v-if="userInfoData.mer_info.type_id === 11">
|
||||
<!-- <view class="business com" v-if="true"> -->
|
||||
<view class="special_work com">
|
||||
<view class="title">里海云仓</view>
|
||||
<view class="content ">
|
||||
<view class="examine" @click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg6%402x.png`" mode="aspectFill"></image>
|
||||
<view class="examine" @click="navigator(`/pages/nongKe/supply_chain/supplier?type_id=12&isDetail=1`)">
|
||||
<image class="icon_img" :src="`${prefix}ghcg.png`" mode="aspectFill"></image>
|
||||
<text class="text">供货采购</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator('/pages/nongKe/supply_chain/purchase_control')">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg7%402x.png`" mode="aspectFill"></image>
|
||||
<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}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg9%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}smck.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">扫码出库</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/nongKe/gather/select_warehouse?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg8%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}rkgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">入库管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/users/embody/embody?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg3%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}txgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">提现管理</text>
|
||||
</view>
|
||||
|
||||
<view class="examine" @click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg1%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}kfjl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">客服记录</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/admin/order_cancellation/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg2%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}ddhx.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">订单核销</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/admin/order/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg5%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}ddgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">订单管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/product/list/index?mer_id=${mer_id}`)">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg3%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}spgl.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商品管理</text>
|
||||
</view>
|
||||
<view class="examine" @click="navigator(`/pages/product/basicSet?mer_id=${mer_id}`, '商户设置')">
|
||||
<image class="icon_img" :src="`${prefix}6/oaimg4%402x.png`" mode="aspectFill">
|
||||
<image class="icon_img" :src="`${prefix}shsz.png`" mode="aspectFill">
|
||||
</image>
|
||||
<text class="text">商户设置</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="" v-if="userInfoData.mer_info">暂无您的工作台</view>
|
||||
</view>
|
||||
<m-tabbar native>
|
||||
<template v-slot:tabbar_index_2>
|
||||
@ -189,7 +189,7 @@
|
||||
mer_id: '',
|
||||
statusBarHeight: statusBarHeight, //系统导航条高度
|
||||
userInfoData: { mer_info: { type_id: 0 } },
|
||||
prefix: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/',
|
||||
prefix: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/11/',
|
||||
page: 0,
|
||||
group_id: 1,
|
||||
count: {
|
||||
@ -206,6 +206,7 @@
|
||||
sos: 0,
|
||||
xiejiao: 0
|
||||
},
|
||||
swiperList: [],
|
||||
swiper: {
|
||||
url: [{
|
||||
img: ''
|
||||
@ -244,7 +245,7 @@
|
||||
// 轮播图请求
|
||||
async getBanner() {
|
||||
const { data } = await getIndexData()
|
||||
this.swiper.url = data.banner
|
||||
this.swiperList = data.banner
|
||||
},
|
||||
async editGoodsClose() {
|
||||
const data = {
|
||||
@ -269,7 +270,7 @@
|
||||
},
|
||||
navigator(url, t) {
|
||||
console.log('t', t);
|
||||
// if (this.userInfoData.is_wsxx === 0 && t != '商户设置') return Toast("请完善商户信息")
|
||||
if (this.userInfoData.is_wsxx === 0 && t != '商户设置') return Toast("请完善商户信息")
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
@ -351,9 +352,6 @@
|
||||
<style lang="scss" scoped>
|
||||
.gather {
|
||||
padding-bottom: 164.91rpx;
|
||||
/* #ifdef MP || MP-WEIXIN */
|
||||
padding-top: 43.86rpx;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
page {
|
||||
|
@ -44,7 +44,15 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'ShopCard',
|
||||
props: ['store_item'],
|
||||
props: {
|
||||
store_item: {
|
||||
type: Object
|
||||
},
|
||||
isDetail: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return { youZhiImg: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/z2586.png', }
|
||||
},
|
||||
@ -56,10 +64,18 @@
|
||||
})
|
||||
},
|
||||
goStore(id) {
|
||||
console.log(this.isDetail);
|
||||
if (this.isDetail == 2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/store/home/index?id=${id}`
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/nongKe/supply_chain/merchant?id=${id}`
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -10,18 +10,23 @@
|
||||
</view>
|
||||
</view>
|
||||
<block v-for="(item,i) in goodsList" :key="i">
|
||||
<view class="list_item">
|
||||
<view class="list_item flex_a_c">
|
||||
<image class="goods_img" :src="item.image" mode="aspectFill"></image>
|
||||
<view class="r_box flex_a_c_j_sb">
|
||||
<view class="message">
|
||||
<view class="title">{{item.store_name}}</view>
|
||||
<view class="message flex_a_c_j_sb">
|
||||
<view class="flex_a_c">
|
||||
<view class="">分类:{{item.storeCategory.cate_name}}</view>
|
||||
<view class="">单位:{{item.unit_name}}</view>
|
||||
<view class="">订货价:{{item.price}}</view>
|
||||
<view class="unit">单位:{{item.unit_name}}</view>
|
||||
</view>
|
||||
<view class="bar_code">条形码:{{ item.bar_code || "0" }}</view>
|
||||
</view>
|
||||
<view class="redact_box">
|
||||
<view class="order_price">订货价:{{item.price}}</view>
|
||||
<button class="redact" @click="redactShow(item)">编辑</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<u-popup :show="popupShow" @close="popupShow = false" mode="center" :round="10" closeOnClickOverlay>
|
||||
@ -200,12 +205,12 @@
|
||||
width: 694.74rpx;
|
||||
height: 66.67rpx;
|
||||
padding: 2px 2px 2px 21.05rpx;
|
||||
border: 1px solid #20A162;
|
||||
border: 1px solid $uni-theme-color;
|
||||
border-radius: 100px;
|
||||
|
||||
.icon-sousuo {
|
||||
font-weight: bold;
|
||||
color: #20A162;
|
||||
color: $uni-theme-color;
|
||||
margin-right: 17.54rpx;
|
||||
}
|
||||
|
||||
@ -214,7 +219,7 @@
|
||||
width: 135.09rpx;
|
||||
height: 59.65rpx;
|
||||
line-height: 59.65rpx;
|
||||
background: linear-gradient(180deg, #66CE69 0%, #20A162 100%);
|
||||
background: $uni-theme-bg-color;
|
||||
border-radius: 100px;
|
||||
}
|
||||
}
|
||||
@ -232,16 +237,21 @@
|
||||
|
||||
.title {
|
||||
font-size: 31.58rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.message {
|
||||
margin: 28.07rpx 0 21.05rpx 0;
|
||||
}
|
||||
|
||||
.list_item {
|
||||
font-size: 24.56rpx;
|
||||
|
||||
.redact_box {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
|
||||
}
|
||||
|
||||
.redact {
|
||||
@ -250,17 +260,36 @@
|
||||
width: 129.82rpx;
|
||||
height: 50.88rpx;
|
||||
line-height: 50.88rpx;
|
||||
background: linear-gradient(90deg, #66CE69 0%, #20A162 100%);
|
||||
background: $uni-theme-bg-color;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.r_box {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.unit {
|
||||
margin-left: 35.09rpx;
|
||||
margin: 7.02rpx 0 7.02rpx 35.09rpx;
|
||||
}
|
||||
|
||||
.goods_img {
|
||||
width: 119.3rpx;
|
||||
height: 119.3rpx;
|
||||
border-radius: 8px;
|
||||
margin-right: 26.32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.popup_cont {
|
||||
width: 680.7rpx;
|
||||
padding: 31.58rpx;
|
||||
font-size: 28.07rpx;
|
||||
|
||||
.message {
|
||||
margin: 28.07rpx 0 21.05rpx 0;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 31.58rpx;
|
||||
|
@ -47,9 +47,7 @@
|
||||
getProductDetail,
|
||||
postCartAdd
|
||||
} from '@/api/store.js'
|
||||
import {
|
||||
Toast
|
||||
} from '../../../libs/uniApi'
|
||||
import { Toast } from '@/libs/uniApi'
|
||||
import goodsPopup from '../cpns/goodsPopup.vue'
|
||||
export default {
|
||||
components: {
|
||||
@ -264,7 +262,7 @@
|
||||
}
|
||||
|
||||
.icon-xuanzhong1 {
|
||||
color: #20A162;
|
||||
color: $uni-theme-color;
|
||||
}
|
||||
|
||||
.head_search {
|
||||
@ -277,12 +275,12 @@
|
||||
width: 694.74rpx;
|
||||
height: 66.67rpx;
|
||||
padding: 2px 2px 2px 21.05rpx;
|
||||
border: 1px solid #20A162;
|
||||
border: 1px solid $uni-theme-color;
|
||||
border-radius: 100px;
|
||||
|
||||
.icon-sousuo {
|
||||
font-weight: bold;
|
||||
color: #20A162;
|
||||
color: $uni-theme-color;
|
||||
margin-right: 17.54rpx;
|
||||
}
|
||||
|
||||
@ -291,7 +289,7 @@
|
||||
width: 135.09rpx;
|
||||
height: 59.65rpx;
|
||||
line-height: 59.65rpx;
|
||||
background: linear-gradient(180deg, #66CE69 0%, #20A162 100%);
|
||||
background: $uni-theme-bg-color;
|
||||
border-radius: 100px;
|
||||
}
|
||||
}
|
||||
@ -308,7 +306,7 @@
|
||||
|
||||
.active {
|
||||
font-weight: 700;
|
||||
color: #20A162;
|
||||
color: $uni-theme-color;
|
||||
}
|
||||
|
||||
.item_list {
|
||||
@ -343,13 +341,13 @@
|
||||
|
||||
.num {
|
||||
font-size: 31.58rpx;
|
||||
color: #20A162;
|
||||
color: $uni-theme-color;
|
||||
}
|
||||
|
||||
.purchase_btn {
|
||||
color: #fff;
|
||||
padding: 7.02rpx 21.05rpx;
|
||||
background: #009E56;
|
||||
background: $uni-theme-color;
|
||||
border-radius: 100px;
|
||||
margin-left: 21.05rpx;
|
||||
}
|
||||
@ -359,7 +357,7 @@
|
||||
width: 180rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
background-color: #009E56;
|
||||
background-color: $uni-theme-color;
|
||||
border-radius: 100px;
|
||||
color: #fff;
|
||||
}
|
||||
@ -377,7 +375,7 @@
|
||||
text-align: center;
|
||||
line-height: 80.7rpx;
|
||||
border-radius: 100px;
|
||||
background-color: #20A162;
|
||||
background-color: $uni-theme-color;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
@ -249,9 +249,7 @@
|
||||
])),
|
||||
onReady() {},
|
||||
mounted: function() {},
|
||||
onLoad: function(options) {
|
||||
|
||||
},
|
||||
onLoad: function(options) {},
|
||||
onShow: function() {
|
||||
let that = this
|
||||
let routes = getCurrentPages();
|
||||
|
@ -1,8 +1,14 @@
|
||||
<template>
|
||||
<view class="supplier" :style="{height: winHeight + 'px' }">
|
||||
<view class="head-wrapper" :style="'top:'+statusBarHeight">
|
||||
<view class="head-menu">
|
||||
<view class='iconfont icon-xiangzuo' @click="returns"></view>
|
||||
<view class="iconfont icon-shouye4" @click="goHome"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="header_warpper">
|
||||
<u-swiper :list="swiperList" keyName="pic" :autoplay="true" height="491.23rpx"></u-swiper>
|
||||
<view class="head_search flex_a_c">
|
||||
<!-- <view class="head_search flex_a_c">
|
||||
<view class="search_content flex_a_c_j_sb">
|
||||
<view class="flex_a_c">
|
||||
<view class="iconfont icon-sousuo"></view>
|
||||
@ -10,7 +16,7 @@
|
||||
</view>
|
||||
<button class="search_btn" @click="searchStoreMerchant">搜索</button>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view class="con-box">
|
||||
@ -37,7 +43,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<block v-for="(item,index) in storeMerchant" :key="index">
|
||||
<storeCard :store_item="item" :category="item.category_name"></storeCard>
|
||||
<storeCard :store_item="item" :category="item.category_name" :isDetail="isDetail"></storeCard>
|
||||
</block>
|
||||
<u-loadmore :status="status" :loading-text="loadingText" :loadmore-text="loadmoreText"
|
||||
:nomore-text="nomoreText" />
|
||||
@ -54,6 +60,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
||||
import storeCard from './component/shop_card.vue'
|
||||
import rightSlider from './component/rightSlider';
|
||||
import { getIndexData } from '@/api/api.js'
|
||||
@ -66,6 +73,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight: statusBarHeight, //系统导航条高度
|
||||
swiperList: [],
|
||||
activeTwo: 0,
|
||||
winHeight: 0,
|
||||
@ -112,6 +120,7 @@
|
||||
type_id: '', // 类型
|
||||
street_id: '' // 位置
|
||||
},
|
||||
isDetail: 2
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
@ -119,6 +128,7 @@
|
||||
if (e.type_id) {
|
||||
this.sotreParam.type_id = e.type_id
|
||||
}
|
||||
if (e.isDetail) this.isDetail = e.isDetail
|
||||
this.getStoreMerchant()
|
||||
this.getStore()
|
||||
this.getClassfication()
|
||||
@ -133,6 +143,16 @@
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
// 后退
|
||||
returns: function() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
// 首页
|
||||
goHome() {
|
||||
uni.switchTab({
|
||||
url: '/pages/home/index'
|
||||
});
|
||||
},
|
||||
async getBanner() {
|
||||
const { data } = await getIndexData()
|
||||
this.swiperList = data.banner
|
||||
@ -336,12 +356,12 @@
|
||||
width: 694.74rpx;
|
||||
height: 66.67rpx;
|
||||
padding: 2px 2px 2px 21.05rpx;
|
||||
border: 1px solid #20A162;
|
||||
border: 1px solid $uni-theme-color;
|
||||
border-radius: 100px;
|
||||
|
||||
.icon-sousuo {
|
||||
font-weight: bold;
|
||||
color: #20A162;
|
||||
color: $uni-theme-color;
|
||||
margin-right: 17.54rpx;
|
||||
}
|
||||
|
||||
@ -350,7 +370,7 @@
|
||||
width: 135.09rpx;
|
||||
height: 59.65rpx;
|
||||
line-height: 59.65rpx;
|
||||
background: linear-gradient(180deg, #66CE69 0%, #20A162 100%);
|
||||
background: $uni-theme-bg-color;
|
||||
border-radius: 100px;
|
||||
}
|
||||
}
|
||||
@ -360,6 +380,7 @@
|
||||
flex: 1;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
margin-top: 28.07rpx;
|
||||
}
|
||||
|
||||
.left_classify {
|
||||
@ -467,7 +488,7 @@
|
||||
.msg {
|
||||
|
||||
.category_name {
|
||||
color: #20A162;
|
||||
color: $uni-theme-color;
|
||||
}
|
||||
|
||||
.scope {
|
||||
@ -485,4 +506,39 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.head-wrapper {
|
||||
z-index: 999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
left: 30rpx;
|
||||
top: 0;
|
||||
/* #ifdef MP */
|
||||
height: 43px;
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
height: 114rpx;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.head-menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 54rpx;
|
||||
width: 140rpx;
|
||||
background: rgba(0, 0, 0, .25);
|
||||
border-radius: 27rpx;
|
||||
|
||||
.iconfont {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
box-sizing: border-box;
|
||||
|
||||
&.icon-xiangzuo {
|
||||
border-right: 1px solid #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -14,11 +14,11 @@
|
||||
<view class="input_photo acea-row row-middle">
|
||||
<block v-if="tabActive == 2">
|
||||
<view class="pictrue" v-if="formData.video_link">
|
||||
<!-- <view v-if="videoplay">
|
||||
<view v-if="videoplay">
|
||||
<video controls id="myvideo" :src="video_link" @fullscreenchange="screenChange"></video>
|
||||
</view> -->
|
||||
</view>
|
||||
<!--#ifndef APP-PLUS-->
|
||||
<!-- <video class="pictrue" :src="formData.video_link"></video> -->
|
||||
<video class="pictrue" :src="formData.video_link"></video>
|
||||
<!--#endif-->
|
||||
<image class="video-bg" mode="widthFix"
|
||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/3/video_bg.png">
|
||||
@ -69,7 +69,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="release_item">
|
||||
<!-- <view class='item acea-row row-between-wrapper'>
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view class='name'><text class="iconfont icon-baobeilianjie"></text>添加产品({{productList.length}})</view>
|
||||
<view class="select">
|
||||
<view class="select_count" @click.stop="addProduct">
|
||||
@ -81,7 +81,7 @@
|
||||
<text class="iconfont icon-xiangyou"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view class='name'><text class="iconfont icon-canyuhuati"></text>参与话题</view>
|
||||
<view class="select">
|
||||
@ -581,7 +581,7 @@
|
||||
line-height: 90rpx;
|
||||
height: 90rpx;
|
||||
height: calc(90rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||
height: calc(90rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||
height: calc(200rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||
}
|
||||
|
||||
.container {
|
||||
|
@ -13,7 +13,7 @@
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
<view class="search_wrapper flex_a_c_j_sb">
|
||||
<!-- <view class="search_wrapper flex_a_c_j_sb">
|
||||
<navigator url="/pages/plantGrass/plant_search/index" hover-class="none" class="search_content flex_a_c_j_sb">
|
||||
<view class="flex_a_c">
|
||||
<view class="iconfont icon-sousuo"></view>
|
||||
@ -22,14 +22,14 @@
|
||||
<button class="search_btn">搜索</button>
|
||||
</navigator>
|
||||
<view class="iconlihai lihai-gengduo" @click="showPicker=true"></view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="shop_wrapper">
|
||||
<navigator class="l_yun" hover-class="none"
|
||||
:url="`/pages/nongKe/supply_chain/supplier?street_id=${sotreParam.street_id}`">
|
||||
:url="`/pages/nongKe/supply_chain/supplier?type_id=10&street_id=${sotreParam.street_id}`">
|
||||
<view class="yun_title flex_a_c">
|
||||
<view class="">泸州市{{district}}{{town}}</view>
|
||||
<view class="iconlihai lihai-gengduo"></view>
|
||||
<view class="iconlihai lihai-gengduo" @click.stop="showPicker=true"></view>
|
||||
</view>
|
||||
<view class="text_cont">
|
||||
<text class="name_town">{{town}}</text>供销综合云市场
|
||||
@ -79,7 +79,9 @@
|
||||
</navigator>
|
||||
</view> -->
|
||||
|
||||
<view class="article_box">
|
||||
<!-- 滚动 -->
|
||||
<scroll-view scroll-y="true" class="article_box">
|
||||
<view>
|
||||
<block v-for="item in ArticleHotList" :key="item.article_id">
|
||||
<view class="article_item">
|
||||
<view class="title">{{item.title}}</view>
|
||||
@ -87,6 +89,8 @@
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
|
||||
<view class="tabs_wrapper">
|
||||
<!-- <u-tabs :list="tabsData.list" @click="tabsChange" :activeStyle="tabsData.activeStyle"
|
||||
@ -277,13 +281,13 @@
|
||||
},
|
||||
Area() {
|
||||
getArea({ city_code: 510500 }).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(0, res);
|
||||
this.Street(res[0]['code']);
|
||||
this.$refs.uPicker.setColumnValues(0, res.data);
|
||||
this.Street(res.data[0]['code']);
|
||||
});
|
||||
},
|
||||
Street(code) {
|
||||
getStreet({ area_code: code }).then(res => {
|
||||
this.$refs.uPicker.setColumnValues(1, res);
|
||||
this.$refs.uPicker.setColumnValues(1, res.data);
|
||||
});
|
||||
},
|
||||
},
|
||||
@ -542,12 +546,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
.scroll_art {
|
||||
width: 694.74rpx;
|
||||
margin: 0 auto;
|
||||
height: 526.32rpx
|
||||
}
|
||||
|
||||
.article_box {
|
||||
height: 431.58rpx;
|
||||
width: 694.74rpx;
|
||||
margin: 38.6rpx auto;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
padding: 24.56rpx;
|
||||
padding: 0 24.56rpx 24.56rpx 24.56rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.article_item {
|
||||
height: 131.58rpx;
|
||||
@ -557,16 +569,17 @@
|
||||
border-bottom: 1px solid #CCCCCC;
|
||||
|
||||
.title {
|
||||
font-size: 31.58rpx;
|
||||
font-size: 28.07rpx;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
margin-bottom: 10.53rpx;
|
||||
}
|
||||
|
||||
.synopsis {
|
||||
font-size: 24.56rpx;
|
||||
font-size: 21.05rpx;
|
||||
color: #666;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
|
@ -151,7 +151,7 @@
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="menus-list-item" v-if="!userInfo.topService && userInfo.service" @click="toService(0)">
|
||||
<!-- <view class="menus-list-item" v-if="!userInfo.topService && userInfo.service" @click="toService(0)">
|
||||
<view class="item-text">
|
||||
<view class="title">
|
||||
<text class="merchant">商家</text>管理
|
||||
@ -159,7 +159,7 @@
|
||||
<view class="info">进入商户中心管理店铺</view>
|
||||
</view>
|
||||
<view class="image merchant-image"></view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="menus-list-item" v-if="!userInfo.service && userInfo.topService" @click="toService(1)">
|
||||
<view class="item-text">
|
||||
<view class="title">
|
||||
|
File diff suppressed because it is too large
Load Diff
1214
pages/users/login/login_copy.vue
Normal file
1214
pages/users/login/login_copy.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,20 +4,21 @@
|
||||
<view class='personal-data'>
|
||||
<view class="wrapper" v-if="switchUserInfo.length>0">
|
||||
<view class="title">管理我的账号</view>
|
||||
<view class="wrapList" >
|
||||
<view class="wrapList">
|
||||
<view class="item acea-row row-between-wrapper" :class="item.uid === userInfo.uid ? 'on' : ''"
|
||||
:style="{ 'background-image': `url(${item.uid == userInfo.uid ? domain+'/static/diy/currentAcc'+keyColor+'.png' : '' })` }"
|
||||
v-for="(item,index) in switchUserInfo"
|
||||
:key="index">
|
||||
v-for="(item,index) in switchUserInfo" :key="index">
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<block v-if='item.uid === userInfo.uid'>
|
||||
<view class="pictrue" v-if="!mp_is_new" @click="uploadpic">
|
||||
<image :src="item.avatar || '/static/images/f.png'"></image>
|
||||
<view v-if="open_update_info != 0" class="radius" ><span class="iconfont iconfonta icon-jilu-xuanzhong"></span></view>
|
||||
<view v-if="open_update_info != 0" class="radius"><span
|
||||
class="iconfont iconfonta icon-jilu-xuanzhong"></span></view>
|
||||
</view>
|
||||
<button v-if="mp_is_new && open_update_info != 0" class="avatar-box pictrue" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
||||
<button v-if="mp_is_new && open_update_info != 0" class="avatar-box pictrue" open-type="chooseAvatar"
|
||||
@chooseavatar="onChooseAvatar">
|
||||
<image :src="item.avatar || '/static/images/f.png'"></image>
|
||||
<view class="radius" ><span class="iconfont iconfonta icon-jilu-xuanzhong"></span></view>
|
||||
<view class="radius"><span class="iconfont iconfonta icon-jilu-xuanzhong"></span></view>
|
||||
</button>
|
||||
<button v-else-if="mp_is_new && open_update_info == 0" class="avatar-box">
|
||||
<image :src="item.avatar || '/static/images/f.png'"></image>
|
||||
@ -25,7 +26,8 @@
|
||||
</block>
|
||||
<view class="pictrue" v-else>
|
||||
<image :src="item.avatar || '/static/images/f.png'"></image>
|
||||
<view class="radius" v-if="open_update_info != 0"><span class="iconfont iconfonta icon-jilu-xuanzhong"></span></view>
|
||||
<view class="radius" v-if="open_update_info != 0"><span
|
||||
class="iconfont iconfonta icon-jilu-xuanzhong"></span></view>
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="name line1">{{ item.nickname }}</view>
|
||||
@ -41,7 +43,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="list" v-else>
|
||||
<view class='item acea-row row-between-wrapper' >
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view>头像</view>
|
||||
<view class="pictrue" v-if="!mp_is_new" @click="uploadpic">
|
||||
<image class="avatar" :src="userInfo.avatar || '/static/images/f.png'"></image>
|
||||
@ -72,7 +74,8 @@
|
||||
<navigator url="/pages/users/user_phone/index" hover-class="none" class="input" v-if="!userInfo.phone">
|
||||
点击绑定手机号<text class="iconfont icon-xiangyou"></text>
|
||||
</navigator>
|
||||
<navigator url="/pages/users/user_modify_phone/index" hover-class="none" class='input acea-row row-between-wrapper' v-else>
|
||||
<navigator url="/pages/users/user_modify_phone/index" hover-class="none"
|
||||
class='input acea-row row-between-wrapper' v-else>
|
||||
<input type='text' disabled='true' name='phone' :value='userInfo.phone' class='id'></input>
|
||||
<text class='iconfont icon-you'></text>
|
||||
</navigator>
|
||||
@ -86,14 +89,16 @@
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view>地址管理</view>
|
||||
<navigator url="/pages/users/user_address_list/index" hover-class="none" class='input acea-row row-between-wrapper'>
|
||||
<navigator url="/pages/users/user_address_list/index" hover-class="none"
|
||||
class='input acea-row row-between-wrapper'>
|
||||
<input type='text' placeholder="立即前往" disabled='true' class='id'></input>
|
||||
<text class='iconfont icon-you'></text>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class='item acea-row row-between-wrapper'>
|
||||
<view>发票管理</view>
|
||||
<navigator url="/pages/users/user_invoice_list/index" hover-class="none" class='input acea-row row-between-wrapper'>
|
||||
<navigator url="/pages/users/user_invoice_list/index" hover-class="none"
|
||||
class='input acea-row row-between-wrapper'>
|
||||
<input type='text' placeholder="立即前往" disabled='true' class='id'></input>
|
||||
<text class='iconfont icon-you'></text>
|
||||
</navigator>
|
||||
@ -169,7 +174,7 @@
|
||||
version: ''
|
||||
};
|
||||
},
|
||||
computed: configMap({open_update_info: 0} ,mapGetters(['isLogin','viewColor','keyColor'])),
|
||||
computed: configMap({ open_update_info: 0 }, mapGetters(['isLogin', 'viewColor', 'keyColor'])),
|
||||
onLoad() {
|
||||
if (this.isLogin) {
|
||||
this.getUserInfo();
|
||||
@ -193,7 +198,7 @@
|
||||
*/
|
||||
uploadpic: function() {
|
||||
let that = this;
|
||||
if(that.open_update_info == 0){
|
||||
if (that.open_update_info == 0) {
|
||||
return;
|
||||
}
|
||||
that.$util.uploadImageOne('upload/image', function(res) {
|
||||
@ -202,16 +207,16 @@
|
||||
userInfo.avatar = res.data.path;
|
||||
}
|
||||
that.switchUserInfo[that.userIndex] = userInfo;
|
||||
editAvatar({avatar:res.data.path}).then((res)=>{
|
||||
editAvatar({ avatar: res.data.path }).then((res) => {
|
||||
that.$util.Tips({
|
||||
title:res.message,
|
||||
title: res.message,
|
||||
})
|
||||
})
|
||||
});
|
||||
},
|
||||
// 修改昵称
|
||||
changeInput(){
|
||||
if(this.open_update_info == 0){
|
||||
changeInput() {
|
||||
if (this.open_update_info == 0) {
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({
|
||||
@ -220,12 +225,12 @@
|
||||
},
|
||||
// 微信头像获取
|
||||
onChooseAvatar(e) {
|
||||
const {avatarUrl} = e.detail
|
||||
const { avatarUrl } = e.detail
|
||||
this.$util.uploadImgs('upload/image', avatarUrl, (res) => {
|
||||
this.userInfo.avatar = res.data.path
|
||||
editAvatar({avatar:res.data.path}).then((res)=>{
|
||||
editAvatar({ avatar: res.data.path }).then((res) => {
|
||||
that.$util.Tips({
|
||||
title:res.message,
|
||||
title: res.message,
|
||||
})
|
||||
})
|
||||
}, (err) => {
|
||||
@ -237,7 +242,7 @@
|
||||
var that = this;
|
||||
plus.runtime.getProperty(plus.runtime.appid, (info) => {
|
||||
this.version = info.version;
|
||||
console.log('当前版本:'+ info.version)
|
||||
console.log('当前版本:' + info.version)
|
||||
});
|
||||
},
|
||||
//#endif
|
||||
@ -300,7 +305,7 @@
|
||||
.then(res => {
|
||||
that.$store.commit("LOGOUT");
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
url: '/pages/home/index',
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
@ -334,22 +339,22 @@
|
||||
})
|
||||
},
|
||||
/**修改密码*/
|
||||
changePwd(){
|
||||
changePwd() {
|
||||
let that = this;
|
||||
if(that.userInfo.phone){
|
||||
if (that.userInfo.phone) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/users/user_modify_pwd/index`
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
that.$util.Tips({
|
||||
title: '请先绑定手机号'
|
||||
});
|
||||
}
|
||||
},
|
||||
//注销账号
|
||||
changeCancel(){
|
||||
changeCancel() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/user_about/index?from='+'the_cancellation_msg'
|
||||
url: '/pages/users/user_about/index?from=' + 'the_cancellation_msg'
|
||||
})
|
||||
},
|
||||
/**
|
||||
@ -359,7 +364,7 @@
|
||||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
that.$set(that, 'userInfo', res.data);
|
||||
if(res.data.phone){
|
||||
if (res.data.phone) {
|
||||
that.userAcc();
|
||||
}
|
||||
});
|
||||
@ -369,10 +374,11 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
html{
|
||||
-webkit-text-size-adjust:none;
|
||||
html {
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
.radius{
|
||||
|
||||
.radius {
|
||||
background-color: white;
|
||||
width: 35rpx;
|
||||
height: 35rpx;
|
||||
@ -384,45 +390,54 @@
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.iconfonta{
|
||||
|
||||
.iconfonta {
|
||||
border-radius: 50%;
|
||||
font-size: 20rpx;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.btnb{
|
||||
|
||||
.btnb {
|
||||
border-radius: 0;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.btna{
|
||||
|
||||
.btna {
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
border-radius: 10rpx 10rpx 0 0;
|
||||
}
|
||||
.btnc{
|
||||
|
||||
.btnc {
|
||||
height: 130rpx;
|
||||
line-height: 130rpx;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.personal-data {
|
||||
padding-bottom: calc(0rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||
padding-bottom: calc(0rpx + env(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||
}
|
||||
|
||||
.personal-data .wrapper {
|
||||
margin: 10rpx 0;
|
||||
background-color: #fff;
|
||||
padding: 36rpx 30rpx 13rpx 30rpx;
|
||||
}
|
||||
|
||||
.personal-data .wrapper .title {
|
||||
margin-bottom: 30rpx;
|
||||
font-size: 32rpx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.personal-data .wrapper .wrapList .item {
|
||||
width: 690rpx;
|
||||
height: 160rpx;
|
||||
@ -434,9 +449,11 @@
|
||||
border: 2rpx solid #f8f8f8;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.t-color {
|
||||
color: var(--view-theme);
|
||||
}
|
||||
|
||||
.personal-data .wrapper .wrapList .item.on {
|
||||
border-color: var(--view-theme);
|
||||
border-radius: 20rpx;
|
||||
@ -445,32 +462,39 @@
|
||||
background-color: var(--view-minorColor);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.personal-data .wrapper .wrapList .item .picTxt {
|
||||
width: 445rpx;
|
||||
}
|
||||
|
||||
.personal-data .wrapper .wrapList .item .picTxt .pictrue {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.personal-data .wrapper .wrapList .item .picTxt .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.personal-data .wrapper .wrapList .item .picTxt .text {
|
||||
width: 325rpx;
|
||||
}
|
||||
|
||||
.personal-data .wrapper .wrapList .item .picTxt .text .name {
|
||||
width: 100%;
|
||||
font-size: 30rpx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.personal-data .wrapper .wrapList .item .picTxt .text .phone {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.personal-data .wrapper .wrapList .item .bnt {
|
||||
font-size: 24rpx;
|
||||
background-color: #fff;
|
||||
@ -479,6 +503,7 @@
|
||||
height: 54rpx;
|
||||
border: 2rpx solid var(--view-theme);
|
||||
}
|
||||
|
||||
.personal-data .wrapper .wrapList .item .currentBnt {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
@ -489,10 +514,12 @@
|
||||
height: 48rpx;
|
||||
border-radius: 0 20rpx 0 20rpx;
|
||||
}
|
||||
|
||||
.personal-data .list {
|
||||
margin-top: 15rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.personal-data .list .item {
|
||||
padding: 30rpx 30rpx 30rpx 0;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
@ -500,6 +527,7 @@
|
||||
font-size: 32rpx;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
.personal-data .list .item .phone {
|
||||
width: 160rpx;
|
||||
height: 56rpx;
|
||||
@ -508,26 +536,32 @@
|
||||
line-height: 56rpx;
|
||||
border-radius: 32rpx
|
||||
}
|
||||
|
||||
.personal-data .list .item .pictrue {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
}
|
||||
|
||||
.personal-data .list .item .pictrue image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.personal-data .list .item .input {
|
||||
min-width: 415rpx;
|
||||
text-align: right;
|
||||
color: #868686;
|
||||
}
|
||||
|
||||
.personal-data .list .item .input .id {
|
||||
width: 365rpx;
|
||||
}
|
||||
|
||||
.personal-data .list .item .input .iconfont {
|
||||
font-size: 35rpx;
|
||||
}
|
||||
|
||||
.personal-data .modifyBnt {
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
@ -539,6 +573,7 @@
|
||||
margin: 76rpx auto 0 auto;
|
||||
background: var(--view-theme);
|
||||
}
|
||||
|
||||
.personal-data .logOut {
|
||||
font-size: 32rpx;
|
||||
text-align: center;
|
||||
@ -549,10 +584,12 @@
|
||||
color: var(--view-theme);
|
||||
border: 1px solid var(--view-theme);
|
||||
}
|
||||
|
||||
.avatar-box {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
background: transparent;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
@ -61,7 +61,7 @@ const mutations = {
|
||||
state.color = color;
|
||||
document.body.style.backgroundColor = color;
|
||||
},
|
||||
UPDATE_USERINFO(state, userInfo) {
|
||||
UPDATE_USERINFO(state, userInfo, time) {
|
||||
userInfo.isNew && Cache.set('is_new_user', '1')
|
||||
state.userInfo = userInfo;
|
||||
},
|
||||
|
2
uni.scss
2
uni.scss
@ -13,6 +13,8 @@
|
||||
*/
|
||||
@import '@/uni_modules/uview-ui/theme.scss';
|
||||
/* 颜色变量 */
|
||||
$uni-theme-color: #F45846;
|
||||
$uni-theme-bg-color: linear-gradient(180deg, #F98649 0%, #F34E45 100%);
|
||||
|
||||
/* 行为相关颜色 */
|
||||
$uni-color-primary: #007aff;
|
||||
|
@ -153,9 +153,9 @@
|
||||
default: false
|
||||
},
|
||||
// 是否开启操作结束后自动放大
|
||||
autoZoom:{
|
||||
type:Boolean,
|
||||
default:true
|
||||
autoZoom: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -197,7 +197,7 @@
|
||||
handler(imageSrc) {
|
||||
this.imageUrl = imageSrc
|
||||
this.imageInfo = null;
|
||||
if(!imageSrc){
|
||||
if (!imageSrc) {
|
||||
return
|
||||
}
|
||||
this.getImageInfo(imageSrc).then(imageInfo => {
|
||||
@ -213,23 +213,22 @@
|
||||
return this.imageBoundingRect;
|
||||
}).then((imageBoundingRect) => {
|
||||
if (this.initPosition) {
|
||||
const {left,top,width,height} = this.initPosition
|
||||
const { left, top, width, height } = this.initPosition
|
||||
const ratio = this.imageBoundingRect.width / this.imageInfo.width
|
||||
if(left!==undefined){
|
||||
if (left !== undefined) {
|
||||
const imgTranslateX = this.cropperPosition.left - imageBoundingRect.left - left * ratio
|
||||
this.cropperPosition.left -= imgTranslateX
|
||||
}
|
||||
if(top!==undefined){
|
||||
if (top !== undefined) {
|
||||
const imgTranslateY = this.cropperPosition.top - imageBoundingRect.top - top * ratio
|
||||
this.cropperPosition.top -= imgTranslateY
|
||||
}
|
||||
!!width && (this.cropperPosition.width = this.initPosition.width * ratio);
|
||||
}!!width && (this.cropperPosition.width = this.initPosition.width * ratio);
|
||||
!!height && (this.cropperPosition.height = this.initPosition.height * ratio);
|
||||
}
|
||||
this.$emit('load')
|
||||
}).catch(err=>{
|
||||
console.error('失败信息',err)
|
||||
this.$emit('loadFail',err)
|
||||
}).catch(err => {
|
||||
console.error('失败信息', err)
|
||||
this.$emit('loadFail', err)
|
||||
})
|
||||
},
|
||||
immediate: true
|
||||
@ -424,8 +423,8 @@
|
||||
/**
|
||||
* @deprecated 本方法已弃用,请用resetCropper代替
|
||||
*/
|
||||
resetRatio(){
|
||||
log('本方法(resetRatio)已弃用,未来将删除,请用resetCropper代替','warn')
|
||||
resetRatio() {
|
||||
log('本方法(resetRatio)已弃用,未来将删除,请用resetCropper代替', 'warn')
|
||||
return this.resetCropper()
|
||||
},
|
||||
// 重置裁剪框
|
||||
@ -458,9 +457,9 @@
|
||||
onTouchEnd() {
|
||||
startTouches = []
|
||||
this.checkImagePosition()
|
||||
if(this.autoZoom){
|
||||
if (this.autoZoom) {
|
||||
clearTimeout(timer)
|
||||
timer = setTimeout(this.zoom,1000)
|
||||
timer = setTimeout(this.zoom, 1000)
|
||||
}
|
||||
this.reportChange()
|
||||
},
|
||||
@ -501,7 +500,7 @@
|
||||
this.imgTranslateY = this.imgTranslateY + (cropperPosition.bottom - imagePosition.bottom)
|
||||
}
|
||||
},
|
||||
zoom(){
|
||||
zoom() {
|
||||
// 容器比例
|
||||
const containerRatio = this.containerRect.width / this.containerRect.height
|
||||
// 移动后的裁剪框比例
|
||||
@ -542,7 +541,7 @@
|
||||
reportChange() {
|
||||
const imagePosition = this.getImagePosition()
|
||||
const cropperPosition = this.getCropperPosition()
|
||||
const scale = this.imageBoundingRect.width/this.imageInfo.width * this.imgScale
|
||||
const scale = this.imageBoundingRect.width / this.imageInfo.width * this.imgScale
|
||||
this.$emit('change', {
|
||||
left: (cropperPosition.left - imagePosition.left) / scale,
|
||||
top: (cropperPosition.top - imagePosition.top) / scale,
|
||||
@ -755,6 +754,7 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./iconfont.css";
|
||||
|
||||
.bt-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -765,6 +765,7 @@
|
||||
padding-top: 30rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.iconfont {
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
@ -774,16 +775,20 @@
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 50%;
|
||||
color: #FFFFFF;
|
||||
|
||||
&.active {
|
||||
color: #007AFF;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-move {
|
||||
right: 100rpx;
|
||||
}
|
||||
|
||||
.icon-reset {
|
||||
right: 40rpx;
|
||||
}
|
||||
|
||||
.bt-canvas {
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
@ -791,25 +796,30 @@
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.mainContent {
|
||||
flex: 1;
|
||||
margin: 60rpx 60rpx 150rpx;
|
||||
position: relative;
|
||||
|
||||
.image {
|
||||
position: absolute;
|
||||
will-change: transform;
|
||||
transform-origin: center center;
|
||||
}
|
||||
|
||||
.controller {
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
padding: 20rpx;
|
||||
|
||||
&::after {
|
||||
display: block;
|
||||
content: '';
|
||||
box-shadow: 0 0 10rpx #333;
|
||||
background-color: #E4E7ED;
|
||||
}
|
||||
|
||||
&.controller_dot {
|
||||
&::after {
|
||||
width: 40rpx;
|
||||
@ -817,12 +827,14 @@
|
||||
border-radius: 99px;
|
||||
}
|
||||
}
|
||||
|
||||
&.vertical {
|
||||
&::after {
|
||||
width: 10rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&.horizon {
|
||||
&::after {
|
||||
width: 40rpx;
|
||||
@ -830,6 +842,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cropper {
|
||||
position: absolute;
|
||||
border: 1px solid #eee;
|
||||
@ -839,40 +852,48 @@
|
||||
will-change: transform;
|
||||
display: contain;
|
||||
pointer-events: none;
|
||||
|
||||
.line {
|
||||
position: absolute;
|
||||
// background-color: #eee;
|
||||
}
|
||||
|
||||
.row {
|
||||
width: 100%;
|
||||
height: 0px;
|
||||
left: 0;
|
||||
border-top: 1px dashed #007AFF;
|
||||
}
|
||||
|
||||
.col {
|
||||
height: 100%;
|
||||
width: 0px;
|
||||
border-left: 1px dashed #007AFF;
|
||||
}
|
||||
|
||||
.row1 {
|
||||
top: 33%;
|
||||
}
|
||||
|
||||
.row2 {
|
||||
top: 66%;
|
||||
}
|
||||
|
||||
.col1 {
|
||||
left: 33%;
|
||||
}
|
||||
|
||||
.col2 {
|
||||
left: 66%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.slot {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
bottom: 131.58rpx;
|
||||
height: 90rpx;
|
||||
height: calc(90rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
|
||||
height: calc(90rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
|
||||
|
Loading…
x
Reference in New Issue
Block a user