diff --git a/README.md b/README.md
index 7008566..7e800f7 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-#酒店桌布小程序
+#铝交易微信公众号


diff --git a/api/api.js b/api/api.js
index a1c1309..bae2ad4 100644
--- a/api/api.js
+++ b/api/api.js
@@ -166,7 +166,7 @@ export function api(key, data, callback, loadingTitle) {
if (req.auth) {
if (!uni.getStorageSync('token')) {
uni.navigateTo({
- url: '/pages_order/auth/wxLogin'
+ url: '/pages_order/auth/loginAndRegisterAndForgetPassword'
})
console.error('需要登录')
return
diff --git a/api/http.js b/api/http.js
index 8f7078e..ea99dcb 100644
--- a/api/http.js
+++ b/api/http.js
@@ -16,7 +16,8 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
method: method,
header: {
'X-Access-Token': uni.getStorageSync('token'),
- 'Content-Type' : method == 'POST' ? 'application/x-www-form-urlencoded' : 'application/json'
+ 'Content-Type' : 'application/json'
+ // 'Content-Type' : method == 'POST' ? 'application/x-www-form-urlencoded' : 'application/json'
},
success: (res) => {
@@ -30,7 +31,7 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
uni.removeStorageSync('token')
console.error('登录过期');
uni.navigateTo({
- url: '/pages_order/auth/wxLogin'
+ url: '/pages_order/auth/loginAndRegisterAndForgetPassword'
})
}
diff --git a/config.js b/config.js
index bc0bb92..9a7a64e 100644
--- a/config.js
+++ b/config.js
@@ -7,7 +7,7 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
-const type = 'dev'
+const type = 'prod'
// 环境配置
@@ -16,7 +16,7 @@ const config = {
baseUrl : 'http://www.gcosc.fun:82',
},
prod : {
- baseUrl : 'http://xxx.xxx.xxx/xxx',
+ baseUrl : 'http://42.194.239.145:8014/aluminium-prod',
}
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 8c80655..065d88e 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,459 +1,455 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('pages.index.index.companyProfile') }}
- {{ $t('other.aluminumProducts') }}
-
-
- 随着全球经济的快速发展,我们这家领先的企业公司应运而生,致力于为客户提供卓越的服务和优质的产品。我们公司成立于2001年,总部位于深圳市横岗大厦,拥有广泛的业务领域和专业的团队,专注于实现客户的期望和需求。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 随着全球经济的快速发展,我们这家领先的企业公司应运而生,致力于为客户提供卓越的服务和优质的产品。我们公司成立于2001年,总部位于深圳市横岗大厦,拥有广泛的业务领域和专业的团队,专注于实现客户的期望和需求。
-
-
-
- {{ $t('pages.index.index.companyProfile') }}
- {{ $t('pages.index.index.aluminiumProduct') }}
-
-
-
-
-
-
-
- {{ $t('other.supplierQuotation') }}
-
-
- {{ $t('other.supplierBilLading') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Company Profile
- {{ $t('pages.index.index.companyProfile') }}
- {{ $t('pages.index.index.aluminiumProduct') }}
-
-
- 随着全球经济的快速发展,我们这家领先的企业公司应运而生,致力于为客户提供卓越的服务和优质的产品。我们公司成立于2001年,总部位于深圳市横岗大厦,拥有广泛的业务领域和专业的团队,专注于实现客户的期望和需求。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 随着全球经济的快速发展,我们这家领先的企业公司应运而生,致力于为客户提供卓越的服务和优质的产品。我们公司成立于2001年,总部位于深圳市横岗大厦,拥有广泛的业务领域和专业的团队,专注于实现客户的期望和需求。
-
-
- Company Profile
- {{ $t('pages.index.index.companyProfile') }}
- {{ $t('pages.index.index.aluminiumProduct') }}
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('pages.index.index.companyProfile') }}
+ {{ $t('other.aluminumProducts') }}
+
+
+ 随着全球经济的快速发展,我们这家领先的企业公司应运而生,致力于为客户提供卓越的服务和优质的产品。我们公司成立于2001年,总部位于深圳市横岗大厦,拥有广泛的业务领域和专业的团队,专注于实现客户的期望和需求。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 随着全球经济的快速发展,我们这家领先的企业公司应运而生,致力于为客户提供卓越的服务和优质的产品。我们公司成立于2001年,总部位于深圳市横岗大厦,拥有广泛的业务领域和专业的团队,专注于实现客户的期望和需求。
+
+
+
+ {{ $t('pages.index.index.companyProfile') }}
+ {{ $t('pages.index.index.aluminiumProduct') }}
+
+
+
+
+
+
+
+ {{ $t('other.supplierQuotation') }}
+
+
+ {{ $t('other.supplierBilLading') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Company Profile
+ {{ $t('pages.index.index.companyProfile') }}
+ {{ $t('pages.index.index.aluminiumProduct') }}
+
+
+ 随着全球经济的快速发展,我们这家领先的企业公司应运而生,致力于为客户提供卓越的服务和优质的产品。我们公司成立于2001年,总部位于深圳市横岗大厦,拥有广泛的业务领域和专业的团队,专注于实现客户的期望和需求。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 随着全球经济的快速发展,我们这家领先的企业公司应运而生,致力于为客户提供卓越的服务和优质的产品。我们公司成立于2001年,总部位于深圳市横岗大厦,拥有广泛的业务领域和专业的团队,专注于实现客户的期望和需求。
+
+
+ Company Profile
+ {{ $t('pages.index.index.companyProfile') }}
+ {{ $t('pages.index.index.aluminiumProduct') }}
+
+
+
+
+
+
+ * {
+ box-sizing: border-box;
+ }
+
+ .page {
+
+ background-color: #2e394d;
+
+ // 供应商
+ .supplier {
+ display: flex;
+ flex-direction: column;
+ height: calc(100vh - 120rpx - 120rpx);
+ background-color: #2e394d;
+
+
+ .topItem {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 30%;
+ background-image: url('../../static/image/index/1.png');
+ background-size: cover;
+
+ .imageFrame {
+
+ width: 90%;
+ height: 90%;
+ //padding:80rpx;
+ }
+ }
+
+ .threeHeOne {
+ display: flex;
+ padding: 20rpx 40rpx 10rpx;
+ flex-direction: column;
+
+ height: 60%;
+
+
+
+ .oneItem {
+ display: flex;
+ height: 33%;
+
+ .left {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ gap: 10rpx;
+ width: 33%;
+ background-color: #1e293d;
+ color: white;
+ font-size: 26rpx;
+
+ .subText {
+ width: 80%;
+ background-color: #2e394d;
+ padding: 0 20rpx;
+ }
+ }
+
+ .right {
+ //height: 30%;
+ width: 66%;
+ padding: 20rpx;
+ background-image: url('../../static/image/index/1.png');
+ background-size: cover;
+ font-size: 20rpx;
+ color: white;
+ }
+ }
+
+ .twoItem {
+ display: flex;
+ justify-content: space-between;
+ gap: 20rpx;
+ height: 33%;
+ margin-top: 20rpx;
+ padding: 10rpx;
+
+ .left {
+ width: 60%;
+ padding: 20rpx;
+ background-color: #1e293d;
+ }
+
+ .right {
+ width: 40%;
+ padding: 20rpx;
+ background-color: #1e293d;
+ }
+ }
+
+ .threeItem {
+ display: flex;
+ //width: 100vw;
+ height: 33%;
+
+
+ .left {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ gap: 20rpx;
+ width: 33%;
+ background-color: #1e293d;
+ color: white;
+ font-size: 26rpx;
+
+ .subText {
+ background-color: #2e394d;
+ width: 80%;
+ padding: 0 20rpx;
+ }
+ }
+
+ .right {
+ //height: 200rpx;
+ width: 66%;
+ padding: 20rpx;
+ background-image: url('../../static/image/index/1.png');
+ background-size: cover;
+ font-size: 20rpx;
+ color: white;
+ }
+ }
+ }
+
+ .btns {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ gap: 40rpx;
+
+ .oneBtn {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 40%;
+ height: 70rpx;
+ border-radius: 40rpx;
+ color: #1F1C39;
+
+ font-size: 28rpx;
+ margin: 20rpx 10rpx 0 0;
+ background: #f2f2f2;
+ //margin-top: 20rpx;
+ border-radius: 40rpx;
+ }
+
+ .twoBtn {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 40%;
+ height: 70rpx;
+ border-radius: 40rpx;
+ color: #1F1C39;
+ font-size: 28rpx;
+ margin: 20rpx 10rpx 0 0;
+ background: #f2f2f2;
+ //margin-top: 20rpx;
+ border-radius: 40rpx;
+ }
+
+ }
+ }
+
+ // 采购商
+ .purchaser {
+ display: flex;
+ flex-direction: column;
+ //gap: 40rpx;
+ background-color: #2e394d;
+
+
+ .topItem {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 280rpx;
+ background-image: url('../../static/image/index/1.png');
+ background-size: cover;
+
+ .imageFrame {
+
+ width: 90%;
+ height: 90%;
+ //padding:80rpx;
+ }
+ }
+
+ .threeHeOne {
+ display: flex;
+ padding: 20rpx 40rpx 10rpx;
+ flex-direction: column;
+
+
+ .oneItem {
+ display: flex;
+
+ .left {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ gap: 10rpx;
+ width: 33%;
+ background-color: #1e293d;
+ color: white;
+ font-size: 26rpx;
+
+ .subText {
+ background-color: #2e394d;
+ padding: 0 20rpx;
+ }
+ }
+
+ .right {
+ height: 180rpx;
+ width: 66%;
+ padding: 20rpx;
+ background-image: url('../../static/image/index/1.png');
+ background-size: cover;
+ font-size: 20rpx;
+ color: white;
+ }
+ }
+
+ .twoItem {
+ display: flex;
+ justify-content: space-between;
+ gap: 20rpx;
+ height: 280rpx;
+ margin-top: 20rpx;
+ padding: 10rpx;
+
+ .left {
+ width: 60%;
+ padding: 20rpx;
+ background-color: #1e293d;
+ }
+
+ .right {
+ width: 40%;
+ padding: 20rpx;
+ background-color: #1e293d;
+ }
+ }
+
+ .threeItem {
+ display: flex;
+ //width: 100vw;
+
+ .left {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ gap: 20rpx;
+ width: 33%;
+ background-color: #1e293d;
+ color: white;
+ font-size: 26rpx;
+
+ .subText {
+ background-color: #2e394d;
+ padding: 0 20rpx;
+ }
+ }
+
+ .right {
+ height: 200rpx;
+ width: 66%;
+ padding: 20rpx;
+ background-image: url('../../static/image/index/1.png');
+ background-size: cover;
+ font-size: 20rpx;
+ color: white;
+ }
+ }
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/pages_order/auth/loginAndRegisterAndForgetPassword.vue b/pages_order/auth/loginAndRegisterAndForgetPassword.vue
index ac54989..a92628e 100644
--- a/pages_order/auth/loginAndRegisterAndForgetPassword.vue
+++ b/pages_order/auth/loginAndRegisterAndForgetPassword.vue
@@ -18,7 +18,7 @@
-
@@ -64,7 +64,7 @@
- {{tips}}
@@ -89,7 +89,7 @@
-
+
@@ -123,8 +123,10 @@
titleList: ['注册', '登录', '重置密码'],
checkboxValue: [],
form: {
- account: '13135294009',
- password: 'lzx123456',
+ username: 'h',
+ password: 'l',
+ loginModel : 0,
+ captcha : '',
},
form1: {
userName: '',
@@ -146,13 +148,27 @@
}
if(this.$utils.verificationAll(this.form, {
- account: '请输入账号',
+ username: '请输入账号',
password: '请输入密码',
})){
return
}
- this.$store.commit('accountLogin', this.form)
+ if(this.titleIndex == 0){
+ // 注册
+ this.$api('registerUser', this.form, res =>{
+ if(res.code == 200){
+ this.titleIndex = 1
+ uni.showToast({
+ title: '注册成功,请登录!',
+ icon : 'none'
+ })
+ }
+ })
+ }else if(this.titleIndex == 1){
+ // 登录
+ this.$store.commit('login', this.form)
+ }
},
// 切换页面
changePage(index) {
@@ -267,7 +283,7 @@
height: 80rpx;
color: #FFF;
background-color: $uni-color;
- border: 1px solid red;
+ box-shadow: 0 0 4rpx 4rpx rgba($uni-color, 0.2);
border-radius: 100rpx;
font-size: 30rpx;
}
diff --git a/pages_order/auth/wxLogin.vue b/pages_order/auth/wxLogin.vue
index 7d15763..80d48e4 100644
--- a/pages_order/auth/wxLogin.vue
+++ b/pages_order/auth/wxLogin.vue
@@ -4,150 +4,154 @@
- {{ $t('pageTitle.welcomeToAluminumTradingPlatform') }}
+ {{ $t('pageTitle.welcomeToAluminumTradingPlatform') }}
-
+
- {{ $t('pageTitle.wechatAuthorizedLogin') }}
+ {{ $t('pageTitle.wechatAuthorizedLogin') }}
-
-
-
+
+
+
-
+
-
-
-
- {{ $t('components.agreeToReadAndAgree') }} “ {{ $t('components.serviceAgreementAndPrivacyTerms') }}”
+
+
+
+ {{ $t('components.agreeToReadAndAgree') }} “
+ {{ $t('components.serviceAgreementAndPrivacyTerms') }}”
- {{ $t('components.and') }} {{ $t('components.personalInfoProtectionGuideline') }}
+ {{ $t('components.and') }}
+ {{ $t('components.personalInfoProtectionGuideline') }}
-
+
-
+
+
\ No newline at end of file
diff --git a/store/store.js b/store/store.js
index 340ec48..b1662fa 100644
--- a/store/store.js
+++ b/store/store.js
@@ -36,37 +36,25 @@ const store = new Vuex.Store({
})
})
},
- login(state){
+ login(state, form){
uni.showLoading({
title: '登录中...'
})
- uni.login({success(res) {
- if(res.errMsg != "login:ok"){
- return
- }
-
- api('wxLogin', {
- code : res.code
- }, res => {
-
- uni.hideLoading()
-
- if(res.code != 200){
- return
- }
+
+ api('loginUser', form, res => {
- state.userInfo = res.result.userInfo
- uni.setStorageSync('token', res.result.token)
+ uni.hideLoading()
- if(!state.userInfo.nickName || !state.userInfo.headImage){
- uni.navigateTo({
- url: '/pages_order/auth/wxUserInfo'
- })
- }else{
- uni.navigateBack(-1)
- }
- })
+ if(res.code != 200){
+ return
}
+
+ state.userInfo = res.result.userInfo
+ uni.setStorageSync('token', res.result.token)
+
+ uni.reLaunch({
+ url: '/pages/index/index'
+ })
})
},
getUserInfo(state){
diff --git a/uni_modules/uv-ui-tools/libs/css/color.scss b/uni_modules/uv-ui-tools/libs/css/color.scss
index 2a94a68..a6bd0ec 100644
--- a/uni_modules/uv-ui-tools/libs/css/color.scss
+++ b/uni_modules/uv-ui-tools/libs/css/color.scss
@@ -6,7 +6,7 @@ $uv-border-color: #dadbde !default;
$uv-bg-color: #f3f4f6 !default;
$uv-disabled-color: #c8c9cc !default;
-$uv-primary: #FD5100 !default;
+$uv-primary: #1f1c39 !default;
// $uv-primary: #3c9cff !default;
$uv-primary-dark: #398ade !default;
$uv-primary-disabled: #9acafc !default;