Commit 583ace75 authored by xiangzj's avatar xiangzj

原生插件开发

parent 2c986eca
......@@ -2,7 +2,7 @@
import {
mapMutations
} from 'vuex'
const nativePlugin = uni.requireNativePlugin("UUMbsAgentPlugin-Test")
export default {
onLaunch: function() {
console.log('App Launch')
......@@ -17,8 +17,16 @@
}
});
},
onShow: function() {
// console.log('App Show')
// #ifdef APP-PLUS
setTimeout(function() { // 被唤醒获取参数 需异步一下
const args = plus.runtime.arguments
if (plus.runtime.arguments && typeof args === 'string') {
const data = nativePlugin.handleOpenURL(args)
}
}, 100);
// #endif
},
onHide: function() {
// console.log('App Hide')
......
{
"name" : "易商",
// "appid" : "__UNI__B70C0E8",
// "appid" : "__UNI__EDB6A1F",
"appid" : "__UNI__EDB6A1F",
"description" : "订货系统",
"versionName" : "1.1.22",
"versionCode" : "10122",
"versionName" : "1.1.24",
"versionCode" : "10124",
"transformPx" : false,
"app-plus" : {
/* 5+App特有相关 */
......@@ -46,7 +46,9 @@
"abiFilters" : [ "armeabi-v7a" ]
},
"ios" : {
"dSYMs" : false
"dSYMs" : false,
"urlschemewhitelist" : "uumbs",
"urltypes" : "uusafeportalwly"
},
/* ios打包配置 */
"sdkConfigs" : {
......@@ -87,6 +89,22 @@
"splashscreen" : {
"iosStyle" : "common"
}
},
"nativePlugins" : {
"AndroidLMY-ToastPlus" : {
"__plugin_info__" : {
"name" : "ToastPlus",
"description" : "原生Toast",
"platforms" : "Android,iOS",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {}
}
}
}
},
/* SDK配置 */
......@@ -112,7 +130,7 @@
// }
"/sap" : {
"target" : "http://221.10.127.60:5000/wlySap",
// "target" : "http://10.0.134.182:8000",
// "target" : "https://218.89.67.37/wlySap",
"changeOrigin" : true
},
"/crm-app" : {
......@@ -134,6 +152,10 @@
"target" : "http://221.10.127.60:5000/gateway/cyj",
// "target" : "http://api.c0331.dev.guanyingyun.com",
"changeOrigin" : true
},
"/uusafe" : {
"target" : "https://zzy.ipincloud.cn:9070",
"changeOrigin" : true
}
}
}
......
# Default ignored files
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/AndroidLMY-ToastPlus.iml" filepath="$PROJECT_DIR$/.idea/AndroidLMY-ToastPlus.iml" />
</modules>
</component>
</project>
\ No newline at end of file
//
// UUMbsAgent.h
// UUMbsAgent
//
// Created by xiaoda on 2019/9/23.
// Copyright © 2019 UUSafe. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "UUMbsApiObject.h"
/// UUSafe 开放平台
@interface UUMbsAgent : NSObject
/// 注册Mbs终端注册第三方程序应用
/// @param builder agent 注册参数对象
/// @param completionHandler 注册接口回调
+ (void)registerWithBuilder:(UUMbsAgentBuilder * _Nonnull)builder
completionHandler:(nullable void (^)(NSError *_Nullable error))completionHandler;
/// 注册Mbs终端注册第三方程序应用(主程序内核版本在3.5.6之后使用)
/// @param builder agent 注册参数对象
+ (BOOL)registerWithBuilderEx:(UUMbsAgentBuilder * _Nonnull)builder;
/// 处理Mbs客户端程序通过URL启动第三方应用时传递的数据
/// 需要在 `application:openURL:sourceApplication:annotation:`或者`application:handleOpenURL`中调用
/// @param url 启动第三方应用的URL
+ (void)handleOpenURL:(NSURL * _Nullable)url;
/// 检测主程序Mbs是否安装,此方法需要在info.plist中添加scheme白名单
/// @param scheme 主程序的程序入口名
+ (BOOL)isMbsInstalled:(NSString * _Nullable)scheme;
/// 获取MbsAgent 版本号,当前版本号 3.6.2
+ (NSString * _Nonnull)getVersion;
/// 设置是否在控制台中打印SDK中的日志,用于调试,仅在 debug模式下生效,默认值 NO
+ (void)enableDebugOn:(BOOL)on NS_DEPRECATED_IOS(1_0, 1_2, "3.6.2 版本以后使用 `setLogLevel` 方法替代。");
/// 设置日志等级,可以控制日志的输出范围
/// @param logLevelOptions 日志等级
+ (void)setMbsAgentLogLevel:(UUMbsAgentLogLevelOptions)logLevelOptions;
/// 获取日志文件路径数组,开发者可以压缩后使用 UIDocumentInteractionController 导出,详见demo
+ (NSArray * _Nullable)getMbsAgentLogs;
@end
//
// UUMbsApiObject.h
// UUMbsAgent
//
// Created by xiaoda on 2019/9/23.
// Copyright © 2019 UUSafe. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
FOUNDATION_EXPORT NSString * const MbsAgentErrorDomain;
/**
错误码
*/
typedef NS_ENUM(NSInteger, MbsErrCode) {
MbsSuccess = 0, /**< 成功 */
MbsErrCodeCommon = -1, /**< 普通错误类型 */
MbsErrCodeIllegalOrg = -2, /**< 注册错误码 无效机构 */
MbsErrCodeIllegalClient = -3, /**< 注册错误码 无效应用 */
MbsErrCodeUserCancel = -4, /**< 授权错误码 用户点击取消并返回 */
MbsErrCodeDeny = -5, /**< 授权错误码 授权失败 */
MbsErrCodeUnsupport = -6, /**< 授权错误码 Mbs不支持 */
MbsErrCodeTimeOut = -7, /**< 授权错误码 授权超时 */
MbsErrCodeOpenMbsError = -8, /**< Mbs无法打开 */
MbsErrCodeSeverError = -9, /**< 平台服务地址与SDK不符 */
MbsErrCodeGroupError = -10, /**< 同步数据模块,groupId有误 */
MbsErrCodeSyncSetError = -11, /**< 同步数据模块,写入数据失败 */
MbsErrCodeSecMailCantOpen = -12, /**< secmail 无法打开 */
MbsErrCodeSSONotRegister = -13, /**< sso MbsAgent未注册 */
MbsErrCodeUnknow = -10000, /**< 未知错误 */
MbsErrCodeKeyError = 10001, /**< 第三方接入-appkey不正确或无权限 */
MbsErrCodeSignError = 10002, /**< 第三方接入-签名不正确 */
MbsErrCodeThirdAPPNotAuth = 10003, /**< 第三方接入-应用不存在或未授权 */
MbsErrCodeTokenInvalid = 10004, /**< 第三方接入-Token 过期 */
MbsErrCodeUserNameErr = 10005 /**< 第三方接入-用户不存在 */
};
typedef NS_ENUM(NSInteger, MbsSecurityType) {
MbsSecurityNone = 0, /**< 不校验证书 */
MbsSecurityServer = 1, /**< 只校验服务端证书 */
MbsSecurityMutualAuth = 2, /**< 双向认证 */
};
typedef NS_ENUM(NSInteger, UUMbsStatMode) {
UUMbsStatModeAuto, //页面自动统计模式(推荐使用)
UUMbsStatModeManual //页面手动统计模式
};
typedef NS_OPTIONS(NSUInteger, UUMbsAgentLogLevelOptions) {
UUMbsAgentLogLevelOptionsDebugConsole = 1 << 0, //在debug模式下,输出日志到控制台
UUMbsAgentLogLevelOptionsReleaseConsole = 1 << 1, //在release模式下,输出日志到控制台
UUMbsAgentLogLevelOptionsDebugFile = 1 << 2, //在debug模式下,输出日志到本地文件
UUMbsAgentLogLevelOptionsReleaseFile = 1 << 3, //在release模式下,输出日志到本地文件
UUMbsAgentLogLevelOptionsAllCorners = ~0UL
};
@class UUMbsAgentSecurityPolicy;
/**
MbsAgent 初始化数据对象,初始化时需要使用此对象携带参数
*/
@interface UUMbsAgentBuilder : NSObject
/** orgCode 机构编码*/
@property (nonatomic , copy) NSString *orgCode;
/** ip Mbs 地址*/
@property (nonatomic , copy) NSString *ip;
/** port Mbs 端口*/
@property (nonatomic , copy) NSString *port;
/** appkey 接入账号 (需要从服务器申请)*/
@property (nonatomic , copy) NSString *appKey;
/** 秘钥,需要申请和appkey对应*/
@property (nonatomic , copy) NSString *secretKey;
/** 主程序的程序入口*/
@property (nonatomic , copy) NSString *hostScheme;
/** 客户端程序入口*/
@property (nonatomic , copy) NSString *clientScheme;
/// 网络校验类型(默认不校验)
@property (nonatomic , assign) MbsSecurityType securityType;
/// 服务端校验信息
@property (nonatomic,strong) UUMbsAgentSecurityPolicy *serverSecurityPolicy;
/// 客户端校验信息
@property (nonatomic,strong) UUMbsAgentSecurityPolicy *clientSecurityPolicy;
@end
/**
MbsAgentStat 初始化数据对象,初始化时需要使用此对象携带参数
*/
@interface UUMbsAgentStatBuilder : NSObject
/** orgCode 机构编码*/
@property (nonatomic , copy) NSString *orgCode;
/** ip Mbs 地址*/
@property (nonatomic , copy) NSString *ip;
/** port Mbs 端口*/
@property (nonatomic , copy) NSString *port;
/** 应用版本,默认为 [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] */
@property (nonatomic , copy) NSString *versionCode;
/** 设备唯一标识,第三方应用自主生成 */
@property (nonatomic , copy) NSString *securityId;
/** 应用id,默认为 [NSBundle mainBundle].bundleIdentifier */
@property (nonatomic , copy) NSString *bundleIdentifier;
/** 是否为基座客户端,默认为NO */
@property (nonatomic , assign) BOOL isMbsPlatform;
@property (nonatomic , assign) UUMbsStatMode statMode;
@end
/**
SSO 标准授权,返回的数据对象
*/
@interface UUMbsAuthParam : NSObject
/** 应用token */
@property (nonatomic , copy) NSString *accessToken;
/** 接入token超时时间,单位秒 */
@property (nonatomic , assign) int64_t accessTokenTimeout;
/** 刷新令牌 */
@property (nonatomic , copy) NSString *refreshToken;
/** 刷新令牌超时时间,单位秒 */
@property (nonatomic , assign) int64_t refreshTokenTimeout;
/** 用户名*/
@property (nonatomic , copy) NSString *username;
/** 密码md5值*/
@property (nonatomic , copy) NSString *password;
/** 服务器返回凭证产生时间戳,单位毫秒,long类型 */
@property (nonatomic , assign) int64_t timestamp;
/** mbs主程序token值,需第三方应用妥善保存,否则可能出现恶意获取token后导致的用户数据泄漏、用户Mbs相关接口功能被恶意发起等行为 */
@property (nonatomic , copy) NSString *mbsToken;
@end
/// 双向校验对象
@interface UUMbsAgentSecurityPolicy : NSObject
/** 证书校验信息 */
@property (nonatomic,strong) NSData *PKCS12Data;
/** 证书校验密码 */
@property (nonatomic,copy) NSString *password;
/**
Whether or not to trust servers with an invalid or expired SSL certificates. Defaults to `NO`.
*/
@property (nonatomic,assign) BOOL allowInvalidCertificates;
/**
Whether or not to validate the domain name in the certificate's CN field. Defaults to `YES`.
*/
@property (nonatomic,assign) BOOL validatesDomainName;
@end
/// 数据同步对象
@interface UUMbsAgentSyncBuilder : NSObject
/** 邮件同步状态 */
@property (nonatomic,strong) NSString *secMailSyncConfig;
@end
framework module UUMbsAgent {
umbrella header "UUMbsAgent.h"
export *
module * { export * }
}
//
// UUMbsSSOManager.h
// UUMbsAgentSSO
//
// Created by xiaoda on 2019/11/4.
// Copyright © 2019 UUSafe. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class UUMbsAuthParam,UUMbsAgentSSOBuilder;
@interface UUMbsSSOManager : NSObject
/// 获取SSO管理类,注册失败时,返回nil
+ (UUMbsSSOManager * _Nullable)getSSOManager;
/// 标准调用模式,该方法会跳转至Mbs客户端获取数据
/// @param completionHandler 获取数据回调
- (void)auth:(nullable void (^)(UUMbsAuthParam * _Nullable response,NSError *_Nullable error))completionHandler;
/// 授权接口,该接口自动处理refreshToken问题,只有当本地无token或者失效时自动跳转客户端授权
/// 需要在Mbs客户端版本3.5.6之后使用
/// @param completionHandler 完成回调
- (void)authEx:(nullable void (^)(UUMbsAuthParam * _Nullable response,NSError *_Nullable error))completionHandler;
/// 刷新token接口,用户授权之后,调用,该接口会尽量刷新tokekn,否则会跳转客户端重新授权
/// @param refreshToken 第三方客户端维护的refreshToken
/// @param completionHandler 数据回调,username,password 两个参数,此接口不提供。
- (void)refreshToken:(NSString * _Nonnull)refreshToken completionHandler:(nullable void (^)(UUMbsAuthParam * _Nullable response,NSError *_Nullable error))completionHandler;
@end
NS_ASSUME_NONNULL_END
framework module UUMbsAgentSSO {
umbrella header "UUMbsAgentSSO.h"
export *
module * { export * }
}
{
"name": "ToastPlus",
"id": "AndroidLMY-ToastPlus",
"version": "1.0.0",
"description": "原生Toast",
"_dp_type": "nativeplugin",
"_dp_nativeplugin": {
"android": {
"plugins": [{
"type": "module",
"name": "ToastPlus",
"class": "com.lmy.toastplus.ToastPlus"
}],
"dependencies": [
"com.squareup.okhttp3:okhttp:3.12.3"
],
"integrateType": "aar",
"minSdkVersion": "21"
},
"ios": {
"plugins": [{
"type": "module",
"name": "UUMbsAgentPlugin-Test",
"class": "UUMbsAgentTestModule"
}],
"frameworks": [
"libc++.tbd",
"UUMbsAgent.framework",
"UUMbsAgentSSO.framework"
],
"integrateType": "framework",
"deploymentTarget": "9.0",
"validArchitectures": [
"armv7", "arm64"
]
}
}
}
......@@ -2,14 +2,14 @@
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项)
"list": [{
"name": "me", //模式名称
"path": "pages/login/login", //启动页面,必选
"query": "uuid=c4bba940-f69e-11ea-a419-6bafda9d095e&__id__=1" //启动参数,在页面的onLoad函数里面得到
}]
},
// "condition": { //模式配置,仅开发期间生效
// "current": 0, //当前激活的模式(list 的索引项)
// "list": [{
// "name": "me", //模式名称
// "path": "pages/login/login", //启动页面,必选
// "query": "uuid=c4bba940-f69e-11ea-a419-6bafda9d095e&__id__=1" //启动参数,在页面的onLoad函数里面得到
// }]
// },
"pages": [{
"path": "pages/login/login",
"style": {
......
......@@ -437,7 +437,7 @@
line-height: 86rpx;
height: 86rpx;
white-space: nowrap;
overflow: hidden;
// overflow: hidden;
text-overflow: ellipsis;
color: #888;
}
......
......@@ -110,7 +110,7 @@
</view>
<view class="text-block text-block-last">
<text class="middle-date">收货地址</text>
<text class="middle-date-des">{{selectedAddress.STREET}}</text>
<text class="middle-date-address">{{selectedAddress.STREET}}</text>
<!-- <input class="middle-date-des" type="text" v-model="selectedAddress.STREET" placeholder="请填写" /> -->
</view>
</view>
......@@ -545,6 +545,12 @@
height: 96rpx;
color: #888;
}
.middle-date-address {
flex: 3;
font-size: 28rpx;
color: #888;
padding-top: 30rpx
}
.picker-year {
position: relative;
......
......@@ -134,6 +134,7 @@
let res1 = null
try{
const {
baseinfo,
INFO,
ITEM,
ATTACHMENT
......@@ -145,6 +146,7 @@
...INFO,
ZZFLD00009CX: INFO.ZZFLD00009CX ? 'X': '',
ZZFLD000099: INFO.ZZFLD000099 ? 'X': '',
ZZFLD000098: baseinfo.ZZFLD000098
},
ITEM,
ATTACHMENT,
......
......@@ -61,7 +61,7 @@
</view>
</view>
<view class="bottom">
<button class="btn" type="default" @click="goLogin" :class="{ 'btn-disabled': disabled }"
<button class="btn" type="default" @click="loginBtn" :class="{ 'btn-disabled': disabled }"
:disabled="disabled"><text class="btn-text">{{loginBtnText}}</text></button>
<!-- <view class="actions">
<navigator url="/pages/forgetpassword/forgetpassword">
......@@ -80,13 +80,15 @@
} from 'vuex'
import {
apiLogin
apiLogin,
getIdToken
} from '@/servers/user.js'
const ToastPlusModule = uni.requireNativePlugin("ToastPlus") || uni.requireNativePlugin("UUMbsAgentPlugin-Test")
export default {
data() {
return {
accessToken: "",
account: '',
// password: 'DO1tjHPW0Z',
password: '',
......@@ -125,20 +127,12 @@
immediate: true
}
},
onLoad(option) {
// console.log('login-option', option)
// this.loginType = this.option?.loginType || 'password'
// if (this.loginType === 'password') {
// const {
// account,
// password
// } = this.userInfo
// this.account = account
// this.password = password
// // this.goLogin()
// } else {
// this.code = this.option.code
// }
onLoad() {
ToastPlusModule && this.initEx()
},
onShow() {
ToastPlusModule && this.authEx()
},
//页面初始加载
mounted() {
......@@ -159,6 +153,18 @@
})
},
methods: {
initEx(){
uni.showLoading({
title: '加载中'
});
// 调用同步方法
var obj = ToastPlusModule.registerSyncFunc({
appKey: 'com.wuliangye.emobilewlycrm',
secretKey: '9ab24ae4bfb349cca739ab15b78f1c7f8737eb73',
packageName: 'com.uusafe.portal.wly'
})
console.log(obj)
},
checkboxChangeNum(){
if (e.detail.value.length == 1) {
//获取缓存的账号
......@@ -185,26 +191,66 @@
this.passwordVisible = !this.passwordVisible;
this.$refs.password.blur()
},
authEx(){
uni.showLoading({
title: '加载中'
});
ToastPlusModule.registerExSyncFunc({}, res => {
this.accessToken = res.data?.token || res
this.getIdToken()
})
},
// 登录
async goLogin() {
if (this.loginType === 'phone') {
uni.navigateTo({
url: `/pages/forgetpassword/get-captcha?phone=${this.phone}&loginType=${this.loginType}`
async getIdToken(){
const params ={
"uuid": "f3eea700a3686e47038a4b047af6d934DsRudwTZSRY",
"accessToken": this.accessToken
}
try{
const res = await getIdToken(params)
console.log(res,res.errorNumber-0===0)
if(res.errorNumber - 0 === 0){
const parmasObj = {
account: res.accounts[0].account,
idToken: res.accounts[0].idToken,
loginType: 'ystoken'
}
this.goLogin(parmasObj, false)
}else{
uni.showLoading({
title: '加载中'
});
} else {
const ispass = await this.validate();
if (!ispass) return;
uni.showToast({
title: '登录异常',
icon: 'none',
duration: 1500
});
console.log(res.errorNumber - 0 === 0,'非')
return
}
}catch(e){
//TODO handle the exception
}
},
// 登录
loginBtn(){
const parmas = {
username: this.account,
password: this.password,
loginType: 'App'
}
this.goLogin(parmas)
},
async goLogin(parmas,isValidate = true) {
if (this.loginType === 'phone') {
uni.navigateTo({
url: `/pages/forgetpassword/get-captcha?phone=${this.phone}&loginType=${this.loginType}`
});
} else {
const ispass = isValidate ? await this.validate() : true;
if (!ispass) return;
const res = await apiLogin(parmas)
// const res = {
// status: 1
// }
if (res.status === 1) {
//缓存账号和密码
if (this.rememberPsw) {
......
......@@ -108,7 +108,7 @@
</view>
<view class="block-detal-item">
<text class="detal-item-label">备注</text>
<text class="detal-item-value detal-item-value2">{{newsItem.remark}}</text>
<text class="detal-item-value detal-item-value3">{{newsItem.remark}}</text>
</view>
<!-- <view class="block-detal-item attach-block">
<text class="detal-item-label">附件</text>
......@@ -161,7 +161,7 @@
receiveInfoHeightComputed() {
console.log(this.receiveInfoHeight - 0,'[][]')
if(this.receiveInfoHeight - 0 === 0){
return { "minHeight": "300px" }
return { "minHeight": "385px" }
}else{
return {
"height": `${this.receiveInfoHeight}px`
......@@ -404,7 +404,7 @@
.detal-item-value3{
padding-left: 60rpx;
font-size: 24rpx;
width: 200%;
width: 300%;
flex: 2;
text-align: right;
}
......@@ -415,11 +415,11 @@
margin-top: 40rpx;
height: 240rpx;
overflow: hidden;
padding-bottom: 96rpx;
// padding-bottom: 96rpx;
}
.receive-info-auto {
height: auto;
// height: auto;
}
.detal-item-title {
......
......@@ -78,7 +78,7 @@
</view>
</view>
<view class="text-block">
<text class="middle-date">总计划量</text>
<text class="middle-date">总计划量(件)</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
......@@ -88,7 +88,7 @@
</view>
</view>
<view class="text-block">
<text class="middle-date">初始计划量</text>
<text class="middle-date">初始计划量(件)</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
......@@ -98,7 +98,7 @@
</view>
</view>
<view class="text-block">
<text class="middle-date">已开票计划量</text>
<text class="middle-date">已开票计划量(件)</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
......@@ -108,7 +108,7 @@
</view>
</view>
<view class="text-block">
<text class="middle-date">已占用计划量</text>
<text class="middle-date">已占用计划量(件)</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
......@@ -118,7 +118,7 @@
</view>
</view>
<view class="text-block">
<text class="middle-date">剩余可用计划量</text>
<text class="middle-date">剩余可用计划量(件)</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
......@@ -128,7 +128,7 @@
</view>
</view>
<view class="text-block">
<text class="middle-date">总计划额</text>
<text class="middle-date">总计划额(万元)</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
......@@ -138,7 +138,7 @@
</view>
</view>
<view class="text-block">
<text class="middle-date">初始计划额</text>
<text class="middle-date">初始计划额(万元)</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
......@@ -148,7 +148,7 @@
</view>
</view>
<view class="text-block">
<text class="middle-date">已扣减计划额</text>
<text class="middle-date">已扣减计划额(万元)</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
......@@ -158,7 +158,7 @@
</view>
</view>
<view class="text-block">
<text class="middle-date">已占用计划额</text>
<text class="middle-date">已占用计划额(万元)</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
......@@ -168,7 +168,7 @@
</view>
</view>
<view class="text-block">
<text class="middle-date">剩余可用计划额</text>
<text class="middle-date">剩余可用计划额(万元)</text>
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
......
......@@ -122,6 +122,12 @@
async getChannelType(){
const res = await getChannelType({'salePlan': this.detail.planType})
this.channelTypeArr = res.data
if (this.detail.acceptUnitType =='V013'|| this .detail.acceptUnitType =='V015'){
this.channelTypeArr = [{ value: 'T', name: '团购渠道' }]
}
if (this.detail.acceptUnitType =='v014'){
this.channelTypeArr = [{ value: 'Z', name: '终端团购渠道' }]
}
if (!this.channelTypeArr.length) {
this.channelTypeArr = [{ value: 'S', name: '社会化渠道' }]
}
......
......@@ -104,11 +104,11 @@
</view>
<view class="bottom">
<view class="cell-list">
<view class="cell-list-block" @click="logOut">
<!-- <view class="cell-list-block" @click="logOut">
<image class="icon-address" src="@/static/image/uc_address@3x.png" mode="aspectFit"></image>
<text class="cell-list-block__title">退出登录</text>
</view> -->
<!-- <image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image> -->
</view>
<!-- <view class="cell-list-block">
<image class="icon-address" src="@/static/image/uc_setting@3x.png" mode="aspectFit"></image>
<text class="cell-list-block__title">设置</text>
......@@ -243,10 +243,11 @@
color: $text-base-color;
font-weight: 500;
margin-bottom: 12rpx;
width: 440rpx;
}
.nick-block--no {
width: 240rpx;
width: 280rpx;
height: 40rpx;
line-height: 40rpx;
font-size: 24rpx;
......
......@@ -195,6 +195,8 @@ class Request {
} else if (config.url.indexOf('wmdp-storeapp') !== -1) {
// config.baseUrl = 'http://10.0.134.128:8080'
config.baseUrl = 'http://221.10.127.60:5000/gateway/zdcx'
} else if (config.url.indexOf('uusafe') !== -1) {
config.baseUrl = 'https://zzy.ipincloud.cn:9070'
} else {
// http://10.0.134.182:8000
config.baseUrl = 'http://221.10.127.60:5000/wlySap'
......
......@@ -23,7 +23,17 @@ export async function apiLogOut(params) {
})
return res
}
/**
* 执掌易服务
* @param
* @returns {Promise<AxiosResponse<T>>}
*/
export async function getIdToken(params) {
const res = await apiHelper.post('/uusafe/mos/custom/rest/wly/v1/getIdToken', params)
return res
}
export default {
apiLogin
apiLogin,
getIdToken
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment