Commit a4bcd530 by liangjianmin

css

parent 322b3103
......@@ -15,14 +15,14 @@ import { API } from '@/util/api.js';
export default {
data() {
return {};
},
onLoad(options) {},
onShareTimeline(res) {
return {
open_id: ''
code: ''
};
},
onLoad(options) {
this.getCode();
},
onShareTimeline(res) {},
methods: {
getCode() {
var self = this;
......@@ -30,8 +30,7 @@ export default {
scopes: 'auth_user',
success: function(res) {
if (res.code) {
self.open_id = res.code;
self.getUserProfileChange();
self.code = res.code;
}
},
fail: function(res) {
......@@ -60,7 +59,7 @@ export default {
});
},
toLogin() {
this.request(API.BindWechat, 'POST', { wechat_unique_id: this.open_id }, true).then(res => {});
this.request(API.BindWechat, 'POST', { wechat_unique_id: this.code }, true).then(res => {});
}
}
};
......
......@@ -5,22 +5,28 @@
<view class="form-box column rowCenter verCenter">
<view class="input-box row verCenter">
<text class="iconfont icon-riqi1"></text>
<input type="text" placeholder="请输入登录账号"/>
<input type="text" placeholder="请输入登录账号" v-model="account" />
</view>
<view class="input-box row verCenter">
<text class="iconfont icon-a-riqi11"></text>
<input type="password" placeholder="请输入登录密码"/>
<input type="password" placeholder="请输入登录密码" v-model="pwd" />
</view>
<button class="btn row rowCenter verCenter">绑定账号</button>
<button class="btn row rowCenter verCenter" @click="submit()">绑定账号</button>
</view>
<view class="copyright">©2021深圳市猎芯供应链有限公司 ALL RIGHTS RESERVED</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
export default {
data() {
return {};
return {
account: '',
pwd: '',
wechat_unique_id: ''
};
},
onLoad(options) {},
onShareTimeline(res) {
......@@ -29,11 +35,38 @@ export default {
imageUrl: ''
};
},
methods: {}
methods: {
submit() {
if (!this.account) {
uni.showToast({
title: '请输入登录账号'
});
return false;
}
if (!this.pwd) {
uni.showToast({
title: '请输入登录密码'
});
return false;
}
let wechat_unique_id = uni.getStorageSync('openid');
this.request(API.Login, 'POST', { account: this.account, pwd: this.pwd, wechat_unique_id: wechat_unique_id }, true).then(res => {
if(res.err_code === 0){
}else{
uni.showToast({
title: res.err_msg
});
}
});
}
}
};
</script>
<style lang="scss">
<style lang="scss">
@import '../../assets/css/mine/login.scss';
</style>
This diff could not be displayed because it is too large.
......@@ -42,5 +42,6 @@
}
]
},
"usingComponents": {}
"usingComponents": {},
"sitemapLocation": "sitemap.json"
}
\ No newline at end of file
......@@ -8,7 +8,7 @@
"use strict";
/* WEBPACK VAR INJECTION */(function(createApp) {__webpack_require__(/*! uni-pages */ 4);var _App = _interopRequireDefault(__webpack_require__(/*! ./App */ 5));
var _util = __webpack_require__(/*! ./util/util.js */ 85);
var _util = __webpack_require__(/*! ./util/util.js */ 11);
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(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;}
......
<view class="page-auth column rowCenter verCenter"><text class="logo"></text><text class="title">SCM商务系统</text><view class="form-box column rowCenter verCenter"><view class="input-box row verCenter"><text class="iconfont icon-riqi1"></text><input type="text" placeholder="请输入登录账号"/></view><view class="input-box row verCenter"><text class="iconfont icon-a-riqi11"></text><input type="password" placeholder="请输入登录密码"/></view><button class="btn row rowCenter verCenter">绑定账号</button></view><view class="copyright">©2021深圳市猎芯供应链有限公司 ALL RIGHTS RESERVED</view></view>
\ No newline at end of file
<view class="page-auth column rowCenter verCenter"><text class="logo"></text><text class="title">SCM商务系统</text><view class="form-box column rowCenter verCenter"><view class="input-box row verCenter"><text class="iconfont icon-riqi1"></text><input type="text" placeholder="请输入登录账号" data-event-opts="{{[['input',[['__set_model',['','account','$event',[]]]]]]}}" value="{{account}}" bindinput="__e"/></view><view class="input-box row verCenter"><text class="iconfont icon-a-riqi11"></text><input type="password" placeholder="请输入登录密码" data-event-opts="{{[['input',[['__set_model',['','pwd','$event',[]]]]]]}}" value="{{pwd}}" bindinput="__e"/></view><button data-event-opts="{{[['tap',[['submit']]]]}}" class="btn row rowCenter verCenter" bindtap="__e">绑定账号</button></view><view class="copyright">©2021深圳市猎芯供应链有限公司 ALL RIGHTS RESERVED</view></view>
\ No newline at end of file
......@@ -6,8 +6,37 @@
"setting": {
"urlCheck": false,
"es6": true,
"enhance": true,
"postcss": true,
"minified": true
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": true,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"showES6CompileOption": false
},
"compileType": "miniprogram",
"libVersion": "",
......@@ -15,19 +44,15 @@
"projectname": "scmMiniprogram",
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
}
......
......@@ -65,6 +65,12 @@
"pathName": "pages/mine/auth",
"query": "",
"scene": null
},
{
"name": "pages/mine/login",
"pathName": "pages/mine/login",
"query": "",
"scene": null
}
]
}
......
......@@ -8,7 +8,11 @@ const API = {
/**
* 会员中心获取
* */
UserInfo: API_BASE + '/supplywechat/userInfo'
UserInfo: API_BASE + '/supplywechat/userInfo',
/**
* 小程序登录
* */
Login: API_BASE + '/supplywechat/login'
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment