Browse Source

新增公众号,文档问题部分修改

master
杨豪 3 years ago
parent
commit
f5d63af524
  1. 157
      App.vue
  2. 4
      config/index.js
  3. 1
      main.js
  4. 5
      pages/Loading/index.vue
  5. 2
      pages/demandHall/needsDetail/index.vue
  6. 110
      pages/life/addGoods/index.vue
  7. 1056
      pages/release/companyAuth/index.vue
  8. 6
      pages/release/index.vue
  9. 6
      pages/shop/GoodsCon/index.vue
  10. 15
      pages/user/editNeeds/index.vue
  11. 18
      pages/user/goodsManage/index.vue
  12. 21
      pages/user/index.vue
  13. 1191
      pages/user/mine/index.vue
  14. 46
      pages/user/openStore/index.vue
  15. 2
      tabbarComponent/tabbar.vue

157
App.vue

@ -5,7 +5,6 @@ import {
export default {
onLaunch: function (e) {
var that = this; //
this.setMenuHeight();
this.autoUpdate();
uni.hideTabBar()
@ -24,13 +23,16 @@ export default {
inviterId: null,
//
systemInfo: null,
scene: null, //
},
onShow(e) {
this.globalData.scene = e.scene
console.log(this.globalData.scene,'this.globalData.scene')
//tabbar
uni.hideTabBar();
var query = {};
if (e.query.q) {
//storage
let urlSpread = e.query.q;
@ -56,6 +58,157 @@ export default {
},
methods: {
sceneInfo(s) {
console.log(s)
var scene = [];
switch (s) {
case 1001:
scene.push(s, "发现栏小程序主入口");
break;
case 1005:
scene.push(s, "顶部搜索框的搜索结果页");
break;
case 1006:
scene.push(s, "发现栏小程序主入口搜索框的搜索结果页");
break;
case 1007:
scene.push(s, "单人聊天会话中的小程序消息卡片");
break;
case 1008:
scene.push(s, "群聊会话中的小程序消息卡片");
break;
case 1011:
scene.push(s, "扫描二维码");
break;
case 1012:
scene.push(s, "长按图片识别二维码");
break;
case 1014:
scene.push(s, "手机相册选取二维码");
break;
case 1017:
scene.push(s, "前往体验版的入口页");
break;
case 1019:
scene.push(s, "微信钱包");
break;
case 1020:
scene.push(s, "公众号profile页相关小程序列表");
break;
case 1022:
scene.push(s, "聊天顶部置顶小程序入口");
break;
case 1023:
scene.push(s, "安卓系统桌面图标");
break;
case 1024:
scene.push(s, "小程序profile页");
break;
case 1025:
scene.push(s, "扫描一维码");
break;
case 1026:
scene.push(s, "附近小程序列表");
break;
case 1027:
scene.push(s, "顶部搜索框搜索结果页“使用过的小程序”列表");
break;
case 1028:
scene.push(s, "我的卡包");
break;
case 1029:
scene.push(s, "卡券详情页");
break;
case 1031:
scene.push(s, "长按图片识别一维码");
break;
case 1032:
scene.push(s, "手机相册选取一维码");
break;
case 1034:
scene.push(s, "微信支付完成页");
break;
case 1035:
scene.push(s, "公众号自定义菜单");
break;
case 1036:
scene.push(s, "App分享消息卡片");
break;
case 1037:
scene.push(s, "小程序打开小程序");
break;
case 1038:
scene.push(s, "从另一个小程序返回");
break;
case 1039:
scene.push(s, "摇电视");
break;
case 1042:
scene.push(s, "添加好友搜索框的搜索结果页");
break;
case 1044:
scene.push(s, "带shareTicket的小程序消息卡片");
break;
case 1047:
scene.push(s, "扫描小程序码");
break;
case 1048:
scene.push(s, "长按图片识别小程序码");
break;
case 1049:
scene.push(s, "手机相册选取小程序码");
break;
case 1052:
scene.push(s, "卡券的适用门店列表");
break;
case 1053:
scene.push(s, "搜一搜的结果页");
break;
case 1054:
scene.push(s, "顶部搜索框小程序快捷入口");
break;
case 1056:
scene.push(s, "音乐播放器菜单");
break;
case 1058:
scene.push(s, "公众号文章");
break;
case 1059:
scene.push(s, "体验版小程序绑定邀请页");
break;
case 1064:
scene.push(s, "微信连Wifi状态栏");
break;
case 1067:
scene.push(s, "公众号文章广告");
break;
case 1068:
scene.push(s, "附近小程序列表广告");
break;
case 1072:
scene.push(s, "二维码收款页面");
break;
case 1073:
scene.push(s, "客服消息列表下发的小程序消息卡片");
break;
case 1074:
scene.push(s, "公众号会话下发的小程序消息卡片");
break;
case 1089:
scene.push(s, "微信聊天主界面下拉");
break;
case 1090:
scene.push(s, "长按小程序右上角菜单唤出最近使用历史");
break;
case 1092:
scene.push(s, "城市服务入口");
break;
default:
scene.push("未知入口");
break;
}
return scene;
},
autoUpdate: function () {
// console.log(new Date());
var self = this; //

4
config/index.js

@ -1,8 +1,8 @@
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api'
export const VUE_APP_API_URL = 'http://192.168.0.112:8092/api'
// export const VUE_APP_API_URL = 'http://192.168.0.112:8092/api'
// export const VUE_APP_API_URL = 'http://192.168.0.111:8092/api'
// export const VUE_APP_API_URL = 'https://cloud.api.cyjyyjy.com/api'
export const VUE_APP_API_URL = 'https://cloud.api.cyjyyjy.com/api'
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://thapi.xinxintuan.co/api'
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';

1
main.js

@ -115,5 +115,6 @@ Vue.mixin({
store.commit('updateDevicetype', deviceType)
Vue.prototype.$VUE_APP_API_URL = VUE_APP_API_URL
Vue.component('cu-custom', cuCustom)
app.$mount();

5
pages/Loading/index.vue

@ -49,7 +49,10 @@ export default {
if (this.$store.getters.token) {
// token
console.log('登录状态存在,直接进页面')
this.toLaunch()
// this.toLaunch()
this.$yrouter.switchTab({
path: '/pages/home/index',
})
return
}
console.log('进行登录操作')

2
pages/demandHall/needsDetail/index.vue

@ -28,7 +28,7 @@
<view class="col-line"></view>
<text>发布公司</text>
</view>
<view class="company-card-box acea-row-nowrap row-middle">
<view class="company-card-box acea-row-nowrap row-middle" @click="toCompanyDetail()">
<image :src="detail.enterprise.enterpriseLogo" class="company-logo" mode="aspectFill"></image>
<view class="info">
<view class="company-name">{{detail.enterprise.enterpriseName}}</view>

110
pages/life/addGoods/index.vue

@ -96,16 +96,11 @@
<view class="sku img-sku acea-row row-middle row-between">
<text>库存<text class="colR">*</text></text>
<input type="number" v-model="attrs[0].stock" @input="changeStock" placeholder="请输入库存" />
<!-- <view class="acea-row row-middle">
<switch :checked="!infinite" @change="stockChange" style="transform: scale(0.8);" />
<view>{{infinite ? '不限' : '有限'}}</view>
</view>
<view class="colB">批量设置</view> -->
</view>
</view>
</view>
<!-- 批量操作 -->
<view class="batch-set-box" v-if="batchData.titleStr">
<view class="batch-set-box" v-if="batchData.titleStr != ''">
<view class="box-top acea-row row-between-wrapper">
<view class="name">{{batchData.titleStr}}</view>
<view class="attr-name w15">库存</view>
@ -136,7 +131,7 @@
<radio :value="0" :checked="state == 0" /><text>上架</text>
</label>
<label>
<radio :value="1" :checked="state == 1" /><text></text>
<radio :value="1" :checked="state == 1" /><text>不上</text>
</label>
</radio-group>
</view>
@ -200,9 +195,9 @@
maskShow: false,
addOptionsDialog: false,
infinite: false,
batchData: {},
batchData: {titleStr: '',priceArr: []},
editattr: false,
priceArr: [],
}
},
onLoad() {
@ -332,10 +327,15 @@
getFormatAttr(data).then((res)=>{
if(res.success){
this.$set(this.batchData,'priceArr',res.data.value)
let strArr = res.data.attr.map(item=>{
return item.value
})
this.$set(this.batchData,'titleStr',strArr.join('/'))
if(res.data.attr){
let strArr = res.data.attr.map(item=>{
return item.value
})
this.$set(this.batchData,'titleStr',strArr.join('/'))
} else{
this.$set(this.batchData,'titleStr','')
}
} else{
uni.showToast({
title: res.msg,
@ -344,32 +344,6 @@
}
})
},
//
setBatchData(arr){
var titleArr = []
for (var i in arr) {
titleArr.push(arr[i].value)
}
var titleStr = titleArr.join('/')
var attrArr = this.setData(arr)
var branchList = []
var hash = {}
attrArr.forEach((item,idx)=>{
branchList.push({
sku: item.join('/'),
pic: '', //" --",
price: '', //" ",
ot_orice: '', //" --",
stock: '', //"",
weight: '', //" --",
volume: '', //" --"
})
})
console.log(attrArr,'attrArr')
this.priceArr = branchList
this.batchData.attrArr = attrArr
console.log(this.batchData)
},
//
setData(attrArr){
var tmp = []
@ -393,45 +367,23 @@
//
changePrice(e){
const price = e.detail.value
this.batchData.priceArr.forEach((item,i)=>{
item.price = price
})
if(this.batchData.priceArr && this.batchData.priceArr.length > 0){
this.batchData.priceArr.forEach((item,i)=>{
item.price = price
})
}
this.attrs[0].price = price
// console.log(this.batchData.priceArr,'this.batchData.priceArr')
},
changeStock(e){
const stock = e.detail.value
this.batchData.priceArr.forEach((item,i)=>{
item.stock = stock
})
if(this.batchData.priceArr && this.batchData.priceArr.length > 0){
this.batchData.priceArr.forEach((item,i)=>{
item.stock = stock
})
}
this.attrs[0].stock = stock
},
//
addSku(){
let item = {
pic: '', //" --",
price: '', //" ",
ot_orice: '', //" --",
stock: '', //"",
weight: '', //" --",
volume: '', //" --"
}
this.attrs.push(item)
uni.pageScrollTo({
scrollTop: 999999
})
},
delSku(idx){
this.attrs.splice(idx,1)
},
//
stockChange(e){
// console.log(e)
this.infinite = !e.detail.value
},
radioChange(e){
this.state = e.detail.value
},
submit(){
// console.log(this.batchData)
var arrtsArr = []
@ -446,7 +398,7 @@
image: this.slider_image[0], //
slider_image: this.slider_image , //
description: this.description, //
tempId: 1, //
tempId: this.tempId, //
attrs: arrtsArr,
state: this.state,
items: this.items,
@ -484,9 +436,9 @@
duration: 1500
})
setTimeout((res)=>{
uni.navigateTo({
url: '/pages/user/goodsManage/index'
})
uni.redirectTo({
url: '/pages/user/goodsManage/index'
});
},1500)
} else{
uni.showToast({
@ -503,9 +455,9 @@
duration: 1500
})
setTimeout((res)=>{
uni.navigateTo({
url: '/pages/user/goodsManage/index'
})
uni.redirectTo({
url: '/pages/user/goodsManage/index'
});
},1500)
} else{
uni.showToast({
@ -515,8 +467,6 @@
}
})
}
console.log(form,'form')
},
alertMessage(msg){
uni.showToast({

1056
pages/release/companyAuth/index.vue

File diff suppressed because it is too large Load Diff

6
pages/release/index.vue

@ -11,7 +11,7 @@
<!-- <view class="icon">!</view> -->
<view>完成企业认证后可以发布资源及需求个人认证后只可发布需求</view>
</view>
<view class="tips acea-row row-middle" v-if="authStatus == 0 || authStatus == 3">
<view class="tips acea-row row-middle" v-if="authStatus == 0">
<view class="icon">!</view>
<view>请先完成认证</view>
</view>
@ -26,6 +26,7 @@
<view class="tips acea-row row-middle" v-if="authStatus == 3">
<view class="icon">!</view>
<view>{{authType == 1 ? '企业信息未审核通过, 请重新提交审核信息!' : '个人信息未审核通过, 请重新提交审核信息!'}}</view>
<view>未通过理由{{reason}}</view>
</view>
</view>
<view class="btn-box acea-row row-between">
@ -159,7 +160,8 @@ export default {
authStatus: res.data.data.authenticationState,
authType: res.data.data.authorizationType,
completeState: res.data.data.completeState,
authInfo: res.data.data.authInfo
authInfo: res.data.data.authInfo,
reason: res.data.data.authInfo.reason
});
}
});

6
pages/shop/GoodsCon/index.vue

@ -420,7 +420,7 @@ export default {
})
getProductDetail(that.id, from)
.then(res => {
res.data.storeInfo.description = res.data.storeInfo.description.replace(/\<img/g, "<img style='max-width: 100%;height:auto;display:block;'")
res.data.storeInfo.description = res.data.storeInfo.description.replace(/\<img/g, "<img style='max-width: 100%;height:auto;display:block;'")
that.$set(that, 'storeInfo', res.data.storeInfo)
// attr attr
that.$set(that.attr, 'productAttr', res.data.productAttr)
@ -984,7 +984,9 @@ export default {
-ms-filter: blur(2px);
filter: blur(2px);
}
.product-con .product-intro .conter{
text-align: center;
}
.product-con .product-intro .conter view {
width: 100% !important;
}

15
pages/user/editNeeds/index.vue

@ -72,8 +72,10 @@
</view>
</view>
</view>
<button class="submit-btn" form-type="submit" data-type="1">保存并提交</button>
<button class="submit-btn" form-type="submit" data-type="0">保存到草稿箱</button>
<view class="btn-box acea-row row-center">
<button class="submit-btn default-btn" form-type="submit" data-type="0">保存到草稿箱</button>
<button class="submit-btn" form-type="submit" data-type="1">保存并提交</button>
</view>
</form>
</view>
@ -387,7 +389,7 @@ export default {
color:#666666;
}
.form-item{
margin-bottom: 60rpx;
margin-bottom: 20rpx;
}
.red{
@ -402,7 +404,7 @@ export default {
padding: 10rpx 22rpx;
background: #eee;
color: #666;
margin-top: 36rpx;
margin-top: 26rpx;
}
.pick-box{
width: 92%;
@ -481,7 +483,7 @@ export default {
margin: 0 14rpx;
}
.submit-btn{
width: 670rpx !important;
width: 240rpx !important;
height: 76rpx !important;
background: linear-gradient(144deg, #FFA782 0%, #FF5100 100%);
border-radius: 38rpx;
@ -492,4 +494,7 @@ export default {
margin:40rpx auto 20rpx !important;
padding: 0 !important;
}
.default-btn{
background: #BFBFBF;
}
</style>

18
pages/user/goodsManage/index.vue

@ -11,11 +11,11 @@
<view class="goods-list-box">
<view class="no-order" v-if="goodsList.length == 0"><image src="https://download.cyjyyjy.com/no-goods.png"></image></view>
<view class="goods-item" v-else v-for="item in goodsList" :key="item" @click="goGoodsCon(item)">
<view class="review-box acea-row row-between" v-if="type == 0">
<view class="status" v-if="item.status == 0">等待审核</view>
<view class="status" v-if="item.status == 1">审核通过</view>
<view class="status" v-if="item.status == -1">审核不通过</view>
<view class="message line1" v-if="item.status == -1">商品有问题</view>
<view class="review-box acea-row row-right">
<view class="info" v-if="item.status == 0">等待审核</view>
<view class="succsess" v-if="item.status == 1">审核通过</view>
<view class="status" v-if="item.status == -1">审核不通过</view>
<view class="message" v-if="item.status == -1">{{item.refuseMessage}}</view>
</view>
<view class="item-top acea-row">
<image class="goods-img" :src="item.image" mode="aspectFill"></image>
@ -61,6 +61,8 @@
},
onShow() {
this.getProducts()
let pages = getCurrentPages();
console.log(pages)
},
onReachBottom() {
this.getProducts()
@ -189,7 +191,7 @@
padding: 90rpx 40rpx 126rpx;
.goods-item{
width: 100%;
padding: 32rpx 22rpx 16rpx;
padding: 16rpx 22rpx 16rpx;
border-radius: 12rpx;
background: #fff;
font-size: 28rpx;
@ -253,6 +255,7 @@
}
.review-box{
font-size: 24rpx;
margin: 0rpx 0 16rpx;
.status{
color: #ff4949;
}
@ -263,9 +266,8 @@
color: #409eff;
}
.message{
font-size: 22rpx;
color:#ff4949;
width: 60%;
// width: 60%;
}
}
.add-btn{

21
pages/user/index.vue

@ -51,15 +51,14 @@
</view>
</view>
</view>
<view style="padding: 58rpx 40rpx 0; border-radius: 12rpx; overflow: hidden;" v-if="(userInfo.mpOpenId == 0 || !userInfo.mpOpenId) && scene == 1011">
<official-account></official-account>
</view>
<view class="menu-list-box">
<!-- 需求管理 -->
<view class="needs-menu-list">
<view class="title-box acea-row row-between-wrapper">
<view>需求管理</view>
<!-- <view class="acea-row row-middle seemore">
<text>查看全部</text>
<image src="../../images/user/arror-r.png"></image>
</view> -->
</view>
<view class="menu-list acea-row row-between">
<view class="menu-item acea-row row-column row-center-wrapper" @tap="toNeedsManage" data-type="1">
@ -238,10 +237,10 @@ export default {
authStatus: 0,
authType: 0,
completeState: "",
currentTabIndex: 4
currentTabIndex: 4,
scene: app.globalData.scene
};
},
components: {
tabbar
},
@ -300,7 +299,6 @@ export default {
},
toAuthInfo() {
let type = this.authType;
if (type == 1) {
uni.navigateTo({
url: '/pages/release/perfectCompanyInfo/index?isEdit=' + 1
@ -313,6 +311,7 @@ export default {
},
toAuth() {
uni.navigateTo({
url: '/pages/release/index'
});
@ -424,7 +423,13 @@ export default {
this.$yrouter.push('/pages/user/openStore/index')
},
toMyShop(){
this.$yrouter.push('/pages/user/myShop/index')
if(this.userInfo.store.status == 0 || this.userInfo.store.status == -1){
this.$yrouter.push('/pages/user/openStore/index')
} else{
this.$yrouter.push('/pages/user/myShop/index')
}
},
}
};

1191
pages/user/mine/index.vue

File diff suppressed because it is too large Load Diff

46
pages/user/openStore/index.vue

@ -1,5 +1,10 @@
<template>
<view class="openshop-box">
<view class="status info" v-if="status == 0">等待审核</view>
<view class="status message" v-if="status == -1">
<text>审核不通过</text>
<text class="reason">{{message}}</text>
</view>
<view class="form-box">
<view class="form-item">
<view class="label">店铺名称:<text class="colR">*</text></view>
@ -20,13 +25,13 @@
<view class="label">详细地址:<text class="colR">*</text></view>
<input type="text" v-model="detailedAddress" placeholder="请输入详细地址"/>
</view>
<view class="form-item">
<!-- <view class="form-item">
<view class="label">店铺类型:</view>
<picker mode="selector">
<view>{{region[0]}}</view>
</picker>
<image src="../../../static/images/arrow-d-g.png" class="arrow"></image>
</view>
</view> -->
<view class="form-item">
<view class="label">店铺logo:<text class="colR">*</text></view>
<view class="img-box">
@ -39,6 +44,7 @@
<textarea v-model="introduction" placeholder="请输入店铺简介" />
</view>
</view>
<view class="add-btn" @click="addShop">提交</view>
</view>
</template>
@ -55,7 +61,9 @@
introduction: '',
address: ['湖北省','武汉市','洪山区'],
image: '',
id: ''
id: '',
status: null,
message: ''
}
},
onLoad(){
@ -69,11 +77,12 @@
this.introduction = store.introduction
this.image = store.image
this.id = store.id
this.status = store.status
this.message = store.refuseMessage
}
},
methods:{
regionChange(e){
console.log(e)
this.address = e.detail.value
},
uploadImg(){
@ -107,7 +116,10 @@
duration: 1500
})
setTimeout((res)=>{
this.$yrouter.push('/pages/user/myShop/index')
// this.$yrouter.push('/pages/user/myShop/index')
uni.redirectTo({
url: '/pages/user/myShop/index'
});
},1500)
} else{
uni.showToast({
@ -134,7 +146,7 @@
min-height: 100vh;
background: #eee;
.form-box{
padding: 30rpx 40rpx;
padding: 0rpx 40rpx;
.form-item{
width: 100%;
padding: 30rpx 28rpx;
@ -192,5 +204,27 @@
border-radius: 40rpx;
margin: 110rpx auto 30rpx;
}
.status{
text-align: center;
font-size: 38rpx;
font-weight: bold;
padding-top: 32rpx;
}
.info{
color: #67c23a;
}
.succsess{
color: #409eff;
}
.message{
color:#ff4949;
display: flex;
flex-direction: column;
align-items: center;
.reason{
font-size: 26rpx;
font-weight: normal;
}
}
}
</style>

2
tabbarComponent/tabbar.vue

@ -69,7 +69,7 @@ export default {
},
methods: {
switchTab(index){
console.log(index)
// console.log(index)
// this.currentTabIndex = index
this.$emit('click', index)
}

Loading…
Cancel
Save