Compare commits
25 Commits
master
...
feature-qu
Author | SHA1 | Date | |
---|---|---|---|
![]() |
aba60965c7 | ||
![]() |
e65c24c01a | ||
![]() |
13caeb8cd1 | ||
![]() |
81e45107eb | ||
![]() |
59cb9f1fc0 | ||
![]() |
1af643fcaf | ||
![]() |
51fe5f25b6 | ||
![]() |
47a2821fa0 | ||
![]() |
8e2de605ef | ||
![]() |
a110387869 | ||
![]() |
e9a6377e26 | ||
![]() |
e11005391b | ||
![]() |
e269404174 | ||
![]() |
b5e261a764 | ||
![]() |
8593b1a2dc | ||
![]() |
709cba9b16 | ||
![]() |
9077a7a064 | ||
![]() |
a0ed531272 | ||
![]() |
b69e51fe9f | ||
![]() |
ee738e9f80 | ||
![]() |
07016fbf15 | ||
![]() |
8b1523c122 | ||
![]() |
22725d4d58 | ||
![]() |
ebb8e0a2af | ||
![]() |
aef4b7a279 |
11
App.vue
11
App.vue
@ -85,7 +85,11 @@
|
||||
index: 1,
|
||||
visible: false
|
||||
})
|
||||
// #ifdef H5
|
||||
uni.setTabBarItem({
|
||||
index: 4,
|
||||
visible: false
|
||||
})
|
||||
// #ifdef H5s
|
||||
uni.setTabBarItem({
|
||||
index: 2,
|
||||
visible: false
|
||||
@ -147,7 +151,6 @@
|
||||
// this.audioTeam.push(result.extras.type);
|
||||
// }
|
||||
}
|
||||
|
||||
console.log("收到消息")
|
||||
console.log(result)
|
||||
// 点击事件
|
||||
@ -157,6 +160,10 @@
|
||||
data.route = result.extras.route
|
||||
data.type = 2
|
||||
uniMP.loadAppletMP(data)
|
||||
} else if (result.extras.type == 3) {
|
||||
uni.switchTab({
|
||||
url: result.extras.route
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: result.extras.route
|
||||
|
87
api/supplier.js
Normal file
87
api/supplier.js
Normal file
@ -0,0 +1,87 @@
|
||||
import request from "@/utils/requestSupplier.js";
|
||||
//报价单列表
|
||||
export const bindCradApi = (data) => {
|
||||
return request.post('user/userbank/add_bank', data);
|
||||
}
|
||||
|
||||
//报价单提交
|
||||
export const bankListApi = (data) => {
|
||||
return request.get('bank/bank/lists', data);
|
||||
}
|
||||
export const amountAccountApi = (data) => {
|
||||
return request.get('user/UserWithdraw/amount_account', data);
|
||||
}
|
||||
|
||||
export const UserWithdrawApi = (data) => {
|
||||
return request.post('user/UserWithdraw/withdraw', data);
|
||||
}
|
||||
|
||||
export const UserWithdrawIndexApi = (data) => {
|
||||
return request.get('user/UserWithdraw/index', data);
|
||||
}
|
||||
|
||||
export const UserWithdrawListsApi = (data) => {
|
||||
return request.get('user/UserWithdraw/lists', data);
|
||||
}
|
||||
|
||||
export const OpurchaseGoodsOfferListApi = (data) => {
|
||||
return request.get('operation/OpurchaseGoodsOffer/list', data);
|
||||
}
|
||||
|
||||
export const OpurchaseGoodsOfferApi = (data) => {
|
||||
return request.post('operation/OpurchaseGoodsOffer/offer', data);
|
||||
}
|
||||
|
||||
export const aboutUsApi = (data) => {
|
||||
return request.post('operation/OpurchaseGoodsOffer/offer', data);
|
||||
}
|
||||
|
||||
|
||||
export const applysApi = (data) => {
|
||||
return request.post('shop/index/apply', data, {
|
||||
tokenName: 1
|
||||
});
|
||||
}
|
||||
|
||||
export const merchatTypeApi = (data) => {
|
||||
return request.get('shop/index/merchat_type', data, {
|
||||
tokenName: 1
|
||||
});
|
||||
}
|
||||
|
||||
export const getSTokenApi = (data) => {
|
||||
return request.get('shop/index/get_token', data, {
|
||||
tokenName: 1
|
||||
});
|
||||
}
|
||||
|
||||
export const getapplyRecordApi = (data) => {
|
||||
return request.get('shop/index/record', data, {
|
||||
tokenName: 1
|
||||
});
|
||||
}
|
||||
|
||||
export const reSubmitApi = (data) => {
|
||||
return request.get('shop/index/apply_detail', data, {
|
||||
tokenName: 1
|
||||
});
|
||||
}
|
||||
|
||||
export const UserWithdrawListsdate_listsApi = (data) => {
|
||||
return request.get('operation/OpurchaseGoodsOffer/date_lists', data);
|
||||
}
|
||||
|
||||
// 余额明细
|
||||
export const UserBlancelistsApi = (data) => {
|
||||
return request.get('financial/FinancialRecord/supplier_list', data);
|
||||
}
|
||||
|
||||
// 发货
|
||||
export const OpurchaseclassExpressApi = (data) => {
|
||||
return request.post('operation/Opurchaseclass/express', data);
|
||||
}
|
||||
|
||||
// 物流公司列表
|
||||
export const ExpressListApi = (data) => {
|
||||
return request.get('index/express_list', data);
|
||||
}
|
@ -132,8 +132,8 @@ export function phonelogin(data) {
|
||||
* 获取用户中心菜单
|
||||
*
|
||||
*/
|
||||
export function getMenuList() {
|
||||
return request.get("common/menus", {}, {
|
||||
export function getMenuList(data) {
|
||||
return request.get("common/menus", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
@ -3,17 +3,7 @@
|
||||
<view v-if="newData.status && newData.status.status" style="height: 100rpx;"></view>
|
||||
<view class="foot" v-if="newData.status && newData.status.status">
|
||||
<view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
|
||||
<view class="foot-item" v-for="(item,index) in newData.menuList" :key="index" @click="goRouter(item)">
|
||||
<block v-if="item.link == activeRouter">
|
||||
<image :src="item.imgList[0]"></image>
|
||||
<view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">{{item.name}}
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<image :src="item.imgList[1]"></image>
|
||||
<view class="txt" :style="{color:newData.txtColor.color[0].item}">{{item.name}}</view>
|
||||
</block>
|
||||
</view>
|
||||
sdafsdfsdfsdfsdfsdf,dsfsdfsdfsdf
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -13,27 +13,32 @@ let VUE_APP_WS_URL = `ws://${location.hostname}?type=user`
|
||||
|
||||
let openPlantGrass = '-openPlantGrass-'
|
||||
|
||||
let httpSix, httpApi;
|
||||
let httpSix, httpApi, httpTwo;
|
||||
|
||||
// const env = 'dev'; // 开发
|
||||
const env = 'dev'; // 开发
|
||||
// const env = 'prod'; // 生产
|
||||
const env = 'prew'; // 预上线
|
||||
// const env = 'prew'; // 预上线
|
||||
|
||||
switch (env) {
|
||||
case 'prod':
|
||||
httpApi = 'https://shop.lihaink.cn' // 生产
|
||||
httpSix = 'https://new-worker.lihaink.cn'
|
||||
httpTwo = 'https://erp.lihaink.cn'
|
||||
wsApi = 'wss://shop.lihaink.cn'
|
||||
break;
|
||||
case 'prew':
|
||||
httpApi = 'https://test.shop.lihaink.cn' //预发布环境
|
||||
httpSix = 'https://ceshi-new-wokr.lihaink.cn'
|
||||
// httpTwo = 'https://erp.lihaink.cn'
|
||||
httpTwo = 'http://192.168.1.22:8546'
|
||||
wsApi = 'wss://test.shop.lihaink.cn'
|
||||
break;
|
||||
default:
|
||||
httpApi = "https://crmeb-test.shop.lihaink.cn" // 测试
|
||||
httpSix = 'https://ceshi-new-wokr.lihaink.cn'
|
||||
// wsApi = 'ws://192.168.1.22:8324'
|
||||
// httpTwo = 'http://192.168.1.22:8546'
|
||||
// httpTwo = 'http://192.168.1.13:8546'
|
||||
httpTwo = 'https://erp.lihaink.cn'
|
||||
wsApi = 'wss://crmeb-test.shop.lihaink.cn'
|
||||
}
|
||||
|
||||
@ -59,6 +64,7 @@ module.exports = {
|
||||
VUE_APP_WS_URL: process.env.NODE_ENV == 'development' ? `${wsApi}?type=user` : VUE_APP_WS_URL,
|
||||
// #endif
|
||||
HTTP_REQUEST_URL_SIX: httpSix,
|
||||
HTTP_REQUEST_URL_TWO: httpTwo,
|
||||
openPlantGrass: openPlantGrass,
|
||||
ENV: env,
|
||||
HEADER: {
|
||||
|
@ -10,9 +10,10 @@
|
||||
module.exports = {
|
||||
//token
|
||||
LOGIN_STATUS: 'LOGIN_STATUS_TOKEN',
|
||||
UUID:'UUID',
|
||||
LOGIN_STATUS_S: 'LOGIN_STATUS_STOKEN',
|
||||
UUID: 'UUID',
|
||||
// uid
|
||||
UID:'UID',
|
||||
UID: 'UID',
|
||||
//<2F>û<EFBFBD>
|
||||
USER_INFO: 'USER_INFO',
|
||||
//token<65><6E><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
||||
@ -39,4 +40,4 @@ module.exports = {
|
||||
CACHE_LONGITUDE: 'LONGITUDE',
|
||||
//缓存纬度
|
||||
CACHE_LATITUDE: 'LATITUDE',
|
||||
}
|
||||
}
|
@ -18,6 +18,7 @@ import auth from './wechat';
|
||||
|
||||
import {
|
||||
LOGIN_STATUS,
|
||||
LOGIN_STATUS_S,
|
||||
USER_INFO,
|
||||
EXPIRES_TIME,
|
||||
STATE_R_KEY
|
||||
@ -48,10 +49,10 @@ export function toLogin(push, pathLogin) {
|
||||
// #endif
|
||||
if (!pathLogin)
|
||||
pathLogin = '/page/users/login/login_copy'
|
||||
Cache.set('login_back_url', path);
|
||||
Cache.set('login_back_url', path);
|
||||
// #ifdef H5
|
||||
if (isWeixin()) {
|
||||
auth.oAuth();
|
||||
auth.oAuth();
|
||||
// if (Cache.get('WECHAT_APPID')) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/users/wechat_login/index',
|
||||
@ -89,6 +90,7 @@ export function checkLogin() {
|
||||
let newTime = Math.round(new Date() / 1000);
|
||||
if (expiresTime < newTime || !token) {
|
||||
Cache.clear(LOGIN_STATUS);
|
||||
Cache.clear(LOGIN_STATUS_S);
|
||||
Cache.clear(EXPIRES_TIME);
|
||||
Cache.clear(USER_INFO);
|
||||
Cache.clear(STATE_R_KEY);
|
||||
|
187
libs/routine.js
187
libs/routine.js
@ -8,96 +8,109 @@
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import store from '../store';
|
||||
import { checkLogin } from './login';
|
||||
import { login } from '../api/public';
|
||||
import {
|
||||
checkLogin
|
||||
} from './login';
|
||||
import {
|
||||
login
|
||||
} from '../api/public';
|
||||
import Cache from '../utils/cache';
|
||||
import { STATE_R_KEY, USER_INFO, EXPIRES_TIME, LOGIN_STATUS} from './../config/cache';
|
||||
import {
|
||||
STATE_R_KEY,
|
||||
USER_INFO,
|
||||
EXPIRES_TIME,
|
||||
LOGIN_STATUS,
|
||||
LOGIN_STATUS_S
|
||||
} from './../config/cache';
|
||||
|
||||
class Routine
|
||||
{
|
||||
|
||||
constructor()
|
||||
{
|
||||
this.scopeUserInfo = 'scope.userInfo';
|
||||
class Routine {
|
||||
|
||||
constructor() {
|
||||
this.scopeUserInfo = 'scope.userInfo';
|
||||
}
|
||||
|
||||
async getUserCode(){
|
||||
let isAuth = await this.isAuth(), code = '' ;
|
||||
if(isAuth)
|
||||
|
||||
async getUserCode() {
|
||||
let isAuth = await this.isAuth(),
|
||||
code = '';
|
||||
if (isAuth)
|
||||
code = await this.getCode();
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
getUserInfo(){
|
||||
let that = this , code = this.getUserCode();
|
||||
return new Promise( (resolve,reject) => {
|
||||
getUserInfo() {
|
||||
let that = this,
|
||||
code = this.getUserCode();
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.getUserInfo({
|
||||
lang: 'zh_CN',
|
||||
success(user) {
|
||||
if(code) user.code = code;
|
||||
resolve({userInfo:user,islogin:false});
|
||||
if (code) user.code = code;
|
||||
resolve({
|
||||
userInfo: user,
|
||||
islogin: false
|
||||
});
|
||||
},
|
||||
fail(res){
|
||||
fail(res) {
|
||||
reject(res);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
authorize()
|
||||
{
|
||||
authorize() {
|
||||
let c2543fff3bfa6f144c2f06a7de6cd10c0b650cae = this;
|
||||
return new Promise((resolve,reject)=>{
|
||||
if(checkLogin())
|
||||
return new Promise((resolve, reject) => {
|
||||
if (checkLogin())
|
||||
return resolve({
|
||||
userInfo:Cache.get(USER_INFO,true),
|
||||
islogin:true,
|
||||
userInfo: Cache.get(USER_INFO, true),
|
||||
islogin: true,
|
||||
});
|
||||
uni.authorize({
|
||||
scope: c2543fff3bfa6f144c2f06a7de6cd10c0b650cae.scopeUserInfo,
|
||||
success() {
|
||||
resolve({islogin:false});
|
||||
},
|
||||
fail(res){
|
||||
scope: c2543fff3bfa6f144c2f06a7de6cd10c0b650cae.scopeUserInfo,
|
||||
success() {
|
||||
resolve({
|
||||
islogin: false
|
||||
});
|
||||
},
|
||||
fail(res) {
|
||||
reject(res);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
async getCode(){
|
||||
|
||||
async getCode() {
|
||||
let backUrlCRshlcICwGdGY = await this.getProvider();
|
||||
return new Promise((resolve,reject)=>{
|
||||
if(Cache.has(STATE_R_KEY)){
|
||||
return new Promise((resolve, reject) => {
|
||||
if (Cache.has(STATE_R_KEY)) {
|
||||
return resolve(Cache.get(STATE_R_KEY));
|
||||
}
|
||||
uni.login({
|
||||
provider:backUrlCRshlcICwGdGY,
|
||||
provider: backUrlCRshlcICwGdGY,
|
||||
success(res) {
|
||||
if (res.code) Cache.set(STATE_R_KEY, res.code ,10);
|
||||
if (res.code) Cache.set(STATE_R_KEY, res.code, 10);
|
||||
return resolve(res.code);
|
||||
},
|
||||
fail(){
|
||||
fail() {
|
||||
return reject(null);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取服务供应商
|
||||
*/
|
||||
getProvider()
|
||||
{
|
||||
return new Promise((resolve,reject)=>{
|
||||
getProvider() {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.getProvider({
|
||||
service:'oauth',
|
||||
service: 'oauth',
|
||||
success(res) {
|
||||
resolve(res.provider);
|
||||
},
|
||||
@ -107,13 +120,13 @@ class Routine
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 是否授权
|
||||
*/
|
||||
isAuth(){
|
||||
isAuth() {
|
||||
let that = this;
|
||||
return new Promise((resolve,reject)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.getSetting({
|
||||
success(res) {
|
||||
if (!res.authSetting[that.scopeUserInfo]) {
|
||||
@ -122,8 +135,8 @@ class Routine
|
||||
resolve(true);
|
||||
}
|
||||
},
|
||||
fail(){
|
||||
resolve(false);
|
||||
fail() {
|
||||
resolve(false);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -147,48 +160,50 @@ class Routine
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 小程序比较版本信息
|
||||
* @param v1 当前版本
|
||||
* @param v2 进行比较的版本
|
||||
* @return boolen
|
||||
*
|
||||
*/
|
||||
compareVersion(v1, v2) {
|
||||
v1 = v1.split('.')
|
||||
v2 = v2.split('.')
|
||||
const len = Math.max(v1.length, v2.length)
|
||||
|
||||
while (v1.length < len) {
|
||||
v1.push('0')
|
||||
}
|
||||
while (v2.length < len) {
|
||||
v2.push('0')
|
||||
}
|
||||
|
||||
for (let i = 0; i < len; i++) {
|
||||
const num1 = parseInt(v1[i])
|
||||
const num2 = parseInt(v2[i])
|
||||
|
||||
if (num1 > num2) {
|
||||
return 1
|
||||
} else if (num1 < num2) {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
return 0
|
||||
* 小程序比较版本信息
|
||||
* @param v1 当前版本
|
||||
* @param v2 进行比较的版本
|
||||
* @return boolen
|
||||
*
|
||||
*/
|
||||
compareVersion(v1, v2) {
|
||||
v1 = v1.split('.')
|
||||
v2 = v2.split('.')
|
||||
const len = Math.max(v1.length, v2.length)
|
||||
|
||||
while (v1.length < len) {
|
||||
v1.push('0')
|
||||
}
|
||||
authUserInfo(data)
|
||||
{
|
||||
return new Promise((resolve, reject)=>{
|
||||
login(data).then(res=>{
|
||||
while (v2.length < len) {
|
||||
v2.push('0')
|
||||
}
|
||||
|
||||
for (let i = 0; i < len; i++) {
|
||||
const num1 = parseInt(v1[i])
|
||||
const num2 = parseInt(v2[i])
|
||||
|
||||
if (num1 > num2) {
|
||||
return 1
|
||||
} else if (num1 < num2) {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
authUserInfo(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
login(data).then(res => {
|
||||
let time = res.data.expires_time - Cache.time();
|
||||
store.commit('UPDATE_USERINFO', res.data.user);
|
||||
store.commit('LOGIN', {token:res.data.token, time:time});
|
||||
store.commit('LOGIN', {
|
||||
token: res.data.token,
|
||||
time: time
|
||||
});
|
||||
store.commit('SETUID', res.data.user.uid);
|
||||
Cache.set(EXPIRES_TIME,res.data.expires_time,time);
|
||||
Cache.set(USER_INFO,res.data.userInfo,time);
|
||||
Cache.set(EXPIRES_TIME, res.data.expires_time, time);
|
||||
Cache.set(USER_INFO, res.data.userInfo, time);
|
||||
return resolve(res);
|
||||
}).catch(res=>{
|
||||
}).catch(res => {
|
||||
return reject(res);
|
||||
})
|
||||
})
|
||||
|
702
manifest.json
702
manifest.json
@ -1,353 +1,353 @@
|
||||
{
|
||||
"name": "惠农生活",
|
||||
"appid": "__UNI__3A527D1",
|
||||
"description": "",
|
||||
"versionName": "2.0.53",
|
||||
"versionCode": 2053,
|
||||
"transformPx": false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus": {
|
||||
"titleNView": true,
|
||||
"usingComponents": true,
|
||||
"nvueCompiler": "uni-app",
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"compatible": {
|
||||
"ignoreVersion": true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
||||
},
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": false,
|
||||
"waiting": false,
|
||||
"autoclose": true,
|
||||
"delay": 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules": {
|
||||
"VideoPlayer": {},
|
||||
"OAuth": {},
|
||||
"Payment": {},
|
||||
"Share": {},
|
||||
"iBeacon": {},
|
||||
"Maps": {},
|
||||
"Geolocation": {},
|
||||
"UniMP": {
|
||||
"description": "uni小程序"
|
||||
},
|
||||
"Push": {},
|
||||
"Barcode": {},
|
||||
"Camera": {}
|
||||
},
|
||||
"safearea": {
|
||||
"bottom": {
|
||||
"offset": "none"
|
||||
}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute": {
|
||||
/* android打包配置 */
|
||||
"android": {
|
||||
"permissions": [
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.BATTERY_STATS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"
|
||||
],
|
||||
"abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
|
||||
"permissionExternalStorage": {
|
||||
"request": "none",
|
||||
"prompt": "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
|
||||
},
|
||||
"permissionPhoneState": {
|
||||
"request": "none" //拨打电话权限关闭
|
||||
},
|
||||
"minSdkVersion": 23,
|
||||
"targetSdkVersion": 30
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios": {
|
||||
"privacyDescription": {
|
||||
"NSPhotoLibraryUsageDescription": "上传用户头像保存分享海报",
|
||||
"NSPhotoLibraryAddUsageDescription": "上传用户头像保存分享海报",
|
||||
"NSCameraUsageDescription": "上传用户头像保存分享海报",
|
||||
"NSLocationWhenInUseUsageDescription": "根据客户地理位置推荐最近门店",
|
||||
"NSLocationAlwaysUsageDescription": "根据客户地理位置推荐最近门店"
|
||||
},
|
||||
"idfa": false,
|
||||
"dSYMs": false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs": {
|
||||
"maps": {
|
||||
"amap": {
|
||||
"appkey_ios": "0a3202688624938fd5d2f37b52c30d5d",
|
||||
"appkey_android": "0354f5ddc11e2ea76c5aac647f44d945",
|
||||
"name": "amapIvoVHpJR"
|
||||
}
|
||||
},
|
||||
"payment": {
|
||||
"weixin": {
|
||||
"__platform__": ["ios", "android"],
|
||||
"appid": "wx2e8f79ff281284f5",
|
||||
"UniversalLinks": "https://shop.lihaink.cn/"
|
||||
}
|
||||
},
|
||||
"share": {
|
||||
"weixin": {
|
||||
"appid": "wx2e8f79ff281284f5",
|
||||
"UniversalLinks": "https://shop.lihaink.cn/"
|
||||
}
|
||||
},
|
||||
"geolocation": {
|
||||
"amap": {
|
||||
"name": "amapIvoVHpJR",
|
||||
"__platform__": ["ios", "android"],
|
||||
"appkey_ios": "0a3202688624938fd5d2f37b52c30d5d",
|
||||
"appkey_android": "0354f5ddc11e2ea76c5aac647f44d945"
|
||||
}
|
||||
},
|
||||
"push": {},
|
||||
"oauth": {
|
||||
"weixin": {
|
||||
"appid": "wx2e8f79ff281284f5",
|
||||
"UniversalLinks": "https://shop.lihaink.cn/"
|
||||
},
|
||||
"univerify": {}
|
||||
},
|
||||
"ad": {}
|
||||
},
|
||||
"icons": {
|
||||
"android": {
|
||||
"hdpi": "unpackage/res/icons/72x72.png",
|
||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios": {
|
||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
||||
"ipad": {
|
||||
"app": "unpackage/res/icons/76x76.png",
|
||||
"app@2x": "unpackage/res/icons/152x152.png",
|
||||
"notification": "unpackage/res/icons/20x20.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
||||
"settings": "unpackage/res/icons/29x29.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"spotlight": "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone": {
|
||||
"app@2x": "unpackage/res/icons/120x120.png",
|
||||
"app@3x": "unpackage/res/icons/180x180.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"splashscreen": {
|
||||
"useOriginalMsgbox": true,
|
||||
"androidStyle": "common"
|
||||
}
|
||||
},
|
||||
"nativePlugins": {
|
||||
"JG-JCore": {
|
||||
"JPUSH_APPKEY_IOS": "8a5efd65cda14fafa6e64ad3",
|
||||
"JPUSH_CHANNEL_IOS": "8a5efd65cda14fafa6e64ad3",
|
||||
"JPUSH_APPKEY_ANDROID": "b5f679f4357018605ea6fd2e",
|
||||
"JPUSH_CHANNEL_ANDROID": "",
|
||||
"__plugin_info__": {
|
||||
"name": "JG-JCore",
|
||||
"description": "极光推送JCore插件",
|
||||
"platforms": "Android,iOS",
|
||||
"url": "",
|
||||
"android_package_name": "uni.UNI3A527D1",
|
||||
"ios_bundle_id": "",
|
||||
"isCloud": false,
|
||||
"bought": -1,
|
||||
"pid": "",
|
||||
"parameters": {
|
||||
"JPUSH_APPKEY_IOS": {
|
||||
"des": "[iOS]极光portal配置应用信息时分配的AppKey",
|
||||
"key": "JCore:APP_KEY",
|
||||
"value": "daebe19b547c43128796a078"
|
||||
},
|
||||
"JPUSH_CHANNEL_IOS": {
|
||||
"des": "[iOS]用于统计分发渠道,不需要可填默认值developer-default",
|
||||
"key": "JCore:CHANNEL",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_APPKEY_ANDROID": {
|
||||
"des": "[Android]极光portal配置应用信息时分配的AppKey",
|
||||
"key": "JPUSH_APPKEY",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_CHANNEL_ANDROID": {
|
||||
"des": "[Android]用于统计分发渠道,不需要可填默认值developer-default",
|
||||
"key": "JPUSH_CHANNEL",
|
||||
"value": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"JG-JPush": {
|
||||
"JPUSH_ISPRODUCTION_IOS": "true",
|
||||
"JPUSH_ADVERTISINGID_IOS": "",
|
||||
"JPUSH_DEFAULTINITJPUSH_IOS": "true",
|
||||
"JPUSH_OPPO_APPKEY": "",
|
||||
"JPUSH_OPPO_APPID": "",
|
||||
"JPUSH_OPPO_APPSECRET": "",
|
||||
"JPUSH_VIVO_APPKEY": "",
|
||||
"JPUSH_VIVO_APPID": "",
|
||||
"JPUSH_MEIZU_APPKEY": "",
|
||||
"JPUSH_MEIZU_APPID": "",
|
||||
"JPUSH_XIAOMI_APPKEY": "",
|
||||
"JPUSH_XIAOMI_APPID": "",
|
||||
"__plugin_info__": {
|
||||
"name": "JG-JPush",
|
||||
"description": "极光推送Hbuilder插件",
|
||||
"platforms": "Android,iOS",
|
||||
"url": "",
|
||||
"android_package_name": "uni.UNI3A527D1",
|
||||
"ios_bundle_id": "",
|
||||
"isCloud": false,
|
||||
"bought": -1,
|
||||
"pid": "",
|
||||
"parameters": {
|
||||
"JPUSH_ISPRODUCTION_IOS": {
|
||||
"des": "[iOS]是否是生产环境,是填true,不是填false或者不填",
|
||||
"key": "JPush:ISPRODUCTION",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_ADVERTISINGID_IOS": {
|
||||
"des": "[iOS]广告标识符(IDFA)如果不需要使用IDFA,可不填",
|
||||
"key": "JPush:ADVERTISINGID",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_DEFAULTINITJPUSH_IOS": {
|
||||
"des": "[iOS]是否默认初始化,是填true,不是填false或者不填",
|
||||
"key": "JPush:DEFAULTINITJPUSH",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_OPPO_APPKEY": {
|
||||
"des": "厂商OPPO-appkey,示例:OP-12345678",
|
||||
"key": "OPPO_APPKEY",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_OPPO_APPID": {
|
||||
"des": "厂商OPPO-appId,示例:OP-12345678",
|
||||
"key": "OPPO_APPID",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_OPPO_APPSECRET": {
|
||||
"des": "厂商OPPO-appSecret,示例:OP-12345678",
|
||||
"key": "OPPO_APPSECRET",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_VIVO_APPKEY": {
|
||||
"des": "厂商VIVO-appkey,示例:12345678",
|
||||
"key": "com.vivo.push.api_key",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_VIVO_APPID": {
|
||||
"des": "厂商VIVO-appId,示例:12345678",
|
||||
"key": "com.vivo.push.app_id",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_MEIZU_APPKEY": {
|
||||
"des": "厂商MEIZU-appKey,示例:MZ-12345678",
|
||||
"key": "MEIZU_APPKEY",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_MEIZU_APPID": {
|
||||
"des": "厂商MEIZU-appId,示例:MZ-12345678",
|
||||
"key": "MEIZU_APPID",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_XIAOMI_APPKEY": {
|
||||
"des": "厂商XIAOMI-appKey,示例:MI-12345678",
|
||||
"key": "XIAOMI_APPKEY",
|
||||
"value": ""
|
||||
},
|
||||
"JPUSH_XIAOMI_APPID": {
|
||||
"des": "厂商XIAOMI-appId,示例:MI-12345678",
|
||||
"key": "XIAOMI_APPID",
|
||||
"value": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp": {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin": {
|
||||
"appid": "wx5fb1cc8edb3f8baa",
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"minified": true,
|
||||
"postcss": true,
|
||||
"es6": true
|
||||
},
|
||||
"permission": {
|
||||
"scope.userLocation": {
|
||||
"desc": "获取您的位置"
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos": ["getLocation", "chooseAddress"],
|
||||
"usingComponents": true,
|
||||
"__usePrivacyCheck__": true
|
||||
},
|
||||
"mp-alipay": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-baidu": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-toutiao": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"h5": {
|
||||
"devServer": {
|
||||
"https": false
|
||||
},
|
||||
"router": {
|
||||
"mode": "history",
|
||||
"base": ""
|
||||
},
|
||||
"domain": "",
|
||||
"sdkConfigs": {
|
||||
"maps": {
|
||||
"qqmap": {
|
||||
"key": "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7"
|
||||
}
|
||||
}
|
||||
},
|
||||
"title": "加载中...",
|
||||
"template": "template.h5.html",
|
||||
"optimization": {
|
||||
"treeShaking": {
|
||||
"enable": true
|
||||
}
|
||||
}
|
||||
}
|
||||
"name" : "惠农生活",
|
||||
"appid" : "__UNI__3A527D1",
|
||||
"description" : "",
|
||||
"versionName" : "2.0.58",
|
||||
"versionCode" : 2058,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"titleNView" : true,
|
||||
"usingComponents" : true,
|
||||
"nvueCompiler" : "uni-app",
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"compatible" : {
|
||||
"ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
||||
},
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : false,
|
||||
"waiting" : false,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {
|
||||
"VideoPlayer" : {},
|
||||
"OAuth" : {},
|
||||
"Payment" : {},
|
||||
"Share" : {},
|
||||
"iBeacon" : {},
|
||||
"Maps" : {},
|
||||
"Geolocation" : {},
|
||||
"UniMP" : {
|
||||
"description" : "uni小程序"
|
||||
},
|
||||
"Push" : {},
|
||||
"Barcode" : {},
|
||||
"Camera" : {}
|
||||
},
|
||||
"safearea" : {
|
||||
"bottom" : {
|
||||
"offset" : "none"
|
||||
}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.BATTERY_STATS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"
|
||||
],
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
||||
"permissionExternalStorage" : {
|
||||
"request" : "none",
|
||||
"prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
|
||||
},
|
||||
"permissionPhoneState" : {
|
||||
"request" : "none" //拨打电话权限关闭
|
||||
},
|
||||
"minSdkVersion" : 23,
|
||||
"targetSdkVersion" : 30
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
"privacyDescription" : {
|
||||
"NSPhotoLibraryUsageDescription" : "上传用户头像保存分享海报",
|
||||
"NSPhotoLibraryAddUsageDescription" : "上传用户头像保存分享海报",
|
||||
"NSCameraUsageDescription" : "上传用户头像保存分享海报",
|
||||
"NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店",
|
||||
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店"
|
||||
},
|
||||
"idfa" : false,
|
||||
"dSYMs" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"amap" : {
|
||||
"appkey_ios" : "0a3202688624938fd5d2f37b52c30d5d",
|
||||
"appkey_android" : "0354f5ddc11e2ea76c5aac647f44d945",
|
||||
"name" : "amapIvoVHpJR"
|
||||
}
|
||||
},
|
||||
"payment" : {
|
||||
"weixin" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appid" : "wx2e8f79ff281284f5",
|
||||
"UniversalLinks" : "https://shop.lihaink.cn/"
|
||||
}
|
||||
},
|
||||
"share" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx2e8f79ff281284f5",
|
||||
"UniversalLinks" : "https://shop.lihaink.cn/"
|
||||
}
|
||||
},
|
||||
"geolocation" : {
|
||||
"amap" : {
|
||||
"name" : "amapIvoVHpJR",
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appkey_ios" : "0a3202688624938fd5d2f37b52c30d5d",
|
||||
"appkey_android" : "0354f5ddc11e2ea76c5aac647f44d945"
|
||||
}
|
||||
},
|
||||
"push" : {},
|
||||
"oauth" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx2e8f79ff281284f5",
|
||||
"UniversalLinks" : "https://shop.lihaink.cn/"
|
||||
},
|
||||
"univerify" : {}
|
||||
},
|
||||
"ad" : {}
|
||||
},
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios" : {
|
||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||
"ipad" : {
|
||||
"app" : "unpackage/res/icons/76x76.png",
|
||||
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||
"notification" : "unpackage/res/icons/20x20.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||
"settings" : "unpackage/res/icons/29x29.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone" : {
|
||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
"splashscreen" : {
|
||||
"useOriginalMsgbox" : true,
|
||||
"androidStyle" : "common"
|
||||
}
|
||||
},
|
||||
"nativePlugins" : {
|
||||
"JG-JCore" : {
|
||||
"JPUSH_APPKEY_IOS" : "8a5efd65cda14fafa6e64ad3",
|
||||
"JPUSH_CHANNEL_IOS" : "8a5efd65cda14fafa6e64ad3",
|
||||
"JPUSH_APPKEY_ANDROID" : "b5f679f4357018605ea6fd2e",
|
||||
"JPUSH_CHANNEL_ANDROID" : "",
|
||||
"__plugin_info__" : {
|
||||
"name" : "JG-JCore",
|
||||
"description" : "极光推送JCore插件",
|
||||
"platforms" : "Android,iOS",
|
||||
"url" : "",
|
||||
"android_package_name" : "uni.UNI3A527D1",
|
||||
"ios_bundle_id" : "",
|
||||
"isCloud" : false,
|
||||
"bought" : -1,
|
||||
"pid" : "",
|
||||
"parameters" : {
|
||||
"JPUSH_APPKEY_IOS" : {
|
||||
"des" : "[iOS]极光portal配置应用信息时分配的AppKey",
|
||||
"key" : "JCore:APP_KEY",
|
||||
"value" : "daebe19b547c43128796a078"
|
||||
},
|
||||
"JPUSH_CHANNEL_IOS" : {
|
||||
"des" : "[iOS]用于统计分发渠道,不需要可填默认值developer-default",
|
||||
"key" : "JCore:CHANNEL",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_APPKEY_ANDROID" : {
|
||||
"des" : "[Android]极光portal配置应用信息时分配的AppKey",
|
||||
"key" : "JPUSH_APPKEY",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_CHANNEL_ANDROID" : {
|
||||
"des" : "[Android]用于统计分发渠道,不需要可填默认值developer-default",
|
||||
"key" : "JPUSH_CHANNEL",
|
||||
"value" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"JG-JPush" : {
|
||||
"JPUSH_ISPRODUCTION_IOS" : "true",
|
||||
"JPUSH_ADVERTISINGID_IOS" : "",
|
||||
"JPUSH_DEFAULTINITJPUSH_IOS" : "true",
|
||||
"JPUSH_OPPO_APPKEY" : "",
|
||||
"JPUSH_OPPO_APPID" : "",
|
||||
"JPUSH_OPPO_APPSECRET" : "",
|
||||
"JPUSH_VIVO_APPKEY" : "",
|
||||
"JPUSH_VIVO_APPID" : "",
|
||||
"JPUSH_MEIZU_APPKEY" : "",
|
||||
"JPUSH_MEIZU_APPID" : "",
|
||||
"JPUSH_XIAOMI_APPKEY" : "",
|
||||
"JPUSH_XIAOMI_APPID" : "",
|
||||
"__plugin_info__" : {
|
||||
"name" : "JG-JPush",
|
||||
"description" : "极光推送Hbuilder插件",
|
||||
"platforms" : "Android,iOS",
|
||||
"url" : "",
|
||||
"android_package_name" : "uni.UNI3A527D1",
|
||||
"ios_bundle_id" : "",
|
||||
"isCloud" : false,
|
||||
"bought" : -1,
|
||||
"pid" : "",
|
||||
"parameters" : {
|
||||
"JPUSH_ISPRODUCTION_IOS" : {
|
||||
"des" : "[iOS]是否是生产环境,是填true,不是填false或者不填",
|
||||
"key" : "JPush:ISPRODUCTION",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_ADVERTISINGID_IOS" : {
|
||||
"des" : "[iOS]广告标识符(IDFA)如果不需要使用IDFA,可不填",
|
||||
"key" : "JPush:ADVERTISINGID",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_DEFAULTINITJPUSH_IOS" : {
|
||||
"des" : "[iOS]是否默认初始化,是填true,不是填false或者不填",
|
||||
"key" : "JPush:DEFAULTINITJPUSH",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_OPPO_APPKEY" : {
|
||||
"des" : "厂商OPPO-appkey,示例:OP-12345678",
|
||||
"key" : "OPPO_APPKEY",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_OPPO_APPID" : {
|
||||
"des" : "厂商OPPO-appId,示例:OP-12345678",
|
||||
"key" : "OPPO_APPID",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_OPPO_APPSECRET" : {
|
||||
"des" : "厂商OPPO-appSecret,示例:OP-12345678",
|
||||
"key" : "OPPO_APPSECRET",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_VIVO_APPKEY" : {
|
||||
"des" : "厂商VIVO-appkey,示例:12345678",
|
||||
"key" : "com.vivo.push.api_key",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_VIVO_APPID" : {
|
||||
"des" : "厂商VIVO-appId,示例:12345678",
|
||||
"key" : "com.vivo.push.app_id",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_MEIZU_APPKEY" : {
|
||||
"des" : "厂商MEIZU-appKey,示例:MZ-12345678",
|
||||
"key" : "MEIZU_APPKEY",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_MEIZU_APPID" : {
|
||||
"des" : "厂商MEIZU-appId,示例:MZ-12345678",
|
||||
"key" : "MEIZU_APPID",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_XIAOMI_APPKEY" : {
|
||||
"des" : "厂商XIAOMI-appKey,示例:MI-12345678",
|
||||
"key" : "XIAOMI_APPKEY",
|
||||
"value" : ""
|
||||
},
|
||||
"JPUSH_XIAOMI_APPID" : {
|
||||
"des" : "厂商XIAOMI-appId,示例:MI-12345678",
|
||||
"key" : "XIAOMI_APPID",
|
||||
"value" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx5fb1cc8edb3f8baa",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"minified" : true,
|
||||
"postcss" : true,
|
||||
"es6" : true
|
||||
},
|
||||
"permission" : {
|
||||
"scope.userLocation" : {
|
||||
"desc" : "获取您的位置"
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos" : [ "getLocation", "chooseAddress" ],
|
||||
"usingComponents" : true,
|
||||
"__usePrivacyCheck__" : true
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"h5" : {
|
||||
"devServer" : {
|
||||
"https" : false
|
||||
},
|
||||
"router" : {
|
||||
"mode" : "history",
|
||||
"base" : ""
|
||||
},
|
||||
"domain" : "",
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"qqmap" : {
|
||||
"key" : "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7"
|
||||
}
|
||||
}
|
||||
},
|
||||
"title" : "加载中...",
|
||||
"template" : "template.h5.html",
|
||||
"optimization" : {
|
||||
"treeShaking" : {
|
||||
"enable" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
142
pages.json
142
pages.json
@ -43,6 +43,30 @@
|
||||
"height": "1000px",
|
||||
"background": "rgba(0,0,0,0.2)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "supplier", // 唯一标识
|
||||
"path": "pages/index/subnvue/supplier", // 页面路径
|
||||
"type": "popup",
|
||||
"style": {
|
||||
"position": "absolute",
|
||||
"dock": "right",
|
||||
"width": "750rpx",
|
||||
"height": "1000px",
|
||||
"background": "rgba(0,0,0,0.2)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "distr", // 唯一标识
|
||||
"path": "pages/index/subnvue/distr", // 页面路径
|
||||
"type": "popup",
|
||||
"style": {
|
||||
"position": "absolute",
|
||||
"dock": "right",
|
||||
"width": "750rpx",
|
||||
"height": "1000px",
|
||||
"background": "rgba(0,0,0,0.2)"
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
@ -55,7 +79,65 @@
|
||||
"navigationBarTitleText": "批发",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/quote/list",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "报价订单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/quote/index",
|
||||
"style": {
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarTitleText": "报价订单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/quote/supplierFinancialy",
|
||||
"style": {
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarTitleText": "提现"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/quote/financialyDeatil",
|
||||
"style": {
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarTitleText": "提现明细"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/quote/balanceDetail",
|
||||
"style": {
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarTitleText": "余额明细"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/quote/bindAccout",
|
||||
"style": {
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarTitleText": "账户绑定"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/bindSupplier/index",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "供应商入驻"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/bindDistribution/index",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "经销商入驻"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/gather/gather",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
@ -99,17 +181,42 @@
|
||||
"app-plus": {
|
||||
"scrollIndicator": false, //禁用原生导航栏
|
||||
"subNVues": [{
|
||||
"id": "userSubnvu", // 唯一标识
|
||||
"path": "pages/user/subnvue/index", // 页面路径
|
||||
"type": "popup",
|
||||
"style": {
|
||||
"position": "absolute",
|
||||
"dock": "right",
|
||||
"width": "750rpx",
|
||||
"height": "1500rpx",
|
||||
"background": "rgba(0,0,0,0.2)"
|
||||
"id": "userSubnvu", // 唯一标识
|
||||
"path": "pages/user/subnvue/index", // 页面路径
|
||||
"type": "popup",
|
||||
"style": {
|
||||
"position": "absolute",
|
||||
"dock": "right",
|
||||
"width": "750rpx",
|
||||
"height": "1500rpx",
|
||||
"background": "rgba(0,0,0,0.2)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "userNewSupplier", // 唯一标识
|
||||
"path": "pages/user/subnvue/userNewSupplier", // 页面路径
|
||||
"type": "popup",
|
||||
"style": {
|
||||
"position": "absolute",
|
||||
"dock": "right",
|
||||
"width": "750rpx",
|
||||
"height": "1500rpx",
|
||||
"background": "rgba(0,0,0,0.2)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "userDistr", // 唯一标识
|
||||
"path": "pages/user/subnvue/userDistr", // 页面路径
|
||||
"type": "popup",
|
||||
"style": {
|
||||
"position": "absolute",
|
||||
"dock": "right",
|
||||
"width": "750rpx",
|
||||
"height": "1500rpx",
|
||||
"background": "rgba(0,0,0,0.2)"
|
||||
}
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1612,12 +1719,6 @@
|
||||
"selectedIconPath": "static/tabbar_icon/b-a.png",
|
||||
"text": "批发"
|
||||
},
|
||||
// {
|
||||
// "pagePath": "pages/plant_grass/index",
|
||||
// "iconPath": "static/tabbar_icon/b.png",
|
||||
// "selectedIconPath": "static/tabbar_icon/b-a.png",
|
||||
// "text": "逛逛"
|
||||
// },
|
||||
{
|
||||
"pagePath": "pages/gather/gather",
|
||||
"iconPath": "static/tabbar_icon/c.png",
|
||||
@ -1630,6 +1731,13 @@
|
||||
"selectedIconPath": "static/tabbar_icon/d-a.png",
|
||||
"text": "购物车"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/quote/list",
|
||||
"iconPath": "static/tabbar_icon/bjd.png",
|
||||
"selectedIconPath": "static/tabbar_icon/bjdact.png",
|
||||
"text": "报价"
|
||||
},
|
||||
|
||||
{
|
||||
"pagePath": "pages/user/index",
|
||||
"iconPath": "static/tabbar_icon/e.png",
|
||||
|
1277
pages/bindDistribution/index.vue
Normal file
1277
pages/bindDistribution/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
1277
pages/bindSupplier/index.vue
Normal file
1277
pages/bindSupplier/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
228
pages/bindSupplier/record.vue
Normal file
228
pages/bindSupplier/record.vue
Normal file
@ -0,0 +1,228 @@
|
||||
<template>
|
||||
<view style="padding: 42rpx 50rpx;">
|
||||
|
||||
<view class="card" v-for="item in listData" :key="item.mer_intention_id">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<view class="ciecle"
|
||||
style="width: 24rpx;height: 24rpx;border-radius: 24rpx;border: 1px solid #DDDDDD;margin-right: 30rpx;">
|
||||
</view>
|
||||
<view class="" style="color: #777777;font-size: 24rpx;">
|
||||
{{item.create_time}}
|
||||
</view>
|
||||
</view>
|
||||
<view class=""
|
||||
style="padding:40rpx;margin: 30rpx 0; width: 606rpx;margin-left: 30rpx;border-radius: 16rpx;box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0,0,0,0.16);">
|
||||
<view class="" v-if="item.status==0" style="color: #20B128;font-size: 32rpx;">
|
||||
待审核
|
||||
</view>
|
||||
|
||||
<view class="" v-if="item.status==1" style="color: #20B128;font-size: 32rpx;">
|
||||
审核通过
|
||||
</view>
|
||||
<view class="" v-if="item.status==2"
|
||||
style="color: #FC452F;font-size: 32rpx;display: flex;justify-content: space-between;">
|
||||
审核失败
|
||||
<view style="color: #20B128;" @click="navgo">
|
||||
重新申请
|
||||
</view>
|
||||
</view>
|
||||
<u-line style="margin: 28rpx 0;"></u-line>
|
||||
<view class="" style="margin-bottom: 20rpx;">
|
||||
{{item.mer_name}}
|
||||
</view>
|
||||
<view class="" v-if="item.status==1" style="font-size: 24rpx; color: #777777;">
|
||||
可以登录我们的工作台,把您的商品推向市场了
|
||||
</view>
|
||||
<view class="" v-if='item.status==2' style="font-size: 24rpx; color: #777777;">
|
||||
备注:{{item.fail_msg}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<u-button v-if="showBtn" @click="openApplet" color="#3ABD40" shape="circle" text="立即发布产品"></u-button>
|
||||
|
||||
|
||||
<view class="application-record" v-if="listData.length">
|
||||
<!-- <view class="card-list" v-for="item in listData" :key="item.mer_intention_id">
|
||||
<view class="card-top">
|
||||
<view class="title">{{item.mer_name}}</view>
|
||||
<view class="time">提交时间:{{item.create_time}}</view>
|
||||
<view v-if="item.fail_msg" class="reason">原因:{{item.fail_msg}}</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="card-bottom">
|
||||
<view class="card-status">
|
||||
<image class="status-icon" v-if="item.status === 0" src="../static/images/pending.png" mode=""></image>
|
||||
<image class="status-icon" v-else-if="item.status === 1" src="../static/images/passed.png" mode=""></image>
|
||||
<image class="status-icon" v-else-if="item.status === 2" src="../static/images/not-pass.png" mode=""></image>
|
||||
<text class="status-text">{{statusText(item.status)}}</text>
|
||||
</view>
|
||||
<view class="status-btn" @click="jump(item)">{{statusBtn(item.status)}}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class='no-shop' v-if="!listData.length && !loading">
|
||||
<view class='pictrue' style="margin: 0 auto;">
|
||||
<image :src="`${domain}/static/images/noCart.png`"></image>
|
||||
<text>暂无申请记录,快去申请入驻吧!</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import {
|
||||
getApplicationRecordList,
|
||||
getUnimpInfo
|
||||
} from '@/api/store.js'
|
||||
|
||||
import {
|
||||
getapplyRecordApi
|
||||
} from "@/api/supplier"
|
||||
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app';
|
||||
|
||||
import uniMP from '@/utils/uniMP.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
domain: HTTP_REQUEST_URL,
|
||||
loading: false,
|
||||
showBtn: false,
|
||||
listData: [],
|
||||
uniMpInfo: {},
|
||||
pageData: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getListData()
|
||||
},
|
||||
// 滚动到底部
|
||||
onReachBottom() {
|
||||
if (this.count == this.listData.length) {
|
||||
uni.showToast({
|
||||
title: '没有更多啦',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
} else {
|
||||
this.pageData.page += 1
|
||||
this.getListData()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openApplet() {
|
||||
this.uniMpInfo.showToast = true
|
||||
uniMP.loadAppletMP(this.uniMpInfo)
|
||||
},
|
||||
getListData() {
|
||||
this.loading = true
|
||||
uni.showLoading({
|
||||
title: '数据加载中',
|
||||
});
|
||||
getapplyRecordApi().then(res => {
|
||||
console.log(res)
|
||||
uni.hideLoading();
|
||||
this.count = res.data.count
|
||||
this.listData = this.listData.concat(res.data.list)
|
||||
})
|
||||
return
|
||||
getApplicationRecordList(this.pageData).then(res => {
|
||||
this.count = res.data.count
|
||||
this.listData = this.listData.concat(res.data.list)
|
||||
this.showBtn = (this.listData[this.listData.length - 1].status == 1)
|
||||
// if (this.showBtn) {
|
||||
// getUnimpInfo().then(res => {
|
||||
// this.uniMpInfo = res.data
|
||||
// })
|
||||
// }
|
||||
uni.hideLoading();
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
navgo() {
|
||||
// uni.navigateBack()
|
||||
uni.navigateTo({
|
||||
url: '/pages/store/settled/index?type=1'
|
||||
})
|
||||
},
|
||||
// 跳转逻辑
|
||||
jump(item) {
|
||||
console.log(item)
|
||||
if ([0, 2].includes(item.status)) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/store/settled/index?mer_i_id=${item.mer_intention_id}`
|
||||
})
|
||||
} else if (item.status === 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/store/merchantDetails/index?mer_i_id=${item.mer_intention_id}&mer_id=${item.mer_id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
//状态判断
|
||||
statusText(number) {
|
||||
// 使用对象
|
||||
let statusData = {
|
||||
0: "待审核",
|
||||
1: "审核通过",
|
||||
2: "审核未通过",
|
||||
};
|
||||
return statusData[number]
|
||||
},
|
||||
// button显示文字
|
||||
statusBtn(number) {
|
||||
// 使用对象
|
||||
let statusData = {
|
||||
0: "编辑",
|
||||
1: "查看",
|
||||
2: "重新提交",
|
||||
};
|
||||
return statusData[number]
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.application-record {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background-color: #F5F5F5;
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
}
|
||||
|
||||
.no-shop {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
height: 100vh;
|
||||
|
||||
.pictrue {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
color: $uni-nothing-text;
|
||||
|
||||
image {
|
||||
width: 414rpx;
|
||||
height: 380rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -227,6 +227,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getSTokenApi
|
||||
} from "@/api/supplier.js"
|
||||
import {
|
||||
mapState,
|
||||
mapGetters
|
||||
@ -252,6 +255,9 @@
|
||||
isNewMer
|
||||
} from '@/api/user.js';
|
||||
// #endif
|
||||
import {
|
||||
showTab
|
||||
} from "@/utils/showTab.js"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -298,12 +304,13 @@
|
||||
},
|
||||
created() {},
|
||||
onLoad() {
|
||||
// #ifdef APP
|
||||
this.subNVue = uni.getSubNVueById('concat')
|
||||
let that = this
|
||||
uni.$on('diverGatherSubEmit', function(data) {
|
||||
that.clickMenu(that.nowMenuList[0])
|
||||
})
|
||||
|
||||
// #endif
|
||||
},
|
||||
onShow() {
|
||||
let that = this
|
||||
@ -328,7 +335,7 @@
|
||||
menu = [];
|
||||
}
|
||||
this.nowMenuList = menu;
|
||||
|
||||
this.isSupplierFn()
|
||||
// #ifdef APP-PLUS
|
||||
if (Boolean(this.userInfo.service?.mer_id)) {
|
||||
isNewMer(this.userInfo.uid, this.userInfo.service?.mer_id).then(
|
||||
@ -386,6 +393,19 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/*供应商tabbar,token,引导页相关*/
|
||||
isSupplierFn() {
|
||||
if (!this.isLogin || uni.getStorageSync('LOGIN_STATUS_STOKEN')) return;
|
||||
getSTokenApi().then(res => {
|
||||
if (res.data?.token) {
|
||||
uni.setStorageSync('LOGIN_STATUS_STOKEN', (res.data?.token || ''))
|
||||
this.$store.commit('SET_STOKEN', res.data?.token);
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log("获取报错", err)
|
||||
})
|
||||
},
|
||||
|
||||
openDiver() {
|
||||
this.subNVue.show('zoom-out', 300)
|
||||
uni.$emit('diverGatherEmit', this.elInfo);
|
||||
|
@ -18,13 +18,28 @@
|
||||
我是农民用户
|
||||
</view>
|
||||
</view>
|
||||
<view class="li" style="margin-top: 50rpx;" @click="navSw('/pages/index/index',true)">
|
||||
<u-image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/48aed202402260946123969.webp" width="690rpx"
|
||||
<view class="li" style="margin-top: 50rpx;" @click="navSw('/pages/index/index',1)">
|
||||
<u-image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/2a6b2202405241614559247.webp" width="690rpx"
|
||||
height="200rpx" style="position: absolute;"></u-image>
|
||||
<view class="btn">
|
||||
我是商户
|
||||
</view>
|
||||
</view>
|
||||
<view class="li" style="margin-top: 50rpx;" @click="navSw('/pages/index/index',2)">
|
||||
<u-image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/17eb3202405241615175799.webp" width="690rpx"
|
||||
height="200rpx" style="position: absolute;"></u-image>
|
||||
<view class="btn">
|
||||
我是供应商
|
||||
</view>
|
||||
</view>
|
||||
<view class="li" style="margin-top: 50rpx;" @click="navSw('/pages/index/index',3)">
|
||||
<u-image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/df628202405241615337825.webp" width="690rpx"
|
||||
height="200rpx" style="position: absolute;"></u-image>
|
||||
<view class="btn">
|
||||
我是经销商
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 50rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -44,9 +59,11 @@
|
||||
url
|
||||
})
|
||||
},
|
||||
navSw(url, isNewStore) {
|
||||
uni.setStorageSync('newStore', Boolean(isNewStore))
|
||||
// return
|
||||
navSw(url, isNewStoreType) {
|
||||
if (isNewStoreType == 1) uni.setStorageSync('newStore', true);
|
||||
if (isNewStoreType == 2) uni.setStorageSync('newSupplier', true);
|
||||
if (isNewStoreType == 3) uni.setStorageSync('newDistribution', true);
|
||||
uni.setStorageSync('userType', isNewStoreType)
|
||||
uni.switchTab({
|
||||
url: url
|
||||
})
|
||||
@ -64,7 +81,7 @@
|
||||
|
||||
.box {
|
||||
width: 750rpx;
|
||||
height: 100vh;
|
||||
min-height: 100vh;
|
||||
background-image: url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/1333d202402261025145680.webp);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% auto;
|
||||
|
@ -399,6 +399,9 @@
|
||||
import {
|
||||
showTab
|
||||
} from "@/utils/showTab.js";
|
||||
import {
|
||||
getSTokenApi
|
||||
} from "@/api/supplier.js"
|
||||
export default {
|
||||
computed: configMap({
|
||||
hide_mer_status: 0,
|
||||
@ -626,8 +629,6 @@
|
||||
this.activeRouter = '/' + curRoute
|
||||
},
|
||||
onLoad(options) {
|
||||
|
||||
|
||||
let that = this
|
||||
this._options = options;
|
||||
this.diyId = options.diyId || 0;
|
||||
@ -647,10 +648,13 @@
|
||||
},
|
||||
|
||||
onShow() {
|
||||
if (uni.getStorageSync('newStore')) this.openDiver();
|
||||
let that = this;
|
||||
that.isIntegral = uni.getStorageSync('isIntegral')
|
||||
// #ifdef APP-PLUS
|
||||
this.isSupplierFn() /*获取供应商toke*/
|
||||
this.openNewMerDiver() /*新商户入驻商户引导页*/
|
||||
this.openNewSuppierDiver() /*新供应商入驻商户引导页*/
|
||||
this.openNewDistrDiver() /*新经销商入驻商户引导页*/
|
||||
if (that.appUpdate.openUpgrade == '1') {
|
||||
that.alertAppUpdate();
|
||||
}
|
||||
@ -665,7 +669,6 @@
|
||||
})
|
||||
})
|
||||
this.isIndexClick = false;
|
||||
|
||||
if (this.isLogin) {
|
||||
this.getUserInfo();
|
||||
}
|
||||
@ -682,9 +685,6 @@
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
// this.overflow = true;
|
||||
// this.reconnect();
|
||||
// that.overflow = true;
|
||||
// #ifdef APP-PLUS
|
||||
setTimeout(() => {
|
||||
this.hotPage = 1;
|
||||
@ -698,9 +698,23 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
/*供应商tabbar,token,引导页相关*/
|
||||
isSupplierFn() {
|
||||
if (!this.isLogin || uni.getStorageSync('LOGIN_STATUS_STOKEN')) return;
|
||||
getSTokenApi().then(res => {
|
||||
if (res.data?.token) {
|
||||
uni.setStorageSync('LOGIN_STATUS_STOKEN', (res.data?.token || ''))
|
||||
this.$store.commit('SET_STOKEN', res.data?.token);
|
||||
}
|
||||
}).catch(err => {
|
||||
// console.log("获取报错", err)
|
||||
})
|
||||
},
|
||||
|
||||
/*新商户引导页相关*/
|
||||
openDiver() {
|
||||
openNewMerDiver() {
|
||||
// #ifdef APP
|
||||
if (!uni.getStorageSync('newStore')) return;
|
||||
this.subNvue = uni.getSubNVueById('newUser')
|
||||
this.subNvue.show('slide-in-left', 300)
|
||||
uni.$on('offSubnvue', () => {
|
||||
@ -711,14 +725,7 @@
|
||||
})
|
||||
}
|
||||
});
|
||||
// uni.$on('diverIndexSubEmit', () => {
|
||||
// this.subNvue.hide('slide-out-left')
|
||||
// uni.switchTab({
|
||||
// url: '/pages/gather/gather'
|
||||
// })
|
||||
// })
|
||||
// #endif
|
||||
|
||||
},
|
||||
/* 新商户发布商品引导页 */
|
||||
openListGoodsDiver() {
|
||||
@ -738,6 +745,37 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
/* 新供应商入驻引导页*/
|
||||
openNewSuppierDiver() {
|
||||
let isNewSupplire = Boolean(uni.getStorageSync('newSupplier'));
|
||||
if (!isNewSupplire) return;
|
||||
this.subNvue = uni.getSubNVueById('supplier')
|
||||
this.subNvue.show('slide-in-left', 300)
|
||||
uni.$on('offSubnvue', () => {
|
||||
this.subNvue.hide('slide-out-left')
|
||||
if (uni.getStorageSync("newSupplier")) {
|
||||
uni.switchTab({
|
||||
url: '/pages/user/index'
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
/* 新供应商入驻引导页*/
|
||||
openNewDistrDiver() {
|
||||
let isNewSupplire = Boolean(uni.getStorageSync('newDistribution'));
|
||||
if (!isNewSupplire) return;
|
||||
this.subNvue = uni.getSubNVueById('distr')
|
||||
this.subNvue.show('slide-in-left', 300)
|
||||
uni.$on('offSubnvue', () => {
|
||||
this.subNvue.hide('slide-out-left')
|
||||
if (uni.getStorageSync("newDistribution")) {
|
||||
uni.switchTab({
|
||||
url: '/pages/user/index'
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
loadCoupon() {
|
||||
if (!this.showCoupon && !uni.getStorageSync('show_coupon') && uni.getStorageSync('is_new_user')) {
|
||||
getNewPeopleCouponLst().then(res => {
|
||||
|
161
pages/index/subnvue/distr.nvue
Normal file
161
pages/index/subnvue/distr.nvue
Normal file
@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="jump" @click="jump">
|
||||
<text class="font">跳过</text>
|
||||
</view>
|
||||
<view class="next-btn center" :style="{ left:screenWidth/2,top:(screenHeight-96)}">
|
||||
<text class="next-btn-text font" style="line-height: 76rpx;" @click="next">下一步(1/2)</text>
|
||||
</view>
|
||||
<view class="tips-box" style="position: absolute;right: 20px;" :style="{top:screenHeight-215}">
|
||||
<view class="tips" style="position: absolute;padding-left: 20px;">
|
||||
<view class="tras">
|
||||
<text style="font-size: 28rpx;line-height: 100rpx;color: white;"> 点击我的页面,进行经销商户入驻
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<image src="/static/images/starpng.png" class="start" mode="">
|
||||
</image>
|
||||
</view>
|
||||
<view class="target" :style="{left:screenWidth/4*3,top:screenHeight-68}" @click="next">
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/96aba202405171618278261.png"
|
||||
class="target-icon"></image>
|
||||
<text class="target-text">我的</text>
|
||||
</view>
|
||||
<view :style="{left:screenWidth/4*3,top:screenHeight-130}">
|
||||
<image src="/static/images/pointer.png" style="width: 254rpx;height: 254rpx;"></image>
|
||||
</view>
|
||||
<image src="/static/images/greenLine.png" class="greenLine"
|
||||
:style="{left:screenWidth/4*3+15,top:screenHeight-120}" mode=""></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
screenHeight: 0,
|
||||
screenWidth: 0,
|
||||
isAct: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jump() {
|
||||
uni.setStorageSync("newDistribution", false)
|
||||
uni.$emit('offSubnvue');
|
||||
},
|
||||
next() {
|
||||
uni.$emit('offSubnvue');
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
let that = this
|
||||
let data = (uni.getWindowInfo())
|
||||
this.screenHeight = data.screenHeight
|
||||
this.screenWidth = data.screenWidth
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.jump {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 80rpx;
|
||||
border: 1px solid white;
|
||||
padding: 10rpx 20rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.font {
|
||||
font-size: 28rpx;
|
||||
color: white;
|
||||
lines: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.center {
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.next-btn {
|
||||
position: absolute;
|
||||
width: 240rpx;
|
||||
height: 76rpx;
|
||||
border: 1px solid white;
|
||||
border-radius: 38rpx;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
.target {
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
background-color: white;
|
||||
border-radius: 136rpx;
|
||||
}
|
||||
|
||||
.target-icon {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
position: absolute;
|
||||
left: 68rpx;
|
||||
transform: translate(-50%, -50%);
|
||||
top: 68rpx;
|
||||
}
|
||||
|
||||
.target-text {
|
||||
font-size: 20rpx;
|
||||
position: absolute;
|
||||
left: 68rpx;
|
||||
transform: translate(-50%, 0);
|
||||
top: 100rpx;
|
||||
}
|
||||
|
||||
.pointer {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.tips-box {
|
||||
width: 462rpx;
|
||||
height: 178rpx;
|
||||
position: absolute;
|
||||
padding-top: 72rpx;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.start {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.tips {
|
||||
width: 462rpx;
|
||||
height: 106rpx;
|
||||
background-color: #5BE157;
|
||||
border-radius: 20rpx;
|
||||
|
||||
}
|
||||
|
||||
.tras {
|
||||
width: 462rpx;
|
||||
transition-property: width;
|
||||
transition-duration: 3s;
|
||||
transition-delay: 0.1s;
|
||||
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
|
||||
}
|
||||
|
||||
.act {
|
||||
width: 462rpx;
|
||||
}
|
||||
|
||||
.greenLine {
|
||||
width: 35px;
|
||||
height: 60px;
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
161
pages/index/subnvue/supplier.nvue
Normal file
161
pages/index/subnvue/supplier.nvue
Normal file
@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="jump" @click="jump">
|
||||
<text class="font">跳过</text>
|
||||
</view>
|
||||
<view class="next-btn center" :style="{ left:screenWidth/2,top:(screenHeight-96)}">
|
||||
<text class="next-btn-text font" style="line-height: 76rpx;" @click="next">下一步(1/2)</text>
|
||||
</view>
|
||||
<view class="tips-box" style="position: absolute;right: 20px;" :style="{top:screenHeight-215}">
|
||||
<view class="tips" style="position: absolute;padding-left: 20px;">
|
||||
<view class="tras">
|
||||
<text style="font-size: 28rpx;line-height: 100rpx;color: white;"> 点击我的页面,进行供应商户入驻
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<image src="/static/images/starpng.png" class="start" mode="">
|
||||
</image>
|
||||
</view>
|
||||
<view class="target" :style="{left:screenWidth/4*3,top:screenHeight-68}" @click="next">
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/96aba202405171618278261.png"
|
||||
class="target-icon"></image>
|
||||
<text class="target-text">我的</text>
|
||||
</view>
|
||||
<view :style="{left:screenWidth/4*3,top:screenHeight-130}">
|
||||
<image src="/static/images/pointer.png" style="width: 254rpx;height: 254rpx;"></image>
|
||||
</view>
|
||||
<image src="/static/images/greenLine.png" class="greenLine"
|
||||
:style="{left:screenWidth/4*3+15,top:screenHeight-120}" mode=""></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
screenHeight: 0,
|
||||
screenWidth: 0,
|
||||
isAct: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jump() {
|
||||
uni.setStorageSync("newSupplier", false)
|
||||
uni.$emit('offSubnvue');
|
||||
},
|
||||
next() {
|
||||
uni.$emit('offSubnvue');
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
let that = this
|
||||
let data = (uni.getWindowInfo())
|
||||
this.screenHeight = data.screenHeight
|
||||
this.screenWidth = data.screenWidth
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.jump {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 80rpx;
|
||||
border: 1px solid white;
|
||||
padding: 10rpx 20rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.font {
|
||||
font-size: 28rpx;
|
||||
color: white;
|
||||
lines: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.center {
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.next-btn {
|
||||
position: absolute;
|
||||
width: 240rpx;
|
||||
height: 76rpx;
|
||||
border: 1px solid white;
|
||||
border-radius: 38rpx;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
.target {
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
background-color: white;
|
||||
border-radius: 136rpx;
|
||||
}
|
||||
|
||||
.target-icon {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
position: absolute;
|
||||
left: 68rpx;
|
||||
transform: translate(-50%, -50%);
|
||||
top: 68rpx;
|
||||
}
|
||||
|
||||
.target-text {
|
||||
font-size: 20rpx;
|
||||
position: absolute;
|
||||
left: 68rpx;
|
||||
transform: translate(-50%, 0);
|
||||
top: 100rpx;
|
||||
}
|
||||
|
||||
.pointer {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.tips-box {
|
||||
width: 462rpx;
|
||||
height: 178rpx;
|
||||
position: absolute;
|
||||
padding-top: 72rpx;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.start {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.tips {
|
||||
width: 462rpx;
|
||||
height: 106rpx;
|
||||
background-color: #5BE157;
|
||||
border-radius: 20rpx;
|
||||
|
||||
}
|
||||
|
||||
.tras {
|
||||
width: 462rpx;
|
||||
transition-property: width;
|
||||
transition-duration: 3s;
|
||||
transition-delay: 0.1s;
|
||||
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
|
||||
}
|
||||
|
||||
.act {
|
||||
width: 462rpx;
|
||||
}
|
||||
|
||||
.greenLine {
|
||||
width: 35px;
|
||||
height: 60px;
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
@ -196,6 +196,9 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import {
|
||||
getSTokenApi
|
||||
} from "@/api/supplier.js"
|
||||
import couponListWindow from '@/components/couponListWindow';
|
||||
import addcartWindow from '@/components/addcartWindow';
|
||||
import {
|
||||
@ -321,6 +324,7 @@
|
||||
mounted: function() {},
|
||||
onLoad: function(options) {},
|
||||
onShow: function() {
|
||||
this.isSupplierFn()
|
||||
let that = this
|
||||
let routes = getCurrentPages();
|
||||
let curRoute = routes[routes.length - 1].route;
|
||||
@ -358,6 +362,18 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/*供应商tabbar,token,引导页相关*/
|
||||
isSupplierFn() {
|
||||
if (!this.isLogin || uni.getStorageSync('LOGIN_STATUS_STOKEN')) return;
|
||||
getSTokenApi().then(res => {
|
||||
if (res.data?.token) {
|
||||
uni.setStorageSync('LOGIN_STATUS_STOKEN', (res.data?.token || ''))
|
||||
this.$store.commit('SET_STOKEN', res.data?.token);
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log("获取报错", err)
|
||||
})
|
||||
},
|
||||
tabsChange(e) {
|
||||
this.tabsCurr = e;
|
||||
uni.setStorageSync('tabbar_sale_type', this.tabsCurr + '');
|
||||
@ -385,7 +401,8 @@
|
||||
let that = this;
|
||||
getUserInfo().then(res => {
|
||||
that.userInfo = res.data;
|
||||
if (res.data.mer_info.mer_settlement_agree_status && this.tabsArr.length == 1) this.tabsArr
|
||||
if (res.data.mer_info.mer_settlement_agree_status && this.tabsArr.length == 1) this
|
||||
.tabsArr
|
||||
.push({
|
||||
name: '商户购物车',
|
||||
val: 2
|
||||
@ -513,7 +530,8 @@
|
||||
if (res.data.attr.length == 0) return Toast('此商品为单规格商品');
|
||||
const sku = {};
|
||||
res.data.attrValue.forEach((itemn) => {
|
||||
if (this.tabsCurr == 2) itemn.price = itemn.wholesale_price; //把价格设置为批发价
|
||||
if (this.tabsCurr == 2) itemn.price = itemn
|
||||
.wholesale_price; //把价格设置为批发价
|
||||
sku[itemn.sku] = itemn;
|
||||
})
|
||||
goods.attr = res.data.attr;
|
||||
@ -643,8 +661,9 @@
|
||||
}
|
||||
},
|
||||
attrVal(val) {
|
||||
this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw].attr_values[val
|
||||
.indexn]);
|
||||
this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw]
|
||||
.attr_values[val
|
||||
.indexn]);
|
||||
},
|
||||
/**
|
||||
* 属性变动赋值
|
||||
@ -867,7 +886,8 @@
|
||||
// 总金额 //总数
|
||||
el.list.forEach(e => {
|
||||
if (e.check) {
|
||||
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr
|
||||
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e
|
||||
.productAttr
|
||||
.price, e.cart_num))
|
||||
totalNum += e.cart_num
|
||||
}
|
||||
|
314
pages/quote/balanceDetail.vue
Normal file
314
pages/quote/balanceDetail.vue
Normal file
@ -0,0 +1,314 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<!-- <view style="margin-top: 20rpx; display: flex;align-items: center;" @click="showDate=true">
|
||||
<text>{{ formatTimestampToYearMonth(nowTimes) }}</text> <u-icon name="arrow-down"></u-icon>
|
||||
</view> -->
|
||||
<view class="recoder" v-if="lists.length">
|
||||
<view class="card" v-for="(item,index) in lists" :key="index">
|
||||
<view class="right">
|
||||
<view class="item" style="justify-content: flex-start;">
|
||||
<text class="rest">{{item.number_sn}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item_title">
|
||||
<text style="font-weight: 500;">{{item.financial_type }}</text>
|
||||
</view>
|
||||
<view class="item_money">+{{item.number}}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item-time">{{item.create_time}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
||||
</u-empty>
|
||||
<u-datetime-picker :show="showDate" @confirm='confirmDate' :maxDate='now' @cancel='showDate=false'
|
||||
@close='showDate=false' v-model="nowTimes" mode="year-month"></u-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
UserBlancelistsApi,
|
||||
UserWithdrawIndexApi,
|
||||
} from "@/api/supplier.js"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: '',
|
||||
total: "",
|
||||
count: "",
|
||||
nowTimes: new Date().getTime(),
|
||||
now: new Date().getTime(),
|
||||
showDate: false,
|
||||
lists: [
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navgo(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
formatTimestampToYearMonth(timestamp) {
|
||||
var date = new Date(timestamp);
|
||||
var year = date.getFullYear();
|
||||
var month = date.getMonth() + 1; // 月份是从0开始的,所以需要加1
|
||||
if (month < 10) {
|
||||
month = '0' + month; // 如果月份小于10,则在前面补零
|
||||
}
|
||||
return year + '-' + month;
|
||||
},
|
||||
confirmDate(e) {
|
||||
this.nowTimes = this.formatTimestampToYearMonth(e.value)
|
||||
this.getList()
|
||||
this.showDate = false
|
||||
},
|
||||
|
||||
async getAmount() {
|
||||
let res = await UserWithdrawIndexApi()
|
||||
this.count = res.data.count
|
||||
this.total = res.data.total
|
||||
|
||||
},
|
||||
async getList() {
|
||||
let res = await UserBlancelistsApi({
|
||||
// create_time: this.formatTimestampToYearMonth(this.nowTimes)
|
||||
})
|
||||
this.lists = res.data.lists
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
uni.showTabBar()
|
||||
this.getList()
|
||||
this.getAmount()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getList()
|
||||
this.getAmount()
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
padding: 20rpx;
|
||||
|
||||
.head {
|
||||
padding: 28rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
box-shadow: 0rpx 4rpx 10rpx 2rpx rgba(161, 161, 161, 0.4);
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
|
||||
.head_conent {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
|
||||
.line {
|
||||
width: 1rpx;
|
||||
height: 70rpx;
|
||||
background-color: #dfdfdf;
|
||||
}
|
||||
|
||||
.sum {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
color: #737373;
|
||||
font-size: 30rpx;
|
||||
|
||||
.num {
|
||||
font-size: 48.06rpx;
|
||||
margin-bottom: 15rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-bottom: 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.recoder {
|
||||
margin-top: 20rpx;
|
||||
// padding: 0 28rpx 28rpx 28rpx;
|
||||
|
||||
.time {
|
||||
height: 42rpx;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
line-height: 45rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.icon {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
transform: rotate(90deg);
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
// width: 694rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 21rpx 21rpx 21rpx 21rpx;
|
||||
opacity: 1;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.rest {
|
||||
margin-right: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.code {
|
||||
margin-right: 10rpx;
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.legal_company {
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
background: #72BE53;
|
||||
border-radius: 6rpx;
|
||||
padding: 2rpx 10rpx;
|
||||
}
|
||||
|
||||
.legal_person {
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
background: #FF8056;
|
||||
border-radius: 6rpx;
|
||||
padding: 2rpx 10rpx;
|
||||
}
|
||||
|
||||
.item-time {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
&_title {
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
&_money {
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #F55726;
|
||||
}
|
||||
|
||||
&_brank {
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #737373;
|
||||
line-height: 39rpx;
|
||||
}
|
||||
|
||||
&_time {
|
||||
font-size: 23rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #B3B3B3;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
|
||||
.item_status {
|
||||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||
padding: 2rpx 16rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.audit {
|
||||
background: rgba(38, 172, 245, .2);
|
||||
color: #26ACF5;
|
||||
}
|
||||
|
||||
.trans {
|
||||
background: rgba(245, 87, 38, .2);
|
||||
color: #F55726;
|
||||
}
|
||||
|
||||
.done {
|
||||
display: flex;
|
||||
background: rgba(70, 176, 58, .2);
|
||||
color: #46B03A;
|
||||
}
|
||||
|
||||
.lose {
|
||||
background: rgba(102, 102, 102, .2);
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
.item-title {
|
||||
justify-content: flex-start;
|
||||
|
||||
text {
|
||||
&:nth-child(1) {
|
||||
width: 198rpx;
|
||||
height: 40rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 51rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
&:nth-child(1) {
|
||||
width: 198rpx;
|
||||
height: 40rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 51rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.remark {
|
||||
word-wrap: break-word;
|
||||
font-size: 24rpx;
|
||||
color: #F55726;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
232
pages/quote/bindAccout.vue
Normal file
232
pages/quote/bindAccout.vue
Normal file
@ -0,0 +1,232 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="action">
|
||||
<view class="">
|
||||
提现至
|
||||
</view>
|
||||
<view style="font-weight: bold;">
|
||||
{{form.is_own?'对公账户':'个人账户'}}
|
||||
</view>
|
||||
<view style="display: flex;align-items: center;color: #20B128;" @click="showPop1=true">
|
||||
<text>账户类型</text> <u-icon color="#20B128" name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form">
|
||||
<u-form labelPosition="left" borderBottom :label-style="{fontSize:'30rpx'}" labelWidth='70'>
|
||||
<u-form-item label="开户银行" prop="userInfo.name" borderBottom ref="item1" @click="showPop=true">
|
||||
<text style="padding-left: 20rpx;" v-if="form.bank_name">{{form.bank_name}}</text>
|
||||
<text v-else style="color: #20B128;padding-left: 20rpx;">点击选择开户银行</text>
|
||||
</u-form-item>
|
||||
<u-form-item label="账户名称" prop="userInfo.name" borderBottom ref="item1">
|
||||
<u-input style="border: none;" v-model="form.name" placeholder="请输入账户名称" />
|
||||
</u-form-item>
|
||||
<u-form-item label="银行账号" prop="userInfo.name" borderBottom ref="item1">
|
||||
<u-input maxlength="19" style="border: none;" v-model="form.bank_code" type='number'
|
||||
placeholder="请输入银行账号" />
|
||||
</u-form-item>
|
||||
<u-form-item label="开户网点" prop="userInfo.name" borderBottom ref="item1">
|
||||
<u-input style="border: none;" v-model="form.bank_branch" placeholder="请输入开户网点" />
|
||||
</u-form-item>
|
||||
<u-form-item v-if="!form.is_own" label="身份证" prop="userInfo.name" borderBottom ref="item1">
|
||||
<u-input style="border: none;" v-model="form.id_card" placeholder="请输入身份证" />
|
||||
</u-form-item>
|
||||
<u-form-item v-if="!form.is_own" label="电话" prop="userInfo.name" borderBottom ref="item1">
|
||||
<u-input style="border: none;" v-model="form.phone" placeholder="请输入电话" />
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
</view>
|
||||
<view class="" style="margin-top: 20rpx;color: red;text-align: center;" v-if="form.is_check==2">
|
||||
审核失败,请重新提交审核
|
||||
</view>
|
||||
<view class="" style="margin-top: 20rpx;color: red;text-align: center;" v-if="form.is_check===0">
|
||||
正在审核中
|
||||
</view>
|
||||
<view class="submit-btn" v-if="form.is_check==='' || form.is_check==2">
|
||||
<u-button text="提交绑定" @click="submit" shape="circle" color="#50C758"></u-button>
|
||||
</view>
|
||||
<u-popup :show="showPop" :round="10" mode="bottom" @close="showPop=false" @open="showPop=true">
|
||||
<view class="popContent">
|
||||
<view style="text-align: center;font-weight: bold;">请选择银行</view>
|
||||
<u-icon name="close" color="#303133" size="24" @click="showPop=false"
|
||||
style="position: absolute;top: 20rpx;right: 20rpx;"></u-icon>
|
||||
<view class="bank-list">
|
||||
<view class="bank-li" v-for="item in bankList" :key='item.id' @click="choseBank(item)">
|
||||
<u-image :show-loading="true" :src="item.image" width="60rpx" height="60rpx"></u-image>
|
||||
<text style="margin-left: 20rpx;">{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup :show="showPop1" :round="10" mode="bottom" @close="showPop1=false" @open="showPop1=true">
|
||||
<view class="popContent">
|
||||
<view style="text-align: center;font-weight: bold;">请选择提现账户</view>
|
||||
<u-icon name="close" color="#303133" size="24" @click="showPop1=false"
|
||||
style="position: absolute;top: 20rpx;right: 20rpx;"></u-icon>
|
||||
<view class="bank-list">
|
||||
<view class="bank-li" @click="choseAccount(0)">
|
||||
<text>个人账户</text>
|
||||
</view>
|
||||
<view class="bank-li" @click="choseAccount(1)">
|
||||
<text>对公账户</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
bindCradApi,
|
||||
bankListApi,
|
||||
amountAccountApi
|
||||
} from "@/api/supplier.js"
|
||||
import {
|
||||
Modal
|
||||
} from "../../libs/uniApi"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
"name": "",
|
||||
"bank_id": 1,
|
||||
"bank_name": '',
|
||||
"bank_code": "",
|
||||
"bank_branch": "",
|
||||
"financial_img": "",
|
||||
"is_own": 0,
|
||||
is_check: '', // 0待审核,1通过,2未通过
|
||||
phone: '',
|
||||
"id_card": "",
|
||||
user_type: '2'
|
||||
|
||||
},
|
||||
|
||||
showPop: false,
|
||||
bankList: [],
|
||||
hasBindAccount: [],
|
||||
showPop1: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navgo(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
async getHasBindBankList() {
|
||||
let res = await amountAccountApi({
|
||||
is_check: 'all' //全部查询
|
||||
})
|
||||
this.hasBindAccount = res.data.bank_list
|
||||
if(res.data.bank_list[0]) this.form = res.data.bank_list[0] || {}
|
||||
},
|
||||
getFormData(form, target) {
|
||||
console.log(target)
|
||||
if (!target) {
|
||||
for (let key in form) {
|
||||
form[key] = ''
|
||||
}
|
||||
console.log('return', form)
|
||||
return
|
||||
}
|
||||
console.log('除了来了')
|
||||
form.name = target.name || ''
|
||||
form.bank_id = target.bank_id || ''
|
||||
form.bank_name = target.bank_name || ''
|
||||
form.bank_code = target.bank_code || ''
|
||||
form.bank_branch = target.bank_branch || ''
|
||||
form.phone = target.phone || ''
|
||||
form.id_card = target.id_card || ''
|
||||
form.is_own = target.is_own
|
||||
form.is_check = target.is_check
|
||||
},
|
||||
choseAccount(type) {
|
||||
let index = this.hasBindAccount.findIndex(item => item.is_own == type)
|
||||
this.form = this.hasBindAccount[index] || {}
|
||||
this.form.is_own = type;
|
||||
if(!this.form.id) this.form.is_check = "";
|
||||
this.showPop1 = false
|
||||
},
|
||||
|
||||
choseBank(item) {
|
||||
this.form.bank_name = item.name
|
||||
this.form.bank_id = item.id
|
||||
this.showPop = false
|
||||
},
|
||||
async getBankList() {
|
||||
let res = await bankListApi()
|
||||
this.bankList = res.data.lists
|
||||
|
||||
},
|
||||
async submit() {
|
||||
await Modal('温馨提示', "确定信息无误,提交绑定")
|
||||
this.form.is_own === 1 ? '' : this.form.is_own = 0
|
||||
await bindCradApi({
|
||||
...this.form
|
||||
})
|
||||
this.form.is_check = 0;
|
||||
this.$util.Tips({
|
||||
title: '提交成功,等待后台审核'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
uni.showTabBar()
|
||||
this.getHasBindBankList()
|
||||
this.getBankList()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getHasBindBankList()
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.popContent {
|
||||
padding: 20rpx;
|
||||
|
||||
.bank-list {
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
max-height: 40vh;
|
||||
|
||||
.bank-li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20rpx;
|
||||
border-bottom: 1px solid #F8F9FA;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.action {
|
||||
background-color: white;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.form {
|
||||
padding: 28rpx 30rpx;
|
||||
background-color: white;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
position: fixed;
|
||||
bottom: 146rpx;
|
||||
width: 710rpx;
|
||||
|
||||
}
|
||||
</style>
|
550
pages/quote/financialyDeatil.vue
Normal file
550
pages/quote/financialyDeatil.vue
Normal file
@ -0,0 +1,550 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="head">
|
||||
<view class="head_conent">
|
||||
<view class="sum">
|
||||
<view class="text">已提现金额</view>
|
||||
<u-count-to class="num" style="color: #F84221;" :startVal="0" :endVal="total" :decimals="2" bold
|
||||
font-size="22"></u-count-to>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="sum">
|
||||
<view class="text">已提现次数</view>
|
||||
<u-count-to class="num" :startVal="0" :endVal="count" bold font-size="22"></u-count-to>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin-top: 20rpx; display: flex;align-items: center;" @click="showDate=true">
|
||||
<text>{{ formatTimestampToYearMonth(nowTimes) }}</text> <u-icon name="arrow-down"></u-icon>
|
||||
</view>
|
||||
<view class="recoder" v-if="lists.length">
|
||||
<view class="card" v-for="(item,index) in lists" :key="index">
|
||||
<view class="right">
|
||||
<view class="item" style="justify-content: flex-start;">
|
||||
<text class="rest">余额提现至</text>
|
||||
<text v-if="item.merchant_bank_info.bank_code"
|
||||
class="code">({{item.merchant_bank_info.bank_code.substring(item.merchant_bank_info.bank_code.length - 4)}})</text>
|
||||
<text class="withdraw-type legal_company">{{ item.merchant_bank_info.is_own?"对公" :"个人"}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item_title">
|
||||
<text>{{item.merchant_bank_info.bank_info.name }}</text>
|
||||
</view>
|
||||
<view class="item_money">+{{item.amount}}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item-time">{{item.create_time}}</view>
|
||||
{{item.is_check==1?'审核通过':item.is_check==2?"审核不通过":"待审核" }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="remark" v-if="item.fail_msg">{{item.fail_msg}}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<u-empty v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
||||
</u-empty>
|
||||
<u-datetime-picker :show="showDate" @confirm='confirmDate' :maxDate='now' @cancel='showDate=false'
|
||||
@close='showDate=false' v-model="nowTimes" mode="year-month"></u-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
UserWithdrawListsApi,
|
||||
UserWithdrawIndexApi,
|
||||
} from "@/api/supplier.js"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: '',
|
||||
total: "",
|
||||
count: "",
|
||||
nowTimes: new Date().getTime(),
|
||||
now: new Date().getTime(),
|
||||
showDate: false,
|
||||
lists: [{
|
||||
"id": 11,
|
||||
"mer_id": 500,
|
||||
"supplier_id": 0,
|
||||
"merchant_bank_id": 297,
|
||||
"amount": "80.00",
|
||||
"is_check": 0,
|
||||
"fail_msg": "",
|
||||
"is_arrival": 0,
|
||||
"arrival_proof": null,
|
||||
"create_time": "2024-05-15 10:56:43",
|
||||
"merchant_bank_info": {
|
||||
"id": 297,
|
||||
"supplier_id": 0,
|
||||
"mer_id": 500,
|
||||
"bank_id": 1,
|
||||
"bank_code": "6213362109985515778",
|
||||
"bank_branch": "迎晖路支行",
|
||||
"name": "赵明军",
|
||||
"id_card": "513701200012105613",
|
||||
"phone": "19130550023",
|
||||
"financial_img": "",
|
||||
"is_own": 0,
|
||||
"is_check": 1,
|
||||
"fail_msg": null,
|
||||
"admin_id": 1,
|
||||
"create_time": "2024-05-14 16:49:31",
|
||||
"update_time": "2024-05-14 16:50:04",
|
||||
"delete_time": null,
|
||||
"bank_info": {
|
||||
"id": 1,
|
||||
"name": "中国银行",
|
||||
"image": "https://lihaiim.oss-cn-chengdu.aliyuncs.com/public/uploads/images/20240510/20240510114142858ca3838.png",
|
||||
"create_time": 0,
|
||||
"update_time": 0,
|
||||
"delete_time": null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"mer_id": 500,
|
||||
"supplier_id": 0,
|
||||
"merchant_bank_id": 297,
|
||||
"amount": "58.00",
|
||||
"is_check": 0,
|
||||
"fail_msg": "",
|
||||
"is_arrival": 0,
|
||||
"arrival_proof": null,
|
||||
"create_time": "2024-05-15 10:55:34",
|
||||
"merchant_bank_info": {
|
||||
"id": 297,
|
||||
"supplier_id": 0,
|
||||
"mer_id": 500,
|
||||
"bank_id": 1,
|
||||
"bank_code": "6213362109985515778",
|
||||
"bank_branch": "迎晖路支行",
|
||||
"name": "赵明军",
|
||||
"id_card": "513701200012105613",
|
||||
"phone": "19130550023",
|
||||
"financial_img": "",
|
||||
"is_own": 0,
|
||||
"is_check": 1,
|
||||
"fail_msg": null,
|
||||
"admin_id": 1,
|
||||
"create_time": "2024-05-14 16:49:31",
|
||||
"update_time": "2024-05-14 16:50:04",
|
||||
"delete_time": null,
|
||||
"bank_info": {
|
||||
"id": 1,
|
||||
"name": "中国银行",
|
||||
"image": "https://lihaiim.oss-cn-chengdu.aliyuncs.com/public/uploads/images/20240510/20240510114142858ca3838.png",
|
||||
"create_time": 0,
|
||||
"update_time": 0,
|
||||
"delete_time": null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"mer_id": 500,
|
||||
"supplier_id": 0,
|
||||
"merchant_bank_id": 297,
|
||||
"amount": "7.00",
|
||||
"is_check": 1,
|
||||
"fail_msg": "",
|
||||
"is_arrival": 1,
|
||||
"arrival_proof": "[\"https://lihaiim.oss-cn-chengdu.aliyuncs.com/public/uploads/images/20240514/20240514112247c16164097.png\", \"https://lihaiim.oss-cn-chengdu.aliyuncs.com/public/uploads/images/20240514/202405141122478b56c8734.png\", \"https://lihaiim.oss-cn-chengdu.aliyuncs.com/public/uploads/images/20240514/20240514112247e80105959.png\"]",
|
||||
"create_time": "2024-05-14 21:54:14",
|
||||
"merchant_bank_info": {
|
||||
"id": 297,
|
||||
"supplier_id": 0,
|
||||
"mer_id": 500,
|
||||
"bank_id": 1,
|
||||
"bank_code": "6213362109985515778",
|
||||
"bank_branch": "迎晖路支行",
|
||||
"name": "赵明军",
|
||||
"id_card": "513701200012105613",
|
||||
"phone": "19130550023",
|
||||
"financial_img": "",
|
||||
"is_own": 0,
|
||||
"is_check": 1,
|
||||
"fail_msg": null,
|
||||
"admin_id": 1,
|
||||
"create_time": "2024-05-14 16:49:31",
|
||||
"update_time": "2024-05-14 16:50:04",
|
||||
"delete_time": null,
|
||||
"bank_info": {
|
||||
"id": 1,
|
||||
"name": "中国银行",
|
||||
"image": "https://lihaiim.oss-cn-chengdu.aliyuncs.com/public/uploads/images/20240510/20240510114142858ca3838.png",
|
||||
"create_time": 0,
|
||||
"update_time": 0,
|
||||
"delete_time": null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"mer_id": 500,
|
||||
"supplier_id": 0,
|
||||
"merchant_bank_id": 297,
|
||||
"amount": "12.00",
|
||||
"is_check": 1,
|
||||
"fail_msg": "",
|
||||
"is_arrival": 1,
|
||||
"arrival_proof": "[\"https://lihaiim.oss-cn-chengdu.aliyuncs.com/public/uploads/images/20240514/202405141811330f05a4138.png\", \"https://lihaiim.oss-cn-chengdu.aliyuncs.com/public/uploads/images/20240514/2024051411224760ab52438.png\"]",
|
||||
"create_time": "2024-05-14 18:20:12",
|
||||
"merchant_bank_info": {
|
||||
"id": 297,
|
||||
"supplier_id": 0,
|
||||
"mer_id": 500,
|
||||
"bank_id": 1,
|
||||
"bank_code": "6213362109985515778",
|
||||
"bank_branch": "迎晖路支行",
|
||||
"name": "赵明军",
|
||||
"id_card": "513701200012105613",
|
||||
"phone": "19130550023",
|
||||
"financial_img": "",
|
||||
"is_own": 0,
|
||||
"is_check": 1,
|
||||
"fail_msg": null,
|
||||
"admin_id": 1,
|
||||
"create_time": "2024-05-14 16:49:31",
|
||||
"update_time": "2024-05-14 16:50:04",
|
||||
"delete_time": null,
|
||||
"bank_info": {
|
||||
"id": 1,
|
||||
"name": "中国银行",
|
||||
"image": "https://lihaiim.oss-cn-chengdu.aliyuncs.com/public/uploads/images/20240510/20240510114142858ca3838.png",
|
||||
"create_time": 0,
|
||||
"update_time": 0,
|
||||
"delete_time": null
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"mer_id": 500,
|
||||
"supplier_id": 0,
|
||||
"merchant_bank_id": 296,
|
||||
"amount": "100.00",
|
||||
"is_check": 1,
|
||||
"fail_msg": "",
|
||||
"is_arrival": 0,
|
||||
"arrival_proof": null,
|
||||
"create_time": "2024-05-14 17:04:13",
|
||||
"merchant_bank_info": {
|
||||
"bank_info": "[]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"mer_id": 500,
|
||||
"supplier_id": 0,
|
||||
"merchant_bank_id": 296,
|
||||
"amount": "100.00",
|
||||
"is_check": 0,
|
||||
"fail_msg": "",
|
||||
"is_arrival": 0,
|
||||
"arrival_proof": null,
|
||||
"create_time": "2024-05-14 17:02:59",
|
||||
"merchant_bank_info": {
|
||||
"bank_info": "[]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"mer_id": 500,
|
||||
"supplier_id": 0,
|
||||
"merchant_bank_id": 296,
|
||||
"amount": "100.00",
|
||||
"is_check": 0,
|
||||
"fail_msg": "",
|
||||
"is_arrival": 0,
|
||||
"arrival_proof": null,
|
||||
"create_time": "2024-05-14 15:51:02",
|
||||
"merchant_bank_info": {
|
||||
"bank_info": "[]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"mer_id": 500,
|
||||
"supplier_id": 0,
|
||||
"merchant_bank_id": 296,
|
||||
"amount": "100.00",
|
||||
"is_check": 0,
|
||||
"fail_msg": "",
|
||||
"is_arrival": 0,
|
||||
"arrival_proof": null,
|
||||
"create_time": "2024-05-14 14:35:47",
|
||||
"merchant_bank_info": {
|
||||
"bank_info": "[]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navgo(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
formatTimestampToYearMonth(timestamp) {
|
||||
var date = new Date(timestamp);
|
||||
var year = date.getFullYear();
|
||||
var month = date.getMonth() + 1; // 月份是从0开始的,所以需要加1
|
||||
if (month < 10) {
|
||||
month = '0' + month; // 如果月份小于10,则在前面补零
|
||||
}
|
||||
return year + '-' + month;
|
||||
},
|
||||
confirmDate(e) {
|
||||
this.nowTimes = this.formatTimestampToYearMonth(e.value)
|
||||
this.getList()
|
||||
this.showDate = false
|
||||
},
|
||||
|
||||
async getAmount() {
|
||||
let res = await UserWithdrawIndexApi()
|
||||
this.count = res.data.count
|
||||
this.total = res.data.total
|
||||
|
||||
},
|
||||
async getList() {
|
||||
let res = await UserWithdrawListsApi({
|
||||
create_time: this.formatTimestampToYearMonth(this.nowTimes)
|
||||
})
|
||||
this.lists = res.data.lists
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
uni.showTabBar()
|
||||
this.getList()
|
||||
this.getAmount()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getList()
|
||||
this.getAmount()
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
padding: 20rpx;
|
||||
|
||||
.head {
|
||||
padding: 28rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
box-shadow: 0rpx 4rpx 10rpx 2rpx rgba(161, 161, 161, 0.4);
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
|
||||
.head_conent {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
|
||||
.line {
|
||||
width: 1rpx;
|
||||
height: 70rpx;
|
||||
background-color: #dfdfdf;
|
||||
}
|
||||
|
||||
.sum {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
color: #737373;
|
||||
font-size: 30rpx;
|
||||
|
||||
.num {
|
||||
font-size: 48.06rpx;
|
||||
margin-bottom: 15rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-bottom: 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.recoder {
|
||||
margin-top: 20rpx;
|
||||
// padding: 0 28rpx 28rpx 28rpx;
|
||||
|
||||
.time {
|
||||
height: 42rpx;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
line-height: 45rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.icon {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
transform: rotate(90deg);
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
// width: 694rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 21rpx 21rpx 21rpx 21rpx;
|
||||
opacity: 1;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.rest {
|
||||
margin-right: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.code {
|
||||
margin-right: 10rpx;
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.legal_company {
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
background: #72BE53;
|
||||
border-radius: 6rpx;
|
||||
padding: 2rpx 10rpx;
|
||||
}
|
||||
|
||||
.legal_person {
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
background: #FF8056;
|
||||
border-radius: 6rpx;
|
||||
padding: 2rpx 10rpx;
|
||||
}
|
||||
|
||||
.item-time {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
&_title {
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
&_money {
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #F55726;
|
||||
}
|
||||
|
||||
&_brank {
|
||||
font-size: 26rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #737373;
|
||||
line-height: 39rpx;
|
||||
}
|
||||
|
||||
&_time {
|
||||
font-size: 23rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #B3B3B3;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
|
||||
.item_status {
|
||||
border-radius: 6rpx 6rpx 6rpx 6rpx;
|
||||
padding: 2rpx 16rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.audit {
|
||||
background: rgba(38, 172, 245, .2);
|
||||
color: #26ACF5;
|
||||
}
|
||||
|
||||
.trans {
|
||||
background: rgba(245, 87, 38, .2);
|
||||
color: #F55726;
|
||||
}
|
||||
|
||||
.done {
|
||||
display: flex;
|
||||
background: rgba(70, 176, 58, .2);
|
||||
color: #46B03A;
|
||||
}
|
||||
|
||||
.lose {
|
||||
background: rgba(102, 102, 102, .2);
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
.item-title {
|
||||
justify-content: flex-start;
|
||||
|
||||
text {
|
||||
&:nth-child(1) {
|
||||
width: 198rpx;
|
||||
height: 40rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 51rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
&:nth-child(1) {
|
||||
width: 198rpx;
|
||||
height: 40rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 51rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.remark {
|
||||
word-wrap: break-word;
|
||||
font-size: 24rpx;
|
||||
color: #F55726;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
393
pages/quote/index.vue
Normal file
393
pages/quote/index.vue
Normal file
@ -0,0 +1,393 @@
|
||||
<template>
|
||||
<view style="padding: 100rpx 0;min-height: 100vh;">
|
||||
<view class="head">
|
||||
<view class="">
|
||||
<view class="" style="display: flex;justify-content: space-around;margin-top: 24rpx;color:#777777">
|
||||
<view :class="{act: tabIndex==1}" @click="changeTabs(1)">
|
||||
报价列表
|
||||
</view>
|
||||
<view :class="{act: tabIndex==2}" @click="changeTabs(2)">
|
||||
报价记录
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 8rpx;" />
|
||||
<view class="line" :style="{left:tabIndex==1?tabsLeft+'px':tabsRight+'px'}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<u-loading-page v-if="loading" :loading="loading"></u-loading-page>
|
||||
<view v-else>
|
||||
<view class="card" v-for="(item,index) in lists" :key='index'>
|
||||
<view class="head">
|
||||
</view>
|
||||
<view class="card-content">
|
||||
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
|
||||
<image style="width: 152rpx;height: 152rpx;" :src="item.goods.imgs" mode=""></image>
|
||||
<view class="status">
|
||||
{{tabIndex==1?"未报价":"已报价" }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-content-r">
|
||||
<view class="title ellipsis">
|
||||
{{item.goods.goods_name}}
|
||||
</view>
|
||||
<view class="need">
|
||||
需求量: {{item.need_num}}{{item.goods.unit_name}}
|
||||
</view>
|
||||
<view class="ipt">
|
||||
<u--input placeholder="输入报价数量" :readonly="tabIndex==2" v-model="item.nums"
|
||||
style="background-color:#F6F6F6;border: none;" type="number" @blur="blur1(item)"></u--input>
|
||||
<view style="width: 10rpx;">
|
||||
</view>
|
||||
<u--input style="background-color: #F6F6F6;border: none;" placeholder="输入产品报价" @blur="blur2(item)"
|
||||
:readonly="tabIndex==2" v-model="item.price" type="number"></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="status-png" v-if="tabIndex==2">
|
||||
<image v-if="item.is_adopt==0" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/491f6202405281828272606.png" style="width: 108rpx; height: 84rpx;">
|
||||
</image>
|
||||
<image v-else-if="item.is_adopt==1" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/274ad202405111523222891.png" style="width: 108rpx; height: 84rpx;">
|
||||
</image>
|
||||
<image v-else-if="item.is_adopt==2 && item.delivery_name" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/fde75202405281450531427.png" style=" width: 108rpx;
|
||||
height: 84rpx;">
|
||||
</image>
|
||||
<image v-else-if="item.is_adopt==2 && !item.delivery_name" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/dbe43202405281449446456.png" style=" width: 108rpx;
|
||||
height: 84rpx;">
|
||||
</image>
|
||||
<image v-else src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/22059202405281826183468.png" style="width: 108rpx; height: 84rpx;">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-footer" v-if="item.nums && item.price">
|
||||
共{{item.nums}}{{item.unit_name}} 合计:<text
|
||||
style="font-size: 28rpx;color: #FC452F;font-weight: 700;">¥{{(item.nums*item.price).toFixed(2)}}</text>
|
||||
</view>
|
||||
<u-line style="margin-top: 30rpx;" color="#F3F3F3"></u-line>
|
||||
</view>
|
||||
<u-empty v-if="lists.length==0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
||||
</u-empty>
|
||||
</view>
|
||||
|
||||
<view class="submit-btn" v-show="tabIndex==1 && lists.length > 0">
|
||||
<u-button shape='circle' color='#20B128' @click="submit" text="提交"></u-button>
|
||||
</view>
|
||||
<view class="submit-btn" v-show="tabIndex==2 && deliveryBtnShow">
|
||||
<u-button shape='circle' color='#20B128' @click="showDeliver" text="立即发货"></u-button>
|
||||
</view>
|
||||
<uni-popup ref="deliver" type="center" @click.stop="">
|
||||
<view class="deliver">
|
||||
<view style="font-size: 32rpx;font-weight: bold;text-align: center;">发货</view>
|
||||
<u--form labelPosition="left" style="width: 100%;" labelWidth="auto" :model="model1" :rules="rules"
|
||||
ref="uForm">
|
||||
<u-form-item label="配送方式" borderBottom>
|
||||
<u-radio-group v-model="model_type" placement="row" @change="model1.delivery_name='';model1.delivery_id=''" activeColor="#20B128">
|
||||
<u-radio label="自己配送" :name="2" style="margin-right: 20rpx;"></u-radio>
|
||||
<u-radio label="快递配送" :name="1"></u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<block v-if="model_type==1">
|
||||
<u-form-item label="快递公司" prop="delivery_name" @tap="deliveryNameShow=true" borderBottom>
|
||||
<u--input v-model="model1.delivery_name" readonly border="none" placeholder="请选择快递公司" suffixIcon="arrow-right"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="物流单号" prop="delivery_id" borderBottom>
|
||||
<u--input v-model="model1.delivery_id" border="none" placeholder="请输入物流单号"></u--input>
|
||||
</u-form-item>
|
||||
</block>
|
||||
<block v-if="model_type==2">
|
||||
<u-form-item label="送货人姓名" prop="delivery_name" borderBottom>
|
||||
<u--input v-model="model1.delivery_name" border="none" placeholder="请输入送货人姓名"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="送货人电话" prop="delivery_id" borderBottom>
|
||||
<u--input v-model="model1.delivery_id" border="none" placeholder="请输入送货人电话"></u--input>
|
||||
</u-form-item>
|
||||
</block>
|
||||
</u--form>
|
||||
<u-button shape='circle' style="margin-top: 80rpx;" color='#20B128' @click="onExpress" text="确认发货"></u-button>
|
||||
<u-picker
|
||||
:show="deliveryNameShow"
|
||||
:columns="[columns]"
|
||||
title="请选择快递公司"
|
||||
@cancel="deliveryNameShow = false"
|
||||
@confirm="changeName"
|
||||
>
|
||||
</u-picker>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { Toast } from "../../libs/uniApi";
|
||||
import {
|
||||
OpurchaseGoodsOfferApi,
|
||||
OpurchaseGoodsOfferListApi,
|
||||
OpurchaseclassExpressApi,
|
||||
ExpressListApi
|
||||
} from "@/api/supplier.js"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabIndex: 1,
|
||||
tabsLeft: 0,
|
||||
tabsRight: 0,
|
||||
loading: false,
|
||||
lists: [],
|
||||
date: "",
|
||||
ycn: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/739c3202405071458553459.png',
|
||||
wcj: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/04c2c202405071501462462.png',
|
||||
ybj: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/274ad202405111523222891.png',
|
||||
model_type: 2,
|
||||
deliveryNameShow: false,
|
||||
deliveryBtnShow: false,
|
||||
model1: {
|
||||
delivery_name: "",
|
||||
delivery_id: "",
|
||||
},
|
||||
rules: {
|
||||
delivery_name: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '不可为空',
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
delivery_id: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '不可为空',
|
||||
trigger: ['change', 'blur']
|
||||
}
|
||||
},
|
||||
columns: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navgo(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
blur1(item){
|
||||
if(item.nums<0) item.nums=0;
|
||||
if(item.nums>item.need_num) item.nums=item.need_num;
|
||||
},
|
||||
blur2(item){
|
||||
if(item.price<0) item.price=0;
|
||||
item.price = (+item.price).toFixed(2)
|
||||
},
|
||||
getTabsPosi() {
|
||||
const {
|
||||
windowWidth
|
||||
} = uni.getSystemInfoSync();
|
||||
this.tabsLeft = (((windowWidth / 2) - 26) / 2)
|
||||
this.tabsRight = (this.tabsLeft + (windowWidth / 2))
|
||||
},
|
||||
async getLists(type) {
|
||||
let that = this
|
||||
OpurchaseGoodsOfferListApi({
|
||||
type: type || this.tabIndex,
|
||||
date: this.date
|
||||
}).then(res => {
|
||||
this.lists = res.data.lists;
|
||||
this.deliveryBtnShow = res.data.extend.delivery ? true : false;
|
||||
this.lists.forEach(item => {
|
||||
if (!(+item.nums)) {
|
||||
item.nums = ''
|
||||
}
|
||||
if (!(+item.price)) {
|
||||
item.price = ''
|
||||
}
|
||||
})
|
||||
})
|
||||
that.loading = true
|
||||
setTimeout(() => {
|
||||
that.loading = false
|
||||
}, 1000)
|
||||
},
|
||||
changeTabs(num) {
|
||||
let that = this
|
||||
this.tabIndex = num
|
||||
this.getLists()
|
||||
},
|
||||
priceBlur(i) {
|
||||
this.lists[i].price = (+this.lists[i].price).toFixed(2)
|
||||
},
|
||||
async submit() {
|
||||
let data =
|
||||
this.lists.filter(item => {
|
||||
return (+item.price && +item.nums)
|
||||
}).map(item => {
|
||||
if(item.nums > item.need_num) item.nums = item.need_num;
|
||||
return {
|
||||
id: item.id,
|
||||
nums: item.nums,
|
||||
price: item.price
|
||||
}
|
||||
})
|
||||
if (!data.length) return ;
|
||||
let res = await OpurchaseGoodsOfferApi({
|
||||
data: data
|
||||
})
|
||||
this.getLists(1)
|
||||
},
|
||||
showDeliver() {
|
||||
this.getAction();
|
||||
this.$refs.deliver.open()
|
||||
},
|
||||
// 发货
|
||||
onExpress() {
|
||||
this.$refs.uForm.validate().then(res=>{
|
||||
OpurchaseclassExpressApi({
|
||||
...this.model1,
|
||||
// date: this.date
|
||||
}).then(res => {
|
||||
this.getLists(2);
|
||||
this.$refs.deliver.close();
|
||||
Toast('发货成功')
|
||||
})
|
||||
})
|
||||
},
|
||||
// 物流公司列表
|
||||
getAction(){
|
||||
ExpressListApi({
|
||||
page_size: 100
|
||||
}).then(res=>{
|
||||
this.columns = res.data.lists.map(item=>item.name);
|
||||
})
|
||||
},
|
||||
changeName(e){
|
||||
this.model1.delivery_name = e.value[0];
|
||||
this.deliveryNameShow = false;
|
||||
},
|
||||
},
|
||||
onLoad(option) {
|
||||
this.date = option.date
|
||||
this.getTabsPosi()
|
||||
this.getLists()
|
||||
// OpurchaseGoodsOfferListApi()
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
.head {
|
||||
padding: 20rpx;
|
||||
background-color: white;
|
||||
position: relative;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100vw;
|
||||
z-index: 10;
|
||||
|
||||
.act {
|
||||
color: #20B128;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 26px;
|
||||
height: 5rpx;
|
||||
background-color: #20B128;
|
||||
border-radius: 50rpx;
|
||||
position: absolute;
|
||||
transition: 300ms;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 20rpx;
|
||||
padding-bottom: 150rpx;
|
||||
|
||||
.card {
|
||||
width: 710rpx;
|
||||
margin: 0 auto;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: white;
|
||||
|
||||
|
||||
|
||||
.card-content {
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
.card-content-l {
|
||||
margin-right: 20rpx;
|
||||
position: relative;
|
||||
|
||||
.status {
|
||||
width: 152rpx;
|
||||
height: 40rpx;
|
||||
background-color: rgba(0, 0, 0, .3);
|
||||
text-align: center;
|
||||
color: white;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.card-content-r {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
width: 500rpx;
|
||||
}
|
||||
|
||||
.need {
|
||||
color: #777777;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.ipt {
|
||||
display: flex;
|
||||
height: 56rpx;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.status-png {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
margin-top: 30rpx;
|
||||
text-align: right;
|
||||
font-size: 28rpx;
|
||||
color: #060606;
|
||||
}
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
position: fixed;
|
||||
bottom: 70rpx;
|
||||
width: 710rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.deliver {
|
||||
width: 600rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 14rpx;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
145
pages/quote/list.vue
Normal file
145
pages/quote/list.vue
Normal file
@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<view class="box">
|
||||
|
||||
<!-- <view class="top">
|
||||
<view class="title" style='padding-top: 100rpx;'>
|
||||
<view>
|
||||
</view>
|
||||
报价订单
|
||||
<text style="color: #20B128;" @click="navgo('/pages/quote/supplierFinancialy')">提现</text>
|
||||
</view>
|
||||
<view style="background-color: white;padding: 20rpx;">
|
||||
<u-search :showAction="true" v-model="keyword" :actionStyle="{color:'#20B128'}" actionText="搜索"
|
||||
placeholder="输入商品分类" :animation="true" @search="getLists" @custom='getLists'></u-search>
|
||||
</view>
|
||||
|
||||
</view> -->
|
||||
<u-empty v-if="lists.length==0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
||||
</u-empty>
|
||||
<view class="content">
|
||||
<view class="li" v-for="(item,index) in lists" :key="index"
|
||||
@click="navgo(`/pages/quote/index?date=${item.name.substring(0, 10)}`)">
|
||||
<view class="li-head" :class="item.status !=0?'act':'' ">
|
||||
<view style="display: flex;align-items: center;font-size: 28rpx;">
|
||||
<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/90b74202405201510453389.png"
|
||||
width="28rpx" height="28rpx" style="margin-right: 10rpx;"></u--image>
|
||||
<text> {{item.name}}</text>
|
||||
</view>
|
||||
<text v-if="item.status ==0"
|
||||
style="margin-right: 10rpx;color: #20B128;padding:4rpx 10rpx;background-color: #E4F6E5;border-radius: 5rpx;">待报价</text>
|
||||
<text v-else
|
||||
style="margin-right: 10rpx;color: #FC452F;padding:4rpx 10rpx;background-color: #FFEBE3;border-radius: 5rpx;">已报价</text>
|
||||
</view>
|
||||
<view style="padding: 20rpx;">
|
||||
商品分类: <text v-for="items in item.class_arr">{{items}}</text>
|
||||
</view>
|
||||
<view style="padding: 0 20rpx;padding-bottom: 20rpx;">
|
||||
商品数量: 共{{item.nums}}种
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="detail" @click="navgo('/pages/quote/supplierFinancialy')">
|
||||
提现
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
OpurchaseGoodsOfferListApi,
|
||||
UserWithdrawListsdate_listsApi
|
||||
} from "@/api/supplier.js"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: '',
|
||||
lists: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navgo(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
async getLists() {
|
||||
let res = await UserWithdrawListsdate_listsApi({
|
||||
// keyword: this.keyword
|
||||
})
|
||||
this.lists = res.data.lists
|
||||
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getLists()
|
||||
},
|
||||
onLoad() {
|
||||
uni.showTabBar()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getLists()
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.box {
|
||||
min-height: 95vh;
|
||||
|
||||
.top {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: white;
|
||||
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 20rpx;
|
||||
|
||||
.li {
|
||||
background-color: white;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.li-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #707070;
|
||||
justify-content: space-between;
|
||||
font-size: 22rpx;
|
||||
background: linear-gradient(92deg, rgba(226, 255, 228, 0.3) 0%, #FFFFFF 100%);
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.act {
|
||||
background: linear-gradient(86deg, rgba(255, 222, 212, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.detail {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 88rpx;
|
||||
text-align: center;
|
||||
line-height: 88rpx;
|
||||
background-color: #50C758;
|
||||
color: white;
|
||||
position: absolute;
|
||||
bottom: 150px;
|
||||
right: 40rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
217
pages/quote/supplierFinancialy.vue
Normal file
217
pages/quote/supplierFinancialy.vue
Normal file
@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="total" @click="navgo('/pages/quote/balanceDetail')">
|
||||
<view class="">
|
||||
账户总余额(元)
|
||||
</view>
|
||||
<view style="font-size: 36rpx;">
|
||||
¥{{balance||0.00}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="action">
|
||||
<view class="">
|
||||
提现至
|
||||
</view>
|
||||
<view style="font-weight: bold;" @click="showPop1=true">
|
||||
{{target_bank.is_own?'对公账户':"个人账户"}}
|
||||
</view>
|
||||
<view style="display: flex;align-items: center;color: #20B128;" @click="navgo('/pages/quote/bindAccout')">
|
||||
<text>更换账户</text> <u-icon color="#20B128" name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form" v-if='target_bank.bank_name'>
|
||||
<u-form labelPosition="left" borderBottom :label-style="{fontSize:'30rpx'}" ref="form1" labelWidth='70'>
|
||||
<u-form-item label="银行卡" borderBottom ref="item1">
|
||||
<u-input style="border: none;" v-model="target_bank.bank_name" />
|
||||
</u-form-item>
|
||||
<u-form-item label="持卡人" borderBottom ref="item1">
|
||||
<u-input style="border: none;" v-model="target_bank.name" />
|
||||
</u-form-item>
|
||||
<u-form-item label="银行账户" borderBottom ref="item1">
|
||||
<u-input style="border: none;" v-model="target_bank.bank_code" />
|
||||
</u-form-item>
|
||||
<u-form-item label="开户网点" borderBottom ref="item1">
|
||||
<u-input style="border: none;" v-model="target_bank.bank_branch" />
|
||||
</u-form-item>
|
||||
<u-form-item label="提现金额" borderBottom ref="item1">
|
||||
<u-input style="border: none;" v-model="form.money" placeholder="请输入提现金额" />
|
||||
</u-form-item>
|
||||
<text style="color: #999999;font-size: 24rpx;">
|
||||
说明:用户下单后该订单金额存放在暂存金额中,用户确认收货后次日18:00才可提现该笔订单金额
|
||||
提货付款订单在完成后次日18:00才可提现
|
||||
</text>
|
||||
</u-form>
|
||||
</view>
|
||||
<u-empty mode="data" v-else :text='emptyText'
|
||||
icon="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/89e93202405131146497294.png" />
|
||||
<view class="detail" @click="navgo('/pages/quote/financialyDeatil')">
|
||||
明细
|
||||
</view>
|
||||
<view class="submit-btn">
|
||||
<u-button text="提现" @click="submit" shape="circle" color="#50C758"></u-button>
|
||||
</view>
|
||||
<u-popup :show="showPop1" :round="10" mode="bottom" @close="showPop1=false" @open="showPop1=true">
|
||||
<view class="popContent">
|
||||
<view style="text-align: center;font-weight: bold;">请选择提现账户</view>
|
||||
<u-icon name="close" color="#303133" size="24" @click="showPop1=false"
|
||||
style="position: absolute;top: 20rpx;right: 20rpx;"></u-icon>
|
||||
<view class="bank-list">
|
||||
<view class="bank-li" @click="choseAccount(0)">
|
||||
<text>个人账户</text>
|
||||
</view>
|
||||
|
||||
<view class="bank-li" @click="choseAccount(1)">
|
||||
<text>对公账户</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
hasBindAccount,
|
||||
amountAccountApi,
|
||||
UserWithdrawApi
|
||||
} from "@/api/supplier.js"
|
||||
import {
|
||||
Modal
|
||||
} from "../../libs/uniApi"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
balance: '',
|
||||
target_bank: {},
|
||||
emptyText: "撒大声地",
|
||||
form: {
|
||||
money: ''
|
||||
},
|
||||
hasBindAccount: [],
|
||||
showPop1: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navgo(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
choseAccount(type) {
|
||||
let index = this.hasBindAccount.findIndex(item => item.is_own == type)
|
||||
this.target_bank = this.hasBindAccount[index] || {}
|
||||
this.target_bank.is_own = type
|
||||
this.showPop1 = false
|
||||
},
|
||||
async getHasBindBankList() {
|
||||
let res = await amountAccountApi({})
|
||||
this.balance = res.data.balance
|
||||
this.hasBindAccount = res.data.bank_list
|
||||
this.target_bank = res.data.bank_list[0] || {}
|
||||
|
||||
},
|
||||
async submit() {
|
||||
await Modal("温馨提示", '确认无误后,确定提现')
|
||||
await UserWithdrawApi({
|
||||
"merchant_bank_id": this.target_bank.id,
|
||||
"amount": this.form.money
|
||||
})
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
duration: 1500,
|
||||
})
|
||||
uni.$u.sleep(1500).then(res => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/quote/financialyDeatil'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
uni.showTabBar()
|
||||
this.getHasBindBankList()
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getHasBindBankList()
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
padding: 20rpx;
|
||||
min-height: 100vh;
|
||||
|
||||
.total {
|
||||
background-color: #50C758;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 42rpx 30rpx;
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.action {
|
||||
background-color: white;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.form {
|
||||
padding: 28rpx 30rpx;
|
||||
background-color: white;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.popContent {
|
||||
padding: 20rpx;
|
||||
|
||||
.bank-list {
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
max-height: 40vh;
|
||||
|
||||
.bank-li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20rpx;
|
||||
border-bottom: 1px solid #F8F9FA;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.detail {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 88rpx;
|
||||
text-align: center;
|
||||
line-height: 88rpx;
|
||||
background-color: #50C758;
|
||||
color: white;
|
||||
position: absolute;
|
||||
bottom: 300rpx;
|
||||
right: 20rpx;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
position: fixed;
|
||||
bottom: 146rpx;
|
||||
width: 710rpx;
|
||||
|
||||
}
|
||||
</style>
|
@ -180,7 +180,9 @@
|
||||
<view v-if="item.isShow" class="item ">
|
||||
<view @click="authTo(item.url)" class="item-count">
|
||||
<image v-if="showSkeleton" class="skeleton_image skeleton-radius"></image>
|
||||
<image v-else :src="item.pic" class="targets"></image>
|
||||
<image v-else :src="item.pic" class="targets"
|
||||
:class="'targets'+ (item.name=='供应入驻'?'1335':item.name=='经销入驻'?'1440':'') ">
|
||||
</image>
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -308,6 +310,12 @@
|
||||
import {
|
||||
showTab
|
||||
} from "@/utils/showTab.js";
|
||||
import {
|
||||
getSTokenApi
|
||||
} from "@/api/supplier.js"
|
||||
import {
|
||||
nextTick
|
||||
} from "vue";
|
||||
const app = getApp();
|
||||
export default {
|
||||
components: {
|
||||
@ -475,46 +483,27 @@
|
||||
onReady() {
|
||||
// #ifdef APP
|
||||
this.isNodes++;
|
||||
let that = this
|
||||
// setTimeout(() => {
|
||||
// const query = uni.createSelectorQuery().in(this);
|
||||
// query
|
||||
// .select(".targets")
|
||||
// .boundingClientRect((data) => {
|
||||
// that.elInfo = data
|
||||
// // #ifdef APP-PLUS
|
||||
// if (Boolean(uni.getStorageSync('newStore'))) {
|
||||
// that.subNvue = uni.getSubNVueById('userSubnvu')
|
||||
// that.subNvue.show('slide-in-left', 300)
|
||||
// uni.$emit('openUserSubnvue', JSON.stringify(data))
|
||||
// }
|
||||
// // #endif
|
||||
// })
|
||||
// .exec();
|
||||
// }, 500)
|
||||
|
||||
// #endif
|
||||
|
||||
|
||||
},
|
||||
mounted: function() {
|
||||
this.getVersion()
|
||||
},
|
||||
onShow: function() {
|
||||
this.isSupplierFn()
|
||||
// #ifdef APP-PLUS
|
||||
this.openDiver()
|
||||
this.openDistrDiver()
|
||||
setTimeout(() => {
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query
|
||||
.select(".targets")
|
||||
.boundingClientRect((data) => {
|
||||
that.elInfo = data
|
||||
// #ifdef APP-PLUS
|
||||
if (Boolean(uni.getStorageSync('newStore'))) {
|
||||
that.subNvue = uni.getSubNVueById('userSubnvu')
|
||||
that.subNvue.show('slide-in-left', 300)
|
||||
uni.$emit('openUserSubnvue', JSON.stringify(data))
|
||||
}
|
||||
// #endif
|
||||
})
|
||||
.exec();
|
||||
}, 800)
|
||||
@ -541,6 +530,60 @@
|
||||
}, 500)
|
||||
},
|
||||
methods: {
|
||||
/*供应商tabbar,token,引导页相关*/
|
||||
isSupplierFn() {
|
||||
if (!this.isLogin || uni.getStorageSync('LOGIN_STATUS_STOKEN')) return;
|
||||
getSTokenApi().then(res => {
|
||||
if (res.data?.token) {
|
||||
uni.setStorageSync('LOGIN_STATUS_STOKEN', (res.data?.token || ''))
|
||||
this.$store.commit('SET_STOKEN', res.data?.token);
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log("获取报错", err)
|
||||
})
|
||||
},
|
||||
|
||||
/*新供应商入驻引导页*/
|
||||
openDiver() {
|
||||
let isNewSupplier = Boolean(uni.getStorageSync('newSupplier'));
|
||||
if (!isNewSupplier) return;
|
||||
let that = this
|
||||
this.subNvue = uni.getSubNVueById('userNewSupplier')
|
||||
uni.$on('offnewSupplierSubnvue', () => {
|
||||
this.subNvue.hide('slide-out-right');
|
||||
})
|
||||
setTimeout(() => {
|
||||
that.subNvue.show('slide-in-left', 300)
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query
|
||||
.select('.targets1335')
|
||||
.boundingClientRect((data) => {
|
||||
uni.$emit('openSupplierSubnvue', (data))
|
||||
})
|
||||
.exec();
|
||||
}, 800)
|
||||
},
|
||||
/*新经销商入驻引导页*/
|
||||
openDistrDiver() {
|
||||
let isNewSupplier = Boolean(uni.getStorageSync('newDistribution'));
|
||||
if (!isNewSupplier) return;
|
||||
let that = this
|
||||
this.subNvue = uni.getSubNVueById('userDistr')
|
||||
uni.$on('offnewSupplierSubnvue', () => {
|
||||
this.subNvue.hide('slide-out-right');
|
||||
})
|
||||
setTimeout(() => {
|
||||
that.subNvue.show('slide-in-left', 300)
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query
|
||||
.select('.targets1440')
|
||||
.boundingClientRect((data) => {
|
||||
uni.$emit('openSupplierSubnvue', (data))
|
||||
})
|
||||
.exec();
|
||||
}, 800)
|
||||
},
|
||||
|
||||
authTo(url) {
|
||||
if (this.isLogin) {
|
||||
uni.navigateTo({
|
||||
@ -749,8 +792,9 @@
|
||||
*/
|
||||
getMyMenus: function() {
|
||||
let that = this;
|
||||
if (this.MyMenus.length) return;
|
||||
getMenuList().then(res => {
|
||||
getMenuList({
|
||||
type: uni.getStorageSync('userType') || null
|
||||
}).then(res => {
|
||||
that.personalMenu = []
|
||||
res.data.menu.forEach((item, index) => {
|
||||
that.filterMenus(item)
|
||||
|
166
pages/user/subnvue/userDistr.nvue
Normal file
166
pages/user/subnvue/userDistr.nvue
Normal file
@ -0,0 +1,166 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="jump" @click="next">
|
||||
<text class="font">跳过</text>
|
||||
</view>
|
||||
<view class="next-btn center" :style="{ left:screenWidth/2,top:(screenHeight-96)}">
|
||||
<text class="next-btn-text font" style="line-height: 76rpx;" @click="next">我知道了</text>
|
||||
</view>
|
||||
<view class="target" :style="{left:left-20,top:top-13.5}" @click="next">
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/af251202405251345514747.png"
|
||||
class="target-icon"></image>
|
||||
<text class="target-text">经销入驻</text>
|
||||
</view>
|
||||
<view :style="{left:left-20+'px',top:top-70+'px'}" class="trans1">
|
||||
<image src="/static/images/pointer.png" style="width: 254rpx;height: 254rpx;"></image>
|
||||
</view>
|
||||
<view class="tips-box" :style="{left:left-100,top:top-170}">
|
||||
<view class="tips" style="position: absolute;padding-left: 20px;">
|
||||
<view class="tras" :class="{act:isAct}">
|
||||
<text style="font-size: 28rpx;line-height: 100rpx;color: white;">点击我的页面,进行经销商入驻</text>
|
||||
</view>
|
||||
</view>
|
||||
<image src="/static/images/starpng.png" class="start" mode="">
|
||||
</image>
|
||||
</view>
|
||||
<image src="/static/images/greenLine.png" class="greenLine" :style="{left:left-3.5,top:top-70}" mode="">
|
||||
</image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
screenHeight: 0,
|
||||
screenWidth: 0,
|
||||
isAct: false,
|
||||
left: 0,
|
||||
top: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
next() {
|
||||
uni.$emit('offnewSupplierSubnvue');
|
||||
uni.setStorageSync("newDistribution", false)
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.$on('openSupplierSubnvue', (data) => {
|
||||
this.left = data.left
|
||||
this.top = data.top
|
||||
})
|
||||
const res = uni.getSystemInfo({
|
||||
success: (res => {
|
||||
this.screenHeight = res.screenHeight
|
||||
this.screenWidth = res.screenWidth
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.jump {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 80rpx;
|
||||
border: 1px solid white;
|
||||
padding: 10rpx 20rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.font {
|
||||
font-size: 28rpx;
|
||||
color: white;
|
||||
lines: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.center {
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.next-btn {
|
||||
position: absolute;
|
||||
width: 240rpx;
|
||||
height: 76rpx;
|
||||
border: 1px solid white;
|
||||
border-radius: 38rpx;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
.target {
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
background-color: white;
|
||||
border-radius: 136rpx;
|
||||
}
|
||||
|
||||
.target-icon {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
position: absolute;
|
||||
left: 68rpx;
|
||||
transform: translate(-50%, -50%);
|
||||
top: 68rpx;
|
||||
}
|
||||
|
||||
.target-text {
|
||||
font-size: 20rpx;
|
||||
position: absolute;
|
||||
left: 68rpx;
|
||||
transform: translate(-50%, 0);
|
||||
top: 100rpx;
|
||||
}
|
||||
|
||||
.pointer {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.tips-box {
|
||||
width: 462rpx;
|
||||
height: 178rpx;
|
||||
position: absolute;
|
||||
padding-top: 72rpx;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.start {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.tips {
|
||||
width: 462rpx;
|
||||
height: 106rpx;
|
||||
background-color: #5BE157;
|
||||
border-radius: 20rpx;
|
||||
|
||||
}
|
||||
|
||||
.tras {
|
||||
width: 462rpx;
|
||||
transition-property: width;
|
||||
transition-duration: 3s;
|
||||
transition-delay: 0.1s;
|
||||
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
|
||||
}
|
||||
|
||||
|
||||
.act {
|
||||
width: 462rpx;
|
||||
}
|
||||
|
||||
.greenLine {
|
||||
width: 35px;
|
||||
height: 60px;
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
167
pages/user/subnvue/userNewSupplier.nvue
Normal file
167
pages/user/subnvue/userNewSupplier.nvue
Normal file
@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="jump" @click="next">
|
||||
<text class="font">跳过</text>
|
||||
</view>
|
||||
<view class="next-btn center" :style="{ left:screenWidth/2,top:(screenHeight-96)}">
|
||||
<text class="next-btn-text font" style="line-height: 76rpx;" @click="next">我知道了</text>
|
||||
</view>
|
||||
<view class="target" :style="{left:left-20,top:top-13.5}" @click="next">
|
||||
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/c251a202405251344552292.png"
|
||||
class="target-icon"></image>
|
||||
<text class="target-text">供应入驻</text>
|
||||
</view>
|
||||
<view :style="{left:left-20+'px',top:top-70+'px'}" class="trans1">
|
||||
<image src="/static/images/pointer.png" style="width: 254rpx;height: 254rpx;"></image>
|
||||
</view>
|
||||
<view class="tips-box" :style="{left:left-100,top:top-170}">
|
||||
<view class="tips" style="position: absolute;padding-left: 20px;">
|
||||
<view class="tras" :class="{act:isAct}">
|
||||
<text style="font-size: 28rpx;line-height: 100rpx;color: white;">点击我的页面,进行供应商入驻</text>
|
||||
</view>
|
||||
</view>
|
||||
<image src="/static/images/starpng.png" class="start" mode="">
|
||||
</image>
|
||||
</view>
|
||||
<image src="/static/images/greenLine.png" class="greenLine" :style="{left:left-3.5,top:top-70}" mode="">
|
||||
</image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
screenHeight: 0,
|
||||
screenWidth: 0,
|
||||
isAct: false,
|
||||
left: 0,
|
||||
top: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
next() {
|
||||
uni.$emit('offnewSupplierSubnvue');
|
||||
uni.setStorageSync("newSupplier", false)
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
uni.$on('openSupplierSubnvue', (data) => {
|
||||
console.log('接收消息', data.top, data.left)
|
||||
this.left = data.left
|
||||
this.top = data.top
|
||||
})
|
||||
const res = uni.getSystemInfo({
|
||||
success: (res => {
|
||||
this.screenHeight = res.screenHeight
|
||||
this.screenWidth = res.screenWidth
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.jump {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 80rpx;
|
||||
border: 1px solid white;
|
||||
padding: 10rpx 20rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.font {
|
||||
font-size: 28rpx;
|
||||
color: white;
|
||||
lines: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.center {
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.next-btn {
|
||||
position: absolute;
|
||||
width: 240rpx;
|
||||
height: 76rpx;
|
||||
border: 1px solid white;
|
||||
border-radius: 38rpx;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
.target {
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
background-color: white;
|
||||
border-radius: 136rpx;
|
||||
}
|
||||
|
||||
.target-icon {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
position: absolute;
|
||||
left: 68rpx;
|
||||
transform: translate(-50%, -50%);
|
||||
top: 68rpx;
|
||||
}
|
||||
|
||||
.target-text {
|
||||
font-size: 20rpx;
|
||||
position: absolute;
|
||||
left: 68rpx;
|
||||
transform: translate(-50%, 0);
|
||||
top: 100rpx;
|
||||
}
|
||||
|
||||
.pointer {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.tips-box {
|
||||
width: 462rpx;
|
||||
height: 178rpx;
|
||||
position: absolute;
|
||||
padding-top: 72rpx;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.start {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.tips {
|
||||
width: 462rpx;
|
||||
height: 106rpx;
|
||||
background-color: #5BE157;
|
||||
border-radius: 20rpx;
|
||||
|
||||
}
|
||||
|
||||
.tras {
|
||||
width: 462rpx;
|
||||
transition-property: width;
|
||||
transition-duration: 3s;
|
||||
transition-delay: 0.1s;
|
||||
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
|
||||
}
|
||||
|
||||
|
||||
.act {
|
||||
width: 462rpx;
|
||||
}
|
||||
|
||||
.greenLine {
|
||||
width: 35px;
|
||||
height: 60px;
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
@ -321,6 +321,7 @@
|
||||
wechatAppAuth,
|
||||
appleAppAuth
|
||||
} from '@/api/api.js'
|
||||
|
||||
// #endif
|
||||
import attrs, {
|
||||
required,
|
||||
@ -480,7 +481,6 @@
|
||||
});
|
||||
that.$store.commit("SETUID", data.user.uid);
|
||||
that.$store.commit('UPDATE_USERINFO', data.user);
|
||||
|
||||
let method
|
||||
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
|
||||
'/pages/goods_cate/goods_cate',
|
||||
@ -600,7 +600,6 @@
|
||||
});
|
||||
that.$store.commit("SETUID", data.result.user.uid);
|
||||
that.$store.commit('UPDATE_USERINFO', data.result.user);
|
||||
|
||||
let method
|
||||
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
|
||||
'/pages/goods_cate/goods_cate',
|
||||
@ -1238,7 +1237,6 @@
|
||||
|
||||
// 账号密码验证通过后的逻辑
|
||||
submitSuccess(data) {
|
||||
console.log(data, 'hanshu')
|
||||
let that = this
|
||||
this.checkOpenId(data.user)
|
||||
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) ||
|
||||
@ -1344,6 +1342,7 @@
|
||||
phone: this.account,
|
||||
jg_register_id: result.registerID
|
||||
}).then(res => {
|
||||
uni.setStorageSync('jg_id', result.registerID)
|
||||
console.log("绑定成功", res);
|
||||
}).catch(err => {
|
||||
console.log("绑定失败", err);
|
||||
@ -1359,7 +1358,6 @@
|
||||
uni.preLogin({
|
||||
provider: 'univerify',
|
||||
success() {
|
||||
console.log("当前环境支持一键登录")
|
||||
uni.login({
|
||||
provider: 'univerify',
|
||||
univerifyStyle: oneClickStyle,
|
||||
@ -1379,18 +1377,6 @@
|
||||
title: '登录失败,请稍后再试'
|
||||
});
|
||||
})
|
||||
// uniCloud.callFunction({
|
||||
// name: 'oneClickLoginFn',
|
||||
// data: {
|
||||
// 'access_token': res.authResult
|
||||
// .access_token,
|
||||
// 'openid': res.authResult.openid
|
||||
// }
|
||||
// }).then(res => {
|
||||
// console.log(res, '登录成功后的res')
|
||||
// }).catch(err => {
|
||||
// console.log(err, 'ererre')
|
||||
// })
|
||||
},
|
||||
fail(res) { // 登录失败
|
||||
console.log(res.errCode)
|
||||
@ -1400,7 +1386,7 @@
|
||||
},
|
||||
fail(res) {
|
||||
that.$util.Tips({
|
||||
title: '当前环境不支持一键登录'
|
||||
title: '登录失败,开起数据流量后重新登录'
|
||||
});
|
||||
}
|
||||
})
|
||||
|
@ -351,6 +351,7 @@
|
||||
|
||||
onShow() {
|
||||
this.isIndexClick = false;
|
||||
this.isSupplierFn()
|
||||
},
|
||||
|
||||
onPageScroll(e) {
|
||||
@ -385,6 +386,18 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
/*供应商tabbar,token,引导页相关*/
|
||||
isSupplierFn() {
|
||||
if (!this.isLogin || uni.getStorageSync('LOGIN_STATUS_STOKEN')) return;
|
||||
getSTokenApi().then(res => {
|
||||
if (res.data?.token) {
|
||||
uni.setStorageSync('LOGIN_STATUS_STOKEN', (res.data?.token || ''))
|
||||
this.$store.commit('SET_STOKEN', res.data?.token);
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log("获取报错", err)
|
||||
})
|
||||
},
|
||||
|
||||
// 下拉加载
|
||||
onPulling() {
|
||||
|
BIN
static/tabbar_icon/bjd.png
Normal file
BIN
static/tabbar_icon/bjd.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1023 B |
BIN
static/tabbar_icon/bjdact.png
Normal file
BIN
static/tabbar_icon/bjdact.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
@ -13,6 +13,7 @@ import {
|
||||
} from "../../api/user.js";
|
||||
import {
|
||||
LOGIN_STATUS,
|
||||
LOGIN_STATUS_S,
|
||||
UID,
|
||||
USER_INFO
|
||||
} from '../../config/cache';
|
||||
@ -28,6 +29,7 @@ import {
|
||||
const state = {
|
||||
location: Cache.get('LOCATION_DATA', true) || {},
|
||||
token: Cache.get(LOGIN_STATUS) || null,
|
||||
s_token: uni.getStorageSync(LOGIN_STATUS_S) || null,
|
||||
uuid: uni.getStorageSync('uuid') || "",
|
||||
backgroundColor: "#fff",
|
||||
userInfo: (typeof Cache.get('USER_INFO') == 'string' ? JSON.parse(Cache.get('USER_INFO')) : Cache.get(
|
||||
@ -52,6 +54,9 @@ const mutations = {
|
||||
Cache.set(LOGIN_STATUS, opt.token, opt.time);
|
||||
uni.removeStorageSync('auth_token');
|
||||
},
|
||||
SET_STOKEN(state, s_token) {
|
||||
state.s_token = s_token
|
||||
},
|
||||
SET_USERINFO(state, opt) {
|
||||
state.userInfo = opt;
|
||||
Cache.set(USER_INFO, opt);
|
||||
@ -72,6 +77,7 @@ const mutations = {
|
||||
state.token = null;
|
||||
state.uid = null
|
||||
Cache.clear(LOGIN_STATUS);
|
||||
Cache.clear(LOGIN_STATUS_S);
|
||||
Cache.clear(UID);
|
||||
},
|
||||
BACKGROUND_COLOR(state, color) {
|
||||
|
106
utils/request.js
106
utils/request.js
@ -9,13 +9,17 @@
|
||||
// +----------------------------------------------------------------------
|
||||
import {
|
||||
HTTP_REQUEST_URL,
|
||||
HTTP_REQUEST_URL_TWO,
|
||||
HEADER,
|
||||
TOKENNAME
|
||||
} from '@/config/app';
|
||||
import { checkLogin } from '../libs/login';
|
||||
import {
|
||||
checkLogin
|
||||
} from '../libs/login';
|
||||
import store from '../store';
|
||||
import pako from '../plugin/pako/pako.es5.min.js'
|
||||
function toLogin(){
|
||||
|
||||
function toLogin() {
|
||||
store.commit("LOGOUT");
|
||||
uni.showToast({
|
||||
title: '请登录',
|
||||
@ -23,40 +27,43 @@ function toLogin(){
|
||||
duration: 1000
|
||||
});
|
||||
}
|
||||
|
||||
function decompress(str) {
|
||||
return pako.inflateRaw(base64ToUint8Array(str), {
|
||||
to: 'string'
|
||||
});
|
||||
}
|
||||
|
||||
function base64ToUint8Array(base64String) {
|
||||
let padding = '='.repeat((4 - base64String.length % 4) % 4);
|
||||
let base64 = (base64String + padding)
|
||||
.replace(/\-/g, '+')
|
||||
.replace(/_/g, '/');
|
||||
let rawData = atob(base64);
|
||||
let outputArray = new Uint8Array(rawData.length);
|
||||
for (var i = 0; i < rawData.length; ++i) {
|
||||
outputArray[i] = rawData.charCodeAt(i);
|
||||
}
|
||||
return outputArray;
|
||||
let padding = '='.repeat((4 - base64String.length % 4) % 4);
|
||||
let base64 = (base64String + padding)
|
||||
.replace(/\-/g, '+')
|
||||
.replace(/_/g, '/');
|
||||
let rawData = atob(base64);
|
||||
let outputArray = new Uint8Array(rawData.length);
|
||||
for (var i = 0; i < rawData.length; ++i) {
|
||||
outputArray[i] = rawData.charCodeAt(i);
|
||||
}
|
||||
return outputArray;
|
||||
}
|
||||
|
||||
function atob(input) {
|
||||
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||
let str = input.replace(/=+$/, '');
|
||||
let output = '';
|
||||
if (str.length % 4 === 1) {
|
||||
throw new Error('InvalidLengthError');
|
||||
}
|
||||
for (let i = 0, len = str.length; i < len; i += 4) {
|
||||
const a = chars.indexOf(str.charAt(i));
|
||||
const b = chars.indexOf(str.charAt(i + 1));
|
||||
const c = chars.indexOf(str.charAt(i + 2));
|
||||
const d = chars.indexOf(str.charAt(i + 3));
|
||||
const sum = (a << 18) | (b << 12) | (c << 6) | d;
|
||||
output += String.fromCharCode((sum >> 16) & 0xFF, (sum >> 8) & 0xFF, sum & 0xFF);
|
||||
}
|
||||
|
||||
return output;
|
||||
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||
let str = input.replace(/=+$/, '');
|
||||
let output = '';
|
||||
if (str.length % 4 === 1) {
|
||||
throw new Error('InvalidLengthError');
|
||||
}
|
||||
for (let i = 0, len = str.length; i < len; i += 4) {
|
||||
const a = chars.indexOf(str.charAt(i));
|
||||
const b = chars.indexOf(str.charAt(i + 1));
|
||||
const c = chars.indexOf(str.charAt(i + 2));
|
||||
const d = chars.indexOf(str.charAt(i + 3));
|
||||
const sum = (a << 18) | (b << 12) | (c << 6) | d;
|
||||
output += String.fromCharCode((sum >> 16) & 0xFF, (sum >> 8) & 0xFF, sum & 0xFF);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
var HTTP_list = new Map();
|
||||
@ -67,10 +74,10 @@ var HTTP_list = new Map();
|
||||
function baseRequest(url, method, data, {
|
||||
noAuth = false,
|
||||
noVerify = false,
|
||||
enLoad = false //终止上一个接口相同类型正在请求的接口, 防止快速切换tab时页面抖动
|
||||
enLoad = false //终止上一个接口相同类型正在请求的接口, 防止快速切换tab时页面抖动
|
||||
}) {
|
||||
let Url = HTTP_REQUEST_URL,
|
||||
header = HEADER;
|
||||
header = uni.$u.deepClone(HEADER);
|
||||
if (!noAuth) {
|
||||
//登录过期自动登录
|
||||
if (!store.state.app.token && !checkLogin()) {
|
||||
@ -80,16 +87,16 @@ function baseRequest(url, method, data, {
|
||||
});
|
||||
}
|
||||
}
|
||||
let URL = Url + '/api/' + url
|
||||
if(enLoad) {
|
||||
let http = HTTP_list.get(URL);
|
||||
if(http){
|
||||
http.abort();
|
||||
}
|
||||
}
|
||||
HTTP_list.delete(URL);
|
||||
let URL = Url + '/api/' + url
|
||||
if (enLoad) {
|
||||
let http = HTTP_list.get(URL);
|
||||
if (http) {
|
||||
http.abort();
|
||||
}
|
||||
}
|
||||
HTTP_list.delete(URL);
|
||||
if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
|
||||
if(store.state.app.uuid) header['uuid'] = store.state.app.uuid
|
||||
if (store.state.app.uuid) header['uuid'] = store.state.app.uuid
|
||||
return new Promise((reslove, reject) => {
|
||||
let http = uni.request({
|
||||
url: URL,
|
||||
@ -98,10 +105,9 @@ function baseRequest(url, method, data, {
|
||||
data: data || {},
|
||||
success: (res) => {
|
||||
if (res.data && res.data.encode) {
|
||||
try
|
||||
{
|
||||
try {
|
||||
res.data = JSON.parse(decompress(res.data.data));
|
||||
}catch(e){
|
||||
} catch (e) {
|
||||
res.data = decompress(decodeURI(res.data.data));
|
||||
}
|
||||
}
|
||||
@ -118,22 +124,22 @@ function baseRequest(url, method, data, {
|
||||
})
|
||||
reject(res.data);
|
||||
} else {
|
||||
console.error("请求失败", res)
|
||||
reject(res.data.message || '系统错误');
|
||||
}
|
||||
console.error("请求失败", res)
|
||||
reject(res.data.message || '系统错误');
|
||||
}
|
||||
},
|
||||
fail: (message) => {
|
||||
reject('请求失败');
|
||||
},
|
||||
complete: () => {
|
||||
// if(enLoad) HTTP_list.delete(URL);
|
||||
}
|
||||
complete: () => {
|
||||
// if(enLoad) HTTP_list.delete(URL);
|
||||
}
|
||||
})
|
||||
if(enLoad) HTTP_list.set(URL, http);
|
||||
if (enLoad) HTTP_list.set(URL, http);
|
||||
});
|
||||
}
|
||||
const request = {};
|
||||
['options', 'get', 'post', 'put', 'head', 'delete', 'trace', 'connect'].forEach((method) => {
|
||||
request[method] = (api, data, opt) => baseRequest(api, method, data, opt || {})
|
||||
});
|
||||
export default request;
|
||||
export default request;
|
131
utils/requestSupplier.js
Normal file
131
utils/requestSupplier.js
Normal file
@ -0,0 +1,131 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
import {
|
||||
HTTP_REQUEST_URL_TWO,
|
||||
HEADER,
|
||||
TOKENNAME
|
||||
} from '@/config/app';
|
||||
import {
|
||||
checkLogin
|
||||
} from '../libs/login';
|
||||
import store from '../store';
|
||||
import pako from '../plugin/pako/pako.es5.min.js'
|
||||
import {
|
||||
Tips
|
||||
} from "@/utils/util.js"
|
||||
|
||||
function toLogin() {
|
||||
|
||||
}
|
||||
|
||||
function decompress(str) {
|
||||
return pako.inflateRaw(base64ToUint8Array(str), {
|
||||
to: 'string'
|
||||
});
|
||||
}
|
||||
|
||||
function base64ToUint8Array(base64String) {
|
||||
let padding = '='.repeat((4 - base64String.length % 4) % 4);
|
||||
let base64 = (base64String + padding)
|
||||
.replace(/\-/g, '+')
|
||||
.replace(/_/g, '/');
|
||||
let rawData = atob(base64);
|
||||
let outputArray = new Uint8Array(rawData.length);
|
||||
for (var i = 0; i < rawData.length; ++i) {
|
||||
outputArray[i] = rawData.charCodeAt(i);
|
||||
}
|
||||
return outputArray;
|
||||
}
|
||||
|
||||
function atob(input) {
|
||||
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||
let str = input.replace(/=+$/, '');
|
||||
let output = '';
|
||||
if (str.length % 4 === 1) {
|
||||
throw new Error('InvalidLengthError');
|
||||
}
|
||||
for (let i = 0, len = str.length; i < len; i += 4) {
|
||||
const a = chars.indexOf(str.charAt(i));
|
||||
const b = chars.indexOf(str.charAt(i + 1));
|
||||
const c = chars.indexOf(str.charAt(i + 2));
|
||||
const d = chars.indexOf(str.charAt(i + 3));
|
||||
const sum = (a << 18) | (b << 12) | (c << 6) | d;
|
||||
output += String.fromCharCode((sum >> 16) & 0xFF, (sum >> 8) & 0xFF, sum & 0xFF);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
var HTTP_list = new Map();
|
||||
|
||||
/**
|
||||
* 发送请求
|
||||
*/
|
||||
let that = this
|
||||
|
||||
function baseRequest(url, method, data, {
|
||||
noAuth = false,
|
||||
noVerify = false,
|
||||
tokenName = 0, //判断token名称,值的Boolean值为true时为X-token,一般为token
|
||||
enLoad = false //终止上一个接口相同类型正在请求的接口, 防止快速切换tab时页面抖动
|
||||
}) {
|
||||
let Url = HTTP_REQUEST_URL_TWO,
|
||||
header = uni.$u.deepClone(HEADER);
|
||||
let URL = Url + '/api/' + url
|
||||
if (enLoad) {
|
||||
let http = HTTP_list.get(URL);
|
||||
if (http) {
|
||||
http.abort();
|
||||
}
|
||||
}
|
||||
HTTP_list.delete(URL);
|
||||
|
||||
if (tokenName) {
|
||||
// if (store.state.app.token) header[TOKENNAME] = 'Bearer' + store.state.app.token;
|
||||
if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
|
||||
} else {
|
||||
if (store.state.app.s_token) header['Token'] = store.state.app.s_token;
|
||||
}
|
||||
if (store.state.app.uuid) header['uuid'] = store.state.app.uuid
|
||||
return new Promise((reslove, reject) => {
|
||||
let http = uni.request({
|
||||
url: URL,
|
||||
method: method || 'GET',
|
||||
header: header,
|
||||
data: data || {},
|
||||
success: (res) => {
|
||||
console.log(res.data.show)
|
||||
if (res.data.code == 1) {
|
||||
reslove(res.data, res);
|
||||
}
|
||||
if (res.data.show) {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
} else {
|
||||
reslove(res.data, res);
|
||||
}
|
||||
},
|
||||
fail: (message) => {
|
||||
reject('请求失败');
|
||||
},
|
||||
complete: () => {
|
||||
// if(enLoad) HTTP_list.delete(URL);
|
||||
}
|
||||
})
|
||||
if (enLoad) HTTP_list.set(URL, http);
|
||||
});
|
||||
}
|
||||
const request = {};
|
||||
['options', 'get', 'post', 'put', 'head', 'delete', 'trace', 'connect'].forEach((method) => {
|
||||
request[method] = (api, data, opt) => baseRequest(api, method, data, opt || {})
|
||||
});
|
||||
export default request;
|
@ -1,23 +1,23 @@
|
||||
// 控制tabbar是否显示
|
||||
import store from "@/store/index.js"
|
||||
|
||||
export const showTab = (data)=>{
|
||||
let user = data || store.state.app.userInfo;
|
||||
if(user.mer_info&&user.mer_info.mer_settlement_agree_status){
|
||||
uni.setTabBarItem({
|
||||
index: 1,
|
||||
visible: true,
|
||||
fail:(e)=>{
|
||||
console.log(e);
|
||||
}
|
||||
})
|
||||
}else {
|
||||
uni.setTabBarItem({
|
||||
index: 1,
|
||||
visible: false,
|
||||
fail:(e)=>{
|
||||
console.log(e);
|
||||
}
|
||||
})
|
||||
}
|
||||
const setTab = (index, visible) => {
|
||||
uni.setTabBarItem({
|
||||
index,
|
||||
visible,
|
||||
fail: (e) => {
|
||||
console.log(e);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const showTab = (data) => {
|
||||
setTab(4, Boolean(uni.getStorageSync('LOGIN_STATUS_STOKEN')))
|
||||
setTab(3, !Boolean(uni.getStorageSync('LOGIN_STATUS_STOKEN')))
|
||||
let user = data || store.state.app.userInfo;
|
||||
if (user.mer_info && user.mer_info.mer_settlement_agree_status) {
|
||||
setTab(1, true)
|
||||
} else {
|
||||
setTab(1, false)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user