Commit 6bd9dcb5 by 施宇

11

parent 6da4b563
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<text class="upload-text">上传图片</text> <text class="upload-text">上传图片</text>
</view> </view>
<view class="hasImg" wx:else> <view class="hasImg" wx:else>
<cover-image src="{{imgUrl}}"></cover-image> <image src="{{imgUrl}}" class="img"></image>
<text class="icon iconfont iconiconxiantiaoshouji7 deleteImg" bindtap="deleteImg"></text> <text class="icon iconfont iconiconxiantiaoshouji7 deleteImg" bindtap="deleteImg"></text>
</view> </view>
<view class="text">据说上传图片更容易被采纳报价</view> <view class="text">据说上传图片更容易被采纳报价</view>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<text class="upload-text">上传图片</text> <text class="upload-text">上传图片</text>
</view> </view>
<view class="hasImg" wx:else> <view class="hasImg" wx:else>
<cover-image src="{{imgUrl}}"></cover-image> <image src="{{imgUrl}}" class="img"></image>
<text class="icon iconfont iconiconxiantiaoshouji7 deleteImg" bindtap="deleteImg"></text> <text class="icon iconfont iconiconxiantiaoshouji7 deleteImg" bindtap="deleteImg"></text>
</view> </view>
<view class="text">据说上传图片更容易让人报价</view> <view class="text">据说上传图片更容易让人报价</view>
......
...@@ -85,7 +85,7 @@ Page({ ...@@ -85,7 +85,7 @@ Page({
'userinfo[nickName]': self.data.userinfo.nickName 'userinfo[nickName]': self.data.userinfo.nickName
}, function (res) { }, function (res) {
if (res.err_code === 0) { if (res.errcode === 0) {
wx.setStorage({ wx.setStorage({
key: "openid", key: "openid",
......
...@@ -132,22 +132,22 @@ Page({ ...@@ -132,22 +132,22 @@ Page({
mobile: this.data.formData.mobile, mobile: this.data.formData.mobile,
code_type: 3 code_type: 3
}, (res) => { }, (res) => {
if (res.err_code === 0) { if (res.errcode === 0) {
this.getCode(); this.getCode();
this.setData({ this.setData({
disabled: true disabled: true
}); });
} else if (res.err_code === 500) { } else if (res.errcode === 500) {
//图形验证码不正确的时候 //图形验证码不正确的时候
this.refreshVerification(); this.refreshVerification();
wx.showToast({ wx.showToast({
title: res.err_msg, title: res.errmsg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
} else { } else {
wx.showToast({ wx.showToast({
title: res.err_msg, title: res.errmsg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
...@@ -366,13 +366,13 @@ Page({ ...@@ -366,13 +366,13 @@ Page({
} }
http.getData(apis.resetPassword, 'POST', params, (res) => { http.getData(apis.resetPassword, 'POST', params, (res) => {
if (res.err_code === 0) { if (res.errcode === 0) {
this.setData({ this.setData({
type: 3 type: 3
}); });
} else { } else {
wx.showToast({ wx.showToast({
title: res.err_msg, title: res.errmsg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
......
...@@ -72,7 +72,7 @@ Page({ ...@@ -72,7 +72,7 @@ Page({
encryptedData: e.detail.encryptedData, encryptedData: e.detail.encryptedData,
iv: e.detail.iv iv: e.detail.iv
}, (res) => { }, (res) => {
if (res.err_code === 0) { if (res.errcode === 0) {
//注入token //注入token
wx.setStorage({ wx.setStorage({
key: "access_token", key: "access_token",
......
...@@ -208,7 +208,7 @@ Page({ ...@@ -208,7 +208,7 @@ Page({
http.getData(apis.authlogin, 'POST', e.detail.value, function (res) { http.getData(apis.authlogin, 'POST', e.detail.value, function (res) {
if (res.err_code === 0) { if (res.errcode === 0) {
//注入token //注入token
wx.setStorage({ wx.setStorage({
...@@ -234,7 +234,7 @@ Page({ ...@@ -234,7 +234,7 @@ Page({
} else { } else {
wx.showToast({ wx.showToast({
title: res.err_msg, title: res.errmsg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
......
...@@ -129,22 +129,22 @@ Page({ ...@@ -129,22 +129,22 @@ Page({
mobile: this.data.formData.mobile, mobile: this.data.formData.mobile,
code_type: 1 code_type: 1
}, (res) => { }, (res) => {
if (res.err_code === 0) { if (res.errcode === 0) {
this.getCode(); this.getCode();
this.setData({ this.setData({
disabled: true disabled: true
}); });
} else if (res.err_code === 500) { } else if (res.errcode === 500) {
//图形验证码不正确的时候 //图形验证码不正确的时候
this.refreshVerification(); this.refreshVerification();
wx.showToast({ wx.showToast({
title: res.err_msg, title: res.errmsg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
} else { } else {
wx.showToast({ wx.showToast({
title: res.err_msg, title: res.errmsg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
...@@ -349,7 +349,7 @@ Page({ ...@@ -349,7 +349,7 @@ Page({
}); });
http.getData(apis.authRegister, 'POST', e.detail.value, (res) => { http.getData(apis.authRegister, 'POST', e.detail.value, (res) => {
if (res.err_code === 0) { if (res.errcode === 0) {
//注入token //注入token
wx.setStorage({ wx.setStorage({
...@@ -366,17 +366,17 @@ Page({ ...@@ -366,17 +366,17 @@ Page({
url: '/pages/person/successfully/index' url: '/pages/person/successfully/index'
}); });
} else if (res.err_code === 500) { } else if (res.errcode === 500) {
//图形验证码不正确的时候 //图形验证码不正确的时候
this.refreshVerification(); this.refreshVerification();
wx.showToast({ wx.showToast({
title: res.err_msg, title: res.errmsg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
} else { } else {
wx.showToast({ wx.showToast({
title: res.err_msg, title: res.errmsg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
......
...@@ -150,7 +150,7 @@ Page({ ...@@ -150,7 +150,7 @@ Page({
}); });
http.getData(apis.editPwd, 'POST', e.detail.value, (res) => { http.getData(apis.editPwd, 'POST', e.detail.value, (res) => {
if (res.err_code === 0) { if (res.errcode === 0) {
wx.navigateBack({ wx.navigateBack({
delta: 2 delta: 2
}); });
...@@ -161,7 +161,7 @@ Page({ ...@@ -161,7 +161,7 @@ Page({
}); });
wx.showToast({ wx.showToast({
title: res.err_msg, title: res.errmsg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
......
...@@ -85,13 +85,13 @@ Page({ ...@@ -85,13 +85,13 @@ Page({
http.getData(apis.authLogout, 'POST', null, (res) => { http.getData(apis.authLogout, 'POST', null, (res) => {
if (res.err_code === 0) { if (res.errcode === 0) {
wx.switchTab({ wx.switchTab({
url: '/pages/tab/home/home' url: '/pages/tab/home/home'
}); });
} else { } else {
wx.showToast({ wx.showToast({
title: res.err_msg, title: res.errmsg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
......
...@@ -125,22 +125,22 @@ Page({ ...@@ -125,22 +125,22 @@ Page({
mobile: this.data.formData.mobile, mobile: this.data.formData.mobile,
code_type: 2 code_type: 2
}, (res) => { }, (res) => {
if (res.err_code === 0) { if (res.errcode === 0) {
this.getCode(); this.getCode();
this.setData({ this.setData({
disabled: true disabled: true
}); });
} else if (res.err_code === 500) { } else if (res.errcode === 500) {
//图形验证码不正确的时候 //图形验证码不正确的时候
this.refreshVerification(); this.refreshVerification();
wx.showToast({ wx.showToast({
title: res.err_msg, title: res.errmsg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
} else { } else {
wx.showToast({ wx.showToast({
title: res.err_msg, title: res.errmsg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
...@@ -296,7 +296,7 @@ Page({ ...@@ -296,7 +296,7 @@ Page({
}); });
http.getData(apis.authMobilelogin, 'POST', e.detail.value, (res) => { http.getData(apis.authMobilelogin, 'POST', e.detail.value, (res) => {
if (res.err_code === 0) { if (res.errcode === 0) {
//注入token //注入token
wx.setStorage({ wx.setStorage({
...@@ -311,17 +311,17 @@ Page({ ...@@ -311,17 +311,17 @@ Page({
url: '/pages/tab/home/home' url: '/pages/tab/home/home'
}) })
} else if (res.err_code === 500) { } else if (res.errcode === 500) {
//图形验证码不正确的时候 //图形验证码不正确的时候
this.refreshVerification(); this.refreshVerification();
wx.showToast({ wx.showToast({
title: res.err_msg, title: res.errmsg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
} else { } else {
wx.showToast({ wx.showToast({
title: res.err_msg, title: res.errmsg,
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
......
...@@ -48,7 +48,7 @@ Page({ ...@@ -48,7 +48,7 @@ Page({
random: obj.randomStr, random: obj.randomStr,
signature: obj.singnatrueStr signature: obj.singnatrueStr
}, function(res) { }, function(res) {
if (res.err_code === 0) { if (res.errcode === 0) {
if (res.data.length) { if (res.data.length) {
me.setData({ me.setData({
rmList: res.data rmList: res.data
......
...@@ -109,7 +109,7 @@ Page({ ...@@ -109,7 +109,7 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {
console.log(111)
}, },
/** /**
......
...@@ -2,5 +2,7 @@ ...@@ -2,5 +2,7 @@
"usingComponents": { "usingComponents": {
"priceItem": "/components/priceItem/priceItem" "priceItem": "/components/priceItem/priceItem"
}, },
"navigationBarTitleText": "商品管理" "navigationBarTitleText": "商品管理",
"enablePullDownRefresh":true,
"backgroundTextStyle": "dark"
} }
\ No newline at end of file
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
.good-view { .good-view {
min-height: 100%; min-height: 100%;
padding:180rpx 0 118rpx; padding:0 0 118rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.good-view .search-com { .good-view .search-com {
height: 86rpx; height: 86rpx;
box-sizing: border-box; box-sizing: border-box;
position: fixed; /* position: fixed; */
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
color: #adb6bf; color: #adb6bf;
height: 94rpx; height: 94rpx;
box-sizing: border-box; box-sizing: border-box;
position: fixed; /* position: fixed; */
top: 86rpx; top: 86rpx;
left: 0; left: 0;
right: 0; right: 0;
......
.form-view { .form-view {
} }
.form-item { .form-item {
margin-left: 24rpx; margin-left: 24rpx;
padding: 27rpx 0; padding: 27rpx 0;
...@@ -61,6 +60,7 @@ textarea { ...@@ -61,6 +60,7 @@ textarea {
.hf-btn { .hf-btn {
margin: 60rpx 55rpx; margin: 60rpx 55rpx;
} }
.hf-btn .icon { .hf-btn .icon {
margin-right: 8rpx; margin-right: 8rpx;
font-size: 32rpx; font-size: 32rpx;
...@@ -94,29 +94,32 @@ textarea { ...@@ -94,29 +94,32 @@ textarea {
width: 220rpx; width: 220rpx;
position: relative; position: relative;
} }
.hasImg img{
height:100%; .hasImg .img {
width:100%; height: 100%;
width: 100%;
} }
.deleteImg{
font-size:30rpx !important; .deleteImg {
color:#fff; font-size: 30rpx !important;
color: #fff;
position: absolute; position: absolute;
top:0; top: 0;
right:0; right: 0;
transform: translate(30%,-30%); transform: translate(30%, -30%);
background-color: #EA1717; background-color: #ea1717;
height:44rpx; height: 44rpx;
width:44rpx; width: 44rpx;
text-align: center; text-align: center;
line-height: 44rpx; line-height: 44rpx;
border-radius: 50%; border-radius: 50%;
z-index: 2;
} }
.delete-btn{
margin-bottom:60rpx; .delete-btn {
border:2rpx solid #D8DFE6; margin-bottom: 60rpx;
border: 2rpx solid #d8dfe6;
background-color: #fff; background-color: #fff;
color:#686E73; color: #686e73;
box-sizing: border-box; box-sizing: border-box;
} }
...@@ -2563,7 +2563,7 @@ var $pres = null; ...@@ -2563,7 +2563,7 @@ var $pres = null;
* (Function) callback - Function that will fire on Http error * (Function) callback - Function that will fire on Http error
* *
* Example: * Example:
* function onError(err_code){ * function onError(errcode){
* //do stuff * //do stuff
* } * }
* *
......
// const auth_url = 'https://authapi.icsales.com'; const auth_url = 'https://authapi.icsales.com';
// const so_url = 'https://soapi.icsales.com'; const so_url = 'https://soapi.icsales.com';
// const offer_url = "https://offerapi.icsales.com"; const offer_url = "https://offerapi.icsales.com";
// const user_url = 'https://userapi.icsales.com'; const user_url = 'https://userapi.icsales.com';
// const goods_url = 'https://goodsapi.icsales.com'; const goods_url = 'https://goodsapi.icsales.com';
// const home_url = 'https://home.icsales.com'; const home_url = 'https://home.icsales.com';
const auth_url = 'http://authapi.icsales.cc'; // const auth_url = 'http://authapi.icsales.cc';
const so_url = 'http://soapi.icsales.cc'; // const so_url = 'http://soapi.icsales.cc';
const offer_url = "http://offerapi.icsales.cc"; // const offer_url = "http://offerapi.icsales.cc";
const user_url = 'http://userapi.icsales.cc'; // const user_url = 'http://userapi.icsales.cc';
const goods_url = 'http://goodsapi.icsales.cc'; // const goods_url = 'http://goodsapi.icsales.cc';
const home_url = 'http://home.icsales.cc'; // const home_url = 'http://home.icsales.cc';
const apis = { const apis = {
/** /**
......
...@@ -40,7 +40,7 @@ const getImUser = () => { ...@@ -40,7 +40,7 @@ const getImUser = () => {
getData(apis.authme, 'get', { getData(apis.authme, 'get', {
"token": token, "token": token,
}, function(res) { }, function(res) {
if (res.err_code == 0) { if (res.errcode == 0) {
wx.setStorageSync('user_id', res.data.user_id + ''); wx.setStorageSync('user_id', res.data.user_id + '');
wx.setStorageSync('avatar', res.data.avatar); wx.setStorageSync('avatar', res.data.avatar);
wx.setStorageSync('company_name', res.data.company_name); wx.setStorageSync('company_name', res.data.company_name);
......
...@@ -50,7 +50,7 @@ const getData = (url, type, param, callBack, loading, isheader, istoken) => { ...@@ -50,7 +50,7 @@ const getData = (url, type, param, callBack, loading, isheader, istoken) => {
} }
//处理token失效的情况 //处理token失效的情况
if (res.data.hasOwnProperty('data')) { if (res.data.hasOwnProperty('data')) {
if (res.data.err_code == 501 || res.data.errcode == 501) { if (res.data.errcode == 501 || res.data.errcode == 501) {
wx.redirectTo({ wx.redirectTo({
url: '/pages/person/login/index' url: '/pages/person/login/index'
}); });
...@@ -58,7 +58,7 @@ const getData = (url, type, param, callBack, loading, isheader, istoken) => { ...@@ -58,7 +58,7 @@ const getData = (url, type, param, callBack, loading, isheader, istoken) => {
typeof callBack == "function" && callBack(res.data, ""); typeof callBack == "function" && callBack(res.data, "");
} }
} else { } else {
if (res.data.err_code == 501 || res.data.errcode == 501) { if (res.data.errcode == 501 || res.data.errcode == 501) {
wx.redirectTo({ wx.redirectTo({
url: '/pages/person/login/index' url: '/pages/person/login/index'
}); });
...@@ -100,7 +100,6 @@ const uploadFile = (url, path, callBack) => { ...@@ -100,7 +100,6 @@ const uploadFile = (url, path, callBack) => {
source: 2 source: 2
}, },
success: (res) => { success: (res) => {
console.log(res)
var data = JSON.parse(res.data); var data = JSON.parse(res.data);
if (data.errcode == 103200) { if (data.errcode == 103200) {
callBack(data.data[0]) callBack(data.data[0])
......
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