Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
b35e564349
18 changed files with 26 additions and 496 deletions
  1. 2
      app.json
  2. 2
      pages/home/index/index.js
  3. 6
      pages/html/integral/index.js
  4. 179
      pages/shop/index/index.js
  5. 10
      pages/shop/index/index.json
  6. 80
      pages/shop/index/index.wxml
  7. 17
      pages/shop/index/index.wxss
  8. 134
      submodel/pages/shop/create/index.js
  9. 7
      submodel/pages/shop/create/index.json
  10. 38
      submodel/pages/shop/create/index.wxml
  11. 4
      submodel/pages/shop/create/index.wxss
  12. 7
      submodel/pages/shop/detail/index.js
  13. 2
      submodel/pages/shop/detail/index.wxml
  14. 1
      submodel/pages/shop/detail/index.wxss
  15. 21
      submodel/pages/shop/index/index.js
  16. 6
      submodel/pages/shop/order/index.js
  17. 2
      submodel/pages/shop/order/index.wxml
  18. 4
      utils/util.js

2
app.json

@ -14,8 +14,6 @@
"pages/home/tab4/index", "pages/home/tab4/index",
"pages/home/tab5/index", "pages/home/tab5/index",
"pages/home/tab6/index", "pages/home/tab6/index",
"pages/shop/index/index",
"pages/shop/create/index",
"pages/shop/detail/index", "pages/shop/detail/index",
"pages/shop/order/index", "pages/shop/order/index",
"pages/shop/bidding/index", "pages/shop/bidding/index",

2
pages/home/index/index.js

@ -94,7 +94,7 @@ Component({
if (e.currentTarget.id == 'bidding') { if (e.currentTarget.id == 'bidding') {
util.navigateTo('/submodel/pages/bidding/index/index') util.navigateTo('/submodel/pages/bidding/index/index')
} else if (e.currentTarget.id == 'shop') { } else if (e.currentTarget.id == 'shop') {
util.navigateTo('/pages/shop/index/index')
util.navigateTo('/submodel/pages/shop/index/index')
} else if (e.currentTarget.id == 'ordering') { } else if (e.currentTarget.id == 'ordering') {
util.navigateTo('/submodel/pages/morder/index/index') util.navigateTo('/submodel/pages/morder/index/index')
} else if (e.currentTarget.id == 'agent') { } else if (e.currentTarget.id == 'agent') {

6
pages/html/integral/index.js

@ -63,13 +63,13 @@ Page({
} }
if(targetView == 'createShop'){ if(targetView == 'createShop'){
// 开店铺 // 开店铺
wx.redirectTo({ url: '/pages/shop/index/index' })
wx.redirectTo({ url: '/submodel/pages/shop/index/index' })
} else if(targetView == 'updateShopInfo'){ } else if(targetView == 'updateShopInfo'){
// 完善店铺 // 完善店铺
wx.redirectTo({ url: '/pages/shop/index/index' })
wx.redirectTo({ url: '/submodel/pages/shop/index/index' })
} else if(targetView == 'createProduct'){ } else if(targetView == 'createProduct'){
// 发布商品 // 发布商品
wx.redirectTo({ url: '/pages/shop/index/index' })
wx.redirectTo({ url: '/submodel/pages/shop/index/index' })
} else if(targetView == 'replyArticle'){ } else if(targetView == 'replyArticle'){
// 回复帖子 // 回复帖子
wx.navigateBack({ delta: 1 }) wx.navigateBack({ delta: 1 })

179
pages/shop/index/index.js

@ -1,179 +0,0 @@
import { getStoreOverView, getStoreInfo, depositStore } from "../../../api/ztb"
const math = require('../../../utils/math')
const util = require('../../../utils/util')
const tdsdk = require('../../../libs/tdweapp')
const app = getApp()
Page({
data: {
iconList: [
{ index: 0, icon: 'pick', color: 'gray', badge: 0, name: '我要卖货' },
{ index: 1, icon: 'edit', color: 'gray', badge: 0, name: '发布竞价' },
{ index: 5, icon: 'shop', color: 'gray', badge: 0, name: '编辑店铺' },
{ index: 7, icon: 'form', color: 'gray', badge: 0, name: '发布采购' }
],
form: {
margin: 0,
todayMargin: 0,
todayMarginNum: 0
},
detail: null,
hasStore: 0,
status: null,
imageHeight: 0,
imgList: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.wuxDialog = this.wuxDialog || this.selectComponent('#wux-dialog')
this.setData({ hasStore: app.globalData.userInfo.hasStore })
},
onShow: function () {
wx.showLoading({ title: '加载中', mask: true })
// get/store-overview
getStoreOverView().then(result => {
//成功回调
app.globalData.userInfo.hasStore = result.data.hasStore
this.setData({ form: result.data, hasStore: result.data.hasStore, status: result.data.status })
this.data.status = result.data.status
if (this.data.hasStore && result.data.status != 2) {
this.showDialog()
}
if(this.data.form.storeId){
getStoreInfo(this.data.form.storeId).then(res => {
this.setData({ detail: res.data, imgList: res.data.coverImgUrlList, imageHeight: math.divide(math.times(750, 9), 16)})
wx.hideLoading()
}).catch(err => {
wx.hideLoading()
})
} else {
wx.hideLoading()
}
}).catch(err => {
//异常回调
wx.hideLoading()
})
},
showDialog: function(){
this.wuxDialog.open({
resetOnClose: true,
maskClosable: false,
title: '温馨提示',
content: '您还没有完善店铺信息,现在去善店铺信息?',
buttons: [{
text: '取消'
}, {
text: '确定',
type: 'primary',
onTap(e) {
wx.navigateTo({ url: '/pages/shop/create/index' })
}
}]
})
},
onClose: function(){
this.setData({visible: false})
},
onImageClick: function(){
this.setData({visible: false})
wx.navigateTo({ url: '/pages/ztbvip/index' })
},
apllyShop: function(){
if(!app.globalData.userInfo.isAuth){
this.wuxDialog.open({
resetOnClose: true,
title: '温馨提示',
content: '您还没有进行个人信息认证,无法开店,现在去进行个人信息认证?',
buttons: [{
text: '确定',
type: 'primary',
onTap(e) {
wx.navigateTo({ url: '/pages/home/idcard/index' })
}
}]
})
return
}
if(!app.globalData.userInfo.isVIP){
this.setData({visible: true})
return
}
if (!app.globalData.userInfo.hasStore) {
if(this.data.form.status == 1){
wx.navigateTo({ url: '/pages/shop/create/index' })
} else {
wx.showLoading({ title: '加载中', mask: true })
depositStore().then(result => {
//成功回调
app.globalData.userInfo.hasStore = 1
this.data.form.status == 1
wx.hideLoading()
wx.navigateTo({ url: '/pages/shop/create/index' })
}).catch(err => {
wx.hideLoading()
util.showToast(err)
})
}
} else if(this.data.form.storeId){
if(this.data.form.status == 2){
wx.navigateTo({ url: '/pages/shop/detail/index?storeId=' + this.data.form.storeId })
} else {
wx.navigateTo({ url: '/pages/shop/create/index' })
}
}
},
onGridTap: function (e) {
if (!app.globalData.userInfo.hasStore) {
this.wuxDialog.open({
resetOnClose: true,
maskClosable: false,
title: '温馨提示',
content: '您还没有开店,请先申请开店吧!',
buttons: [ {
text: '确定',
type: 'primary'
}]
})
return
}
if (this.data.form.status != 2) {
this.showDialog()
return
}
var index = e.currentTarget.dataset.index
if (index === 0) {
wx.navigateTo({ url: '/pages/goods/create/index?type=1' })
} else if (index === 1) {
wx.navigateTo({ url: '/pages/goods/create/index?type=2' })
} else if (index === 2) {
wx.navigateTo({ url: '/pages/shop/bidding/index' })
} else if (index === 3) {
wx.navigateTo({ url: '/pages/goods/index/index' })
} else if (index === 4) {
wx.navigateTo({ url: '/pages/shop/order/index?storeId=' + this.data.form.storeId })
} else if (index === 5) {
wx.navigateTo({ url: '/pages/shop/create/index?storeId=' + this.data.form.storeId })
} else if (index === 6) {
wx.navigateTo({ url: '/pages/shop/bill/index' })
} else if (index === 7) {
wx.navigateTo({ url: '/submodel/pages/purchase/create/index' })
} else if (index === 8) {
wx.navigateTo({ url: '/submodel/pages/purchase/index/index?storeId=' + this.data.form.storeId })
}
},
viewImage: function(e){
wx.previewImage({ urls: this.data.imgList, current: e.currentTarget.dataset.url });
},
onShow: function () {
tdsdk.Page.onShow()
},
onHide: function(){
tdsdk.Page.onHide()
},
onUnload: function () {
tdsdk.Page.onUnload()
}
})

10
pages/shop/index/index.json

@ -1,10 +0,0 @@
{
"usingComponents": {
"wux-dialog": "/components/dialog/index",
"wux-button": "/components/button/index",
"wux-cell-group": "/components/cell-group/index",
"wux-cell": "/components/cell/index",
"wux-image": "/components/image/index",
"wux-popup": "/components/popup/index"
}
}

80
pages/shop/index/index.wxml

@ -1,80 +0,0 @@
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">我的店铺</view>
</cu-custom>
<view wx:if="{{detail && status == 2}}">
<view wx:if="{{detail}}" style="position: relative">
<swiper class="screen-swiper {{imgList.length > 1 ? 'square-dot' : ''}}" style="min-height:{{imageHeight}}rpx" indicator-dots="{{imgList.length > 1}}" indicator-color="#FFFFFF" indicator-active-color="#008AFF" autoplay="true" interval="3000" duration="500">
<swiper-item wx:for="{{imgList}}" wx:key="index">
<view bindtap="viewImage" style="width:100%;height:100%" data-url="{{item}}">
<image src="{{item}}" mode="aspectFill"></image>
</view>
</swiper-item>
</swiper>
<view class="info-layout" style="text-align:right">
<view class="text-white text-df" style="line-height:50rpx;">店主昵称:{{detail.contacts}}({{detail.contactPhoneNo}})</view>
<view class="text-white text-df" style="line-height:50rpx;">店铺地址:{{detail.locDetails}}</view>
</view>
</view>
</view>
<view class="bg-white text-sg" style="padding: 0rpx 32rpx" wx:if="{{detail && status == 2}}">
<view class="flex flex-justify detail-layout" style="border-bottom:1px solid #f3f3f3">
<view class="flex" style="align-items: center;">
<view class="text-black text-lg">{{detail.name}}</view>
</view>
<view class="flex" style="align-items: center;">
<text class="cuIcon-locationfill text-blue" style="font-size:16px;padding-top:6rpx" />
<view class="text-df text-blue" style="margin-left:6rpx">{{detail.locProvinceName}} {{detail.locCityName}}</view>
</view>
</view>
</view>
<view class="bg-white" style="padding:32rpx;" wx:else>
<wux-button block type="positive" bind:click="apllyShop">{{ hasStore ? (status == 2 ? '我的店铺' : '完善店铺') : '申请开店' }}</wux-button>
</view>
<view class="cu-list grid col-4 no-border {{(detail && status == 2) ? '' : ''}}">
<view class="cu-item" wx:for="{{iconList}}" wx:key="index" data-index="{{item.index}}" bindtap="onGridTap">
<view class="cuIcon-{{item.icon}} text-{{item.color}}" style="font-size:32px">
<view class="cu-tag badge" wx:if="{{item.badge!=0}}">
<block wx:if="{{item.badge!=1}}">{{item.badge>99?"99+":item.badge}}</block>
</view>
</view>
<text>{{item.name}}</text>
</view>
</view>
<view style="height:18rpx"></view>
<wux-cell-group>
<wux-cell title="店铺账单" is-link data-index="{{6}}" bind:click="onGridTap">
<view slot="header" class="cuIcon-recharge text-black" style="font-size:20px;margin-right:12rpx"></view>
<text slot="footer" style="padding-top:4px">¥{{form.todayMargin || 0}}</text>
</wux-cell>
<wux-cell title="店铺订单" is-link data-index="{{4}}" bind:click="onGridTap">
<view slot="header" class="cuIcon-text text-black" style="font-size:20px;margin-right:12rpx"></view>
</wux-cell>
<wux-cell title="商品管理" is-link data-index="{{3}}" bind:click="onGridTap">
<view slot="header" class="cuIcon-form text-black" style="font-size:20px;margin-right:12rpx"></view>
</wux-cell>
<wux-cell title="竞价管理" is-link data-index="{{2}}" bind:click="onGridTap">
<view slot="header" class="cuIcon-form text-black" style="font-size:20px;margin-right:12rpx"></view>
</wux-cell>
<wux-cell title="采购管理" is-link data-index="{{8}}" bind:click="onGridTap">
<view slot="header" class="cuIcon-form text-black" style="font-size:20px;margin-right:12rpx"></view>
</wux-cell>
</wux-cell-group>
<view style="height:18rpx"></view>
<wux-dialog id="wux-dialog" />
<wux-popup wux-class="wux-landscape" wux-content-class="wux-landscape__popup" wux-body-class="wux-landscape__popup-body"
hasHeader="{{ false }}" hasFooter="{{ false }}" visible="{{ visible }}" mask="{{ true }}" bind:close="onClose">
<view class="wux-close" bindtap="onClose">
<text class="cuIcon-roundclose text-white" style="font-size:64rpx"></text>
</view>
<view class="wux-landscape__inner">
<wux-image width="{{604}}" height="{{806}}" nuit="{{'rpx'}}" src="/assets/popup/need-member.png" bind:click="onImageClick">
<view class="flex flex-center" slot="loading" style="height:654rpx;width:680rpx">
<text class="icon--refresher"></text>
</view>
</wux-image>
</view>
</wux-popup>

17
pages/shop/index/index.wxss

@ -1,17 +0,0 @@
.margin-top {
margin-top: 18rpx;
}
.detail-layout{
min-height:90rpx;
font-size: 30rpx;
align-items: center;
}
.info-layout {
position: absolute;
bottom: 0;
width: 100%;
background-color: rgba(0, 0, 0, 0.3);
padding: 18rpx 30rpx;
}

134
submodel/pages/shop/create/index.js

@ -1,134 +0,0 @@
// pages/shop/apply/index.js
import { updateStore, getStoreInfo, editStore } from "../../../../api/ztb"
const util = require('../../../../utils/util')
import regions from '../../../../const/region'
Page({
/**
* 页面的初始数据
*/
data: {
options: regions,
theme: 'energized',
warning: '注意:店铺资料审核后不可修改,请谨慎填写',
region: [440000, 440100, 440106],
form: {
contactPhoneNo: '',
name: '',
contacts: '',
locProvinceId: '',
locCityId: '',
locDistrictId: '',
locDetails: ''
},
imgList: [],
requesting: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.cascaderView = this.cascaderView || this.selectComponent('#wux-cascader')
if(options.storeId){
this.data.form['storeId'] = options.storeId
wx.showLoading({ title: '加载中', mask: true })
getStoreInfo(options.storeId).then(result => {
var fileList = []
if(result.data.coverImgUrlList && result.data.coverImgUrlList.length){
result.data.coverImgUrlList.forEach(element => {
fileList.push({ url: element, status: 8 })
})
}
this.setData({
form: result.data,
imgList: fileList,
['form.areaStr']: result.data.locProvinceName + ' ' + result.data.locCityName + ' ' + result.data.locDistrictName,
region: [result.data.locProvinceId, result.data.locCityId, result.data.locDistrictId]
})
wx.hideLoading()
}).catch(err => {
//异常回调
wx.hideLoading()
})
}
},
bindinput: function(e){
this.data.form[e.target.id] = e.detail.value
},
showRegion: function(){
if(this.data.disabled){
return
}
this.cascaderView.showPicker(this.data.region)
},
onRegionChange: function (e) {
if (e.detail && e.detail.options) {
this.setData({
['form.areaStr']: e.detail.options.map((n) => n.label).join(' '),
region: e.detail.value
})
this.data.form['locProvinceId'] = e.detail.value[0]
this.data.form['locCityId'] = e.detail.value[1]
this.data.form['locDistrictId'] = e.detail.value[2]
}
},
onUploadChange: function(e){
if(e.detail && e.detail.length){
var list = []
e.detail.forEach(element => {
if(!util.isEmpty(element.url)){
list.push(element.url)
}
})
this.data.form['coverImgUrlList'] = list
}
},
submitForm: function(){
if(util.isEmpty(this.data.form.name)){
util.showToast('请输入店铺名称')
return
}
if(util.isEmpty(this.data.form.contacts)){
util.showToast('请输入店主昵称')
return
}
if(util.isEmpty(this.data.form.contactPhoneNo)){
util.showToast('请输入联系电话')
return
}
if(util.isEmpty(this.data.form.locDistrictId)){
util.showToast('请选择店铺所在区域')
return
}
if(util.isEmpty(this.data.form.locDetails)){
util.showToast('请输入店铺详细地址')
return
}
if(util.isEmpty(this.data.form.coverImgUrlList) || this.data.form.coverImgUrlList.length <= 0){
util.showToast('请上传一张店铺图片')
return
}
this.setData({requesting: true})
wx.showLoading({ title: '加载中', mask: true })
if(!util.isEmpty(this.data.form.storeId)){
editStore(this.data.form).then(result => {
wx.hideLoading()
util.showBackToast('店铺完善成功')
}).catch(err => {
wx.hideLoading()
util.showToast(err)
this.setData({requesting: false})
})
} else {
updateStore(this.data.form).then(result => {
wx.hideLoading()
util.showBackToast('店铺完善成功')
}).catch(err => {
wx.hideLoading()
util.showToast(err)
this.setData({requesting: false})
})
}
}
})

7
submodel/pages/shop/create/index.json

@ -1,7 +0,0 @@
{
"usingComponents": {
"wux-button": "/components/button/index",
"wux-cascader": "/components/cascader/index",
"wux-uploader": "/components/uploader/index"
}
}

38
submodel/pages/shop/create/index.wxml

@ -1,38 +0,0 @@
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">完善店铺</view>
</cu-custom>
<view class="cu-form-group margin-top">
<view class="title">店铺名称:</view>
<input id="name" disabled="{{disabled}}" placeholder-style="color:#aaa" placeholder="请输入店铺名称" value="{{form.name}}" bindinput="bindinput"></input>
</view>
<view class="cu-form-group">
<view class="title">店主昵称:</view>
<input id="contacts" disabled="{{disabled}}" placeholder-style="color:#aaa" placeholder="请输入店主昵称" value="{{form.contacts}}" bindinput="bindinput"></input>
</view>
<view class="cu-form-group">
<view class="title">联系电话:</view>
<input id="contactPhoneNo" disabled="{{disabled}}" placeholder-style="color:#aaa" placeholder="请输入联系电话" value="{{form.contactPhoneNo}}" bindinput="bindinput"></input>
</view>
<view class="cu-form-group" data-index="1" style="border-top: 1px solid #f3f3f3" bindtap="showRegion">
<view class="flex text-sg">所在地区:
<view class="{{form.areaStr||'input-grey'}}">{{form.areaStr||'请选择所在地区'}}</view>
</view>
<text class="cuIcon-right text-gray" wx:if="{{!disabled}}"></text>
</view>
<view class="cu-form-group" style="border-top: 1rpx solid #f3f3f3">
<view class="title">详细地址:</view>
<input id="locDetails" disabled="{{disabled}}" placeholder-style="color:#aaa" placeholder="请输入店铺详细地址" value="{{form.locDetails}}" bindinput="bindinput"></input>
</view>
<view class="cu-bar bg-white margin-top">
<view class="action text-bold" style="color:#333333">{{!disabled?'上传或拍照店铺图片:':'店铺图片:'}}</view>
</view>
<wux-uploader count="5" fileList="{{imgList}}" bindcustomevent="onUploadChange"></wux-uploader>
<view style="padding:48rpx">
<wux-button block type="positive" disabled="{{requesting}}" bind:click="submitForm">提交</wux-button>
</view>
<wux-cascader id="wux-cascader" value="{{region}}" options="{{ options }}" bind:close="onRegionChange" />

4
submodel/pages/shop/create/index.wxss

@ -1,4 +0,0 @@
/* pages/shop/apply/index.wxss */
.margin-top{
margin-top: 18rpx;
}

7
submodel/pages/shop/detail/index.js

@ -1,7 +1,6 @@
// pages/shop/detail/index.js
import { getStoreInfo, getProductList, getStoreProductList } from "../../../api/ztb"
const math = require('../../../utils/math')
const util = require('../../../utils/util')
import { getStoreInfo, getProductList, getStoreProductList } from "../../../../api/ztb"
const math = require('../../../../utils/math')
const util = require('../../../../utils/util')
const app = getApp() const app = getApp()
Page({ Page({

2
submodel/pages/shop/detail/index.wxml

@ -1,5 +1,5 @@
<!--pages/shop/detail/index.wxml--> <!--pages/shop/detail/index.wxml-->
<wxs module="formate" src="../../../pages/formate.wxs"></wxs>
<wxs module="formate" src="../../../../pages/formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">店铺详情</view> <view slot="content">店铺详情</view>
</cu-custom> </cu-custom>

1
submodel/pages/shop/detail/index.wxss

@ -1,4 +1,3 @@
/* pages/shop/detail/index.wxss */
.margin-top { .margin-top {
margin-top: 18rpx; margin-top: 18rpx;
} }

21
submodel/pages/shop/index/index.js

@ -1,7 +1,7 @@
import { getStoreOverView, getStoreInfo, depositStore } from "../../../api/ztb"
const math = require('../../../utils/math')
const util = require('../../../utils/util')
const tdsdk = require('../../../libs/tdweapp')
import { getStoreOverView, getStoreInfo, depositStore } from "../../../../api/ztb"
const math = require('../../../../utils/math')
const util = require('../../../../utils/util')
const tdsdk = require('../../../../libs/tdweapp')
const app = getApp() const app = getApp()
Page({ Page({
@ -68,7 +68,7 @@ Page({
text: '确定', text: '确定',
type: 'primary', type: 'primary',
onTap(e) { onTap(e) {
wx.navigateTo({ url: '/pages/shop/create/index' })
wx.navigateTo({ url: '/submodel/pages/shop/create/index' })
} }
}] }]
}) })
@ -100,9 +100,10 @@ Page({
this.setData({visible: true}) this.setData({visible: true})
return return
} }
console.log(app.globalData.userInfo)
if (!app.globalData.userInfo.hasStore) { if (!app.globalData.userInfo.hasStore) {
if(this.data.form.status == 1){ if(this.data.form.status == 1){
wx.navigateTo({ url: '/pages/shop/create/index' })
wx.navigateTo({ url: '/submodel/pages/shop/create/index' })
} else { } else {
wx.showLoading({ title: '加载中', mask: true }) wx.showLoading({ title: '加载中', mask: true })
depositStore().then(result => { depositStore().then(result => {
@ -110,7 +111,7 @@ Page({
app.globalData.userInfo.hasStore = 1 app.globalData.userInfo.hasStore = 1
this.data.form.status == 1 this.data.form.status == 1
wx.hideLoading() wx.hideLoading()
wx.navigateTo({ url: '/pages/shop/create/index' })
wx.navigateTo({ url: '/submodel/pages/shop/create/index' })
}).catch(err => { }).catch(err => {
wx.hideLoading() wx.hideLoading()
util.showToast(err) util.showToast(err)
@ -120,8 +121,10 @@ Page({
if(this.data.form.status == 2){ if(this.data.form.status == 2){
wx.navigateTo({ url: '/pages/shop/detail/index?storeId=' + this.data.form.storeId }) wx.navigateTo({ url: '/pages/shop/detail/index?storeId=' + this.data.form.storeId })
} else { } else {
wx.navigateTo({ url: '/pages/shop/create/index' })
wx.navigateTo({ url: '/submodel/pages/shop/create/index' })
} }
} else {
wx.navigateTo({ url: '/submodel/pages/shop/create/index' })
} }
}, },
onGridTap: function (e) { onGridTap: function (e) {
@ -154,7 +157,7 @@ Page({
} else if (index === 4) { } else if (index === 4) {
wx.navigateTo({ url: '/pages/shop/order/index?storeId=' + this.data.form.storeId }) wx.navigateTo({ url: '/pages/shop/order/index?storeId=' + this.data.form.storeId })
} else if (index === 5) { } else if (index === 5) {
wx.navigateTo({ url: '/pages/shop/create/index?storeId=' + this.data.form.storeId })
wx.navigateTo({ url: '/submodel/pages/shop/create/index?storeId=' + this.data.form.storeId })
} else if (index === 6) { } else if (index === 6) {
wx.navigateTo({ url: '/pages/shop/bill/index' }) wx.navigateTo({ url: '/pages/shop/bill/index' })
} else if (index === 7) { } else if (index === 7) {

6
submodel/pages/shop/order/index.js

@ -1,6 +1,6 @@
import { getStoreTradeList } from "../../../api/ztb"
const util = require('../../../utils/util')
const event = require('../../../utils/event.js')
import { getStoreTradeList } from "../../../../api/ztb"
const util = require('../../../../utils/util')
const event = require('../../../../utils/event.js')
const app = getApp() const app = getApp()
const status = ['', 1, 2, 3, 4, 5, 6, 7, 8, 9] const status = ['', 1, 2, 3, 4, 5, 6, 7, 8, 9]

2
submodel/pages/shop/order/index.wxml

@ -1,5 +1,5 @@
<wxs module="shop" src="../../shop/shop.wxs"></wxs> <wxs module="shop" src="../../shop/shop.wxs"></wxs>
<wxs module="formate" src="../../../pages/formate.wxs"></wxs>
<wxs module="formate" src="../../../../pages/formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">订单管理</view> <view slot="content">订单管理</view>
</cu-custom> </cu-custom>

4
utils/util.js

@ -166,7 +166,7 @@ function checkId(id) {
const tokenList = [ const tokenList = [
'/submodel/pages/paper/price-index/index', '/submodel/pages/paper/price-index/index',
'/pages/shop/index/index',
'/submodel/pages/shop/index/index',
'/submodel/pages/bidding/index/index', '/submodel/pages/bidding/index/index',
'/submodel/pages/morder/index/index', '/submodel/pages/morder/index/index',
'/pages/html/message/index', '/pages/html/message/index',
@ -244,7 +244,7 @@ function navigateTarget(redirectInfo){
} else if(redirectInfo.targetView == 'myBidList'){ } else if(redirectInfo.targetView == 'myBidList'){
navigateTo('/submodel/pages/bidding/index/index') navigateTo('/submodel/pages/bidding/index/index')
} else if(redirectInfo.targetView == 'myShop'){ } else if(redirectInfo.targetView == 'myShop'){
navigateTo('/pages/shop/index/index')
navigateTo('/submodel/pages/shop/index/index')
} else if(redirectInfo.targetView == 'buyerOrderList'){ } else if(redirectInfo.targetView == 'buyerOrderList'){
navigateTo('/submodel/pages/morder/index/index') navigateTo('/submodel/pages/morder/index/index')
} else if(redirectInfo.targetView == 'createArticle'){ } else if(redirectInfo.targetView == 'createArticle'){

Loading…
Cancel
Save