parent
f5cab812f0
commit
a3f10adea3
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"name": "mall4m",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"lockfileVersion": 2,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "mall4m",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"crypto-js": "^4.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/crypto-js": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw=="
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"crypto-js": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"name": "mall4m",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "一个基于vue、element ui 的轻量级、前后端分离、拥有完整sku和下单流程的完全开源商城 小程序端",
|
||||||
|
"main": "app.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://gitee.com/gz-yami/mall4m.git"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"crypto-js": "^4.1.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,26 @@
|
|||||||
<!--pages/login/login.wxml-->
|
<!--pages/login/login.wxml-->
|
||||||
<image src='http://img-test.gz-yami.com/mini/logo.jpg' class='c-logo'></image>
|
<image src='http://img-test.gz-yami.com/mini/logo.jpg' class='c-logo'></image>
|
||||||
<view class="title">mall4j</view>
|
<view class="title">mall4j</view>
|
||||||
<view class="msg">申请获得你的公开信息(昵称、头像等)</view>
|
<view class="login-form">
|
||||||
<button color="#eb2444" open-type="getUserInfo" lang = "zh_CN" bindgetuserinfo = "onGotUserInfo" class=''>微信授权</button>
|
<view class="item">
|
||||||
|
<view class="account">
|
||||||
|
<text class="input-item">用户名</text>
|
||||||
|
<input type="text" data-type="account" placeholder-class="inp-palcehoder" placeholder="请输入用户名" bindinput="getInputVal"></input>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="account">
|
||||||
|
<text class="input-item">密码</text>
|
||||||
|
<input type="password" data-type="password" placeholder-class="inp-palcehoder" placeholder="请输入密码" bindinput="getInputVal"></input>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<button class="authorized-btn" bindtap="handleLoginOrRegister">{{isRegister ? '注册': '登录'}}</button>
|
||||||
|
<button class="to-idx-btn" bindtap="goBack">回到首页</button>
|
||||||
|
</view>
|
||||||
|
<view class="operate">
|
||||||
|
<view class="to-register" bindtap="handleChangeShowType">
|
||||||
|
{{isRegister?'已有账号?去登录>' : '没有账号?去注册>'}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"setting": {},
|
||||||
|
"condition": {
|
||||||
|
"plugin": {
|
||||||
|
"list": []
|
||||||
|
},
|
||||||
|
"game": {
|
||||||
|
"list": []
|
||||||
|
},
|
||||||
|
"gamePlugin": {
|
||||||
|
"list": []
|
||||||
|
},
|
||||||
|
"miniprogram": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"name": "登录",
|
||||||
|
"pathName": "pages/login/login",
|
||||||
|
"query": "",
|
||||||
|
"launchMode": "default",
|
||||||
|
"scene": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,3 +1,6 @@
|
|||||||
var domain = "http://127.0.0.1:8086"; //统一接口域名,测试环境
|
//可改动页面
|
||||||
|
|
||||||
|
var domain = "http://192.168.1.17:8386"; //统一接口域名,测试环境
|
||||||
|
|
||||||
exports.domain = domain;
|
exports.domain = domain;
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,11 @@
|
|||||||
|
import CryptoJS from 'crypto-js'
|
||||||
|
// 加密
|
||||||
|
const keyStr = '-mall4j-password' // 解密用的key
|
||||||
|
export function encrypt(word) {
|
||||||
|
const time = Date.now()
|
||||||
|
|
||||||
|
const key = CryptoJS.enc.Utf8.parse(keyStr)
|
||||||
|
const srcs = CryptoJS.enc.Utf8.parse(time + word) // 加密方式: 时间戳 + 密文
|
||||||
|
const encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })
|
||||||
|
return encrypted.toString()
|
||||||
|
}
|
||||||
Loading…
Reference in new issue