Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot] 15a33baf15
Bump junit from 4.12 to 4.13.1 in /CreateName-api
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-13 19:50:45 +00:00
195 changed files with 21556 additions and 12691 deletions

17
App.vue
View File

@ -1,17 +0,0 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
</style>

31
CreateName-api/.gitignore vendored Normal file
View File

@ -0,0 +1,31 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
### VS Code ###
.vscode/

View File

@ -0,0 +1,118 @@
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.5";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";
/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";
/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if (mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if (mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if (!outputFile.getParentFile().exists()) {
if (!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}
}

Binary file not shown.

View File

@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar

310
CreateName-api/mvnw vendored Normal file
View File

@ -0,0 +1,310 @@
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Maven2 Start Up Batch script
#
# Required ENV vars:
# ------------------
# JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
# M2_HOME - location of maven2's installed home dir
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------
if [ -z "$MAVEN_SKIP_RC" ] ; then
if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi
if [ -f "$HOME/.mavenrc" ] ; then
. "$HOME/.mavenrc"
fi
fi
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "`uname`" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;;
Darwin*) darwin=true
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
export JAVA_HOME="`/usr/libexec/java_home`"
else
export JAVA_HOME="/Library/Java/Home"
fi
fi
;;
esac
if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=`java-config --jre-home`
fi
fi
if [ -z "$M2_HOME" ] ; then
## resolve links - $0 may be a link to maven's home
PRG="$0"
# need this for relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
saveddir=`pwd`
M2_HOME=`dirname "$PRG"`/..
# make it fully qualified
M2_HOME=`cd "$M2_HOME" && pwd`
cd "$saveddir"
# echo Using m2 at $M2_HOME
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --unix "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$M2_HOME" ] &&
M2_HOME="`(cd "$M2_HOME"; pwd)`"
[ -n "$JAVA_HOME" ] &&
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
fi
if [ -z "$JAVA_HOME" ]; then
javaExecutable="`which javac`"
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
readLink=`which readlink`
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
if $darwin ; then
javaHome="`dirname \"$javaExecutable\"`"
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
else
javaExecutable="`readlink -f \"$javaExecutable\"`"
fi
javaHome="`dirname \"$javaExecutable\"`"
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
fi
fi
if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD="`which java`"
fi
fi
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly." >&2
echo " We cannot execute $JAVACMD" >&2
exit 1
fi
if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set."
fi
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
if [ -z "$1" ]
then
echo "Path not specified to find_maven_basedir"
return 1
fi
basedir="$1"
wdir="$1"
while [ "$wdir" != '/' ] ; do
if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir
break
fi
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
wdir=`cd "$wdir/.."; pwd`
fi
# end of workaround
done
echo "${basedir}"
}
# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
echo "$(tr -s '\n' ' ' < "$1")"
fi
}
BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
exit 1;
fi
##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data.
##########################################################################################
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found .mvn/wrapper/maven-wrapper.jar"
fi
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
fi
if [ -n "$MVNW_REPOURL" ]; then
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
else
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
fi
while IFS="=" read key value; do
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
esac
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
if [ "$MVNW_VERBOSE" = true ]; then
echo "Downloading from: $jarUrl"
fi
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
if $cygwin; then
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
fi
if command -v wget > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found wget ... using wget"
fi
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
wget "$jarUrl" -O "$wrapperJarPath"
else
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
fi
elif command -v curl > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found curl ... using curl"
fi
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
curl -o "$wrapperJarPath" "$jarUrl" -f
else
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
fi
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Falling back to using Java to download"
fi
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
# For Cygwin, switch paths to Windows format before running javac
if $cygwin; then
javaClass=`cygpath --path --windows "$javaClass"`
fi
if [ -e "$javaClass" ]; then
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
echo " - Compiling MavenWrapperDownloader.java ..."
fi
# Compiling the Java class
("$JAVA_HOME/bin/javac" "$javaClass")
fi
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
# Running the downloader
if [ "$MVNW_VERBOSE" = true ]; then
echo " - Running MavenWrapperDownloader.java ..."
fi
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
fi
fi
fi
fi
##########################################################################################
# End of extension
##########################################################################################
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
if [ "$MVNW_VERBOSE" = true ]; then
echo $MAVEN_PROJECTBASEDIR
fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --path --windows "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi
# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
export MAVEN_CMD_LINE_ARGS
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

182
CreateName-api/mvnw.cmd vendored Normal file
View File

@ -0,0 +1,182 @@
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
if "%MVNW_VERBOSE%" == "true" (
echo Found %WRAPPER_JAR%
)
) else (
if not "%MVNW_REPOURL%" == "" (
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
)
if "%MVNW_VERBOSE%" == "true" (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %DOWNLOAD_URL%
)
powershell -Command "&{"^
"$webclient = new-object System.Net.WebClient;"^
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
"}"
if "%MVNW_VERBOSE%" == "true" (
echo Finished downloading %WRAPPER_JAR%
)
)
@REM End of extension
@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
exit /B %ERROR_CODE%

120
CreateName-api/pom.xml Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>top.weimumu</groupId>
<artifactId>login-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>login-api</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--junit-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
</dependency>
<!--mysql-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
<!--mybatis plus-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.2.0</version>
</dependency>
<!--lombok-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
</dependency>
<!--druid-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.19</version>
</dependency>
<!--log4j-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.28</version>
</dependency>
<!-- http客户端 -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>1.46</version>
</dependency>
<!--base64加密-->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>1.4.0</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- google json 解析 -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,15 @@
package top.weimumu.loginapi;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@MapperScan("top.weimumu.loginapi.mapper")
public class LoginApiApplication {
public static void main(String[] args) {
SpringApplication.run(LoginApiApplication.class, args);
}
}

View File

@ -0,0 +1,20 @@
package top.weimumu.loginapi.VO;
import lombok.Data;
/**
* @author: create by calvin wong
* @date:2020/3/31
**/
@Data
public class ResultVO<T> {
/** 错误码. */
private Integer code;
/** 提示信息. */
private String msg;
/** 具体内容. */
private T data;
}

View File

@ -0,0 +1,101 @@
package top.weimumu.loginapi.common;
/**
* @author: create by calvin wong
* @date:2019/12/10
**/
public class GlobalResult {
// 响应业务状态
private Integer status;
// 响应消息
private String msg;
// 响应中的数据
private Object data;
private String ok; // 不使用
public static GlobalResult build(Integer status, String msg, Object data) {
return new GlobalResult(status, msg, data);
}
public static GlobalResult ok(Object data) {
return new GlobalResult(data);
}
public static GlobalResult ok() {
return new GlobalResult(null);
}
public static GlobalResult errorMsg(String msg) {
return new GlobalResult(500, msg, null);
}
public static GlobalResult errorMap(Object data) {
return new GlobalResult(501, "error", data);
}
public static GlobalResult errorTokenMsg(String msg) {
return new GlobalResult(502, msg, null);
}
public static GlobalResult errorException(String msg) {
return new GlobalResult(555, msg, null);
}
public GlobalResult() {
}
public GlobalResult(Integer status, String msg, Object data) {
this.status = status;
this.msg = msg;
this.data = data;
}
public GlobalResult(Object data) {
this.status = 200;
this.msg = "OK";
this.data = data;
}
public Boolean isOK() {
return this.status == 200;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
public String getOk() {
return ok;
}
public void setOk(String ok) {
this.ok = ok;
}
}

View File

@ -0,0 +1,139 @@
package top.weimumu.loginapi.common;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author: create by calvin wong
* @date:2019/12/10
**/
public class HttpClientUtil {
public static String doGet(String url, Map<String, String> param) {
// 创建Httpclient对象
CloseableHttpClient httpclient = HttpClients.createDefault();
String resultString = "";
CloseableHttpResponse response = null;
try {
// 创建uri
URIBuilder builder = new URIBuilder(url);
if (param != null) {
for (String key : param.keySet()) {
builder.addParameter(key, param.get(key));
}
}
URI uri = builder.build();
// 创建http GET请求
HttpGet httpGet = new HttpGet(uri);
// 执行请求
response = httpclient.execute(httpGet);
// 判断返回状态是否为200
if (response.getStatusLine().getStatusCode() == 200) {
resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (response != null) {
response.close();
}
httpclient.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return resultString;
}
public static String doGet(String url) {
return doGet(url, null);
}
public static String doPost(String url, Map<String, String> param) {
// 创建Httpclient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = null;
String resultString = "";
try {
// 创建Http Post请求
HttpPost httpPost = new HttpPost(url);
// 创建参数列表
if (param != null) {
List<NameValuePair> paramList = new ArrayList<>();
for (String key : param.keySet()) {
paramList.add(new BasicNameValuePair(key, param.get(key)));
}
// 模拟表单
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(paramList);
httpPost.setEntity(entity);
}
// 执行http请求
response = httpClient.execute(httpPost);
resultString = EntityUtils.toString(response.getEntity(), "utf-8");
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
response.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return resultString;
}
public static String doPost(String url) {
return doPost(url, null);
}
public static String doPostJson(String url, String json) {
// 创建Httpclient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = null;
String resultString = "";
try {
// 创建Http Post请求
HttpPost httpPost = new HttpPost(url);
// 创建请求内容
StringEntity entity = new StringEntity(json, ContentType.APPLICATION_JSON);
httpPost.setEntity(entity);
// 执行http请求
response = httpClient.execute(httpPost);
resultString = EntityUtils.toString(response.getEntity(), "utf-8");
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
response.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return resultString;
}
}

View File

@ -0,0 +1,21 @@
package top.weimumu.loginapi.common;
import java.util.Random;
/**
* calvin wong
* */
public class KeyUtil {
/**
*
* : +
* @return
*/
public static synchronized String genUniqueKey() {
Random random = new Random();
Integer number = random.nextInt(900000) + 100000;
return System.currentTimeMillis() + String.valueOf(number);
}
}

View File

@ -0,0 +1,29 @@
package top.weimumu.loginapi.common;
import top.weimumu.loginapi.VO.ResultVO;
/**
* @author: create by calvin wong
* @date:2020/4/1
**/
public class ResultVOUtils {
public static ResultVO success(Object object) {
ResultVO resultVO = new ResultVO();
resultVO.setData(object);
resultVO.setCode(0);
resultVO.setMsg("成功");
return resultVO;
}
public static ResultVO success() {
return success(null);
}
public static ResultVO error(Integer code, String msg) {
ResultVO resultVO = new ResultVO();
resultVO.setCode(code);
resultVO.setMsg(msg);
return resultVO;
}
}

View File

@ -0,0 +1,74 @@
package top.weimumu.loginapi.common;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.shiro.codec.Base64;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.security.AlgorithmParameters;
import java.security.Security;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* @author: create by calvin wong
* @date:2019/12/10
**/
public class WechatUtil {
public static JSONObject getSessionKeyOrOpenId(String code) {
String requestUrl = "https://api.weixin.qq.com/sns/jscode2session";
Map<String, String> requestUrlParam = new HashMap<>();
// https://mp.weixin.qq.com/wxopen/devprofile?action=get_profile&token=164113089&lang=zh_CN
//小程序appId
requestUrlParam.put("appid", "wx62e0151eaf62eff7");
//小程序secret
requestUrlParam.put("secret", "c45170b3aa8dbc5cd45ab12c319298f8");
//小程序端返回的code
requestUrlParam.put("js_code", code);
//默认参数
requestUrlParam.put("grant_type", "authorization_code");
//发送post请求读取调用微信接口获取openid用户唯一标识
JSONObject jsonObject = JSON.parseObject(HttpClientUtil.doPost(requestUrl, requestUrlParam));
return jsonObject;
}
public static JSONObject getUserInfo(String encryptedData, String sessionKey, String iv) {
// 被加密的数据
byte[] dataByte = Base64.decode(encryptedData);
// 加密秘钥
byte[] keyByte = Base64.decode(sessionKey);
// 偏移量
byte[] ivByte = Base64.decode(iv);
try {
// 如果密钥不足16位那么就补足. 这个if 中的内容很重要
int base = 16;
if (keyByte.length % base != 0) {
int groups = keyByte.length / base + (keyByte.length % base != 0 ? 1 : 0);
byte[] temp = new byte[groups * base];
Arrays.fill(temp, (byte) 0);
System.arraycopy(keyByte, 0, temp, 0, keyByte.length);
keyByte = temp;
}
// 初始化
Security.addProvider(new BouncyCastleProvider());
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding", "BC");
SecretKeySpec spec = new SecretKeySpec(keyByte, "AES");
AlgorithmParameters parameters = AlgorithmParameters.getInstance("AES");
parameters.init(new IvParameterSpec(ivByte));
cipher.init(Cipher.DECRYPT_MODE, spec, parameters);// 初始化
byte[] resultByte = cipher.doFinal(dataByte);
if (null != resultByte && resultByte.length > 0) {
String result = new String(resultByte, "UTF-8");
return JSON.parseObject(result);
}
} catch (Exception e) {
}
return null;
}
}

View File

@ -0,0 +1,22 @@
package top.weimumu.loginapi.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@RestController
@RequestMapping("/sys/bazi-info")
public class BaziInfoController{
}

View File

@ -0,0 +1,20 @@
package top.weimumu.loginapi.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@RestController
@RequestMapping("/sys/name-detail")
public class NameDetailController{
}

View File

@ -0,0 +1,19 @@
package top.weimumu.loginapi.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@RestController
@RequestMapping("/sys/name-info")
public class NameInfoController{
}

View File

@ -0,0 +1,59 @@
package top.weimumu.loginapi.controller;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.weimumu.loginapi.VO.ResultVO;
import top.weimumu.loginapi.common.ResultVOUtils;
import top.weimumu.loginapi.converter.OrderForm2OrderDTOConverter;
import top.weimumu.loginapi.dto.OrderDTO;
import top.weimumu.loginapi.enums.ResultEnum;
import top.weimumu.loginapi.exception.NameException;
import top.weimumu.loginapi.form.OrderForm;
import top.weimumu.loginapi.service.IOrderMasterService;
import top.weimumu.loginapi.service.IUserService;
import javax.validation.Valid;
import java.util.HashMap;
import java.util.Map;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@RestController
@RequestMapping("/order")
@Slf4j
public class OrderMasterController{
@Autowired
private IOrderMasterService iOrderMasterService;
@Autowired
private IUserService iUserService;
//创建订单
@PostMapping("/create")
public ResultVO<Map<String,String>> create(@Valid OrderForm orderForm,
BindingResult bindingResult){
//校验参数
if (bindingResult.hasErrors()) {
log.error("【订单生成】参数不正确orderForm={}",orderForm);
throw new NameException(ResultEnum.PARAM_ERROR);
}
OrderDTO orderDTO = OrderForm2OrderDTOConverter.convert(orderForm);
OrderDTO createResult = iOrderMasterService.saveInfo(orderDTO);
Map<String, String> map = new HashMap<>();
map.put("orderId", createResult.getOrder_id());
return ResultVOUtils.success(map);
}
}

View File

@ -0,0 +1,19 @@
package top.weimumu.loginapi.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@RestController
@RequestMapping("/sys/user")
public class UserController{
}

View File

@ -0,0 +1,39 @@
package top.weimumu.loginapi.converter;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import lombok.extern.slf4j.Slf4j;
import top.weimumu.loginapi.dto.OrderDTO;
import top.weimumu.loginapi.entity.NameDetail;
import top.weimumu.loginapi.enums.ResultEnum;
import top.weimumu.loginapi.exception.NameException;
import top.weimumu.loginapi.form.OrderForm;
import java.util.ArrayList;
import java.util.List;
/**
* @author calvin
* @since 2020-03-30
*/
@Slf4j
public class OrderForm2OrderDTOConverter {
public static OrderDTO convert(OrderForm orderForm) {
Gson gson = new Gson();
OrderDTO orderDTO = new OrderDTO();
orderDTO.setOpen_id(orderForm.getOpen_id());
orderDTO.setSurname(orderForm.getSurname());
orderDTO.setGender(orderForm.getGender());
orderDTO.setBirth_time(orderForm.getBirth_time());
List<NameDetail> orderDetailList = new ArrayList<>();
orderDTO.setOrderDetailList(orderDetailList);
return orderDTO;
}
}

View File

@ -0,0 +1,44 @@
package top.weimumu.loginapi.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import top.weimumu.loginapi.entity.NameDetail;
import java.util.Date;
import java.util.List;
/**
* @author: create by calvin wong
* @date:2020/3/24
**/
@Data
public class OrderDTO {
/** order_id */
private String order_id;
/** 姓氏*/
private String surname;
/** 性别 */
private Integer gender;
/** 出生日期 */
private Date birth_time;
/** detail_id名字id*/
private String detail_id;
/** 用户身份识别open_id*/
private String open_id;
/** 八字id*/
private Integer bazi_id;
/** 创建时间. */
private Date createTime;
/** 更新时间. */
private Date updateTime;
List<NameDetail> orderDetailList;
}

View File

@ -0,0 +1,41 @@
package top.weimumu.loginapi.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@Data
@Accessors(chain = true)
public class BaziInfo {
private static final long serialVersionUID = 1L;
@TableId(value = "bazi_id", type = IdType.AUTO)
private Integer baziId;
/**
*
*/
private String baziType;
/**
*
*/
private String baziContent;
private LocalDateTime createTime;
private LocalDateTime updateTime;
}

View File

@ -0,0 +1,59 @@
package top.weimumu.loginapi.entity;
import lombok.Data;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@Data
@Accessors(chain = true)
public class NameDetail{
private static final long serialVersionUID = 1L;
private String detailId;
/**
*
*/
private String ming;
/**
* id
*/
private String nameId;
/**
* id
*/
private Integer baziId;
/**
*
*/
private String surname;
/**
*
*/
private BigDecimal score;
/**
*
*/
private String baziContent;
private LocalDateTime createTime;
private LocalDateTime updateTime;
}

View File

@ -0,0 +1,54 @@
package top.weimumu.loginapi.entity;
import lombok.Data;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@Data
@Accessors(chain = true)
public class NameInfo {
private static final long serialVersionUID = 1L;
private String nameId;
/**
*
*/
private String surname;
/**
*
*/
private String ming;
/**
* 1 2
*/
private Integer gender;
/**
*
*/
private BigDecimal score;
/**
* id
*/
private Integer baiziId;
private LocalDateTime createTime;
private LocalDateTime updateTime;
}

View File

@ -0,0 +1,38 @@
package top.weimumu.loginapi.entity;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@Data
@Accessors(chain = true)
public class OrderMaster {
private static final long serialVersionUID = 1L;
private String orderId;
private LocalDateTime birthTime;
private String surname;
private String detailId;
private String openId;
private Integer gender;
private LocalDateTime createTime;
private LocalDateTime updateTime;
}

View File

@ -0,0 +1,38 @@
package top.weimumu.loginapi.entity;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@Data
@Accessors(chain = true)
public class User{
private static final long serialVersionUID = 1L;
private String openId;
private String sessionKey;
private LocalDateTime lastVisitTime;
private String avatarUrl;
private String skey;
private String nickName;
private LocalDateTime createTime;
private LocalDateTime updateTime;
}

View File

@ -0,0 +1,24 @@
package top.weimumu.loginapi.enums;
import lombok.Getter;
/**
* @author: create by calvin wong
* @date:2020/4/2
**/
@Getter
public enum GenderEnum {
BOY(1,"男孩"),
GIRL(2,"女孩"),
;
private Integer code;
private String message;
GenderEnum(Integer code, String message){
this.code = code;
this.message = message;
}
}

View File

@ -0,0 +1,51 @@
package top.weimumu.loginapi.enums;
import lombok.Getter;
/**
* @author: create by calvin wong
* @date:2019/12/10
**/
@Getter
public enum ResultEnum {
SUCCESS(0, "成功"),
PARAM_ERROR(1, "参数不正确"),
ORDER_NOT_EXIST(12, "订单不存在"),
ORDERDETAIL_NOT_EXIST(13, "订单详情不存在"),
ORDER_STATUS_ERROR(14, "订单状态不正确"),
ORDER_UPDATE_FAIL(15, "订单更新失败"),
ORDER_DETAIL_EMPTY(16, "订单详情为空"),
ORDER_PAY_STATUS_ERROR(17, "订单支付状态不正确"),
ORDER_OWNER_ERROR(19, "该订单不属于当前用户"),
WECHAT_MP_ERROR(20, "微信公众账号方面错误"),
WXPAY_NOTIFY_MONEY_VERIFY_ERROR(21, "微信支付异步通知金额校验不通过"),
ORDER_CANCEL_SUCCESS(22, "订单取消成功"),
ORDER_FINISH_SUCCESS(23, "订单完结成功"),
LOGIN_FAIL(25, "登录失败, 登录信息不正确"),
LOGOUT_SUCCESS(26, "登出成功"),
;
private Integer code;
private String message;
ResultEnum(Integer code, String message) {
this.code = code;
this.message = message;
}
}

View File

@ -0,0 +1,21 @@
package top.weimumu.loginapi.exception;
import top.weimumu.loginapi.enums.ResultEnum;
/**
* @author: create by calvin wong
* @date:2020/3/27
**/
public class NameException extends RuntimeException {
private Integer code;
public NameException(ResultEnum resultEnum){
super(resultEnum.getMessage());
this.code = resultEnum.getCode();
}
public NameException(Integer code,String message){
super(message);
this.code = code;
}
}

View File

@ -0,0 +1,27 @@
package top.weimumu.loginapi.form;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import java.util.Date;
/**
* @author: create by calvin wong
* @date:2020/3/25
**/
@Data
public class OrderForm {
/** 用户微信open_id*/
@NotEmpty(message = "open_id不能为空")
private String open_id;
/** 姓氏*/
@NotEmpty(message="姓氏不能为空")
private String surname;
/** 性别*/
@NotEmpty(message = "性别不能为空")
private Integer gender;
/** 出生日期*/
@NotEmpty(message = "出生时间不能为空")
private Date birth_time;
}

View File

@ -0,0 +1,16 @@
package top.weimumu.loginapi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import top.weimumu.loginapi.entity.BaziInfo;
/**
* <p>
* Mapper
* </p>
*
* @author calvin
* @since 2020-03-30
*/
public interface BaziInfoMapper extends BaseMapper<BaziInfo> {
}

View File

@ -0,0 +1,20 @@
package top.weimumu.loginapi.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import top.weimumu.loginapi.entity.NameDetail;
import java.util.List;
/**
* <p>
* Mapper
* </p>
*
* @author calvin
* @since 2020-03-30
*/
public interface NameDetailMapper extends BaseMapper<NameDetail> {
@Override
List<NameDetail> selectList(Wrapper<NameDetail> queryWrapper);
}

View File

@ -0,0 +1,16 @@
package top.weimumu.loginapi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import top.weimumu.loginapi.entity.NameInfo;
/**
* <p>
* Mapper
* </p>
*
* @author calvin
* @since 2020-03-30
*/
public interface NameInfoMapper extends BaseMapper<NameInfo> {
}

View File

@ -0,0 +1,16 @@
package top.weimumu.loginapi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import top.weimumu.loginapi.entity.OrderMaster;
/**
* <p>
* Mapper
* </p>
*
* @author calvin
* @since 2020-03-30
*/
public interface OrderMasterMapper extends BaseMapper<OrderMaster> {
}

View File

@ -0,0 +1,16 @@
package top.weimumu.loginapi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import top.weimumu.loginapi.entity.User;
/**
* <p>
* Mapper
* </p>
*
* @author calvin
* @since 2020-03-30
*/
public interface UserMapper extends BaseMapper<User> {
}

View File

@ -0,0 +1,16 @@
package top.weimumu.loginapi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import top.weimumu.loginapi.entity.BaziInfo;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
public interface IBaziInfoService extends IService<BaziInfo> {
}

View File

@ -0,0 +1,16 @@
package top.weimumu.loginapi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import top.weimumu.loginapi.entity.NameDetail;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
public interface INameDetailService extends IService<NameDetail> {
}

View File

@ -0,0 +1,23 @@
package top.weimumu.loginapi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import top.weimumu.loginapi.dto.OrderDTO;
import top.weimumu.loginapi.entity.NameInfo;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
public interface INameInfoService extends IService<NameInfo> {
/** 根据姓氏和生辰八字查询名字 */
List<NameInfo> findList(OrderDTO orderDTO);
}

View File

@ -0,0 +1,26 @@
package top.weimumu.loginapi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import top.weimumu.loginapi.dto.OrderDTO;
import top.weimumu.loginapi.entity.OrderMaster;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
public interface IOrderMasterService extends IService<OrderMaster> {
/** 创建订单*/
OrderDTO saveInfo(OrderDTO orderDTO);
/** 删除订单*/
OrderDTO removeInfo(OrderDTO orderDTO);
/** 查询订单*/
List<OrderDTO> getList(String openid);
}

View File

@ -0,0 +1,16 @@
package top.weimumu.loginapi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import top.weimumu.loginapi.entity.User;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
public interface IUserService extends IService<User> {
}

View File

@ -0,0 +1,20 @@
package top.weimumu.loginapi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import top.weimumu.loginapi.entity.BaziInfo;
import top.weimumu.loginapi.mapper.BaziInfoMapper;
import top.weimumu.loginapi.service.IBaziInfoService;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@Service
public class BaziInfoServiceImpl extends ServiceImpl<BaziInfoMapper, BaziInfo> implements IBaziInfoService {
}

View File

@ -0,0 +1,20 @@
package top.weimumu.loginapi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import top.weimumu.loginapi.entity.NameDetail;
import top.weimumu.loginapi.mapper.NameDetailMapper;
import top.weimumu.loginapi.service.INameDetailService;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@Service
public class NameDetailServiceImpl extends ServiceImpl<NameDetailMapper, NameDetail> implements INameDetailService {
}

View File

@ -0,0 +1,39 @@
package top.weimumu.loginapi.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.weimumu.loginapi.dto.OrderDTO;
import top.weimumu.loginapi.entity.NameInfo;
import top.weimumu.loginapi.mapper.NameInfoMapper;
import top.weimumu.loginapi.service.INameInfoService;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@Service
public class NameInfoServiceImpl extends ServiceImpl<NameInfoMapper, NameInfo> implements INameInfoService {
@Autowired
private NameInfoMapper nameInfoMapper;
@Override
public List<NameInfo> findList(OrderDTO orderDTO){
Map<String,Object> columnMap = new HashMap<>();
columnMap.put("surname",orderDTO.getSurname());
columnMap.put("gender", orderDTO.getGender());
columnMap.put("bazi_id",orderDTO.getBazi_id());
return nameInfoMapper.selectByMap(columnMap);
}
}

View File

@ -0,0 +1,57 @@
package top.weimumu.loginapi.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sun.org.apache.xml.internal.security.keys.KeyUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.weimumu.loginapi.common.KeyUtil;
import top.weimumu.loginapi.dto.OrderDTO;
import top.weimumu.loginapi.entity.NameDetail;
import top.weimumu.loginapi.entity.NameInfo;
import top.weimumu.loginapi.entity.OrderMaster;
import top.weimumu.loginapi.mapper.OrderMasterMapper;
import top.weimumu.loginapi.service.INameInfoService;
import top.weimumu.loginapi.service.IOrderMasterService;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@Service
public class OrderMasterServiceImpl extends ServiceImpl<OrderMasterMapper, OrderMaster> implements IOrderMasterService {
@Autowired
private OrderMasterMapper orderMasterMapper;
@Autowired
private INameInfoService iNameInfoService;
@Override
public OrderDTO saveInfo(OrderDTO orderDTO) {
String orderId = KeyUtil.genUniqueKey();
// 查询姓名库中10个名字
List<NameDetail> nameInfoList= iNameInfoService.findList(orderDTO);
// 刷选10个数据
// 将数据入库namedetail
// 写入订单
return null;
}
@Override
public OrderDTO removeInfo(OrderDTO orderDTO){
return null;
}
@Override
public List<OrderDTO> getList(String openId) {
return null;
}
}

View File

@ -0,0 +1,20 @@
package top.weimumu.loginapi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import top.weimumu.loginapi.entity.User;
import top.weimumu.loginapi.mapper.UserMapper;
import top.weimumu.loginapi.service.IUserService;
/**
* <p>
*
* </p>
*
* @author calvin
* @since 2020-03-30
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
}

View File

@ -0,0 +1,9 @@
server:
port: 8080
spring:
datasource:
url: jdbc:mysql://192.168.253.133:3307/create_name?useUnicode=true&useSSL=false&characterEndcoding=utf8&useTimezone=true&serverTimezone=Asia/Shanghai
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver

View File

@ -0,0 +1,13 @@
package top.weimumu.loginapi;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class LoginApiApplicationTests {
@Test
void contextLoads() {
}
}

33
CreateName-uni/App.vue Normal file
View File

@ -0,0 +1,33 @@
<script>
import { mapMutations } from 'vuex';
export default {
methods: {
...mapMutations(['login'])
},
onLaunch: function() {
let userInfo = uni.getStorageSync('userInfo') || '';
if (userInfo.id) {
//
uni.getStorage({
key: 'userInfo',
success: res => {
this.login(res.data);
}
});
}
},
onShow: function() {
console.log('App Show');
},
onHide: function() {
console.log('App Hide');
}
};
</script>
<style>
/*每个页面公共css */
/*每个页面公共css */
@import 'colorui/main.css';
@import 'colorui/icon.css';
</style>

View File

@ -0,0 +1,184 @@
/*
Animation
ColorUI by 201932619:52:28
*/
/* css 滤镜 控制黑白底色gif的 */
.gif-black{
mix-blend-mode: screen;
}
.gif-white{
mix-blend-mode: multiply;
}
/* Animation css */
[class*=animation-] {
animation-duration: .5s;
animation-timing-function: ease-out;
animation-fill-mode: both
}
.animation-fade {
animation-name: fade;
animation-duration: .8s;
animation-timing-function: linear
}
.animation-scale-up {
animation-name: scale-up
}
.animation-scale-down {
animation-name: scale-down
}
.animation-slide-top {
animation-name: slide-top
}
.animation-slide-bottom {
animation-name: slide-bottom
}
.animation-slide-left {
animation-name: slide-left
}
.animation-slide-right {
animation-name: slide-right
}
.animation-shake {
animation-name: shake
}
.animation-reverse {
animation-direction: reverse
}
@keyframes fade {
0% {
opacity: 0
}
100% {
opacity: 1
}
}
@keyframes scale-up {
0% {
opacity: 0;
transform: scale(.2)
}
100% {
opacity: 1;
transform: scale(1)
}
}
@keyframes scale-down {
0% {
opacity: 0;
transform: scale(1.8)
}
100% {
opacity: 1;
transform: scale(1)
}
}
@keyframes slide-top {
0% {
opacity: 0;
transform: translateY(-100%)
}
100% {
opacity: 1;
transform: translateY(0)
}
}
@keyframes slide-bottom {
0% {
opacity: 0;
transform: translateY(100%)
}
100% {
opacity: 1;
transform: translateY(0)
}
}
@keyframes shake {
0%,
100% {
transform: translateX(0)
}
10% {
transform: translateX(-9px)
}
20% {
transform: translateX(8px)
}
30% {
transform: translateX(-7px)
}
40% {
transform: translateX(6px)
}
50% {
transform: translateX(-5px)
}
60% {
transform: translateX(4px)
}
70% {
transform: translateX(-3px)
}
80% {
transform: translateX(2px)
}
90% {
transform: translateX(-1px)
}
}
@keyframes slide-left {
0% {
opacity: 0;
transform: translateX(-100%)
}
100% {
opacity: 1;
transform: translateX(0)
}
}
@keyframes slide-right {
0% {
opacity: 0;
transform: translateX(100%)
}
100% {
opacity: 1;
transform: translateX(0)
}
}

View File

@ -0,0 +1,65 @@
<template>
<view>
<view class="cu-custom" :style="[{height:CustomBar + 'px'}]">
<view class="cu-bar fixed" :style="style" :class="[bgImage!=''?'none-bg text-white bg-img':'',bgColor]">
<view class="action" @tap="BackPage" v-if="isBack">
<text class="cuIcon-back"></text>
<slot name="backText"></slot>
</view>
<view class="content" :style="[{top:StatusBar + 'px'}]">
<slot name="content"></slot>
</view>
<slot name="right"></slot>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
StatusBar: this.StatusBar,
CustomBar: this.CustomBar
};
},
name: 'cu-custom',
computed: {
style() {
var StatusBar= this.StatusBar;
var CustomBar= this.CustomBar;
var bgImage = this.bgImage;
var style = `height:${CustomBar}px;padding-top:${StatusBar}px;`;
if (this.bgImage) {
style = `${style}background-image:url(${bgImage});`;
}
return style
}
},
props: {
bgColor: {
type: String,
default: ''
},
isBack: {
type: [Boolean, String],
default: false
},
bgImage: {
type: String,
default: ''
},
},
methods: {
BackPage() {
uni.navigateBack({
delta: 1
});
}
}
}
</script>
<style>
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,119 @@
<template>
<view class="content">
<view class="mix-list-cell" :class="border" @click="eventClick" hover-class="cell-hover" :hover-stay-time="50">
<text
v-if="icon"
class="cell-icon yticon"
:style="[{
color: iconColor,
}]"
:class="icon"
></text>
<text class="cell-tit clamp">{{title}}</text>
<text v-if="tips" class="cell-tip">{{tips}}</text>
<text class="cell-more yticon"
:class="typeList[navigateType]"
></text>
</view>
</view>
</template>
<script>
/**
* 简单封装了下 应用范围比较狭窄可以在此基础上进行扩展使用
* 比如加入image iconSize可控等
*/
export default {
data() {
return {
typeList: {
left: 'icon-zuo',
right: 'icon-you',
up: 'icon-shang',
down: 'icon-xia'
},
}
},
props: {
icon: {
type: String,
default: ''
},
title: {
type: String,
default: '标题'
},
tips: {
type: String,
default: ''
},
navigateType: {
type: String,
default: 'right'
},
border: {
type: String,
default: 'b-b'
},
hoverClass: {
type: String,
default: 'cell-hover'
},
iconColor: {
type: String,
default: '#333'
}
},
methods: {
eventClick(){
this.$emit('eventClick');
}
},
}
</script>
<style lang='scss'>
.icon .mix-list-cell.b-b:after{
left: 90upx;
}
.mix-list-cell{
display:flex;
align-items:baseline;
padding: 20upx 20upx;
line-height:60upx;
position:relative;
&.cell-hover{
background:#fafafa;
}
&.b-b:after{
left: 30upx;
}
.cell-icon{
align-self:center;
width:56upx;
max-height:60upx;
font-size:38upx;
}
.cell-more{
align-self: center;
font-size:30upx;
color:$font-color-base;
margin-left:$uni-spacing-row-sm;
}
.cell-tit{
flex: 1;
font-size: $font-base;
color: $font-color-dark;
margin-right:10upx;
}
.cell-tip{
font-size: $font-sm+2upx;
color: $font-color-light;
}
}
</style>

View File

@ -0,0 +1,66 @@
<template>
<view class="mix-load-more">
<image
class="mix-load-icon"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUJCRjNGOEQ1RDNBMTFFOUFERjY5MEU0MTg5MjY0NDgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUJCRjNGOEU1RDNBMTFFOUFERjY5MEU0MTg5MjY0NDgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QkJGM0Y4QjVEM0ExMUU5QURGNjkwRTQxODkyNjQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QkJGM0Y4QzVEM0ExMUU5QURGNjkwRTQxODkyNjQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pkf/QQsAAAHYSURBVHjavFfRcYJAEOVu8h87SFJBSAUJNGCsIKQCsQK1AkkHpAKwAaUE7YB0kFRg3prFcWAPTziyM+uJHPvuvV32TuVZ2na79TG8wWkc8Ui2g3/z+BkEwc4mnrIAXGCYMpiN0SISLGDZCRiArxhW8Huvm5XwGRaQSzd1C8usB6jHz2aINbdijIkp59KlpWD+bmTMTNtA13AK8IRAipy+82/rlucijt1kzDnNWgBjAJUXCpHkTeBjw5RJlfMT8GazKZVSd8JkKpDkGl2xgJgLs1FwiPVwkppkcAVKxs/MpIKrJD8CHw6HWJK3C2gNXMr79AhMHQlsb4UJsYNqlmKMCJMYRwa2ZV9UjiGxjjRk9oUbucN3uBGLMLWhB+8cAjdiUWo1Ph4FiZwBG2L52vsHg7Q/9WvK8d6w9zozqJrUrzXvnw0pXAJDbmoaAXz5dxksboBOOXiuzaW+nToGLzAU57uTBDDmhj+Yaaq6evLZVoMCS8mv5OZdZhCz2RZpH/4YhDGzNrFLwDxznXMlHH3mF/ou+b5vd+t72LM6Q1ufqy2YC69pUHTKsdBpJnjNvizjvHQuLgE8D8OQCmppeM/PrXAidcuftogPDiPaTmlB1ANYoavsV4ABAGz+xJ8bzHJJAAAAAElFTkSuQmCC"
v-show="status === 1"
>
</image>
<text class="mix-load-text">{{text[status]}}</text>
</view>
</template>
<script>
export default {
name: "mix-load-more",
props: {
status: {
//012
type: Number,
default: 0
},
text: {
type: Array,
default () {
return [
'上拉显示更多',
'正在加载...',
'没有更多数据了'
];
}
}
}
}
</script>
<style>
.mix-load-more{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
height: 90upx;
padding-top: 10upx;
}
.mix-load-icon{
display: block;
width: 36upx;
height: 36upx;
margin-right: 12upx;
animation: load 1.2s cubic-bezier(.37,1.08,.7,.74) infinite;
}
.mix-load-text{
font-size: 28upx;
color: #888;
}
@-webkit-keyframes load {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>

View File

@ -0,0 +1,315 @@
<template>
<view>
<!-- 海报 -->
<canvas canvas-id="wongPoster" :style="{width:cansWidth,height:cansHeight}" class="isCan"></canvas>
<view class="bg" @click="closeCans"></view>
<view class="fixedBox">
<view class="boxLeft"><button class="flexBtn btnLeft" hover-class="btnHover" @click="saveCans"></button></view>
<view class="boxRight"><button class="flexBtn btnRight" hover-class="btnHover" @click="closeCans"></button></view>
</view>
</view>
</template>
<script>
export default {
props:{
},
data() {
return {
//
cansWidth:270, //
cansHeight:480 //
//
};
},
created() {
this.ctx = uni.createCanvasContext('wongPoster',this);
//
this.drawBaseBg('white');
/*
绘制图片
调用方式:this.drawBg({
url:'',路径
sLeft:0~1 | 'center' 百分比离左边距离 1则为100vw,
sTop:0~1 百分比离顶部距离,
sWidth:0~1 百分比宽度
sHeight:0~1 百分比高度
})
*/
this.drawBg({url:'/static/can_bg.png',sLeft:0,sTop:0,sWidth:1,sHeight:0.75})
this.drawBg({url:'/static/scan.jpg',sLeft:.05,sTop:0.80,sWidth:.30,sHeight:0.15})
/*
绘制头像
绘制头像需要添加域名白名单 downloadFile合法域名 https://wx.qlogo.cn
调用方式:this.circleImg(img, x, y, r)
img:图片路径
x:0~1 百分比离左边距离,
y:0~1 百分比离顶部距离
*/
this.circleImg('http://wx.qlogo.cn/mmopen/g1fhzkUAKGxa6OShKmbCB2nz2BvaGJzdjwGDduibvTLwmHChCiaFHxHI71tFIJyQfMHNxDibSJZ30TUgRKTEhEGonmRj3icNeEht/64',.35,.23, 12)
/*
绘制单行文本
调用方式:this.drawText({
text:'文本', String || Array
sLeft:0~1 || 'center' 百分比离左边距离,
sTop:0~1 百分比离顶部距离,
fontSize:Number 文字大小,
color:'' 颜色,
bold:Boolean 粗体,
lineHeight:Number //
})
*/
this.drawText({text:'恭喜您获得免费好名字',sLeft:'center',sTop:0.1,fontSize:12,color:'#5A390F'})
this.drawText({text:'王金富',sLeft:.48,sTop:0.265,fontSize:12,color:'#5A390F'})
this.drawText({text:'王金富',sLeft:.67,sTop:0.53,fontSize:10,color:'#5A390F'})
this.drawText({text:this.today,sLeft:.64,sTop:0.58,fontSize:10,color:'#5A390F'})
this.drawText({text:'求财得财',sLeft:.1,sTop:0.65,fontSize:10,color:'#5A390F',bold:true})
this.drawText({text:['XXXXXXXXXXXXXXXX','XXXXXXXXX','XXXXXXXX'],sLeft:.37,sTop:0.85,fontSize:10,color:'#5A390F',lineHeight:12})
//
this.drawPara({
para:'姓名评分为88配合您的生辰八字属于求财得财大富大贵您可以保存图片分享给亲友。',//
fontSize:10,//
sLeft:.06,//
sTop:.32,//
titleHeight:16,//
sMaxWidth:.84,//
redWord:['2020年6月6日','姓名评分为88'],//
color:'#5A390F',//
redColor:'#DD524D',//
bold:false //
})
},
computed:{
today(){
let year = new Date().getFullYear();
let month =new Date().getMonth() + 1
let date =new Date().getDate()
let time = year + "年" + month + "月" + date +"日"
return time
}
},
methods:{
drawBaseBg(bgColor){
this.ctx.rect(0, 0, this.cansWidth, this.cansHeight)
this.ctx.setFillStyle(bgColor)
this.ctx.fill()
this.ctx.draw(true)
},
circleImg(img, x, y, r) {
uni.getImageInfo({
src:img
}).then((image)=>{
console.log(image[1].path)
x= Math.ceil(this.cansWidth * x)
y = Math.ceil(this.cansHeight * y)
this.ctx.save();
var d = 2 * r;
var cx = x + r;
var cy = y + r;
this.ctx.arc(cx, cy, r, 0, 2 * Math.PI);
this.ctx.clip();
this.ctx.drawImage(image[1].path, x, y, d, d);
this.ctx.restore();
this.ctx.draw(true);
})
},
closeCans() {
this.$parent.posterShow = false
},
saveCans(){
console.log('保存')
uni.showLoading({
title:'保存ing...',
mask:true
})
uni.canvasToTempFilePath({
x: 0,
y: 0,
width: this.cansWidth*1.5,
height: this.cansHeight * 1.5,
destWidth: this.cansWidth * 3,
destHeight: this.cansHeight * 3,
canvasId:'wongPoster',
success: function(res) {
uni.hideLoading()
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: function (res) {
uni.showToast({
title:'保存相册成功'
})
console.log('save success')
},
fail(res) {
console.log(res)
if(res.errMsg == "saveImageToPhotosAlbum:fail auth deny") {
uni.showModal({
title:'您需要授权相册权限',
success(res) {
if(res.confirm){
uni.openSetting({
success(res) {
},
fail(res) {
console.log(res)
}
})
}
}
})
}
}
});
},
fail(res) {
uni.hideLoading()
}
},this)
},
drawPara(item){
var redIndexObj = {}
if(item.redWord.length > 0){
for(var i = 0; i < item.redWord.length ;i++){
let startIndex = 0,index;
while ((index = item.para.indexOf(item.redWord[i], startIndex)) > -1) {
redIndexObj[index] = true;
for(var j = 0;j<item.redWord[i].length; j++){
redIndexObj[index+j] = true
}
startIndex = index + 1;
}
}
}
this.ctx.font =`normal normal ${item.fontSize}px sans-serif`;
this.ctx.setFillStyle(item.color)
var isLeft
if(item.sLeft == 'center'){
isLeft = this.cansWidth * (.5 - item.sMaxWidth /2) - item.fontSize
} else {
isLeft = item.sLeft * this.cansWidth
}
var maxWidth = Math.floor(this.cansWidth * item.sMaxWidth)
var tempList = item.para.split('')
var nowText = '',
isCol = 0,
textWidth = 0
for(var i = 0 ; i <tempList.length;i++){
if(i>0){
nowText += tempList[i -1]
} else {
nowText += tempList[0]
}
textWidth = this.ctx.measureText(nowText).width
if(textWidth > maxWidth){
isCol++
nowText = '占'
textWidth = this.ctx.measureText(nowText).width
}
if(redIndexObj[i]){
this.ctx.save()
if(item.bold) this.ctx.font =`normal bold ${item.fontSize}px sans-serif`;
this.ctx.setFillStyle(item.redColor)
}
this.ctx.fillText(tempList[i],isLeft+textWidth, item.sTop * this.cansHeight + item.titleHeight * isCol)
this.ctx.restore()
}
this.ctx.draw(true)
},
drawBg(item){
if(item.sLeft == 'center'){
this.ctx.drawImage(item.url, this.cansWidth * (.5 - item.sWidth /2) , this.cansHeight * item.sTop, this.cansWidth * item.sWidth, this.cansHeight * item.sHeight);
} else {
this.ctx.drawImage(item.url, this.cansWidth * item.sLeft, this.cansHeight * item.sTop, this.cansWidth * item.sWidth, this.cansHeight * item.sHeight);
}
this.ctx.draw(true);
},
drawText(item){
var isLeft
if(item.sLeft == 'center'){
isLeft = this.cansWidth * .5 - (item.fontSize*item.text.length) /2
} else {
isLeft = item.sLeft * this.cansWidth
}
this.ctx.save()
if(item.bold) this.ctx.font =`normal bold ${item.fontSize}px sans-serif`;
this.ctx.setFillStyle(item.color)
this.ctx.setFontSize(item.fontSize)
if(item.text instanceof Array){
if(!item.lineHeight) item.lineHeight = item.fontSize + 2
console.log('我是数组',item.text)
for(var i = 0 ; i < item.text.length ; i++){
this.ctx.fillText(item.text[i],isLeft, item.sTop * this.cansHeight + item.lineHeight * i)
}
} else{
console.log('我是字符串',item.text)
this.ctx.fillText(item.text,isLeft, item.sTop * this.cansHeight)
}
this.ctx.draw(true)
this.ctx.restore()
}
}
}
</script>
<style lang="scss" scoped>
.bg{
width: 100vw;
height: 100vh;
position: fixed;
left: 0;
top: 0;
z-index: 998;
background-color: rgba(0, 0, 0, 0.8);
}
.fixedBox{
width: 100%;
height: 100upx;
position: fixed;
bottom: 30upx;
left: 0;
display: flex;
z-index: 1000;
.boxLeft,.boxRight{
width: 50%;
height: 100%;
display: flex;
align-items: center;
position: relative;
z-index: 1000;
justify-content: center;
.flexBtn{
position: relative;
z-index: 1000;
width: 200upx;
height: 60upx;
text-align: center;
line-height: 55upx;
font-size: 24upx;
border-bottom: 6upx #f58365 solid;
border-radius: 32upx;
color: white;
background: linear-gradient(to left, #f58365, #ff188a);
}
}
}
.btnHover{
height: 55upx !important;
border-bottom: 0 #F6BE3C solid !important;
transform: translateY(3px) translateZ(0px) !important;
}
.isCan{
border: 6px solid white;
border-radius: 10px;
position: fixed;
left: 0;
z-index: 999;
width: 270px;
height: 480px;
right: 0;
bottom: 130upx;
margin:0 auto;
background-size: 100%;
}
</style>

View File

@ -0,0 +1,8 @@
const dev = {
baseUrl: 'http://192.168.133.253:8080',
}
export function def() {
return dev
}

126
CreateName-uni/json.js Normal file
View File

@ -0,0 +1,126 @@
const tabList = [{
name: '男孩名',
id: '1',
}, {
name: '女孩名',
id: '2'
}, {
name: '唐诗名',
id: '3'
}, {
name: '宋词名',
id: '4'
}, {
name: '周易名',
id: '5'
}, {
name: '公司名',
id: '6'
}];
const newsList = [{
id: 1,
title: '2020鼠年宝宝起名大全',
author: '泰山起名',
images: [
'https://www.yw11.com/uploads/00_yw11/baby/1(144).png',
'https://www.yw11.com/uploads/00_yw11/baby/1(323).png',
'https://www.yw11.com/uploads/00_yw11/baby/1(29).png',
],
time: '2小时前',
type: 3,
},
{
id: 2,
title: '取什么名字对宝宝成为学霸帮助大?',
author: '爱考试',
images: [
'https://www.yw11.com/uploads/00_yw11/baby/1(125).png'
],
time: '30分钟前',
type: 1,
},
{
id: 3,
title: '女宝宝起名注意事项”',
author: '新京报',
images: [
'https://www.yw11.com/uploads/00_yw11/girl/5(195).png',
],
time: '2小时前',
type: 2,
},
{
id: 4,
title: '2020女宝宝名字案例',
author: '神说要唱歌',
images: [
'https://www.yw11.com/uploads/allimg/190215/49-1Z215141SG43.png',
],
videoSrc: 'https://dcloud-img.oss-cn-hangzhou.aliyuncs.com/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20181126.mp4',
time: '2019-04-10 11:43',
type: 2,
},
{
id: 5,
title: '2019改名字最新规定,看过的都说好!”',
author: '全球加盟网',
images: ['https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2892004605,2174659864&fm=26&gp=0.jpg'],
videoSrc: 'https://dcloud-img.oss-cn-hangzhou.aliyuncs.com/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20181126.mp4',
time: '5分钟前',
type: 3,
},
{
id: 6,
title: '诗词典故为宝宝取儒雅名的意义!',
author: '诗词网',
images: ['https://www.yw11.com/uploads/00_yw11/girl/5_134.png'],
time: '5分钟前',
type: 3,
},
{
id: 7,
title: '好听时髦名字如何定位宝宝',
author: '时尚网',
images: [
'https://www.yw11.com/uploads/00_yw11/boy/2_62.png',
'https://www.yw11.com/uploads/00_yw11/boy/2_158.png',
'https://www.yw11.com/uploads/00_yw11/boy/2_63.png'
],
time: '2019-04-14 10:58',
type: 3,
},
{
id: 8,
title: '利用软件起名靠谱吗!',
author: '程序员大哥',
images: [
'http://p3-tt.bytecdn.cn/list/pgc-image/15394993934784aeea82ef5',
'http://p1-tt.bytecdn.cn/list/pgc-image/153949939338547b7a69cf6',
'http://p1-tt.bytecdn.cn/list/509a000211b25f210c77',
],
time: '2019-04-14 10:58',
type: 3,
},
]
const evaList = [{
src: 'http://gss0.baidu.com/-fo3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/77c6a7efce1b9d1663174705fbdeb48f8d546486.jpg',
nickname: 'Ranth Allngal',
time: '09-20 12:54',
zan: '54',
content: '评论不要太苛刻,不管什么产品都会有瑕疵,客服也说了可以退货并且商家承担运费,我觉得至少态度就可以给五星。'
},
{
src: 'http://img0.imgtn.bdimg.com/it/u=2396068252,4277062836&fm=26&gp=0.jpg',
nickname: 'Ranth Allngal',
time: '09-20 12:54',
zan: '54',
content: '楼上说的好有道理。'
}
]
export default {
tabList,
newsList,
evaList
}

115
CreateName-uni/main.js Normal file
View File

@ -0,0 +1,115 @@
import Vue from 'vue'
import store from './store'
import App from './App'
import * as config from './config'
const defConfig = config.def
const msg = (title, duration = 1500, mask = false, icon = 'none') => {
//统一提示方便全局修改
if (Boolean(title) === false) {
return;
}
uni.showToast({
title,
duration,
mask,
icon
});
}
const request = (_gp, _mt, data = {}, failCallback) => {
//异步请求数据
return new Promise(resolve => {
if (!userInfo || !userInfo.accessToken) {
userInfo = uni.getStorageSync('userInfo')
}
let accessToken = userInfo ? userInfo.accessToken : ''
let baseUrl = config.def().baseUrl
uni.request({
url: baseUrl + '/m.api',
data: {
...data,
_gp,
_mt
},
method: 'POST',
header: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'ACCESSTOKEN': accessToken
},
success: (res) => {
if (res.statusCode === 200) {
if (res.data.errno === 200) {
resolve(res.data);
} else if (res.data.errno === 10001) {
if (failCallback) {
failCallback(res.data)
}
if (!loginLock) {
loginLock = true
uni.showModal({
title: '登录提示',
content: '您尚未登录,是否立即登录?',
showCancel: true,
confirmText: '登录',
success: (e) => {
if (e.confirm) {
uni.navigateTo({
url: '/pages/public/login'
})
}
},
fail: () => {},
complete: () => {
loginLock = false
}
})
}
} else {
if (failCallback) {
failCallback(res.data)
} else {
uni.showToast({
title: res.data.errmsg,
icon: 'none'
})
}
}
}
}
})
})
}
let userInfo = undefined
const logout = () => {
userInfo = undefined
uni.removeStorage({
key: 'userInfo'
})
}
const setUserInfo = (i) => {
userInfo = i
}
Vue.config.productionTip = false
Vue.prototype.$store = store;
Vue.prototype.$api = {
request,
setUserInfo,
logout,
msg,
defConfig
};
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()

View File

@ -1,6 +1,6 @@
{ {
"name" : "newName", "name" : "wx-login",
"appid" : "__UNI__EB8F0F8", "appid" : "__UNI__3EF5909",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
@ -8,8 +8,7 @@
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
"usingComponents" : true, "usingComponents" : true,
"nvueStyleCompiler" : "uni-app", "nvueCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : { "splashscreen" : {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender" : true,
"waiting" : true, "waiting" : true,
@ -17,40 +16,57 @@
"delay" : 0 "delay" : 0
}, },
/* */ /* */
"modules" : {}, "modules" : {
"OAuth" : {}
},
/* */ /* */
"distribute" : { "distribute" : {
/* android */ /* android */
"android" : { "android" : {
"permissions" : [ "permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<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_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<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_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
] ]
}, },
/* ios */ /* ios */
"ios" : {}, "ios" : {},
/* SDK */ /* SDK */
"sdkConfigs" : {} "sdkConfigs" : {
"oauth" : {
"weixin" : {
"appid" : "wx62e0151eaf62eff7",
"appsecret" : "308e5884a703a14ef00401bf2e5d740e",
"UniversalLinks" : ""
}
}
}
} }
}, },
/* */ /* */
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "", "appid" : "wx62e0151eaf62eff7",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"es6" : false "es6" : false
@ -65,8 +81,5 @@
}, },
"mp-toutiao" : { "mp-toutiao" : {
"usingComponents" : true "usingComponents" : true
},
"uniStatistics" : {
"enable" : false
} }
} }

66
CreateName-uni/pages.json Normal file
View File

@ -0,0 +1,66 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "起名"
}
},
{
"path": "pages/name/name",
"style": {
"navigationBarTitleText": "鉴名"
}
},
{
"path": "pages/me/me",
"style": {
"navigationBarTitleText": "我的"
}
},
{
"path":"pages/details/details",
"style":{
"navigationBarTitleText":"详情"
}
},
{
"path":"pages/login/login",
"style":{
"navigationBarTitleText":"登录"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "CreateName",
"navigationBarBackgroundColor": "#FFFFFF"
},
"tabBar": {
"color":"#C0C4CC",
"selectedColor":"#2C2C2C",
"borderStyle":"black",
"backgroundColor":"#ffffff",
"list": [
{
"pagePath":"pages/index/index",
"iconPath":"static/create.png",
"selectedIconPath":"static/create-current.png",
"text":"起名"
},
{
"pagePath":"pages/name/name",
"iconPath":"static/name.png",
"selectedIconPath":"static/name-current.png",
"text":"鉴名"
},
{
"pagePath":"pages/me/me",
"iconPath":"static/wode.png",
"selectedIconPath":"static/wode-current.png",
"text":"我的"
}
]
}
}

View File

@ -0,0 +1,172 @@
<template>
<view>
<scroll-view :scroll-y="modalName==null" class="page" :class="modalName!=null?'show':''" >
<view class="cu-bar bg-white solid-bottom margin-top">
<view class="action">
<text class="cuIcon-title text-orange "></text> 列表左滑
</view>
</view>
<view class="cu-list menu-avatar">
<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in 4" :key="index"
@touchstart="ListTouchStart" @touchmove="ListTouchMove" @touchend="ListTouchEnd" :data-target="'move-box-' + index">
<view class="cu-avatar round lg" :style="[{backgroundImage:'url(https://ossweb-img.qq.com/images/lol/web201310/skin/big2100'+ (index+2) +'.jpg)'}]"></view>
<view class="content">
<view class="text-grey">文晓港</view>
<view class="text-gray text-sm">
<text class="cuIcon-infofill text-red margin-right-xs"></text> 消息未送达</view>
</view>
<view class="action">
<view class="text-grey text-xs">22:20</view>
<view class="cu-tag round bg-grey sm">5</view>
</view>
<view class="move">
<view class="bg-grey">置顶</view>
<view class="bg-red">删除</view>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
data() {
return {
cuIconList: [{
cuIcon: 'cardboardfill',
color: 'red',
badge: 120,
name: 'VR'
}, {
cuIcon: 'recordfill',
color: 'orange',
badge: 1,
name: '录像'
}, {
cuIcon: 'picfill',
color: 'yellow',
badge: 0,
name: '图像'
}, {
cuIcon: 'noticefill',
color: 'olive',
badge: 22,
name: '通知'
}, {
cuIcon: 'upstagefill',
color: 'cyan',
badge: 0,
name: '排行榜'
}, {
cuIcon: 'clothesfill',
color: 'blue',
badge: 0,
name: '皮肤'
}, {
cuIcon: 'discoverfill',
color: 'purple',
badge: 0,
name: '发现'
}, {
cuIcon: 'questionfill',
color: 'mauve',
badge: 0,
name: '帮助'
}, {
cuIcon: 'commandfill',
color: 'purple',
badge: 0,
name: '问答'
}, {
cuIcon: 'brandfill',
color: 'mauve',
badge: 0,
name: '版权'
}],
modalName: null,
gridCol: 3,
gridBorder: false,
menuBorder: false,
menuArrow: false,
menuCard: false,
skin: false,
listTouchStart: 0,
listTouchDirection: null,
};
},
methods: {
showModal(e) {
this.modalName = e.currentTarget.dataset.target
},
hideModal(e) {
this.modalName = null
},
Gridchange(e) {
this.gridCol = e.detail.value
},
Gridswitch(e) {
this.gridBorder = e.detail.value
},
MenuBorder(e) {
this.menuBorder = e.detail.value
},
MenuArrow(e) {
this.menuArrow = e.detail.value
},
MenuCard(e) {
this.menuCard = e.detail.value
},
SwitchSex(e) {
this.skin = e.detail.value
},
// ListTouch
ListTouchStart(e) {
this.listTouchStart = e.touches[0].pageX
},
// ListTouch
ListTouchMove(e) {
this.listTouchDirection = e.touches[0].pageX - this.listTouchStart > 0 ? 'right' : 'left'
},
// ListTouch
ListTouchEnd(e) {
if (this.listTouchDirection == 'left') {
this.modalName = e.currentTarget.dataset.target
} else {
this.modalName = null
}
this.listTouchDirection = null
}
}
}
</script>
<style>
.page {
height: 100Vh;
width: 100vw;
}
.page.show {
overflow: hidden;
}
.switch-sex::after {
content: "\e716";
}
.switch-sex::before {
content: "\e7a9";
}
.switch-music::after {
content: "\e66a";
}
.switch-music::before {
content: "\e6db";
}
</style>

View File

@ -0,0 +1,97 @@
<template>
<view class="content">
<form @submit="formSubmit">
<!-- 宝宝姓氏 -->
<view class="cu-form-group">
<view class="title">宝宝姓氏</view>
<input name="input" placeholder="请输入姓氏" maxlength="2" />
</view>
<!-- 宝宝性别 -->
<view class="cu-form-group">
<view class="title">宝宝性别</view>
<radio-group name="radio1">
<label>
<radio class="black radio" :class="radio == 'A' ? 'checked' : ''" :checked="radio == 'A' ? true : false" value="A" />
<text>男孩</text>
</label>
<label>
<radio class="black radio" :class="radio == 'B' ? 'checked' : ''" :checked="radio == 'B' ? true : false" value="B" />
<text>女孩</text>
</label>
</radio-group>
</view>
<!-- 名字字数 -->
<view class="cu-form-group">
<view class="title">名字字数</view>
<radio-group name="radio2">
<label>
<radio class="black radio" :class="radio == 'C' ? 'checked' : ''" :checked="radio == 'C' ? true : false" value="C" />
<text>单字名</text>
</label>
<label>
<radio class="black radio" :class="radio == 'D' ? 'checked' : ''" :checked="radio == 'D' ? true : false" value="D" />
<text>多字名</text>
</label>
</radio-group>
</view>
<!-- 日期选择 -->
<view class="cu-form-group">
<view class="title">出生日期</view>
<picker name="datePicker" mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
<view class="picker">{{date}}</view>
</picker>
</view>
<!-- 时辰选择 -->
<view class="cu-form-group">
<view class="title">出生时辰</view>
<picker name="timePicker" mode="time" :value="time" start="09:01" end="21:01" @change="bindTimeChange">
<view class="picker">{{time}}</view>
</picker>
</view>
<view class="margin"><button class="w-btn big radius bg-black margin-tb white-color" form-type="submit" >免费起名</button></view>
</form>
</view>
</template>
<script>
export default {
data() {
return {
isBorn: true,
date: '2020-2-2',
posterShow: false,
time: '12:01',
radio: 'A'
};
},
onLoad() {},
methods: {
bindDateChange: function(e) {
this.date = e.target.value;
},
bindTimeChange: function(e) {
this.time = e.target.value;
},
formSubmit: function (e) {
console.log('form发生了submit事件携带数据为' + JSON.stringify(e.target.value))
var formData = e.target.value;
uni.showToast({
title: '提交成功',
icon: 'success',
duration: 1000
})
setTimeout(() => {
uni.navigateTo({
url:'../details/details'
})
}, 600);
}
}
};
</script>
<style></style>

View File

@ -0,0 +1,102 @@
<template>
<view class="container">
<view class="left-top-sign">LOGIN</view>
<view class="welcome">欢迎回来</view>
<button class="confirm-btn" open-type="getUserInfo" @getuserinfo="wxLogin" :disabled="logining">微信授权登录</button>
</view>
</template>
<script>
import { mapMutations } from 'vuex';
export default {
data() {
return {
logining: false
};
},
onLoad() {},
methods: {
wxLogin(e) {
const that = this;
that.logining = true;
let userInfo = e.detail.userInfo;
uni.login({
provider:"weixin",
success:(login_res => {
let code = login_res.code;
uni.getUserInfo({
success(info_res) {
console.log(info_res)
uni.request({
url:'http://localhost:8080/wxlogin',
method:"POST",
header: {
'content-type': 'application/x-www-form-urlencoded'
},
data:{
code : code,
rawData : info_res.rawData
},
success(res) {
if(res.data.status == 200){
that.$store.commit('login',userInfo);
// uni.setStorageSync("userInfo",userInfo);
// uni.setStorageSync("skey", res.data.data);
}else{
console.log('服务器异常')
}
},
fail(error) {
console.log(error)
}
})
uni.hideLoading()
uni.navigateBack()
}
})
})
})
}
}
};
</script>
<style lang="scss">
.container {
display: flex;
overflow: hidden;
background: #fff;
flex-direction: column;
justify-content: center;
.left-top-sign {
font-size: 120upx;
color: $page-color-base;
position: relative;
left: -10upx;
margin-top: 100upx;
}
.welcome {
position: relative;
left: 50upx;
top: -90upx;
font-size: 46upx;
color: #555;
text-shadow: 1px 0px 1px rgba(0, 0, 0, 0.3);
}
.confirm-btn {
width: 630upx;
height: 76upx;
line-height: 76upx;
border-radius: 50px;
margin-top: 70upx;
background: $uni-color-primary;
color: #fff;
font-size: $font-lg;
&:after {
border-radius: 100px;
}
}
}
</style>

View File

@ -0,0 +1,76 @@
<template>
<view class="content">
<!-- 登录头像 -->
<image class="logo" :src="userInfo.avatarUrl || '/static/missing-face.png'"></image>
<view class="text-area">
<text class="title" @click="toLogin">{{ hasLogin ? userInfo.nickName || '' : '' }}</text>
</view>
<!-- list列表 -->
<view class="section">
<list-cell icon="icon-chuangzuo" iconColor="#8a8a8a" title="起名记录"></list-cell>
<list-cell icon="icon-dingdan" iconColor="#8a8a8a" title="测名记录"></list-cell>
<list-cell icon="icon-dianhua" iconColor="#8a8a8a" title="联系客服"></list-cell>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex';
import listCell from '../../components/list-cell.vue';
export default {
components:{
listCell
},
data() {
return {};
},
onLoad() {},
computed: {
...mapState(['hasLogin', 'userInfo'])
},
methods: {
toLogin() {
if (!this.hasLogin) {
uni.navigateTo({
url: '/pages/login/login'
});
}
}
}
};
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
.section {
padding: 30upx 0 0;
margin-top: 40upx;
background: #fff;
border-radius:10upx;
}
</style>

View File

@ -0,0 +1,448 @@
<template>
<view>
<!-- 测名 -->
<view>
<view class="search-bar">
<text class="icon-search sz-sm"></text>
<input type="text" placeholder="给你的名字做个评分" confirm-type="search" @input="searchIcon" />
<text class="test-font">测一测</text>
</view>
</view>
<!-- 顶部选项卡 -->
<scroll-view id="nav-bar" class="nav-bar" scroll-x scroll-with-animation :scroll-left="scrollLeft">
<view
v-for="(item,index) in tabBars" :key="item.id"
class="nav-item"
:class="{current: index === tabCurrentIndex}"
:id="'tab'+index"
@click="changeTab(index)"
>{{item.name}}</view>
</scroll-view>
<!-- 下拉刷新组件 -->
<down-refresh ref="mixPulldownRefresh" class="panel-content" :top="90" @refresh="onPulldownReresh" @setEnableScroll="setEnableScroll">
<!-- 内容部分 -->
<swiper
id="swiper"
class="swiper-box"
:duration="300"
:current="tabCurrentIndex"
@change="changeTab"
>
<swiper-item v-for="tabItem in tabBars" :key="tabItem.id">
<scroll-view
class="panel-scroll-box"
:scroll-y="enableScroll"
@scrolltolower="loadMore"
>
<!-- 文章列表 -->
<view v-for="(item, index) in tabItem.newsList" :key="index" class="news-item" @click="navToDetails(item)">
<text :class="['title', 'title'+item.type]">{{item.title}}</text>
<view v-if="item.images.length > 0" :class="['img-list', 'img-list'+item.type, item.images.length === 1 && item.type===3 ? 'img-list-single': '']">
<view
v-for="(imgItem, imgIndex) in item.images" :key="imgIndex"
:class="['img-wrapper', 'img-wrapper'+item.type, item.images.length === 1 && item.type===3 ? 'img-wrapper-single': '']"
>
<image class="img" :src="imgItem"></image>
<view class="video-tip" v-if="item.videoSrc">
<image class="video-tip-icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAEC0lEQVRoQ+2ajVEVMRDHdzuwA6ACpQKxArECtQKxAqECoQKhAqECoQKxAqEDrWCdn7Nx8vJy+bp3T4YhM2+O8S7J/rO7//2IKo9k6CPBIU9Acpo0s10ReSkiPA8mtH0tIncicqOqPDcyZmvEhX8rIu8cQI9gtyJyKSIXc0ENA3EAnxxAj/BT356LyEdV/TWyWDcQM3smIgA4mtjwXkQ4aX4Mngj3QkSYy5PfTmb+laoeLg7EzBDga8aEEB4TOVfVAKAoj2sUc+QXQC0PxMzY8Esi3W8ROVbV05FTDHPMDC1AEBzEcqY1AeLMQQxtXANuZvjMa/cb/i6Oqo9kQKCFI1WtLl7bfOq9mUHd3/w9ND1F5f+WKAJxn/gebQiIg1Y/mAEEUsDX8J0zVZ0iljoQZydAYLuMrYCIwXOQrYc2qREzw4E/RAu/X9KcRrUX5mWBODX+jBY/UdXjuZuNznd5PnscepNjtikgODJpRzCp3VFaHBU+MTEOkSDMIJ0hFKyMNSAZbZA2NMUJn7ujqjebABDWyDDnXpqb5YDEvnGvqsHZi7I5CMgBxiHDxRx5bmSYGZlyyADWmCwHBN8IwjdRH5Im3B+En5UIJuYFBeMnjFtV3Y/frwDJmNV+K/1NAGEvIv+pqp7MUU1GthXzSoHE+VSzWRU0EsuOaUDhw+aWmNdKOEiBxOzQlYkWNJIqAiAI0V0dmhkZNvkXYyUkpEDYhFJ17cOaWXQACUtxaPhgc9JpZvFBr+Rg/xNI8B+0w0lXR0LDzUCIoE0bNPpISdC1uJD7uJQVlzTyEIFQgFGhMpo10pVfDfgIwlAiU9s0af4h+gglARkE8WURZ98G/V65Fhal3zgg3qnqXpVK/IMG0/rhAOYExDh9KgZEcqy4DtlEirKpTgutqLjsnk5RnEaLWeaUhiY0srFOS1KxrqVPtTS+2by8xsdsnkONNN5G0pDCQcVmtcaoLYVVV63e0zDo8L+0OVgvrNy84lIXemRiM022CtjynWsabVCwMdpKXQeSOlZXcGwRsPWbJAgyLZvOPOh2UKZWn6xYS0Dibl/IVF+1VoytJ15wbqyCtmkwKdIZGnZZE+9tmbLI4mC8VRuDAG8xpo00sQFDi2iRJrabU2jGBYVVmbMKxJ0/dzfSXeGVzM3ZiRZt2tGsgmDdJiAFMGiHNPxijk+YGV1NsuHgD82aCB82A4lomdohvf8jrQm3s61XbzgzAMJtVXwWOPZhD7F0AXEwnBrqjzv1sRCACnfp/HvIdsNlTbiDn+pgDuVn3UCCxN4wA1Bods+xrr8R26/yuuuULh8p8D0nSzsTE8ldOZcAhttgKsUhAEM+Ujty1xIm1PJfOK7nCh/LM2xaNVDbfv8EZNsnXtvvDyrmF1FIBKIwAAAAAElFTkSuQmCC"></image>
</view>
</view>
</view>
<!-- 空图片占位 -->
<view v-else class="img-empty"></view>
<view :class="['bot', 'bot'+item.type]">
<text class="author">{{item.author}}</text>
<text class="time">{{item.time}}</text>
</view>
</view>
<!-- 上滑加载更多组件 -->
<up-load :status="tabItem.loadMoreStatus"></up-load>
</scroll-view>
</swiper-item>
</swiper>
</down-refresh>
</view>
</template>
<script>
import json from '@/json'
import downRefresh from '@/components/down-refresh.vue';
import upLoad from '@/components/up-load.vue';
let windowWidth = 0, scrollTimer = false, tabBar;
export default {
components: {
downRefresh,
upLoad,
},
data() {
return {
tabCurrentIndex: 0, //
scrollLeft: 0, //
enableScroll: true,
tabBars: [],
}
},
async onLoad() {
//
windowWidth = uni.getSystemInfoSync().windowWidth;
this.loadTabbars();
},
methods: {
/**
* 数据处理方法在vue和nvue中通用可以直接用mixin混合
* 这里直接写的
* mixin使用方法看index.nuve
*/
//
loadTabbars(){
let tabList = json.tabList;
tabList.forEach(item=>{
item.newsList = [];
item.loadMoreStatus = 0; // 012
item.refreshing = 0;
})
this.tabBars = tabList;
this.loadNewsList('add');
},
//
loadNewsList(type){
let tabItem = this.tabBars[this.tabCurrentIndex];
//type add refresh
if(type === 'add'){
if(tabItem.loadMoreStatus === 2){
return;
}
tabItem.loadMoreStatus = 1;
}
// #ifdef APP-PLUS
else if(type === 'refresh'){
tabItem.refreshing = true;
}
// #endif
//setTimeout
setTimeout(()=>{
let list = json.newsList;
list.sort((a,b)=>{
return Math.random() > .5 ? -1 : 1; //
})
if(type === 'refresh'){
tabItem.newsList = []; //
}
list.forEach(item=>{
item.id = parseInt(Math.random() * 10000);
tabItem.newsList.push(item);
})
//
if(type === 'refresh'){
this.$refs.mixPulldownRefresh && this.$refs.mixPulldownRefresh.endPulldownRefresh();
// #ifdef APP-PLUS
tabItem.refreshing = false;
// #endif
tabItem.loadMoreStatus = 0;
}
//
if(type === 'add'){
tabItem.loadMoreStatus = tabItem.newsList.length > 40 ? 2: 0;
}
}, 600)
},
//
navToDetails(item){
let data = {
id: item.id,
title: item.title,
author: item.author,
time: item.time
}
let url = item.videoSrc ? 'videoDetails' : 'details';
uni.navigateTo({
url: `/pages/details/${url}?data=${JSON.stringify(data)}`
})
},
//
onPulldownReresh(){
this.loadNewsList('refresh');
},
//
loadMore(){
this.loadNewsList('add');
},
//scroll-view
setEnableScroll(enable){
if(this.enableScroll !== enable){
this.enableScroll = enable;
}
},
//tab
async changeTab(e){
if(scrollTimer){
//
clearTimeout(scrollTimer);
scrollTimer = false;
}
let index = e;
//e=numbere=objectswiper
if(typeof e === 'object'){
index = e.detail.current
}
if(typeof tabBar !== 'object'){
tabBar = await this.getElSize("nav-bar")
}
//
let tabBarScrollLeft = tabBar.scrollLeft;
let width = 0;
let nowWidth = 0;
//
for (let i = 0; i <= index; i++) {
let result = await this.getElSize('tab' + i);
width += result.width;
if(i === index){
nowWidth = result.width;
}
}
if(typeof e === 'number'){
//tabbar
this.tabCurrentIndex = index;
}
//300ms,swipertabbar
scrollTimer = setTimeout(()=>{
if (width - nowWidth/2 > windowWidth / 2) {
//
this.scrollLeft = width - nowWidth/2 - windowWidth / 2;
}else{
this.scrollLeft = 0;
}
if(typeof e === 'object'){
this.tabCurrentIndex = index;
}
this.tabCurrentIndex = index;
//tab
let tabItem = this.tabBars[this.tabCurrentIndex];
if(this.tabCurrentIndex !== 0 && tabItem.loaded !== true){
this.loadNewsList('add');
tabItem.loaded = true;
}
}, 300)
},
//size
getElSize(id) {
return new Promise((res, rej) => {
let el = uni.createSelectorQuery().select('#' + id);
el.fields({
size: true,
scrollOffset: true,
rect: true
}, (data) => {
res(data);
}).exec();
});
},
}
}
</script>
<style lang='scss'>
.test-font {
color: #2C2C2C;
margin-left: 40%;
font-weight: bold;
}
/* 顶部tabbar */
.nav-bar{
position: relative;
z-index: 10;
height: 90upx;
white-space: nowrap;
box-shadow: 0 2upx 8upx rgba(0,0,0,.06);
background-color: #fff;
.nav-item{
display: inline-block;
width: 150upx;
height: 90upx;
text-align: center;
line-height: 90upx;
font-size: 30upx;
color: #8a8a8a;
position: relative;
&:after{
content: '';
width: 0;
height: 0;
border-bottom: 4upx solid #2c2c2c;
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
transition: .3s;
}
}
.current{
color: #2c2c2c;
&:after{
width: 50%;
}
}
}
.swiper-box{
height: 100%;
}
.panel-scroll-box{
height: 100%;
.panel-item{
background: #fff;
padding: 30px 0;
border-bottom: 2px solid #000;
}
}
/**
* 新闻列表 直接拿的nvue样式修改,
* 一共需要修改不到10行代码, 另外px需要直接修改为upx只有单位不一样计算都是一样的
* 吐槽难道不能在编译的时候把nuve中的upx转为px? 这样就不用修改单位了
*/
.video-wrapper{
width: 100%;
height: 440upx;
.video{
width: 100%;
}
}
view{
display:flex;
flex-direction: column;
}
.img{
width: 100%;
height: 100%;
}
.news-item{
position:relative;
}
/* 修改结束 */
/* 新闻列表 emmm 仅供参考 */
.news-item{
width: 750upx;
padding: 24upx 30upx;
border-bottom-width: 1px;
border-color: #eee;
background-color: #fff;
}
.title{
font-size: 32upx;
color: #303133;
line-height: 46upx;
}
.bot{
flex-direction: row;
}
.author{
font-size: 26upx;
color: #aaa;
}
.time{
font-size: 26upx;
color: #aaa;
margin-left: 20upx;
}
.img-list{
flex-shrink: 0;
flex-direction: row;
background-color: #fff;
width: 220upx;
height: 140upx;
}
.img-wrapper{
flex: 1;
flex-direction: row;
height: 140upx;
position: relative;
overflow: hidden;
}
.img{
flex: 1;
}
.img-empty{
height: 20upx;
}
/* 图在左 */
.img-list1{
position:absolute;
left: 30upx;
top: 24upx;
}
.title1{
padding-left: 240upx;
}
.bot1{
padding-left: 240upx;
margin-top: 20upx;
}
/* 图在右 */
.img-list2{
position:absolute;
right: 30upx;
top: 24upx;
}
.title2{
padding-right: 210upx;
}
.bot2{
margin-top: 20upx;
}
/* 底部3图 */
.img-list3{
width: 700upx;
margin: 16upx 0upx;
}
.img-wrapper3{
margin-right: 4upx;
}
/* 底部大图 */
.img-list-single{
width: 690upx;
height: 240upx;
margin: 16upx 0upx;
}
.img-wrapper-single{
height: 240upx;
margin-right: 0upx;
}
.video-tip{
position: absolute;
left: 0;
top: 0;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,.3);
}
.video-tip-icon{
width: 60upx;
height:60upx;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -0,0 +1,35 @@
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
hasLogin: false,
userInfo: {},
},
mutations: {
login(state, provider) {
state.hasLogin = true;
state.userInfo = provider;
uni.setStorage({//缓存用户登陆状态
key: 'userInfo',
data: provider
})
console.log(state.userInfo);
},
logout(state) {
state.hasLogin = false;
state.userInfo = {};
uni.removeStorage({
key: 'userInfo'
})
}
},
actions: {
}
})
export default store

28
CreateName-uni/uni.scss Normal file
View File

@ -0,0 +1,28 @@
/* 页面左右间距 */
$page-row-spacing: 30upx;
$page-color-base: #f8f8f8;
$page-color-light: #f8f6fc;
$base-color: #fa436a;
/* 文字尺寸 */
$font-sm: 24upx;
$font-base: 28upx;
$font-lg: 32upx;
/*文字颜色*/
$font-color-dark: #303133;
$font-color-base: #606266;
$font-color-light: #909399;
$font-color-disabled: #C0C4CC;
$font-color-spec: #4399fc;
/* 边框颜色 */
$border-color-dark: #DCDFE6;
$border-color-base: #E4E7ED;
$border-color-light: #EBEEF5;
/* 图片加载中颜色 */
$image-bg-color: #eee;
/* 行为相关颜色 */
$uni-color-primary:#fa436a;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,43 @@
{
"pages": [
"pages/index/index",
"pages/name/name",
"pages/me/me",
"pages/details/details",
"pages/login/login"
],
"subPackages": [],
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "CreateName",
"navigationBarBackgroundColor": "#FFFFFF"
},
"tabBar": {
"color": "#C0C4CC",
"selectedColor": "#2C2C2C",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "static/create.png",
"selectedIconPath": "static/create-current.png",
"text": "起名"
},
{
"pagePath": "pages/name/name",
"iconPath": "static/name.png",
"selectedIconPath": "static/name-current.png",
"text": "鉴名"
},
{
"pagePath": "pages/me/me",
"iconPath": "static/wode.png",
"selectedIconPath": "static/wode-current.png",
"text": "我的"
}
]
},
"usingComponents": {},
"sitemapLocation": "sitemap25.json"
}

View File

@ -0,0 +1 @@
@import './common/main.wxss';

View File

@ -0,0 +1,256 @@
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/main"],[
/* 0 */
/*!**************************************************!*\
!*** F:/demo/app/wx--uni/CreateName-uni/main.js ***!
\**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(uni, createApp) {__webpack_require__(/*! uni-pages */ 4);__webpack_require__(/*! @dcloudio/uni-stat */ 5);
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
var _store = _interopRequireDefault(__webpack_require__(/*! ./store */ 9));
var _App = _interopRequireDefault(__webpack_require__(/*! ./App */ 11));
var config = _interopRequireWildcard(__webpack_require__(/*! ./config */ 17));function _interopRequireWildcard(obj) {if (obj && obj.__esModule) {return obj;} else {var newObj = {};if (obj != null) {for (var key in obj) {if (Object.prototype.hasOwnProperty.call(obj, key)) {var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};if (desc.get || desc.set) {Object.defineProperty(newObj, key, desc);} else {newObj[key] = obj[key];}}}}newObj.default = obj;return newObj;}}function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};var ownKeys = Object.keys(source);if (typeof Object.getOwnPropertySymbols === 'function') {ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {return Object.getOwnPropertyDescriptor(source, sym).enumerable;}));}ownKeys.forEach(function (key) {_defineProperty(target, key, source[key]);});}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}
var defConfig = config.def;
var msg = function msg(title) {var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;var mask = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;var icon = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'none';
//统一提示方便全局修改
if (Boolean(title) === false) {
return;
}
uni.showToast({
title: title,
duration: duration,
mask: mask,
icon: icon });
};
var request = function request(_gp, _mt) {var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var failCallback = arguments.length > 3 ? arguments[3] : undefined;
//异步请求数据
return new Promise(function (resolve) {
if (!userInfo || !userInfo.accessToken) {
userInfo = uni.getStorageSync('userInfo');
}
var accessToken = userInfo ? userInfo.accessToken : '';
var baseUrl = config.def().baseUrl;
uni.request({
url: baseUrl + '/m.api',
data: _objectSpread({},
data, {
_gp: _gp,
_mt: _mt }),
method: 'POST',
header: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'ACCESSTOKEN': accessToken },
success: function success(res) {
if (res.statusCode === 200) {
if (res.data.errno === 200) {
resolve(res.data);
} else if (res.data.errno === 10001) {
if (failCallback) {
failCallback(res.data);
}
if (!loginLock) {
loginLock = true;
uni.showModal({
title: '登录提示',
content: '您尚未登录,是否立即登录?',
showCancel: true,
confirmText: '登录',
success: function success(e) {
if (e.confirm) {
uni.navigateTo({
url: '/pages/public/login' });
}
},
fail: function fail() {},
complete: function complete() {
loginLock = false;
} });
}
} else {
if (failCallback) {
failCallback(res.data);
} else {
uni.showToast({
title: res.data.errmsg,
icon: 'none' });
}
}
}
} });
});
};
var userInfo = undefined;
var logout = function logout() {
userInfo = undefined;
uni.removeStorage({
key: 'userInfo' });
};
var setUserInfo = function setUserInfo(i) {
userInfo = i;
};
_vue.default.config.productionTip = false;
_vue.default.prototype.$store = _store.default;
_vue.default.prototype.$api = {
request: request,
setUserInfo: setUserInfo,
logout: logout,
msg: msg,
defConfig: defConfig };
_App.default.mpType = 'app';
var app = new _vue.default(_objectSpread({},
_App.default));
createApp(app).$mount();
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createApp"]))
/***/ }),
/* 1 */,
/* 2 */,
/* 3 */,
/* 4 */,
/* 5 */,
/* 6 */,
/* 7 */,
/* 8 */,
/* 9 */,
/* 10 */,
/* 11 */
/*!**************************************************!*\
!*** F:/demo/app/wx--uni/CreateName-uni/App.vue ***!
\**************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _App_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./App.vue?vue&type=script&lang=js& */ 12);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _App_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _App_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./App.vue?vue&type=style&index=0&lang=css& */ 14);
/* harmony import */ var _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 16);
var render, staticRenderFns, recyclableRender, components
var renderjs
/* normalize component */
var component = Object(_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
_App_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"],
render,
staticRenderFns,
false,
null,
null,
null,
false,
components,
renderjs
)
/* hot reload */
if (false) { var api; }
component.options.__file = "F:/demo/app/wx--uni/CreateName-uni/App.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
/***/ }),
/* 12 */
/*!***************************************************************************!*\
!*** F:/demo/app/wx--uni/CreateName-uni/App.vue?vue&type=script&lang=js& ***!
\***************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_App_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./App.vue?vue&type=script&lang=js& */ 13);
/* harmony import */ var _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_App_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_App_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_App_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_App_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_App_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/* 13 */
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!F:/demo/app/wx--uni/CreateName-uni/App.vue?vue&type=script&lang=js& ***!
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
var _vuex = __webpack_require__(/*! vuex */ 10);function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};var ownKeys = Object.keys(source);if (typeof Object.getOwnPropertySymbols === 'function') {ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {return Object.getOwnPropertyDescriptor(source, sym).enumerable;}));}ownKeys.forEach(function (key) {_defineProperty(target, key, source[key]);});}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}var _default =
{
methods: _objectSpread({},
(0, _vuex.mapMutations)(['login'])),
onLaunch: function onLaunch() {var _this = this;
var userInfo = uni.getStorageSync('userInfo') || '';
if (userInfo.id) {
//更新登陆状态
uni.getStorage({
key: 'userInfo',
success: function success(res) {
_this.login(res.data);
} });
}
},
onShow: function onShow() {
console.log('App Show');
},
onHide: function onHide() {
console.log('App Hide');
} };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
/***/ }),
/* 14 */
/*!***********************************************************************************!*\
!*** F:/demo/app/wx--uni/CreateName-uni/App.vue?vue&type=style&index=0&lang=css& ***!
\***********************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-1!./node_modules/css-loader??ref--6-oneOf-1-2!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./App.vue?vue&type=style&index=0&lang=css& */ 15);
/* harmony import */ var _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_App_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/* 15 */
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-1!./node_modules/css-loader??ref--6-oneOf-1-2!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!F:/demo/app/wx--uni/CreateName-uni/App.vue?vue&type=style&index=0&lang=css& ***!
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ })
],[[0,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/main.js.map

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@
/******/ var moduleId, chunkId, i = 0, resolves = []; /******/ var moduleId, chunkId, i = 0, resolves = [];
/******/ for(;i < chunkIds.length; i++) { /******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i]; /******/ chunkId = chunkIds[i];
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { /******/ if(installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]); /******/ resolves.push(installedChunks[chunkId][0]);
/******/ } /******/ }
/******/ installedChunks[chunkId] = 0; /******/ installedChunks[chunkId] = 0;
@ -48,13 +48,17 @@
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]); /******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
/******/ } /******/ }
/******/ } /******/ }
/******/
/******/ return result; /******/ return result;
/******/ } /******/ }
/******/ /******/
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
/******/ /******/
/******/ // object to store loaded CSS chunks
/******/ var installedCssChunks = {
/******/ "common/runtime": 0
/******/ }
/******/
/******/ // object to store loaded and loading chunks /******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // Promise = chunk loading, 0 = chunk loaded /******/ // Promise = chunk loading, 0 = chunk loaded
@ -64,6 +68,11 @@
/******/ /******/
/******/ var deferredModules = []; /******/ var deferredModules = [];
/******/ /******/
/******/ // script path function
/******/ function jsonpScriptSrc(chunkId) {
/******/ return __webpack_require__.p + "" + chunkId + ".js"
/******/ }
/******/
/******/ // The require function /******/ // The require function
/******/ function __webpack_require__(moduleId) { /******/ function __webpack_require__(moduleId) {
/******/ /******/
@ -88,6 +97,104 @@
/******/ return module.exports; /******/ return module.exports;
/******/ } /******/ }
/******/ /******/
/******/ // This file contains only the entry chunk.
/******/ // The chunk loading function for additional chunks
/******/ __webpack_require__.e = function requireEnsure(chunkId) {
/******/ var promises = [];
/******/
/******/
/******/ // mini-css-extract-plugin CSS loading
/******/ var cssChunks = {"components/down-refresh":1,"components/up-load":1,"components/list-cell":1};
/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
/******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
/******/ var href = "" + ({"components/down-refresh":"components/down-refresh","components/up-load":"components/up-load","components/list-cell":"components/list-cell"}[chunkId]||chunkId) + ".wxss";
/******/ var fullhref = __webpack_require__.p + href;
/******/ var existingLinkTags = document.getElementsByTagName("link");
/******/ for(var i = 0; i < existingLinkTags.length; i++) {
/******/ var tag = existingLinkTags[i];
/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href");
/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return resolve();
/******/ }
/******/ var existingStyleTags = document.getElementsByTagName("style");
/******/ for(var i = 0; i < existingStyleTags.length; i++) {
/******/ var tag = existingStyleTags[i];
/******/ var dataHref = tag.getAttribute("data-href");
/******/ if(dataHref === href || dataHref === fullhref) return resolve();
/******/ }
/******/ var linkTag = document.createElement("link");
/******/ linkTag.rel = "stylesheet";
/******/ linkTag.type = "text/css";
/******/ linkTag.onload = resolve;
/******/ linkTag.onerror = function(event) {
/******/ var request = event && event.target && event.target.src || fullhref;
/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + request + ")");
/******/ err.request = request;
/******/ delete installedCssChunks[chunkId]
/******/ linkTag.parentNode.removeChild(linkTag)
/******/ reject(err);
/******/ };
/******/ linkTag.href = fullhref;
/******/
/******/ var head = document.getElementsByTagName("head")[0];
/******/ head.appendChild(linkTag);
/******/ }).then(function() {
/******/ installedCssChunks[chunkId] = 0;
/******/ }));
/******/ }
/******/
/******/ // JSONP chunk loading for javascript
/******/
/******/ var installedChunkData = installedChunks[chunkId];
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
/******/
/******/ // a Promise means "currently loading".
/******/ if(installedChunkData) {
/******/ promises.push(installedChunkData[2]);
/******/ } else {
/******/ // setup Promise in chunk cache
/******/ var promise = new Promise(function(resolve, reject) {
/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
/******/ });
/******/ promises.push(installedChunkData[2] = promise);
/******/
/******/ // start chunk loading
/******/ var script = document.createElement('script');
/******/ var onScriptComplete;
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120;
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = jsonpScriptSrc(chunkId);
/******/
/******/ onScriptComplete = function (event) {
/******/ // avoid mem leaks in IE.
/******/ script.onerror = script.onload = null;
/******/ clearTimeout(timeout);
/******/ var chunk = installedChunks[chunkId];
/******/ if(chunk !== 0) {
/******/ if(chunk) {
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
/******/ var realSrc = event && event.target && event.target.src;
/******/ var error = new Error('Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')');
/******/ error.type = errorType;
/******/ error.request = realSrc;
/******/ chunk[1](error);
/******/ }
/******/ installedChunks[chunkId] = undefined;
/******/ }
/******/ };
/******/ var timeout = setTimeout(function(){
/******/ onScriptComplete({ type: 'timeout', target: script });
/******/ }, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ document.head.appendChild(script);
/******/ }
/******/ }
/******/ return Promise.all(promises);
/******/ };
/******/ /******/
/******/ // expose the modules object (__webpack_modules__) /******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules; /******/ __webpack_require__.m = modules;
@ -141,6 +248,9 @@
/******/ // __webpack_public_path__ /******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/"; /******/ __webpack_require__.p = "/";
/******/ /******/
/******/ // on error function for async loading
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
/******/
/******/ var jsonpArray = global["webpackJsonp"] = global["webpackJsonp"] || []; /******/ var jsonpArray = global["webpackJsonp"] = global["webpackJsonp"] || [];
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ jsonpArray.push = webpackJsonpCallback; /******/ jsonpArray.push = webpackJsonpCallback;

View File

@ -0,0 +1,299 @@
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["components/down-refresh"],{
/***/ 60:
/*!**********************************************************************!*\
!*** F:/demo/app/wx--uni/CreateName-uni/components/down-refresh.vue ***!
\**********************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _down_refresh_vue_vue_type_template_id_74ec3871___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./down-refresh.vue?vue&type=template&id=74ec3871& */ 61);
/* harmony import */ var _down_refresh_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./down-refresh.vue?vue&type=script&lang=js& */ 63);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _down_refresh_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _down_refresh_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _down_refresh_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./down-refresh.vue?vue&type=style&index=0&lang=css& */ 65);
/* harmony import */ var _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 16);
var renderjs
/* normalize component */
var component = Object(_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
_down_refresh_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
_down_refresh_vue_vue_type_template_id_74ec3871___WEBPACK_IMPORTED_MODULE_0__["render"],
_down_refresh_vue_vue_type_template_id_74ec3871___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
false,
null,
null,
null,
false,
_down_refresh_vue_vue_type_template_id_74ec3871___WEBPACK_IMPORTED_MODULE_0__["components"],
renderjs
)
/* hot reload */
if (false) { var api; }
component.options.__file = "F:/demo/app/wx--uni/CreateName-uni/components/down-refresh.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ 61:
/*!*****************************************************************************************************!*\
!*** F:/demo/app/wx--uni/CreateName-uni/components/down-refresh.vue?vue&type=template&id=74ec3871& ***!
\*****************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_template_id_74ec3871___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./down-refresh.vue?vue&type=template&id=74ec3871& */ 62);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_template_id_74ec3871___WEBPACK_IMPORTED_MODULE_0__["render"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_template_id_74ec3871___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_template_id_74ec3871___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_template_id_74ec3871___WEBPACK_IMPORTED_MODULE_0__["components"]; });
/***/ }),
/***/ 62:
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!F:/demo/app/wx--uni/CreateName-uni/components/down-refresh.vue?vue&type=template&id=74ec3871& ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
var components
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
}
var recyclableRender = false
var staticRenderFns = []
render._withStripped = true
/***/ }),
/***/ 63:
/*!***********************************************************************************************!*\
!*** F:/demo/app/wx--uni/CreateName-uni/components/down-refresh.vue?vue&type=script&lang=js& ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./down-refresh.vue?vue&type=script&lang=js& */ 64);
/* harmony import */ var _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/***/ 64:
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!F:/demo/app/wx--uni/CreateName-uni/components/down-refresh.vue?vue&type=script&lang=js& ***!
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var startY,moveY,windowHeight = 500,platform;
var timeDiff = 0;
var touchending;var _default =
{
props: {
top: {
//距离顶部距离单位upx
type: Number,
default: 0 } },
data: function data() {
return {
pageDeviation: 0, //下偏移量
pageTransition: 0, //回弹过渡时间
refreshReady: false, //进入刷新准备状态
refreshing: false // 进入刷新状态
};
},
computed: {
pageTop: function pageTop() {
return uni.upx2px(this.top);
} },
created: function created() {
uni.getSystemInfo({
success: function success(e) {
console.log(e);
platform = e.platform;
windowHeight = e.windowHeight;
} });
},
methods: {
pageTouchstart: function pageTouchstart(e) {
touchending = false;
this.pageTransition = 0;
startY = e.touches[0].pageY;
},
pageTouchmove: function pageTouchmove(e) {
if (touchending) {
return;
}
moveY = (e.touches[0].pageY - startY) * 0.4;
if (moveY >= 0) {
this.pageDeviation = moveY;
this.$emit('setEnableScroll', false);
}
if (moveY >= 50 && this.refreshReady === false) {
this.refreshReady = true;
} else if (moveY < 50 && this.refreshReady === true) {
this.refreshReady = false;
}
if (platform === 'ios' && e.touches[0].pageY > windowHeight + 10) {
this.pageTouchend();
}
},
pageTouchend: function pageTouchend() {
touchending = true;
if (moveY === 0) {
return;
}
this.pageTransition = 0.3;
if (moveY >= 50) {
this.startPulldownRefresh();
} else {
this.pageDeviation = 0;
}
if (this.refreshReady === true) {
this.refreshReady = false;
}
//修复下拉一点回弹后页面无法滚动的bug
this.$emit('setEnableScroll', true);
startY = moveY = 0;
},
//开启下拉刷新
startPulldownRefresh: function startPulldownRefresh() {
if (+new Date() - timeDiff < 100) {
return;
}
timeDiff = +new Date();
this.refreshing = true;
this.pageDeviation = uni.upx2px(90);
this.$emit('refresh');
},
//结束下拉刷新
endPulldownRefresh: function endPulldownRefresh() {
this.refreshing = false;
this.pageDeviation = uni.upx2px(0);
//this.$emit('setEnableScroll', true);
} } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
/***/ }),
/***/ 65:
/*!*******************************************************************************************************!*\
!*** F:/demo/app/wx--uni/CreateName-uni/components/down-refresh.vue?vue&type=style&index=0&lang=css& ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-1!./node_modules/css-loader??ref--6-oneOf-1-2!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./down-refresh.vue?vue&type=style&index=0&lang=css& */ 66);
/* harmony import */ var _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_1_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_2_2_2_20190816_full_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_down_refresh_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/***/ 66:
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-1!./node_modules/css-loader??ref--6-oneOf-1-2!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!F:/demo/app/wx--uni/CreateName-uni/components/down-refresh.vue?vue&type=style&index=0&lang=css& ***!
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ })
}]);
//# sourceMappingURL=../../.sourcemap/mp-weixin/components/down-refresh.js.map
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/down-refresh-create-component',
{
'components/down-refresh-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('1')['createComponent'](__webpack_require__(60))
})
},
[['components/down-refresh-create-component']]
]);

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"component": true
}

Some files were not shown because too many files have changed in this diff Show More