Skip to content

Commit

Permalink
细节优化
Browse files Browse the repository at this point in the history
  • Loading branch information
gooking committed Jun 4, 2021
1 parent de72e4f commit 428d449
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 25 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ App({
wx.hideToast()
}
})
WXAPI.queryConfigBatch('mallName,WITHDRAW_MIN,ALLOW_SELF_COLLECTION,order_hx_uids,subscribe_ids,share_profile,adminUserIds,goodsDetailSkuShowType,shopMod,needIdCheck,balance_pay_pwd,shipping_address_gps,shipping_address_region_level,shopping_cart_vop_open,show_wx_quanzi,cps_open,recycle_open,categoryMod,hide_reputation,show_seller_number,show_goods_echarts,show_buy_dynamic').then(res => {
WXAPI.queryConfigBatch('mallName,WITHDRAW_MIN,ALLOW_SELF_COLLECTION,order_hx_uids,subscribe_ids,share_profile,adminUserIds,goodsDetailSkuShowType,shopMod,needIdCheck,balance_pay_pwd,shipping_address_gps,shipping_address_region_level,shopping_cart_vop_open,show_wx_quanzi,cps_open,recycle_open,categoryMod,hide_reputation,show_seller_number,show_goods_echarts,show_buy_dynamic,goods_search_show_type,show_3_seller,show_quan_exchange_score,show_score_exchange_growth').then(res => {
if (res.code == 0) {
res.data.forEach(config => {
wx.setStorageSync(config.key, config.value);
Expand Down
2 changes: 1 addition & 1 deletion config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
version: '11.13.0',
version: '11.14.0',
note: '细节优化', // 这个为版本描述,无需修改
subDomain: 'tz', // liu123 此处改成你自己的专属域名。什么是专属域名?请看教程 https://www.it120.cc/help/qr6l4m.html
merchantId: 951, // 商户ID,可在后台工厂设置-->商户信息查看
Expand Down
6 changes: 3 additions & 3 deletions demos/pages/ab/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
</view>
</view>
</view>
<view class="case_subject_cont" id="ys0">
<view class="case_subject_cont" id="ys0" wx:if="{{adddata.pics}}">
<view id="ys1" class="cont_mod charact_cont">
<view class="indep_mod">
<view class="cont_title">
<h4 class="big_text">旅行特色</h4>
</view>
<view class="charactpic_list_mod"></view>
</view>
<swiper class='c1' display-multiple-items="{{2.4}}" previous-margin="50rpx" next-margin="50rpx">
<swiper-item wx:for="{{adddata.pics}}" wx:key="index" style="padding:0 20rpx" data-idx="{{ index }}" bindtap="previewImg">
<swiper class='c1' display-multiple-items="{{2}}" previous-margin="50rpx" next-margin="50rpx">
<swiper-item wx:if="{{adddata.pics}}" wx:for="{{adddata.pics}}" wx:key="index" style="padding:0 20rpx" data-idx="{{ index }}" bindtap="previewImg">
<view class="swiper-item-c1">
<image class='swiper-item-c1-img' src='{{item.pic}}' mode="widthFix"></image>
</view>
Expand Down
20 changes: 18 additions & 2 deletions pages/goods/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,29 @@ Page({
onLoad: function (options) {
this.setData({
name: options.name,
categoryId: options.categoryId,
show_seller_number: wx.getStorageSync('show_seller_number')
categoryId: options.categoryId
})
this.search()
this.readConfigVal()
// 补偿写法
getApp().configLoadOK = () => {
this.readConfigVal()
}
},
onShow: function () {

},
readConfigVal() {
const show_seller_number = wx.getStorageSync('show_seller_number')
const goods_search_show_type = wx.getStorageSync('goods_search_show_type')
let listType = 1
if (goods_search_show_type == 2) {
listType = 2
}
this.setData({
show_seller_number,
listType
})
},
async search(){
wx.showLoading({
Expand Down
29 changes: 15 additions & 14 deletions pages/my/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
const CONFIG = require('../../config.js')
const WXAPI = require('apifm-wxapi')
const AUTH = require('../../utils/auth')
const TOOLS = require('../../utils/tools.js')

const APP = getApp()
// fixed首次打开不显示标题的bug
APP.configLoadOK = () => {

}

Page({
data: {
balance:0.00,
Expand All @@ -28,16 +21,14 @@ Page({
userInfoStatus: 0 // 0 未读取 1 没有详细信息 2 有详细信息
},
onLoad() {
this.readConfigVal()
// 补偿写法
getApp().configLoadOK = () => {
this.readConfigVal()
}
},
onShow() {
const _this = this
const order_hx_uids = wx.getStorageSync('order_hx_uids')
this.setData({
version: CONFIG.version,
order_hx_uids,
cps_open: wx.getStorageSync('cps_open'),
recycle_open: wx.getStorageSync('recycle_open'),
})
AUTH.checkHasLogined().then(isLogined => {
if (isLogined) {
_this.getUserApiInfo();
Expand All @@ -58,6 +49,16 @@ Page({
this.data.code = code
})
},
readConfigVal() {
this.setData({
order_hx_uids: wx.getStorageSync('order_hx_uids'),
cps_open: wx.getStorageSync('cps_open'),
recycle_open: wx.getStorageSync('recycle_open'),
show_3_seller: wx.getStorageSync('show_3_seller'),
show_quan_exchange_score: wx.getStorageSync('show_quan_exchange_score'),
show_score_exchange_growth: wx.getStorageSync('show_score_exchange_growth'),
})
},
async getUserApiInfo() {
const res = await WXAPI.userDetail(wx.getStorageSync('token'))
if (res.code == 0) {
Expand Down
6 changes: 3 additions & 3 deletions pages/my/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@
</block>
</view>

<van-cell-group title="三级分销">
<van-cell-group wx:if="{{ show_3_seller == 1 }}" title="三级分销">
<van-cell wx:if="{{!apiUserInfoMap.base.isSeller}}" title="成为分销商" is-link url="/pages/fx/apply-status" />
<van-cell wx:else title="分销中心" is-link url="/pages/fx/apply-status" />
<van-cell wx:if="{{apiUserInfoMap.base.isSeller}}" title="销售团队" is-link url="/pages/fx/members" />
<van-cell wx:if="{{apiUserInfoMap.base.isSeller}}" title="佣金明细" is-link url="/pages/fx/commisionLog" />
</van-cell-group>
<van-cell-group title="其他功能">
<van-cell title="积分券兑换积分" is-link url="/pages/score-excharge/index" />
<van-cell title="积分兑换成长值" is-link url="/pages/score-excharge/growth" />
<van-cell wx:if="{{ show_quan_exchange_score == 1 }}" title="积分券兑换积分" is-link url="/pages/score-excharge/index" />
<van-cell wx:if="{{ show_score_exchange_growth == 1 }}" title="积分兑换成长值" is-link url="/pages/score-excharge/growth" />
<van-cell title="帮助中心" is-link url="/pages/help/index" />
<van-cell title="个人信息" is-link url="/pages/my/info-menu" />
<van-cell title="系统设置" is-link url="/pages/my/setting" />
Expand Down
1 change: 0 additions & 1 deletion project.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"disablePlugins": [],
"outputPath": ""
},
"bundle": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
Expand Down

0 comments on commit 428d449

Please sign in to comment.